From 8b5886eeeec326fde5723c76bfec7f9199ca3e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Wed, 23 Jul 2014 23:53:11 +0200 Subject: [PATCH] bzr: Update recipe Untested yet, but it builds. Only for gcc2 for now, since we don't have a python package for secondary arch yet, and it needs to use libpython.so... --- dev-vcs/bzr/bzr-2.6.0.recipe | 22 ++++++++++++++--- dev-vcs/bzr/patches/bzr-2.6.0_gcc2.patchset | 26 +++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 dev-vcs/bzr/patches/bzr-2.6.0_gcc2.patchset diff --git a/dev-vcs/bzr/bzr-2.6.0.recipe b/dev-vcs/bzr/bzr-2.6.0.recipe index 140a71dff..5ac61ed67 100644 --- a/dev-vcs/bzr/bzr-2.6.0.recipe +++ b/dev-vcs/bzr/bzr-2.6.0.recipe @@ -13,7 +13,15 @@ REVISION="1" LICENSE="GNU GPL v2" COPYRIGHT="2005-2013 Canonical" -ARCHITECTURES="!x86 !x86_gcc2 !x86_64" +ARCHITECTURES="?x86_gcc2 !x86 !x86_64" +#if [ $effectiveTargetArchitecture != x86_gcc2 ]; then +# # x86_gcc2 is fine as primary target architecture as long as we're building +# # for a different secondary architecture. +# ARCHITECTURES="$ARCHITECTURES x86_gcc2" +#else +# ARCHITECTURES="$ARCHITECTURES !x86_gcc2" +#fi +SECONDARY_ARCHITECTURES="!x86" PROVIDES=" bzr = $portVersion compat >= 2.6.0 @@ -22,20 +30,28 @@ PROVIDES=" REQUIRES=" haiku >= $haikuVersion + lib:libpython2.6$secondaryArchSuffix cmd:python " BUILD_REQUIRES=" - haiku_devel >= $haikuVersion + haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libpython2.6$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:python - cmd:gcc + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:msgfmt " SOURCE_DIR="bzr-$portVersion" +if [ $effectiveTargetArchitecture = x86_gcc2 ]; then + PATCHES="bzr-2.6.0_gcc2.patchset" +fi + BUILD() { python setup.py build diff --git a/dev-vcs/bzr/patches/bzr-2.6.0_gcc2.patchset b/dev-vcs/bzr/patches/bzr-2.6.0_gcc2.patchset new file mode 100644 index 000000000..243ed716e --- /dev/null +++ b/dev-vcs/bzr/patches/bzr-2.6.0_gcc2.patchset @@ -0,0 +1,26 @@ +From c8b46da16ce878eafbc1b0837ec7df88ff7dbcfe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Wed, 23 Jul 2014 22:29:50 +0200 +Subject: [PATCH] Use gcc2 zero-length array member + +gcc2 doesn't support C99 flexible array member. +--- + bzrlib/diff-delta.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bzrlib/diff-delta.c b/bzrlib/diff-delta.c +index 0801c96..8f7e582 100644 +--- a/bzrlib/diff-delta.c ++++ b/bzrlib/diff-delta.c +@@ -151,7 +151,7 @@ struct delta_index { + entry */ + unsigned int num_entries; /* The total number of entries in this index */ + struct index_entry *last_entry; /* Pointer to the last valid entry */ +- struct index_entry *hash[]; ++ struct index_entry *hash[0]; + }; + + static unsigned int +-- +1.8.3.4 +