Split package

This commit is contained in:
EnumDev committed 2026-09-21 12:31:51 +03:00
1 parent 2e30c6fa6b
commit c237e68e40
2 files changed
+42 -8

No files matched your search

+20 -7
View File
@@ -1,20 +1,17 @@
name: boost name: boost
description: Collection of high-quality and peer-reviewed libraries that aims to make C++ development highly productive description: Collection of high-quality and peer-reviewed libraries that aims to make C++ development highly productive
version: 1.92.0 version: 1.92.0
revision: 1 revision: 2
url: https://www.boost.org/ url: https://www.boost.org/
license: BSL-1.0 license: BSL-1.0
maintainers: maintainers:
- [email protected] - [email protected]
architecture: any architecture: any
type: source type: source
depends:
- bzip2
- icu=78.*
- zlib
- zstd
make_depends: make_depends:
- python3=3.14.* - bzip2
- icu
- python3
- python-numpy - python-numpy
- zlib - zlib
- zstd - zstd
@@ -23,3 +20,19 @@ downloads:
extract_to: ${BPM_SOURCE} extract_to: ${BPM_SOURCE}
extract_strip_components: 1 extract_strip_components: 1
checksum: ea7b982002cc9dfbe59b0b217b206f470dc75f3de0bb2973d844118934d82411 checksum: ea7b982002cc9dfbe59b0b217b206f470dc75f3de0bb2973d844118934d82411
split_packages:
- name: boost
depends:
- boost-libs=1.92.0
- name: boost-libs
description: Boost runtime libraries
depends:
- bzip2
- gcc-libs
- glibc
- icu=78.*
- xz-utils
- zlib
- zstd
optional_depends:
- python3=3.14.*:For python bindings
+22 -1
View File
@@ -9,11 +9,32 @@ build() {
./b2 stage -j$(nproc) variant=release threading=multi link=shared toolset=gcc cflags="$CPPFLAGS $CFLAGS" cxxflags="$CPPFLAGS $CXXFLAGS" linkflags="$LDFLAGS" ./b2 stage -j$(nproc) variant=release threading=multi link=shared toolset=gcc cflags="$CPPFLAGS $CFLAGS" cxxflags="$CPPFLAGS $CXXFLAGS" linkflags="$LDFLAGS"
} }
_pick() {
local p="$1" f d; shift
for f; do
[ -d "$BPM_WORKDIR"/output_"$p" ] || { echo "Split package $p not found"; exit 1; }
d="$BPM_WORKDIR"/output_"$p"/"${f#$BPM_OUTPUT}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
# The package function is executed in the source directory # The package function is executed in the source directory
# This function is used to move the compiled files into the output directory # This function is used to move the compiled files into the output directory
package() { package_boost() {
./b2 install --prefix="$BPM_OUTPUT"/usr threading=multi link=shared ./b2 install --prefix="$BPM_OUTPUT"/usr threading=multi link=shared
cd "$BPM_OUTPUT"
# Move runtime libraries into split package
_pick boost-libs usr/lib/libboost_*
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE_1_0.txt "$BPM_OUTPUT"/usr/share/licenses/boost/LICENSE
}
package_boost-libs() {
# Install package license # Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE_1_0.txt "$BPM_OUTPUT"/usr/share/licenses/boost/LICENSE install -Dm644 "$BPM_SOURCE"/LICENSE_1_0.txt "$BPM_OUTPUT"/usr/share/licenses/boost/LICENSE
} }