From e212d196d817c5e2d3115d7b4b33d36cf9e94ee9 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 30 Sep 2017 13:39:13 +0000 Subject: [PATCH] Add recipe for boost_build * needs Korli's wait4() patch, otherwise it crashes. --- .../boost_build/boost_build-1.64.0.recipe | 44 +++++++++++++ dev-util/boost_build/licenses/Boost v1.0 | 23 +++++++ .../patches/boost_build-1.64.0.patchset | 66 +++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 dev-util/boost_build/boost_build-1.64.0.recipe create mode 100644 dev-util/boost_build/licenses/Boost v1.0 create mode 100644 dev-util/boost_build/patches/boost_build-1.64.0.patchset diff --git a/dev-util/boost_build/boost_build-1.64.0.recipe b/dev-util/boost_build/boost_build-1.64.0.recipe new file mode 100644 index 000000000..f8625ae9a --- /dev/null +++ b/dev-util/boost_build/boost_build-1.64.0.recipe @@ -0,0 +1,44 @@ +SUMMARY="Makes it easy to build C++ projects, everywhere" +DESCRIPTION="You name your executables and libraries and list their sources. \ +Boost.Build takes care about compiling your sources with right options, \ +creating static and shared libraries, making executables, and other chores — \ +whether you're using gcc, msvc, or a dozen more supported C++ compilers — on \ +Windows, OSX, Linux and commercial UNIX systems." +HOMEPAGE="http://www.boost.org/build/index.html" +COPYRIGHT="2006, 2014 Vladimir Prus" +LICENSE="Boost v1.0" +SOURCE_URI="https://github.com/boostorg/build/archive/boost-$portVersion.tar.gz" +CHECKSUM_SHA256="08df6f0e32c59e51a134e598b29a3dacb415a58e4494635b82a071d43a1e3631" +SOURCE_DIR="build-boost-$portVersion" +PATCHES="boost_build-$portVersion.patchset" +REVISION="1" + +ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + boost_build$secondaryArchSuffix + cmd:b2$secondaryArchSuffix + cmd:bjam$secondaryArchSuffix + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + " + +BUILD() +{ + export LIBS=-lbsd + sh bootstrap.sh +} + +INSTALL() +{ + runConfigure ./b2 install +} diff --git a/dev-util/boost_build/licenses/Boost v1.0 b/dev-util/boost_build/licenses/Boost v1.0 new file mode 100644 index 000000000..36b7cd93c --- /dev/null +++ b/dev-util/boost_build/licenses/Boost v1.0 @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/dev-util/boost_build/patches/boost_build-1.64.0.patchset b/dev-util/boost_build/patches/boost_build-1.64.0.patchset new file mode 100644 index 000000000..3fdd4bf3c --- /dev/null +++ b/dev-util/boost_build/patches/boost_build-1.64.0.patchset @@ -0,0 +1,66 @@ +From f2f840dae93844a5edfed4830ebf41511e1e05bf Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sat, 30 Sep 2017 13:03:23 +0000 +Subject: Hack in Haiku support + + +diff --git a/src/engine/Jambase b/src/engine/Jambase +index a736e26..7b0ab8b 100644 +--- a/src/engine/Jambase ++++ b/src/engine/Jambase +@@ -51,7 +51,7 @@ BOOST_BUILD_PATH.user-value = $(BOOST_BUILD_PATH) ; + # Policy. + if ! $(BOOST_BUILD_PATH) && $(UNIX) + { +- BOOST_BUILD_PATH = /usr/share/boost-build ; ++ BOOST_BUILD_PATH = /system/data/boost-build ; + } + + +diff --git a/src/engine/build.jam b/src/engine/build.jam +index 842296a..96c30cf 100644 +--- a/src/engine/build.jam ++++ b/src/engine/build.jam +@@ -220,7 +220,7 @@ toolset gcc gcc : "-o " : -D + [ opt --debug : -g -O0 -fno-inline ] + [ opt --profile : -O3 -g -pg ] + -I$(--python-include) -I$(--extra-include) -Wno-long-long +- : -L$(--python-lib[1]) -l$(--python-lib[2]) ; ++ : -L$(--python-lib[1]) -l$(--python-lib[2]) -lbsd ; + ## GCC 2.x, 3.x on CYGWIN but without cygwin1.dll + toolset gcc-nocygwin gcc : "-o " : -D + : -s -O3 -mno-cygwin +diff --git a/src/engine/build.sh b/src/engine/build.sh +index 1d0dcc8..cb74e62 100755 +--- a/src/engine/build.sh ++++ b/src/engine/build.sh +@@ -148,6 +148,13 @@ case $BOOST_JAM_TOOLSET in + BOOST_JAM_OS="NT" + ;; + ++ *haiku*) ++ BOOST_JAM_CC=gcc ++ BOOST_JAM_OPT_JAM="$BOOST_JAM_OPT_JAM $CFLAGS -lbsd" ++ BOOST_JAM_OPT_MKJAMBASE="$BOOST_JAM_OPT_MKJAMBASE $CFLAGS -lbsd" ++ BOOST_JAM_OPT_YYACC="$BOOST_JAM_OPT_YYACC $CFLAGS -lbsd" ++ ;; ++ + *) + BOOST_JAM_CC=gcc + esac +diff --git a/src/engine/jambase.c b/src/engine/jambase.c +index 80a7e12..e7da28f 100644 +--- a/src/engine/jambase.c ++++ b/src/engine/jambase.c +@@ -21,7 +21,7 @@ char *jambase[] = { + "BOOST_BUILD_PATH.user-value = $(BOOST_BUILD_PATH) ;\n", + "if ! $(BOOST_BUILD_PATH) && $(UNIX)\n", + "{\n", +-"BOOST_BUILD_PATH = /usr/share/boost-build ;\n", ++"BOOST_BUILD_PATH = /system/data/boost-build ;\n", + "}\n", + "rule _poke ( module-name ? : variables + : value * )\n", + "{\n", +-- +2.7.0 +