summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD264
-rw-r--r--boost-1.81.0-phoenix-multiple-definitions.patch11
-rw-r--r--boost-ublas-c++20-iterator.patch59
-rw-r--r--disable-version-check.patch58
-rw-r--r--no-versioned-shlibs.patch11
6 files changed, 245 insertions, 187 deletions
diff --git a/.SRCINFO b/.SRCINFO
index de8658fecb27..5b1634c4e956 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,26 @@
pkgbase = android-armv7a-eabi-boost
pkgdesc = Free peer-reviewed portable C++ source libraries (Android, armv7a-eabi)
- pkgver = 1.75.0
+ pkgver = 1.84.0
pkgrel = 1
url = https://www.boost.org/
arch = any
license = custom
- makedepends = bzip2
- makedepends = zlib
- makedepends = android-ndk
- makedepends = android-sdk
- depends = android-armv7a-eabi-libiconv
- conflicts = android-boost-armeabi-v7a
- replaces = android-boost-armeabi-v7a
+ makedepends = android-environment
+ depends = android-armv7a-eabi-bzip2
+ depends = android-armv7a-eabi-icu
+ depends = android-armv7a-eabi-zlib
+ depends = android-armv7a-eabi-zstd
+ options = !strip
options = !buildflags
options = staticlibs
- options = !strip
options = !emptydirs
- source = https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.bz2
- source = no-versioned-shlibs.patch
- sha256sums = 953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb
- sha256sums = d82d0f15064812dcabb3456a7bcb1db0e0f6145980e4728e638372e0fd35af23
+ source = https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.bz2
+ source = boost-1.81.0-phoenix-multiple-definitions.patch
+ source = boost-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch
+ source = disable-version-check.patch
+ md5sums = 9cbfb9076ed06384471802b850698a6d
+ md5sums = cb1c25777e9b85af62366e7c930244b8
+ md5sums = 991daf28f76ea0383620ccaf971decba
+ md5sums = 6290eb4fa0cab451aac92e12e85ef073
pkgname = android-armv7a-eabi-boost
-
diff --git a/PKGBUILD b/PKGBUILD
index 3209dd65afdd..1883f79e5d88 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,154 +3,146 @@
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
-_pkgname=boost
-_pkg_arch=armv7a-eabi
-_android_arch=armeabi-v7a
-_android_toolchain=arm-linux-androideabi
-_andoird_toolchain_dir=$_android_toolchain
-_android_platform=24 # https://developer.android.com/about/dashboards/
-_android_target=armv7a-linux-androideabi$_android_platform
-_android_prefix=/opt/android-libs/$_pkg_arch
-_android_ndk_path=/opt/android-ndk
-_boost_arch=arm
-_boost_address_model=32
-
-pkgname=android-$_pkg_arch-$_pkgname
-pkgver=1.75.0
-_boostver=${pkgver//./_}
+_android_arch=armv7a-eabi
+pkgname=android-${_android_arch}-boost
+pkgver=1.84.0
pkgrel=1
-url='https://www.boost.org/'
+_srcname=boost_${pkgver//./_}
arch=('any')
+pkgdesc="Free peer-reviewed portable C++ source libraries (Android, ${_android_arch})"
+url="https://www.boost.org/"
license=('custom')
-pkgdesc="Free peer-reviewed portable C++ source libraries (Android, $_pkg_arch)"
-depends=("android-$_pkg_arch-libiconv")
-options=(!buildflags staticlibs !strip !emptydirs)
-makedepends=('bzip2' 'zlib' 'android-ndk' 'android-sdk')
-conflicts=("android-$_pkgname-$_android_arch")
-replaces=("android-$_pkgname-$_android_arch")
-source=(https://dl.bintray.com/boostorg/release/${pkgver}/source/boost_${_boostver}.tar.bz2
- no-versioned-shlibs.patch)
-sha256sums=('953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb'
- 'd82d0f15064812dcabb3456a7bcb1db0e0f6145980e4728e638372e0fd35af23')
+depends=("android-${_android_arch}-bzip2"
+ "android-${_android_arch}-icu"
+ "android-${_android_arch}-zlib"
+ "android-${_android_arch}-zstd")
+makedepends=('android-environment')
+if [[ $_android_arch == aarch64 ]] || [[ $_android_arch == x86-64 ]]; then
+makedepends+=("android-${_android_arch}-openmpi")
+optdepends+=("android-${_android_arch}-openmpi: for mpi support")
+fi
+options=(!strip !buildflags staticlibs !emptydirs)
+source=("https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.bz2"
+ "boost-1.81.0-phoenix-multiple-definitions.patch"
+ "boost-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch"
+ "disable-version-check.patch")
+md5sums=('9cbfb9076ed06384471802b850698a6d'
+ 'cb1c25777e9b85af62366e7c930244b8'
+ '991daf28f76ea0383620ccaf971decba'
+ '6290eb4fa0cab451aac92e12e85ef073')
prepare() {
- cd ${_pkgname}_${_boostver}
- patch -i ../no-versioned-shlibs.patch
+ cd "${srcdir}/$_srcname"
+ source android-env ${_android_arch}
+
+ # https://github.com/boostorg/phoenix/issues/111
+ patch -Np1 -i ../boost-1.81.0-phoenix-multiple-definitions.patch
+
+ # https://github.com/boostorg/ublas/pull/97
+ patch -Np2 -i ../boost-ublas-c++20-iterator.patch
+ patch -p1 -i ../disable-version-check.patch
}
build() {
- local _stagedir="${srcdir}/stagedir"
- local jobs="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"
- local target_flags=" \
- --target=$_android_target \
- --gcc-toolchain=$_android_ndk_path/toolchains/$_andoird_toolchain_dir-4.9/prebuilt/linux-x86_64 \
- --sysroot=$_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr"
- local common_flags=" \
- $target_flags \
- -isystem $_android_ndk_path/sources/android/support/include \
- -isystem $_android_ndk_path/sources/cxx-stl/llvm-libc++/include \
- -isystem $_android_ndk_path/sources/cxx-stl/llvm-libc++abi/include \
- -isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include \
- -isystem $_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/$_android_toolchain \
- -fexceptions \
- -no-canonical-prefixes \
- -D__ANDROID_API__=$_android_platform \
- -O3 \
- -fPIC \
- -DBOOST_ASIO_HAS_STD_STRING_VIEW=1"
- local ld_flags=" \
- $target_flags \
- -fexceptions \
- $_android_ndk_path/sources/cxx-stl/llvm-libc++/libs/$_android_arch/libc++_shared.so \
- -B$_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/$_android_toolchain/$_android_platform \
- -L$_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/$_android_toolchain/$_android_platform \
- -nostdlib++"
-
- cd ${_pkgname}_${_boostver}
-
- ./bootstrap.sh --with-toolset=gcc
-
- install -Dm755 tools/build/src/engine/b2 "${_stagedir}"/bin/b2
-
- # Support for OpenMPI
- echo "using mpi ;" >> project-config.jam
-
- # boostbook is needed by quickbook
- install -dm755 "${_stagedir}"/share/boostbook
- cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/
-
- export PATH=$_android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
-
- # default "minimal" install: "release link=shared,static
- # runtime-link=shared threading=single,multi"
- # --layout=tagged will add the "-mt" suffix for multithreaded libraries
- # and installs includes in $_android_prefix/include/boost.
- # --layout=system no longer adds the -mt suffix for multi-threaded libs.
- # install to ${_stagedir} for consistency with regular boost package
- "${_stagedir}"/bin/b2 \
- --with-atomic \
- --with-chrono \
- --with-container \
- --with-date_time \
- --with-exception \
- --with-fiber \
- --with-filesystem \
- --with-graph \
- --with-graph_parallel \
- --with-iostreams \
- --with-locale \
- --with-log \
- --with-math \
- --with-mpi \
- --with-program_options \
- --with-random \
- --with-regex \
- --with-serialization \
- --with-system \
- --with-test \
- --with-thread \
- --with-timer \
- --with-type_erasure \
- --with-wave \
- --with-stacktrace \
- variant=release \
- debug-symbols=off \
- threading=multi \
- runtime-link=shared \
- link=shared,static \
- target-os=android \
- toolset=clang-android \
- architecture=$_boost_arch \
- address-model=$_boost_address_model \
- -sICONV_PATH="/opt/android-libs/$_pkg_arch" \
- cflags="$common_flags" \
- cxxflags="$common_flags -frtti -std=c++14" \
- linkflags="$ld_flags" \
- --layout=system \
- ${jobs} \
- \
- --prefix="${_stagedir}" \
- install
+ cd "${srcdir}/$_srcname"
+ source android-env ${_android_arch}
+
+ # Platform specific patches
+ case "$_android_arch" in
+ aarch64)
+ _boost_arch=arm
+ _boost_address_model=64
+ ;;
+ armv7a-eabi)
+ _boost_arch=arm
+ _boost_address_model=32
+ ;;
+ x86)
+ _boost_arch=x86
+ _boost_address_model=32
+ ;;
+ x86-64)
+ _boost_arch=x86
+ _boost_address_model=64
+ ;;
+ *)
+ ;;
+ esac
+
+ ./bootstrap.sh -with-toolset=gcc
+
+ # support for OpenMPI
+ if [[ _boost_address_model == 64 ]]; then
+ _boost_mpi='using mpi ;'
+ else
+ _boost_mpi=''
+ fi
+
+ userConfigs=$srcdir/$_srcname/user-config.jam
+
+ cat << EOF > "${userConfigs}"
+${_boost_mpi}
+using clang : android : ${ANDROID_CXX} :
+<archiver>${ANDROID_AR} \
+<assembler>${ANDROID_AS}
+;
+EOF
+
+ ./b2 install \
+ --prefix="$srcdir/fakeinstall" \
+ --user-config="${userConfigs}" \
+ --layout=system \
+ --with-atomic \
+ --with-chrono \
+ --with-container \
+ --with-date_time \
+ --with-exception \
+ --with-fiber \
+ --with-filesystem \
+ --with-graph \
+ --with-graph_parallel \
+ --with-iostreams \
+ --with-locale \
+ --with-log \
+ --with-math \
+ --with-mpi \
+ --with-program_options \
+ --with-random \
+ --with-regex \
+ --with-serialization \
+ --with-system \
+ --with-test \
+ --with-thread \
+ --with-timer \
+ --with-type_erasure \
+ --with-wave \
+ --with-stacktrace \
+ -sICONV_PATH="${ANDROID_PREFIX}" \
+ variant=release \
+ debug-symbols=off \
+ runtime-link=shared \
+ link=shared,static \
+ target-os=android \
+ toolset=clang-android \
+ architecture=$_boost_arch \
+ threading=multi \
+ address-model=$_boost_address_model \
+ cflags="${CXXFLAGS}" \
+ cxxflags="${CFLAGS}" \
+ linkflags="${LDFLAGS}"
}
package() {
- local _stagedir="${srcdir}/stagedir"
- install -dm755 "${pkgdir}"$_android_prefix
- cp -a "${_stagedir}"/{include,share} "${pkgdir}"$_android_prefix
+ cd "${srcdir}/$_srcname"
+ source android-env ${_android_arch}
- local libdir="${pkgdir}"$_android_prefix/lib
- install -d "${libdir}"
- cp -a "${_stagedir}"/lib/*.a "${libdir}"/
+ find "${srcdir}/fakeinstall"/lib -iname '*.a' -exec $ANDROID_STRIP -g {} \;
+ find "${srcdir}/fakeinstall"/lib -iname '*.so' -exec $ANDROID_STRIP --strip-unneeded {} \;
- install -dm755 "${pkgdir}"$_android_prefix
- cp -a "${_stagedir}"/lib "${pkgdir}"$_android_prefix
+ install -dm755 "$pkgdir/${ANDROID_PREFIX_LIB}/"
+ cp -a "${srcdir}/fakeinstall"/lib/*.{a,so} "$pkgdir/${ANDROID_PREFIX_LIB}/"
+ cp -a "${srcdir}/fakeinstall"/lib/cmake "$pkgdir/${ANDROID_PREFIX_LIB}/"
+ cp -a "${srcdir}/fakeinstall"/include "$pkgdir/${ANDROID_PREFIX}/"
- install -Dm644 "${srcdir}/"${_pkgname}_${_boostver}/LICENSE_1_0.txt \
- "${pkgdir}"$_android_prefix/share/licenses/boost/LICENSE_1_0.txt
-
- local strip=$_android_ndk_path/toolchains/$_android_toolchain-4.9/prebuilt/linux-x86_64/bin/$_android_toolchain-strip
- find "${libdir}" -iname '*.a' -exec $strip -g {} \;
- find "${libdir}" -iname '*.so' -exec $strip --strip-unneeded {} \;
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE_1_0.txt
}
-
-# vim: ts=2 sw=2 et:
diff --git a/boost-1.81.0-phoenix-multiple-definitions.patch b/boost-1.81.0-phoenix-multiple-definitions.patch
new file mode 100644
index 000000000000..0aedde6d0735
--- /dev/null
+++ b/boost-1.81.0-phoenix-multiple-definitions.patch
@@ -0,0 +1,11 @@
+https://bugs.gentoo.org/887041
+https://github.com/boostorg/phoenix/issues/111
+--- a/boost/phoenix/stl.hpp
++++ b/boost/phoenix/stl.hpp
+@@ -11,6 +11,5 @@
+
+ #include <boost/phoenix/stl/algorithm.hpp>
+ #include <boost/phoenix/stl/container.hpp>
+-#include <boost/phoenix/stl/tuple.hpp>
+
+ #endif
diff --git a/boost-ublas-c++20-iterator.patch b/boost-ublas-c++20-iterator.patch
new file mode 100644
index 000000000000..21321cc37f58
--- /dev/null
+++ b/boost-ublas-c++20-iterator.patch
@@ -0,0 +1,59 @@
+From a31e5cffa85f58b64a39fa7c4a1bd3bd9228b069 Mon Sep 17 00:00:00 2001
+From: Conrad Poelman <cpgithub@stellarscience.com>
+Date: Tue, 4 Aug 2020 17:20:40 -0400
+Subject: [PATCH] Remove deprecated inheritance from std::iterator (#97)
+
+std::iterator was deprecated in C++17 and removed in C++20. I replaced the inheritance with the 5 equivalent typedefs, even though they're not all used by ublas, for compatibility in case clients depend on them.
+---
+ .../boost/numeric/ublas/detail/iterator.hpp | 24 ++++++++++++++-----
+ 1 file changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/include/boost/numeric/ublas/detail/iterator.hpp b/include/boost/numeric/ublas/detail/iterator.hpp
+index 1723a301c..7aebf2f9f 100644
+--- a/include/boost/numeric/ublas/detail/iterator.hpp
++++ b/include/boost/numeric/ublas/detail/iterator.hpp
+@@ -107,8 +107,12 @@ namespace boost { namespace numeric { namespace ublas {
+ * via the post increment operator.
+ */
+ template<class IC, class I, class T>
+- struct forward_iterator_base:
+- public std::iterator<IC, T> {
++ struct forward_iterator_base {
++ typedef IC iterator_category;
++ typedef T value_type;
++ typedef std::ptrdiff_t difference_type;
++ typedef T* pointer;
++ typedef T& reference;
+ typedef I derived_iterator_type;
+ typedef T derived_value_type;
+
+@@ -145,8 +149,12 @@ namespace boost { namespace numeric { namespace ublas {
+ * via the post increment and post decrement operator.
+ */
+ template<class IC, class I, class T>
+- struct bidirectional_iterator_base:
+- public std::iterator<IC, T> {
++ struct bidirectional_iterator_base {
++ typedef IC iterator_category;
++ typedef T value_type;
++ typedef std::ptrdiff_t difference_type;
++ typedef T* pointer;
++ typedef T& reference;
+ typedef I derived_iterator_type;
+ typedef T derived_value_type;
+
+@@ -200,8 +208,12 @@ namespace boost { namespace numeric { namespace ublas {
+ */
+ template<class IC, class I, class T, class D = std::ptrdiff_t>
+ // ISSUE the default for D seems rather dangerous as it can easily be (silently) incorrect
+- struct random_access_iterator_base:
+- public std::iterator<IC, T> {
++ struct random_access_iterator_base {
++ typedef IC iterator_category;
++ typedef T value_type;
++ typedef D difference_type;
++ typedef T* pointer;
++ typedef T& reference;
+ typedef I derived_iterator_type;
+ typedef T derived_value_type;
+ typedef D derived_difference_type;
diff --git a/disable-version-check.patch b/disable-version-check.patch
index 3469b005b9d2..4226e1d62336 100644
--- a/disable-version-check.patch
+++ b/disable-version-check.patch
@@ -1,27 +1,33 @@
---- a/tools/build/src/tools/common.jam 2019-09-18 16:03:02.035995695 +0200
-+++ b/tools/build/src/tools/common.jam 2019-09-18 16:03:36.386156355 +0200
-@@ -974,16 +974,16 @@
- }
-
- # From GCC 5, versioning changes and minor becomes patch
-- if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
-- {
-- version = $(version[1]) ;
-- }
-+ #if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
-+ #{
-+ # version = $(version[1]) ;
-+ #}
+--- a/tools/build/src/tools/common.jam 2023-02-03 10:57:59.385098144 +0100
++++ b/tools/build/src/tools/common.jam 2023-02-03 11:00:34.982146918 +0100
+@@ -1127,18 +1127,18 @@
+ import $(toolset) ;
+ local tool-version = [ $(toolset).get-full-version $(command) ] ;
- # Ditto, from Clang 4
-- if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
-- {
-- version = $(version[1]) ;
-- }
-+ #if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
-+ #{
-+ # version = $(version[1]) ;
-+ #}
-
- # On intel, version is not added, because it does not matter and it is the
- # version of vc used as backend that matters. Ideally, we should encode the
+- import version ;
+- if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
+- : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
+- {
+- errors.error toolset $(toolset) "initialization:"
+- : version '$(version)' requested but
+- '$(tool)-$(version)' not found and version
+- '$(tool-version:J=.)' of default '$(command)'
+- does not match
+- : initialized from [ errors.nearest-user-location ]
+- ;
+- }
++ #import version ;
++ #if ! [ version.version-compatible [ SPLIT_BY_CHARACTERS $(version) : . ]
++ # : [ SPLIT_BY_CHARACTERS $(tool-version) : . ] ]
++ #{
++ # errors.error toolset $(toolset) "initialization:"
++ # : version '$(version)' requested but
++ # '$(tool)-$(version)' not found and version
++ # '$(tool-version:J=.)' of default '$(command)'
++ # does not match
++ # : initialized from [ errors.nearest-user-location ]
++ # ;
++ #}
+ }
+ #3) default: no command and no version specified, try using "$(tool)"
+ else
diff --git a/no-versioned-shlibs.patch b/no-versioned-shlibs.patch
deleted file mode 100644
index 96459ea03169..000000000000
--- a/no-versioned-shlibs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- boostcpp.jam.old 2018-08-01 22:50:40.000000000 +0200
-+++ boostcpp.jam 2018-10-07 01:48:30.175912524 +0200
-@@ -154,7 +154,7 @@
- # libFoo.1.2.3.dylib format. AIX linkers do not accept version suffixes
- # either. Pgi compilers can not accept a library with version suffix.
- if $(type) = SHARED_LIB &&
-- ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix &&
-+ ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix android &&
- ! [ $(property-set).get <toolset> ] in pgi
- {
- result = $(result).$(BOOST_VERSION) ;