summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMCApollo <34170230+MCApollo@users.noreply.github.com>2019-04-03 04:50:42 +0000
committerSam Bingner <sam@bingner.com>2019-04-09 23:20:46 -1000
commit877cdf66631fbb2a04f7f98b45be1362bc4eb75d (patch)
treec369a5eba6867e930cc66fe2ea800ef95d12e092
parentbb4e6a8ad361e6f5fb64ef17ee32da512e431c66 (diff)
Fix buildling boost on linux, improved bjam arguments.boost-work-in-progress
-rw-r--r--data/boost/_metadata/description2
-rw-r--r--data/boost/clang.jam.diff27
-rw-r--r--data/boost/darwin.jam.diff235
-rw-r--r--data/boost/make.sh15
-rw-r--r--data/boost/os-feature.jam.diff11
5 files changed, 285 insertions, 5 deletions
diff --git a/data/boost/_metadata/description b/data/boost/_metadata/description
index 632f0918d..6508b34d5 100644
--- a/data/boost/_metadata/description
+++ b/data/boost/_metadata/description
@@ -1 +1 @@
-soon-to-be-standardized C++ class library
+collection of portable C++ source libraries
diff --git a/data/boost/clang.jam.diff b/data/boost/clang.jam.diff
new file mode 100644
index 000000000..33e32ff79
--- /dev/null
+++ b/data/boost/clang.jam.diff
@@ -0,0 +1,27 @@
+--- a/tools/build/src/tools/clang.jam 2018-08-01 15:50:55.000000000 -0500
++++ b/tools/build/src/tools/clang.jam 2019-03-09 22:50:30.536048163 -0600
+@@ -17,16 +17,16 @@
+
+ rule init ( * : * )
+ {
+- if [ os.name ] = MACOSX
+- {
++# if [ os.name ] = MACOSX
++# {
+ toolset.using clang-darwin :
+ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+- }
+- else
+- {
+- toolset.using clang-linux :
+- $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+- }
++# }
++# else
++# {
++# toolset.using clang-linux :
++# $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
++# }
+ }
+
+
diff --git a/data/boost/darwin.jam.diff b/data/boost/darwin.jam.diff
new file mode 100644
index 000000000..9503b9db2
--- /dev/null
+++ b/data/boost/darwin.jam.diff
@@ -0,0 +1,235 @@
+--- a/tools/build/src/tools/darwin.jam 2018-08-01 15:50:55.000000000 -0500
++++ b/tools/build/src/tools/darwin.jam 2019-03-10 00:29:34.859932848 -0600
+@@ -199,7 +199,7 @@
+ }
+
+ # - Initialize the SDKs available in the root for this tool.
+- local sdks = [ init-available-sdk-versions $(condition) : $(root) ] ;
++# local sdks = [ init-available-sdk-versions $(condition) : $(root) ] ;
+
+ #~ ECHO --- ;
+ #~ ECHO --- bin :: $(bin) ;
+@@ -213,200 +213,6 @@
+ #~ EXIT ;
+ }
+
+-# Add and set options for a discovered SDK version.
+-local rule init-sdk ( condition * : root ? : version + : version-feature ? )
+-{
+- local rule version-to-feature ( version + )
+- {
+- switch $(version[1])
+- {
+- case appletv* :
+- {
+- return $(version[1])-$(version[2-]:J=.) ;
+- }
+- case iphone* :
+- {
+- return $(version[1])-$(version[2-]:J=.) ;
+- }
+- case mac* :
+- {
+- return $(version[2-]:J=.) ;
+- }
+- case * :
+- {
+- return $(version:J=.) ;
+- }
+- }
+- }
+-
+- if $(version-feature)
+- {
+- if $(.debug-configuration)
+- {
+- ECHO notice\: available sdk for $(condition)/<macosx-version>$(version-feature) at $(root) ;
+- }
+-
+- # Add the version to the features for specifying them.
+- if ! $(version-feature) in [ feature.values macosx-version ]
+- {
+- feature.extend macosx-version : $(version-feature) ;
+- }
+- if ! $(version-feature) in [ feature.values macosx-version-min ]
+- {
+- feature.extend macosx-version-min : $(version-feature) ;
+- }
+-
+- # Set the flags the version needs to compile with, first
+- # generic options.
+- flags darwin.compile OPTIONS $(condition)/<macosx-version>$(version-feature)
+- : -isysroot $(root) ;
+- flags darwin.link OPTIONS $(condition)/<macosx-version>$(version-feature)
+- : -isysroot $(root) ;
+-
+- # Then device variation options.
+- switch $(version[1])
+- {
+- case appletvsim* :
+- {
+- local N = $(version[2]) ;
+- if ! $(version[3]) { N += 00 ; }
+- else if [ regex.match (..) : $(version[3]) ] { N += $(version[3]) ; }
+- else { N += 0$(version[3]) ; }
+- if ! $(version[4]) { N += 00 ; }
+- else if [ regex.match (..) : $(version[4]) ] { N += $(version[4]) ; }
+- else { N += 0$(version[4]) ; }
+- N = $(N:J=) ;
+- flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+- : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ;
+- flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+- : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ;
+- }
+-
+- case appletv* :
+- {
+- flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+- : -mtvos-version-min=$(version[2-]:J=.) ;
+- flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+- : -mtvos-version-min=$(version[2-]:J=.) ;
+- }
+-
+- case iphonesim* :
+- {
+- local N = $(version[2]) ;
+- if ! $(version[3]) { N += 00 ; }
+- else if [ regex.match (..) : $(version[3]) ] { N += $(version[3]) ; }
+- else { N += 0$(version[3]) ; }
+- if ! $(version[4]) { N += 00 ; }
+- else if [ regex.match (..) : $(version[4]) ] { N += $(version[4]) ; }
+- else { N += 0$(version[4]) ; }
+- N = $(N:J=) ;
+- flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+- : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ;
+- flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+- : -D__IPHONE_OS_VERSION_MIN_REQUIRED=$(N) ;
+- }
+-
+- case iphone* :
+- {
+- flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+- : -miphoneos-version-min=$(version[2-]:J=.) ;
+- flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+- : -miphoneos-version-min=$(version[2-]:J=.) ;
+- }
+-
+- case mac* :
+- {
+- flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
+- : -mmacosx-version-min=$(version[2-]:J=.) ;
+- flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
+- : -mmacosx-version-min=$(version[2-]:J=.) ;
+- }
+- }
+-
+- if $(version[3]) > 0
+- {
+- # We have a minor version of an SDK. We want to set up
+- # previous minor versions, plus the current minor version.
+- # So we recurse to set up the previous minor versions, up to
+- # the current version.
+- local minor-minus-1 = [ CALC $(version[3]) - 1 ] ;
+- return
+- [ init-sdk $(condition) : $(root)
+- : $(version[1-2]) $(minor-minus-1) : [ version-to-feature $(version[1-2]) $(minor-minus-1) ] ]
+- $(version-feature) ;
+- }
+- else
+- {
+- return $(version-feature) ;
+- }
+- }
+- else if $(version[4])
+- {
+- # We have a patch version of an SDK. We want to set up
+- # both the specific patch version, and the minor version.
+- # So we recurse to set up the patch version. Plus the minor version.
+- return
+- [ init-sdk $(condition) : $(root)
+- : $(version[1-3]) : [ version-to-feature $(version[1-3]) ] ]
+- [ init-sdk $(condition) : $(root)
+- : $(version) : [ version-to-feature $(version) ] ] ;
+- }
+- else
+- {
+- # Yes, this is intentionally recursive.
+- return
+- [ init-sdk $(condition) : $(root)
+- : $(version) : [ version-to-feature $(version) ] ] ;
+- }
+-}
+-
+-# Determine the MacOSX SDK versions installed and their locations.
+-local rule init-available-sdk-versions ( condition * : root ? )
+-{
+- root ?= /Developer ;
+- local sdks-root = $(root)/SDKs ;
+- local sdks = [ GLOB $(sdks-root) : MacOSX*.sdk AppleTVOS*.sdk AppleTVSimulator*.sdk iPhoneOS*.sdk iPhoneSimulator*.sdk ] ;
+- local result ;
+- for local sdk in $(sdks)
+- {
+- local sdk-match = [ MATCH "([^0-9]+)([0-9]+)[.]([0-9x]+)[.]?([0-9x]+)?" : $(sdk:D=) ] ;
+- local sdk-platform = $(sdk-match[1]:L) ;
+- local sdk-version = $(sdk-match[2-]) ;
+- if $(sdk-version)
+- {
+- switch $(sdk-platform)
+- {
+- case macosx :
+- {
+- sdk-version = mac $(sdk-version) ;
+- }
+- case appletvos :
+- {
+- sdk-version = appletv $(sdk-version) ;
+- }
+- case appletvsimulator :
+- {
+- sdk-version = appletvsim $(sdk-version) ;
+- }
+- case iphoneos :
+- {
+- sdk-version = iphone $(sdk-version) ;
+- }
+- case iphonesimulator :
+- {
+- sdk-version = iphonesim $(sdk-version) ;
+- }
+- case * :
+- {
+- sdk-version = $(sdk-version:J=-) ;
+- }
+- }
+- result += [ init-sdk $(condition) : $(sdk) : $(sdk-version) ] ;
+- }
+- }
+- return $(result) ;
+-}
+-
+ # Generic options.
+ flags darwin.compile OPTIONS <flags> ;
+
+@@ -497,14 +303,14 @@
+ }
+ }
+
+- case arm :
+- {
+- if $(instruction-set) {
+- options = -arch$(_)$(instruction-set) ;
+- } else {
+- options = -arch arm ;
+- }
+- }
++# case arm :
++# {
++# if $(instruction-set) {
++# options = -arch$(_)$(instruction-set) ;
++# } else {
++# options = -arch arm ;
++# }
++# }
+ }
+
+ if $(options)
diff --git a/data/boost/make.sh b/data/boost/make.sh
index 4f804c29f..167924206 100644
--- a/data/boost/make.sh
+++ b/data/boost/make.sh
@@ -1,12 +1,19 @@
shopt -s extglob
pkg:setup
-./bootstrap.sh --prefix=/usr
-#toolset=gcc-arm64 using gcc : arm64 : aarch64-apple-darwin17-g++ ;
-echo "using clang : arm : ${PKG_TARG}-g++ ;" >>project-config.jam
-./b2 install toolset=clang-arm abi=aapcs --prefix="${PKG_DEST}/usr" -j16
+
+./bootstrap.sh --without-libraries=python --prefix=/usr
+echo "using darwin : : ${PKG_TARG}-clang++ : <archiver>${PKG_TARG}-libtool <target-os>darwin ;" >> project-config.jam
+./b2 --without-python --prefix="${PKG_DEST}/usr" -sNO_LZMA=1 --toolset=darwin link=shared threading=multi,single --layout=tagged install -j2 || : # -j16
+# Feel free to up the cores, I got memory errors due to what I'm using.
+# ./b2 will exit with a status code > 0
rm -f "${PKG_DEST}"/usr/lib/*-d?(-+([0-9_])).@(a|dylib)
for na in "${PKG_DEST}"/usr/lib/*-+([0-9_]).a; do
a=${na/-+([0-9_]).a/.a}
rm -f "$a"
ln -s "$(basename "$na")" "$a"
done
+
+# Note:
+# LZMA and icu4c are not built.
+# The following static libs have no shared library, yet are removed.
+# libboost_test_exec_monitor.a libboost_test_exec_monitor-mt.a
diff --git a/data/boost/os-feature.jam.diff b/data/boost/os-feature.jam.diff
new file mode 100644
index 000000000..db71408bb
--- /dev/null
+++ b/data/boost/os-feature.jam.diff
@@ -0,0 +1,11 @@
+--- a/tools/build/src/tools/features/os-feature.jam 2018-08-01 15:50:55.000000000 -0500
++++ b/tools/build/src/tools/features/os-feature.jam 2019-03-10 00:02:45.701830454 -0600
+@@ -34,7 +34,7 @@
+ local host-os ;
+ if [ os.name ] in $(.os-names:U)
+ {
+- host-os = [ os.name ] ;
++ host-os = darwin ;
+ }
+ else
+ {