From 5fa612436e81d16d6c269f7dfbb51abe4edafca2 Mon Sep 17 00:00:00 2001 From: Zachary Spector Date: Sat, 14 Dec 2013 10:51:46 -0500 Subject: [PATCH 01/13] Patch during prebuild rather than regular build --- recipes/igraph/recipe.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/igraph/recipe.sh b/recipes/igraph/recipe.sh index 942fe0a5fd..cc3ff0da27 100644 --- a/recipes/igraph/recipe.sh +++ b/recipes/igraph/recipe.sh @@ -18,7 +18,8 @@ RECIPE_igraph=$RECIPES_PATH/igraph function prebuild_igraph() { - true + try patch $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch + try patch $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch } function shouldbuild_igraph() { @@ -29,8 +30,6 @@ function shouldbuild_igraph() { function build_igraph() { cd $BUILD_igraph - patch setup.py $RECIPE_igraph/setup.py.patch - patch setup.cfg $RECIPE_igraph/setup.cfg.patch push_arm try $HOSTPYTHON setup.py build_ext -I"$BUILD_PATH/python-install/include/igraph:$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include" -L"$BUILD_PATH/python-install/lib:$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi" -l gnustl_static -p arm-gnueabi install From 488ea4bbf5fee796c9218b1cfe744360690fad40 Mon Sep 17 00:00:00 2001 From: Zachary Spector Date: Mon, 23 Dec 2013 11:32:54 -0500 Subject: [PATCH 02/13] Don't fail so hard the second time you compile. --- recipes/c_igraph/recipe.sh | 10 +++++----- recipes/igraph/recipe.sh | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/c_igraph/recipe.sh b/recipes/c_igraph/recipe.sh index 02697b8e5d..70371185b6 100644 --- a/recipes/c_igraph/recipe.sh +++ b/recipes/c_igraph/recipe.sh @@ -32,15 +32,15 @@ function build_c_igraph() { cd $BUILD_c_igraph push_arm - try patch $BUILD_c_igraph/src/Makefile.am $RECIPE_c_igraph/Makefile.am.patch + patch -Nr - $BUILD_c_igraph/src/Makefile.am $RECIPE_c_igraph/Makefile.am.patch export OLD_CPPFLAGS="$CPPFLAGS" export CPPFLAGS="$CPPFLAGS -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -L$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm/usr/lib" try ./configure --prefix="$BUILD_PATH/python-install" --build=i686-pc-linux-gnu --host=arm-linux-eabi export CPPFLAGS="$OLD_CPPFLAGS" - try cp -f $RECIPE_c_igraph/arith.h $BUILD_c_igraph/src/f2c/arith.h - try patch $BUILD_c_igraph/src/f2c/sysdep1.h $RECIPE_c_igraph/sysdep1.h.patch - try patch $BUILD_c_igraph/src/f2c/uninit.c $RECIPE_c_igraph/uninit.c.patch - try patch $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch + cp -f $RECIPE_c_igraph/arith.h $BUILD_c_igraph/src/f2c/arith.h + patch -Nr - $BUILD_c_igraph/src/f2c/sysdep1.h $RECIPE_c_igraph/sysdep1.h.patch + patch -Nr - $BUILD_c_igraph/src/f2c/uninit.c $RECIPE_c_igraph/uninit.c.patch + patch -N $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch try $MAKE try $MAKE install diff --git a/recipes/igraph/recipe.sh b/recipes/igraph/recipe.sh index cc3ff0da27..5d76d1d753 100644 --- a/recipes/igraph/recipe.sh +++ b/recipes/igraph/recipe.sh @@ -18,8 +18,8 @@ RECIPE_igraph=$RECIPES_PATH/igraph function prebuild_igraph() { - try patch $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch - try patch $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch + patch -Nr - $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch + patch -Nr - $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch } function shouldbuild_igraph() { From 5c8b109605b9b30c24c1f28525a42b44d9416350 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Fri, 27 Dec 2013 23:28:53 -0200 Subject: [PATCH 03/13] Custom actions and categories for BroadcastReceiver android.broadcast.BroadcastReceiver now accepts non-standard actions & categories. Detects by checking the presence of '.' on the name of it --- recipes/android/src/android/broadcast.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/recipes/android/src/android/broadcast.py b/recipes/android/src/android/broadcast.py index 4f6aebcabc..61354bf2dd 100644 --- a/recipes/android/src/android/broadcast.py +++ b/recipes/android/src/android/broadcast.py @@ -29,18 +29,26 @@ def __init__(self, callback, actions=None, categories=None): resolved_actions = [] if actions: for x in actions: - name = 'ACTION_{}'.format(x.upper()) - if not hasattr(Intent, name): - raise Exception('The intent {} doesnt exist'.format(name)) - resolved_actions += [getattr(Intent, name)] + if '.' in x: + full_name = x + else: + name = 'ACTION_{}'.format(x.upper()) + if not hasattr(Intent, name): + raise Exception('The intent {} doesnt exist'.format(name)) + full_name = getattr(Intent, name) + resolved_actions += [full_name] resolved_categories = [] if categories: for x in categories: - name = 'CATEGORY_{}'.format(x.upper()) - if not hasattr(Intent, name): - raise Exception('The intent {} doesnt exist'.format(name)) - resolved_categories += [getattr(Intent, name)] + if '.' in x: + full_name = x + else: + name = 'CATEGORY_{}'.format(x.upper()) + if not hasattr(Intent, name): + raise Exception('The intent {} doesnt exist'.format(name)) + full_name = getattr(Intent, name) + resolved_categories += [full_name] # resolve android API PythonActivity = autoclass('org.renpy.android.PythonActivity') From c9af9fa78eea97a0760b0c6d452f2df820e260c6 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Fri, 27 Dec 2013 23:38:58 -0200 Subject: [PATCH 04/13] Factored out the Intent name expansion --- recipes/android/src/android/broadcast.py | 27 ++++++++++-------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/recipes/android/src/android/broadcast.py b/recipes/android/src/android/broadcast.py index 61354bf2dd..88223e02ea 100644 --- a/recipes/android/src/android/broadcast.py +++ b/recipes/android/src/android/broadcast.py @@ -24,31 +24,26 @@ def __init__(self, callback, actions=None, categories=None): if not actions and not categories: raise Exception('You need to define at least actions or categories') + def _expand_partial_name(partial_name): + if '.' in partial_name: + return partial_name # Its actually a full dotted name + else: + name = 'ACTION_{}'.format(partial_name.upper()) + if not hasattr(Intent, name): + raise Exception('The intent {} doesnt exist'.format(name)) + return getattr(Intent, name) + # resolve actions/categories first Intent = autoclass('android.content.Intent') resolved_actions = [] if actions: for x in actions: - if '.' in x: - full_name = x - else: - name = 'ACTION_{}'.format(x.upper()) - if not hasattr(Intent, name): - raise Exception('The intent {} doesnt exist'.format(name)) - full_name = getattr(Intent, name) - resolved_actions += [full_name] + resolved_actions += [_expand_partial_name(x)] resolved_categories = [] if categories: for x in categories: - if '.' in x: - full_name = x - else: - name = 'CATEGORY_{}'.format(x.upper()) - if not hasattr(Intent, name): - raise Exception('The intent {} doesnt exist'.format(name)) - full_name = getattr(Intent, name) - resolved_categories += [full_name] + resolved_categories += [_expand_partial_name(x)] # resolve android API PythonActivity = autoclass('org.renpy.android.PythonActivity') From 32ada4265d62ec5ea14646d4d2f22450b105ba2a Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Fri, 27 Dec 2013 23:42:00 -0200 Subject: [PATCH 05/13] Simplified via list comprehensions --- recipes/android/src/android/broadcast.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/recipes/android/src/android/broadcast.py b/recipes/android/src/android/broadcast.py index 88223e02ea..aaaae453dc 100644 --- a/recipes/android/src/android/broadcast.py +++ b/recipes/android/src/android/broadcast.py @@ -35,15 +35,8 @@ def _expand_partial_name(partial_name): # resolve actions/categories first Intent = autoclass('android.content.Intent') - resolved_actions = [] - if actions: - for x in actions: - resolved_actions += [_expand_partial_name(x)] - - resolved_categories = [] - if categories: - for x in categories: - resolved_categories += [_expand_partial_name(x)] + resolved_actions = [_expand_partial_name(x) for x in actions] + resolved_categories = [_expand_partial_name(x) for x in categories] # resolve android API PythonActivity = autoclass('org.renpy.android.PythonActivity') From 1385f382e71968580079385e76016592adde1fe3 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Fri, 10 Jan 2014 11:28:48 -0200 Subject: [PATCH 06/13] Oops: was broken if categories[] empty --- recipes/android/src/android/broadcast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/android/src/android/broadcast.py b/recipes/android/src/android/broadcast.py index aaaae453dc..452efbc0e3 100644 --- a/recipes/android/src/android/broadcast.py +++ b/recipes/android/src/android/broadcast.py @@ -35,8 +35,8 @@ def _expand_partial_name(partial_name): # resolve actions/categories first Intent = autoclass('android.content.Intent') - resolved_actions = [_expand_partial_name(x) for x in actions] - resolved_categories = [_expand_partial_name(x) for x in categories] + resolved_actions = [_expand_partial_name(x) for x in actions or []] + resolved_categories = [_expand_partial_name(x) for x in categories or []] # resolve android API PythonActivity = autoclass('org.renpy.android.PythonActivity') From 111bfbbc86048ab924a757062ef5cce03d3f2ab1 Mon Sep 17 00:00:00 2001 From: Baptiste Lagarde Date: Wed, 5 Feb 2014 01:27:54 +1100 Subject: [PATCH 07/13] ADD: django recipe --- recipes/django/recipe.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 recipes/django/recipe.sh diff --git a/recipes/django/recipe.sh b/recipes/django/recipe.sh new file mode 100644 index 0000000000..99fb45f7ea --- /dev/null +++ b/recipes/django/recipe.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +VERSION_django=${VERSION_django:-1.6.1} +DEPS_django=(sqlite3) +URL_django=https://pypi.python.org/packages/source/D/Django/Django-$VERSION_django.tar.gz +MD5_django=3ea7a00ea9e7a014e8a4067dd6466a1b +BUILD_django=$BUILD_PATH/django/$(get_directory $URL_django) +RECIPE_django=$RECIPES_PATH/django + +function prebuild_django() { + true +} + +function build_django() { + cd $BUILD_django + push_arm + try $HOSTPYTHON setup.py install + pop_arm +} + +function postbuild_django() { + # ensure the blacklist doesn't contain wsgiref or unittest + $SED '/unittest/d' $BUILD_PATH/blacklist.txt + $SED '/wsgiref/d' $BUILD_PATH/blacklist.txt +} From 99c7a3e617643567b178229256e3bebb9b570ac8 Mon Sep 17 00:00:00 2001 From: Baptiste Lagarde Date: Wed, 5 Feb 2014 18:32:28 +1100 Subject: [PATCH 08/13] FIX: Don't rebuild django if it is already there --- recipes/django/recipe.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/django/recipe.sh b/recipes/django/recipe.sh index 99fb45f7ea..fe8a257363 100644 --- a/recipes/django/recipe.sh +++ b/recipes/django/recipe.sh @@ -11,6 +11,12 @@ function prebuild_django() { true } +function shouldbuild_django() { + if [ -d "$SITEPACKAGES_PATH/django" ]; then + DO_BUILD=0 + fi +} + function build_django() { cd $BUILD_django push_arm From 244e28b1c79e3bd62f0202b344c55249755e7450 Mon Sep 17 00:00:00 2001 From: Zachary Spector Date: Thu, 13 Feb 2014 08:20:44 -0500 Subject: [PATCH 09/13] Now you can run a distribute recipe involving igraph twice in a row without patch errors --- recipes/c_igraph/recipe.sh | 26 ++++++++++++++++---------- recipes/igraph/recipe.sh | 11 +++++++---- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/recipes/c_igraph/recipe.sh b/recipes/c_igraph/recipe.sh index 02697b8e5d..cdd2e628de 100644 --- a/recipes/c_igraph/recipe.sh +++ b/recipes/c_igraph/recipe.sh @@ -19,7 +19,14 @@ BUILD_c_igraph=$BUILD_PATH/c_igraph/$(get_directory $URL_c_igraph) RECIPE_c_igraph=$RECIPES_PATH/c_igraph function prebuild_c_igraph() { - true + if [ ! -e $BUILD_c_igraph/.patched ]; then { + try patch $BUILD_c_igraph/src/Makefile.am $RECIPE_c_igraph/Makefile.am.patch; + try cp -f $RECIPE_c_igraph/arith.h $BUILD_c_igraph/src/f2c/arith.h; + try patch $BUILD_c_igraph/src/f2c/sysdep1.h $RECIPE_c_igraph/sysdep1.h.patch; + try patch $BUILD_c_igraph/src/f2c/uninit.c $RECIPE_c_igraph/uninit.c.patch; + touch $BUILD_c_igraph/.patched; + } + fi } function shouldbuild_c_igraph() { @@ -32,15 +39,14 @@ function build_c_igraph() { cd $BUILD_c_igraph push_arm - try patch $BUILD_c_igraph/src/Makefile.am $RECIPE_c_igraph/Makefile.am.patch - export OLD_CPPFLAGS="$CPPFLAGS" - export CPPFLAGS="$CPPFLAGS -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -L$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm/usr/lib" - try ./configure --prefix="$BUILD_PATH/python-install" --build=i686-pc-linux-gnu --host=arm-linux-eabi - export CPPFLAGS="$OLD_CPPFLAGS" - try cp -f $RECIPE_c_igraph/arith.h $BUILD_c_igraph/src/f2c/arith.h - try patch $BUILD_c_igraph/src/f2c/sysdep1.h $RECIPE_c_igraph/sysdep1.h.patch - try patch $BUILD_c_igraph/src/f2c/uninit.c $RECIPE_c_igraph/uninit.c.patch - try patch $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch + if [ ! -e $BUILD_c_igraph/config.h ]; then { + export OLD_CPPFLAGS="$CPPFLAGS"; + export CPPFLAGS="$CPPFLAGS -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -L$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm/usr/lib"; + try ./configure --prefix="$BUILD_PATH/python-install" --build=i686-pc-linux-gnu --host=arm-linux-eabi; + try patch $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch; + export CPPFLAGS="$OLD_CPPFLAGS"; + } + fi try $MAKE try $MAKE install diff --git a/recipes/igraph/recipe.sh b/recipes/igraph/recipe.sh index 942fe0a5fd..e846d29f4f 100644 --- a/recipes/igraph/recipe.sh +++ b/recipes/igraph/recipe.sh @@ -1,4 +1,4 @@ -b#!/bin/bash +#!/bin/bash # Recipe for the Python interface to igraph, a high-performance graph library in C: http://igraph.org/ # @@ -18,7 +18,12 @@ RECIPE_igraph=$RECIPES_PATH/igraph function prebuild_igraph() { - true + if [ ! -f "$BUILD_igraph/.patched" ]; then { + try patch $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch + try patch $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch + touch $BUILD_igraph/.patched + }; + fi } function shouldbuild_igraph() { @@ -29,8 +34,6 @@ function shouldbuild_igraph() { function build_igraph() { cd $BUILD_igraph - patch setup.py $RECIPE_igraph/setup.py.patch - patch setup.cfg $RECIPE_igraph/setup.cfg.patch push_arm try $HOSTPYTHON setup.py build_ext -I"$BUILD_PATH/python-install/include/igraph:$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include" -L"$BUILD_PATH/python-install/lib:$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi" -l gnustl_static -p arm-gnueabi install From 933660b1979287b866b279de9a6beba57ccddd44 Mon Sep 17 00:00:00 2001 From: Zachary Spector Date: Sat, 14 Dec 2013 10:51:46 -0500 Subject: [PATCH 10/13] Patch during prebuild rather than regular build --- recipes/igraph/recipe.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/igraph/recipe.sh b/recipes/igraph/recipe.sh index 942fe0a5fd..cc3ff0da27 100644 --- a/recipes/igraph/recipe.sh +++ b/recipes/igraph/recipe.sh @@ -18,7 +18,8 @@ RECIPE_igraph=$RECIPES_PATH/igraph function prebuild_igraph() { - true + try patch $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch + try patch $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch } function shouldbuild_igraph() { @@ -29,8 +30,6 @@ function shouldbuild_igraph() { function build_igraph() { cd $BUILD_igraph - patch setup.py $RECIPE_igraph/setup.py.patch - patch setup.cfg $RECIPE_igraph/setup.cfg.patch push_arm try $HOSTPYTHON setup.py build_ext -I"$BUILD_PATH/python-install/include/igraph:$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include" -L"$BUILD_PATH/python-install/lib:$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi" -l gnustl_static -p arm-gnueabi install From c3b1f64ff9db24f904f440caca1251cd0b56c42e Mon Sep 17 00:00:00 2001 From: Zachary Spector Date: Mon, 23 Dec 2013 11:32:54 -0500 Subject: [PATCH 11/13] Don't fail so hard the second time you compile. --- recipes/c_igraph/recipe.sh | 10 +++++----- recipes/igraph/recipe.sh | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/c_igraph/recipe.sh b/recipes/c_igraph/recipe.sh index 02697b8e5d..70371185b6 100644 --- a/recipes/c_igraph/recipe.sh +++ b/recipes/c_igraph/recipe.sh @@ -32,15 +32,15 @@ function build_c_igraph() { cd $BUILD_c_igraph push_arm - try patch $BUILD_c_igraph/src/Makefile.am $RECIPE_c_igraph/Makefile.am.patch + patch -Nr - $BUILD_c_igraph/src/Makefile.am $RECIPE_c_igraph/Makefile.am.patch export OLD_CPPFLAGS="$CPPFLAGS" export CPPFLAGS="$CPPFLAGS -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -L$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm/usr/lib" try ./configure --prefix="$BUILD_PATH/python-install" --build=i686-pc-linux-gnu --host=arm-linux-eabi export CPPFLAGS="$OLD_CPPFLAGS" - try cp -f $RECIPE_c_igraph/arith.h $BUILD_c_igraph/src/f2c/arith.h - try patch $BUILD_c_igraph/src/f2c/sysdep1.h $RECIPE_c_igraph/sysdep1.h.patch - try patch $BUILD_c_igraph/src/f2c/uninit.c $RECIPE_c_igraph/uninit.c.patch - try patch $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch + cp -f $RECIPE_c_igraph/arith.h $BUILD_c_igraph/src/f2c/arith.h + patch -Nr - $BUILD_c_igraph/src/f2c/sysdep1.h $RECIPE_c_igraph/sysdep1.h.patch + patch -Nr - $BUILD_c_igraph/src/f2c/uninit.c $RECIPE_c_igraph/uninit.c.patch + patch -N $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch try $MAKE try $MAKE install diff --git a/recipes/igraph/recipe.sh b/recipes/igraph/recipe.sh index cc3ff0da27..5d76d1d753 100644 --- a/recipes/igraph/recipe.sh +++ b/recipes/igraph/recipe.sh @@ -18,8 +18,8 @@ RECIPE_igraph=$RECIPES_PATH/igraph function prebuild_igraph() { - try patch $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch - try patch $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch + patch -Nr - $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch + patch -Nr - $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch } function shouldbuild_igraph() { From 9f0624508e7cd4572acd7caff056371335a83066 Mon Sep 17 00:00:00 2001 From: Zachary Spector Date: Thu, 13 Feb 2014 08:20:44 -0500 Subject: [PATCH 12/13] Now you can run a distribute recipe involving igraph twice in a row without patch errors --- recipes/c_igraph/recipe.sh | 27 +++++++++++++++++---------- recipes/igraph/recipe.sh | 10 +++++++--- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/recipes/c_igraph/recipe.sh b/recipes/c_igraph/recipe.sh index 70371185b6..96525dfbfb 100644 --- a/recipes/c_igraph/recipe.sh +++ b/recipes/c_igraph/recipe.sh @@ -19,7 +19,14 @@ BUILD_c_igraph=$BUILD_PATH/c_igraph/$(get_directory $URL_c_igraph) RECIPE_c_igraph=$RECIPES_PATH/c_igraph function prebuild_c_igraph() { - true + if [ ! -e $BUILD_c_igraph/.patched ]; then { + try patch $BUILD_c_igraph/src/Makefile.am $RECIPE_c_igraph/Makefile.am.patch; + try cp -f $RECIPE_c_igraph/arith.h $BUILD_c_igraph/src/f2c/arith.h; + try patch $BUILD_c_igraph/src/f2c/sysdep1.h $RECIPE_c_igraph/sysdep1.h.patch; + try patch $BUILD_c_igraph/src/f2c/uninit.c $RECIPE_c_igraph/uninit.c.patch; + touch $BUILD_c_igraph/.patched; + } + fi } function shouldbuild_c_igraph() { @@ -32,15 +39,15 @@ function build_c_igraph() { cd $BUILD_c_igraph push_arm - patch -Nr - $BUILD_c_igraph/src/Makefile.am $RECIPE_c_igraph/Makefile.am.patch - export OLD_CPPFLAGS="$CPPFLAGS" - export CPPFLAGS="$CPPFLAGS -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -L$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm/usr/lib" - try ./configure --prefix="$BUILD_PATH/python-install" --build=i686-pc-linux-gnu --host=arm-linux-eabi - export CPPFLAGS="$OLD_CPPFLAGS" - cp -f $RECIPE_c_igraph/arith.h $BUILD_c_igraph/src/f2c/arith.h - patch -Nr - $BUILD_c_igraph/src/f2c/sysdep1.h $RECIPE_c_igraph/sysdep1.h.patch - patch -Nr - $BUILD_c_igraph/src/f2c/uninit.c $RECIPE_c_igraph/uninit.c.patch - patch -N $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch + if [ ! -e $BUILD_c_igraph/config.h ]; then { + export OLD_CPPFLAGS="$CPPFLAGS"; + export CPPFLAGS="$CPPFLAGS -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -L$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm/usr/lib"; + try ./configure --prefix="$BUILD_PATH/python-install" --build=i686-pc-linux-gnu --host=arm-linux-eabi; + try patch $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch; + export CPPFLAGS="$OLD_CPPFLAGS"; + } + fi + try $MAKE try $MAKE install diff --git a/recipes/igraph/recipe.sh b/recipes/igraph/recipe.sh index 5d76d1d753..e846d29f4f 100644 --- a/recipes/igraph/recipe.sh +++ b/recipes/igraph/recipe.sh @@ -1,4 +1,4 @@ -b#!/bin/bash +#!/bin/bash # Recipe for the Python interface to igraph, a high-performance graph library in C: http://igraph.org/ # @@ -18,8 +18,12 @@ RECIPE_igraph=$RECIPES_PATH/igraph function prebuild_igraph() { - patch -Nr - $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch - patch -Nr - $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch + if [ ! -f "$BUILD_igraph/.patched" ]; then { + try patch $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch + try patch $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch + touch $BUILD_igraph/.patched + }; + fi } function shouldbuild_igraph() { From 2ee34a9c67f395f49af382c06290ca62255ce811 Mon Sep 17 00:00:00 2001 From: Zachary Spector Date: Thu, 13 Feb 2014 09:58:06 -0500 Subject: [PATCH 13/13] remove extraneous {} --- recipes/c_igraph/recipe.sh | 13 ++++++------- recipes/igraph/recipe.sh | 9 ++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/recipes/c_igraph/recipe.sh b/recipes/c_igraph/recipe.sh index 740152db9d..854671a305 100644 --- a/recipes/c_igraph/recipe.sh +++ b/recipes/c_igraph/recipe.sh @@ -39,13 +39,12 @@ function build_c_igraph() { cd $BUILD_c_igraph push_arm - if [ ! -e $BUILD_c_igraph/config.h ]; then { - export OLD_CPPFLAGS="$CPPFLAGS"; - export CPPFLAGS="$CPPFLAGS -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -L$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm/usr/lib"; - try ./configure --prefix="$BUILD_PATH/python-install" --build=i686-pc-linux-gnu --host=arm-linux-eabi; - try patch $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch; - export CPPFLAGS="$OLD_CPPFLAGS"; - } + if [ ! -e $BUILD_c_igraph/config.h ]; then + export OLD_CPPFLAGS="$CPPFLAGS"; + export CPPFLAGS="$CPPFLAGS -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I$ANDROIDNDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -L$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm/usr/lib"; + try ./configure --prefix="$BUILD_PATH/python-install" --build=i686-pc-linux-gnu --host=arm-linux-eabi; + try patch $BUILD_c_igraph/config.h $RECIPE_c_igraph/config.h.patch; + export CPPFLAGS="$OLD_CPPFLAGS"; fi diff --git a/recipes/igraph/recipe.sh b/recipes/igraph/recipe.sh index e846d29f4f..6d87611c6d 100644 --- a/recipes/igraph/recipe.sh +++ b/recipes/igraph/recipe.sh @@ -18,11 +18,10 @@ RECIPE_igraph=$RECIPES_PATH/igraph function prebuild_igraph() { - if [ ! -f "$BUILD_igraph/.patched" ]; then { - try patch $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch - try patch $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch - touch $BUILD_igraph/.patched - }; + if [ ! -f "$BUILD_igraph/.patched" ]; then + try patch $BUILD_igraph/setup.py $RECIPE_igraph/setup.py.patch + try patch $BUILD_igraph/setup.cfg $RECIPE_igraph/setup.cfg.patch + touch $BUILD_igraph/.patched fi }