diff --git a/mingw-w64-atom-editor/PKGBUILD b/mingw-w64-atom-editor/PKGBUILD new file mode 100644 index 0000000000..faf2129a48 --- /dev/null +++ b/mingw-w64-atom-editor/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Ray Donnelly + +_realname=atom-editor +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=r18372.d4f7e71 +pkgrel=1 +pkgdesc='Cross-platform desktop application shell (mingw-w64)' +source=("${_realname}-${CARCH}"::"git://github.com/atom/atom#branch=master") +arch=('any') +url='https://atom.io' +license=('MIT') +options=() +shasums=('SKIP') +makedepends=("${MINGW_PACKAGE_PREFIX}-ninja" + "${MINGW_PACKAGE_PREFIX}-python2") + +pkgver() { + cd "$srcdir"/${_realname}-${CARCH} + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$srcdir"/${_realname}-${CARCH} +# git am "$srcdir"/0001-python-python2.patch +# git am "$srcdir"/0002-Add-ninja-option.patch +} + +#build() { +# cd "$srcdir"/${_realname}-${CARCH} +# export GYP_GENERATORS=ninja +## Downloads atl, directxsdk, vs2012_crt. +## ./script/update.py +# ./script/build --verbose --force +#} + +package() { + plain "Currently, attempting to make a log fails!" + plain " so for now, please call without -L option" + + cd "$srcdir"/${_realname}-${CARCH} + + export PYTHON=python2 + export INSTALL_PREFIX="${pkgdir}${MINGW_PREFIX}" + export JANKY_SHA1=$_gitref + export JANKY_BRANCH=$_gitbranch + + script/build --install-dir="${INSTALL_PREFIX}" + script/grunt install + + patch "${INSTALL_PREFIX}/bin/atom" < "$srcdir/atom-python.patch" + + sed -e "s/<%= description %>/$pkgdesc/" \ + -e "s|<%= installDir %>/share/atom/atom|/usr/bin/atom|"\ + -e "s|<%= iconName %>|atom|"\ + resources/linux/Atom.desktop.in > resources/linux/Atom.desktop + install -Dm644 resources/linux/Atom.desktop "${INSTALL_PREFIX}/share/applications/Atom.desktop" + + install -Dm644 resources/atom.png "${INSTALL_PREFIX}/share/pixmaps/atom.png" + install -Dm644 LICENSE.md "${INSTALL_PREFIX}/share/licenses/$pkgname/LICENSE.md" +} + +md5sums=('SKIP') diff --git a/mingw-w64-atom-shell/0001-python-python2.patch b/mingw-w64-atom-shell/0001-python-python2.patch index 6dbaa657c5..cd8a9d265c 100644 --- a/mingw-w64-atom-shell/0001-python-python2.patch +++ b/mingw-w64-atom-shell/0001-python-python2.patch @@ -1,7 +1,7 @@ -From b039dac0d007212b9de9b9c81abbf20bf4cfb871 Mon Sep 17 00:00:00 2001 +From 2d77dc617fc6ca38755a13c206082fd7661718db Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 22 Sep 2014 21:09:54 +0100 -Subject: [PATCH] python -> python2 +Subject: [PATCH 1/2] python -> python2 --- script/bootstrap.py | 2 +- diff --git a/mingw-w64-atom-shell/0002-Add-ninja-option.patch b/mingw-w64-atom-shell/0002-Add-ninja-option.patch new file mode 100644 index 0000000000..e0922b25e9 --- /dev/null +++ b/mingw-w64-atom-shell/0002-Add-ninja-option.patch @@ -0,0 +1,46 @@ +From 0865ea25bf981008921c1231a98c907b16e84c20 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 22 Sep 2014 22:53:17 +0100 +Subject: [PATCH 2/2] Add --ninja option + +--- + script/build.py | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/script/build.py b/script/build.py +index 6442cdc..535e904 100755 +--- a/script/build.py ++++ b/script/build.py +@@ -13,11 +13,14 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + def main(): + os.chdir(SOURCE_ROOT) + +- ninja = os.path.join('vendor', 'depot_tools', 'ninja') +- if sys.platform == 'win32': +- ninja += '.exe' +- + args = parse_args() ++ ++ ninja = args.ninja ++ if ninja == None: ++ ninja = os.path.join('vendor', 'depot_tools', 'ninja') ++ if sys.platform == 'win32': ++ ninja += '.exe' ++ + for config in args.configuration: + build_path = os.path.join('out', config) + ret = subprocess.call([ninja, '-C', build_path, args.target]) +@@ -27,6 +30,10 @@ def main(): + + def parse_args(): + parser = argparse.ArgumentParser(description='Build atom-shell') ++ parser.add_argument('-n', '--ninja', ++ help='Select ninja executable', ++ default=None, ++ required=False) + parser.add_argument('-c', '--configuration', + help='Build with Release or Debug configuration', + nargs='+', +-- +2.1.1 + diff --git a/mingw-w64-atom-shell/0002-debugging.patch b/mingw-w64-atom-shell/0002-debugging.patch new file mode 100644 index 0000000000..b307bc3c16 --- /dev/null +++ b/mingw-w64-atom-shell/0002-debugging.patch @@ -0,0 +1,24 @@ +From 8e2d3c4695ee1bed89bc812fc3183fb82825e5b5 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 22 Sep 2014 22:53:17 +0100 +Subject: [PATCH 2/2] debugging + +--- + script/build.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/script/build.py b/script/build.py +index 6442cdc..6d9b837 100755 +--- a/script/build.py ++++ b/script/build.py +@@ -17,6 +17,7 @@ def main(): + if sys.platform == 'win32': + ninja += '.exe' + ++ print "ninja is " + ninja + args = parse_args() + for config in args.configuration: + build_path = os.path.join('out', config) +-- +2.1.1 + diff --git a/mingw-w64-atom-shell/PKGBUILD b/mingw-w64-atom-shell/PKGBUILD index b88ac25e83..f220aa6266 100644 --- a/mingw-w64-atom-shell/PKGBUILD +++ b/mingw-w64-atom-shell/PKGBUILD @@ -6,7 +6,8 @@ pkgver=r2246.50ea0f0 pkgrel=1 pkgdesc='Cross-platform desktop application shell (mingw-w64)' source=("${_realname}-${CARCH}"::"git://github.com/atom/atom-shell.git#branch=master" - "0001-python-python2.patch") + "0001-python-python2.patch" + "0002-Add-ninja-option.patch") arch=('any') url='https://atom.io' license=('MIT') @@ -23,17 +24,23 @@ pkgver() { prepare() { cd "$srcdir"/${_realname}-${CARCH} git am "$srcdir"/0001-python-python2.patch + git am "$srcdir"/0002-Add-ninja-option.patch } build() { cd "$srcdir"/${_realname}-${CARCH} - ./script/build.py + export GYP_GENERATORS=ninja +# Downloads atl, directxsdk, vs2012_crt. +# ./script/update.py + ./script/build.py \ + --ninja ${MINGW_PREFIX}/bin/ninja.exe \ + --install-dir="${pkgdir}${MINGW_PREFIX}" } - package() { echo "NYI" } md5sums=('SKIP' - '4adb33db2460090857ee22f85c23dd84') + 'b320fc8b8ec791f0a884e7169fa7e5d7' + '41cc04603347974168369f16181293ab')