-
Notifications
You must be signed in to change notification settings - Fork 310
/
Copy pathboost.yaml
137 lines (119 loc) · 3.72 KB
/
boost.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
package:
name: boost
version: 1.85.0
epoch: 0
description: "A library for interacting with the Linux kernel's Berkeley Packet Filter (BPF) facility from user space"
copyright:
- license: "BSL-1.0"
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- patch
- python3
- python3-dev
- wolfi-base
data:
- name: libs
items:
atomic: atomic
chrono: chrono
container: container
context: context
contract: contract
coroutine: coroutine
date_time: date_time
fiber: fiber
filesystem: filesystem
graph: graph
iostreams: iostreams
math: math
prg_exec_monitor: prg_exec_monitor
program_options: program_options
python3: python3
random: random
regex: regex
serialization: serialization
system: system
thread: thread
unit_test_framework: unit_test_framework
wave: wave
wserialization: wserialization
# transform melange version 1.81.0 => 1_81_0
var-transforms:
- from: ${{package.version}}
match: \.
replace: _
to: mangled-package-version
pipeline:
- uses: fetch
with:
uri: https://boostorg.jfrog.io/artifactory/main/release/${{package.version}}/source/boost_${{vars.mangled-package-version}}.tar.gz
expected-sha256: be0d91732d5b0cc6fbb275c7939974457e79b54d6f07ce2e3dfdd68bef883b0b
# Apply patches to fix build https://github.com/boostorg/bcp/pull/18
- runs: |
cd ./tools/bcp
patch -p1 < ../../c98516b5b76e9132eba78a399af9c95ec8d23bd4.patch
patch -p1 < ../../cd21e9b4a749a77c24facf2da44f01e032c40842.patch
- runs: |
abiflags="$(python3-config --abiflags)"
# create user-config.jam
PY3_VERSION=$(python3 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))')
cat > user-config.jam <<-__EOF__
using gcc : : $CC : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
using python : ${PY3_VERSION:+$PY3_VERSION }: /usr/bin/python3 : ${PY3_VERSION:+/usr/include/python${PY3_VERSION}${abiflags} }: : : : ${abiflags:+$abiflags };
__EOF__
cd tools/build/src/engine
./build.sh cc gcc
cd ../../../../
cd tools/bcp
../build/src/engine/b2 -j $(nproc)
cd ../../
./tools/build/src/engine/b2 \
--user-config=user-config.jam \
--prefix="${{targets.destdir}}/usr" \
release \
toolset=gcc \
debug-symbols=off \
threading=single,multi \
runtime-link=shared \
link=shared,static \
cflags=-fno-strict-aliasing \
--layout=tagged \
-q \
-j $(nproc)
mkdir -p "${{targets.destdir}}"/usr/bin
install -Dm755 tools/build/src/engine/b2 "${{targets.destdir}}"/usr/bin/b2
install -Dm755 dist/bin/bcp "${{targets.destdir}}"/usr/bin/bcp
install -Dm644 LICENSE_1_0.txt \
"${{targets.destdir}}"/usr/share/licenses/${{package.name}}/LICENSE_1_0.txt
"${{targets.destdir}}"/usr/bin/b2 \
--includedir="${{targets.destdir}}"/usr/include \
--libdir="${{targets.destdir}}"/usr/lib \
install
- uses: strip
subpackages:
- name: boost-dev
pipeline:
- uses: split/dev
- name: boost-static
pipeline:
- uses: split/static
- name: boost-docs
pipeline:
- uses: split/manpages
- range: libs
name: boost-${{range.key}}
description: "${{range.key}} boost library"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/lib
mv "${{targets.destdir}}"/usr/lib/libboost_${{range.key}}* "${{targets.subpkgdir}}"/usr/lib/
update:
enabled: true
github:
identifier: boostorg/boost
strip-prefix: boost-
use-tag: true