[arch-commits] Commit in (5 files)

David Runge dvzrv at gemini.archlinux.org
Mon Dec 20 18:22:47 UTC 2021


    Date: Monday, December 20, 2021 @ 18:22:47
  Author: dvzrv
Revision: 1080587

Add lib32-boost as dependency for yabridge.

Added:
  lib32-boost/
  lib32-boost/repos/
  lib32-boost/trunk/
  lib32-boost/trunk/PKGBUILD
  lib32-boost/trunk/boost-1.78.0-no_cmake_native.patch

------------------------------------+
 PKGBUILD                           |  141 +++++++++++++++++++++++++++++++++++
 boost-1.78.0-no_cmake_native.patch |   29 +++++++
 2 files changed, 170 insertions(+)

Added: lib32-boost/trunk/PKGBUILD
===================================================================
--- lib32-boost/trunk/PKGBUILD	                        (rev 0)
+++ lib32-boost/trunk/PKGBUILD	2021-12-20 18:22:47 UTC (rev 1080587)
@@ -0,0 +1,141 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=boost
+pkgbase=lib32-boost
+pkgname=(lib32-boost lib32-boost-libs)
+pkgver=1.78.0
+_srcname=${_name}_${pkgver//./_}
+pkgrel=2
+pkgdesc="Free peer-reviewed portable C++ source libraries - 32bit"
+arch=(x86_64)
+url="https://www.boost.org/"
+license=(Boost)
+# NOTE: needs lib32-openmpi for (optional) mpi and graph_parallel support
+# NOTE: needs lib32-python for (optional) python support
+makedepends=("boost=${pkgver}" lib32-bzip2 lib32-icu lib32-xz lib32-zlib lib32-zstd)
+source=(
+  "https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.gz"
+  "${_name}-1.78.0-no_cmake_native.patch"
+  "${_name}-b2-fix-lib-install.patch::https://github.com/bfgroup/b2/commit/78fd284a42ca.patch"
+  "${_name}-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch"
+)
+sha512sums=('6ab652c77dddc5a69cfc3f09974ba66f1413d699e49734c7ed31c629f5368230e0adaf95f599eafbf9316660d67b0b011b52ac1552d814564cbb2967bd927fdd'
+            'b7cb5bf7217a7df9095f41e7ec72d842c09e976c6e16489ad752c5f8aa5243316ec954527c93bf08e866191f37c767aa1b5fba884bb33d8c5bc39e6f4dcd09e0'
+            '1b9b2d8a4a1c290d30fb9fb340ea6b222a37424ddd461e0f2c869fba424b41fb8ebc612303fb6427a31939c8813e14fe086e188ea2168f3f9c43d43beea4ffa5'
+            '364387300b9846337d3b8a87ecf677943ab37f7784c74616aaeb1c5ce688b12b6f51516b17c321375eb3ab0319fc206ae8be4a457ec145d69b15d0b8ad62d198')
+b2sums=('df2073861446f378f88926340ddcf14db124f2c195e1514ac2c0c3a55bc36168f48b3b56d0c7f4794a56690bb2a90f0c5880f6c2ede80dec3d57dfcef0ef36bc'
+        '331967912e948747d667c1d5291f716802cc3dc75aae378a4075827b28c8edf2191884ef408d2916281204277deba37cec3b08526ebd942194b7ccb36c59491e'
+        'e5f6d4884eaa557d5547e7e079c2edb4ed9f2f4cd8579aa32a2150f824a5d04413f2a91e79b3139d5b915da6a46f7835f1438ad53f33096973f1a99f378ec1d3'
+        '468d07f48cfa4a1b39724baf66b96cfc4b580eff5231704c5977919e8683c69aeda8759c39b898b8f2e554342bb855912efbe05dd21fc04b898921847056dcf4')
+
+_pick() {
+  local p="$1" f d; shift
+  for f; do
+    d="$srcdir/$p/${f#$pkgdir/}"
+    mkdir -p "$(dirname "$d")"
+    mv "$f" "$d"
+    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+  done
+}
+
+prepare() {
+  local _tmp_install_dir="${srcdir}/tmp_install"
+  cd $_srcname
+
+  # https://github.com/bfgroup/b2/issues/104
+  patch -Np1 -d tools/build <../${_name}-b2-fix-lib-install.patch
+  # https://github.com/boostorg/ublas/pull/97
+  patch -Np2 -i ../${_name}-ublas-c++20-iterator.patch
+  # remove unneeded cmake checks, that would relate to the build dir
+  patch -Np1 -i ../"${_name}-1.78.0-no_cmake_native.patch"
+
+  mkdir -vp "${_tmp_install_dir}"
+}
+
+build() {
+  local _tmp_install_dir="${srcdir}/tmp_install"
+  local _jobs="$(sed 's/.*\(-j *[0-9]\+\).*/\1/' <<<$MAKEFLAGS)"
+
+  # bootstrap build tooling
+  (
+    cd $_srcname/tools/build
+    ./bootstrap.sh --cxxflags="$CXXFLAGS $LDFLAGS"
+  )
+
+  export CFLAGS+=' -m32'
+  export CXXFLAGS+=' -m32'
+  export LDFLAGS+=' -m32'
+  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
+
+  cd $_srcname
+  ./bootstrap.sh \
+    --includedir=include \
+    --libdir=lib32 \
+    --with-icu \
+    --with-python= \
+    --with-toolset=gcc
+
+  ./b2 install \
+    address-model=32 \
+    cflags="$CPPFLAGS $CFLAGS -fPIC -O3" \
+    cxxflags="$CPPFLAGS $CXXFLAGS -fPIC -O3" \
+    debug-symbols=off \
+    linkflags="$LDFLAGS" \
+    link=shared,static \
+    runtime-link=shared \
+    threading=multi \
+    toolset=gcc \
+    variant=release \
+    $_jobs \
+    --includedir="${_tmp_install_dir}/usr/include" \
+    --layout=system \
+    --libdir="${_tmp_install_dir}/usr/lib32" \
+    --prefix="${_tmp_install_dir}" \
+    --without-mpi \
+    --without-graph_parallel \
+    --without-python
+
+  (
+    cd "${_tmp_install_dir}"
+    _pick boost-libs usr/lib32/*.so*
+    _pick headers usr/include
+  )
+}
+
+package_lib32-boost() {
+  local _tmp_install_dir="${srcdir}/tmp_install"
+
+  pkgdesc+=" (static libraries)"
+  depends=("boost=${pkgver}" "lib32-boost-libs=${pkgver}")
+
+  mv -v "${_tmp_install_dir}/"* "${pkgdir}/"
+}
+
+package_lib32-boost-libs() {
+  local _tmp_install_dir="${srcdir}/tmp_install"
+
+  pkgdesc+=" (runtime libraries)"
+  depends=(
+    lib32-bzip2
+    lib32-gcc-libs
+    lib32-glibc
+    lib32-icu libicuuc.so libicui18n.so libicudata.so
+    lib32-xz liblzma.so
+    lib32-zlib libz.so
+    lib32-zstd libzstd.so
+  )
+  provides=(libboost_atomic.so libboost_chrono.so libboost_container.so
+  libboost_context.so libboost_contract.so libboost_coroutine.so
+  libboost_date_time.so libboost_fiber.so libboost_filesystem.so
+  libboost_graph.so libboost_iostreams.so libboost_json.so libboost_locale.so
+  libboost_log.so libboost_log_setup.so libboost_math_c99.so
+  libboost_math_c99f.so libboost_math_c99l.so libboost_math_tr1.so
+  libboost_math_tr1f.so libboost_math_tr1l.so libboost_prg_exec_monitor.so
+  libboost_program_options.so libboost_random.so libboost_regex.so
+  libboost_serialization.so libboost_stacktrace_addr2line.so
+  libboost_stacktrace_basic.so libboost_stacktrace_noop.so libboost_system.so
+  libboost_thread.so libboost_timer.so libboost_type_erasure.so
+  libboost_unit_test_framework.so libboost_wave.so libboost_wserialization.so)
+
+  mv -v boost-libs/* "${pkgdir}/"
+}

Added: lib32-boost/trunk/boost-1.78.0-no_cmake_native.patch
===================================================================
--- lib32-boost/trunk/boost-1.78.0-no_cmake_native.patch	                        (rev 0)
+++ lib32-boost/trunk/boost-1.78.0-no_cmake_native.patch	2021-12-20 18:22:47 UTC (rev 1080587)
@@ -0,0 +1,29 @@
+diff -ruN a/tools/boost_install/boost-install.jam b/tools/boost_install/boost-install.jam
+--- a/tools/boost_install/boost-install.jam	2021-12-02 07:47:38.000000000 +0100
++++ b/tools/boost_install/boost-install.jam	2021-12-20 10:36:34.058660030 +0100
+@@ -711,25 +711,6 @@
+         "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
+         : true ;
+ 
+-    if [ path.is-rooted $(cmakedir) ]
+-    {
+-        local cmakedir-native = [ path-native-fwd $(cmakedir) ] ;
+-
+-        print.text
+-
+-            ""
+-            "# If the computed and the original directories are symlink-equivalent, use original"
+-            "if(EXISTS \"$(cmakedir-native)\")"
+-            "  get_filename_component(_BOOST_CMAKEDIR_ORIGINAL \"$(cmakedir-native)\" REALPATH)"
+-            "  if(_BOOST_CMAKEDIR STREQUAL _BOOST_CMAKEDIR_ORIGINAL)"
+-            "    set(_BOOST_CMAKEDIR \"$(cmakedir-native)\")"
+-            "  endif()"
+-            "  unset(_BOOST_CMAKEDIR_ORIGINAL)"
+-            "endif()"
+-            ""
+-            : true ;
+-    }
+-
+     get-dir "_BOOST_INCLUDEDIR" : $(includedir) ;
+ 
+     if $(library-type) = INTERFACE



More information about the arch-commits mailing list