Skip to content

Commit 8b3e2ee

Browse files
authored
Merge branch 'master' into update/mopidy-mpd
2 parents 55ce6ec + 6302339 commit 8b3e2ee

File tree

4,100 files changed

+133382
-191893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,100 files changed

+133382
-191893
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ When you make changes to your pull request, please *do not close and reopen your
163163
#### Continuous Integration
164164

165165
Pull requests are automatically submitted for Continuous Integration (CI) testing to ensure packages build and pass their tests (on native builds) on various combinations of C library and architecture.
166-
Packages that take longer than 120 minutes or need more than 14G of storage to complete their build (for example, Firefox or the Linux kernel) will fail CI and should include `[ci skip]` in the PR title or body (the comment field when the PR is being opened) to avoid wasting CI builder time.
166+
Packages expected to take longer than several hours or need more than 14G of storage to complete their build (for example, Firefox or the Linux kernel) will fail CI and should include `[ci skip]` in the PR title or body (the comment field when the PR is being opened) to avoid spurious failures and wasted CI builder time.
167167
Use your best judgment on build times based on your local building experience. If you skip CI when submitting a PR, please build and cross-build for a variety of architectures locally, with both glibc and musl, and note your local results in PR comments.
168168
Make sure to cover 64-bit and 32-bit architectures.
169169

Manual.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pkgname=foo
100100
version=1.0
101101
revision=1
102102
build_style=gnu-configure
103-
short_desc="A short description max 72 chars"
103+
short_desc="Package description, no more than 72 characters"
104104
maintainer="name <email>"
105105
license="GPL-3.0-or-later"
106106
homepage="http://www.foo.org"
@@ -367,7 +367,7 @@ The following variables are defined by `xbps-src` and can be used on any templat
367367

368368
- `makejobs` Set to `-jX` if `XBPS_MAKEJOBS` is defined, to allow parallel jobs with `GNU make`.
369369

370-
- `sourcepkg` Set to the to main package name, can be used to match the main package
370+
- `sourcepkg` Set to the main package name, can be used to match the main package
371371
rather than additional binary package names.
372372

373373
- `CHROOT_READY` Set if the target chroot (masterdir) is ready for chroot builds.
@@ -1138,6 +1138,10 @@ for compiling cargo -sys crates.
11381138
It also adds a `cargo` wrapper that detects and passes builds through `cargo-auditable`.
11391139
This helper is added by default for packages that use the `cargo` build style.
11401140

1141+
- `haskell` specifies environment variables for cabal.
1142+
This helper is added by default for packages that use the `haskell-stack` or
1143+
`cabal` build style.
1144+
11411145
<a id="functions"></a>
11421146
### Functions
11431147

@@ -1698,21 +1702,45 @@ The path to the package's source inside `$GOPATH` is available as
16981702
<a id="pkgs_haskell"></a>
16991703
#### Haskell packages
17001704

1701-
We build Haskell package using `stack` from
1702-
[Stackage](http://www.stackage.org/), generally the LTS versions.
1703-
Haskell templates need to have host dependencies on `ghc` and `stack`,
1704-
and set build style to `haskell-stack`.
1705-
1706-
The following variables influence how Haskell packages are built:
1705+
Haskell packages can be built either with the `cabal` or `haskell-stack`
1706+
build style, use whichever is more convenient or better supported by upstream,
1707+
sometimes only one of the two is possible. For packages that have haskell
1708+
parts but use a different build style like `gnu-makefile`, make sure to use
1709+
the `haskell` build helper.
1710+
1711+
The following variables influence how packages are built with cabal:
1712+
1713+
- `cabal_index_state`: The state of the hackage cabal index to use for
1714+
fetching dependencies. The source package of a haskell project should
1715+
come with a freeze file that sets the index state, some also set it in
1716+
their cabal project file. If it does not, then this has to be set to an ISO
1717+
timestamp in the package template. For example `2025-07-05T14:01:16Z`.
1718+
- `configure_args`: Arguments passed to `cabal configure`. The configure step
1719+
generates the `cabal.project.local` file.
1720+
- `make_build_args`: Arguments passed to `cabal build`.
1721+
- `make_build_target`: Target passed to `cabal build`.
1722+
- `make_check_args`: Arguments passed to `cabal test`.
1723+
- `make_check_target`: Test target passed to cabal instead of "test".
1724+
- `make_install_target`: Target passed to `cabal install`.
1725+
1726+
And these variables influence how packages are built with stack:
17071727

17081728
- `stackage`: The Stackage version used to build the package, e.g.
17091729
`lts-3.5`. Alternatively:
17101730
- You can prepare a `stack.yaml` configuration for the project and put it
17111731
into `files/stack.yaml`.
1712-
- If a `stack.yaml` file is present in the source files, it will be used
1732+
- If a `stack.yaml` file is present in the source files, it will be used.
17131733
- `make_build_args`: This is passed as-is to `stack build ...`, so
17141734
you can add your `--flag ...` parameters there.
17151735

1736+
To patch dependencies of haskell packages they have to be fetched explicitly
1737+
from hackage by adding them to `distfiles` instead of letting cabal or stack
1738+
download them. Once extracted and patched, the path to the patched version
1739+
can be added to `packages` in `cabal.project` or `stack.yaml`.
1740+
Stack will find them automatically if no `stack.yaml` file exists by scanning
1741+
the directory. The build tool will then use the patched version of the
1742+
depencency instead of downloading it from hackage.
1743+
17161744
<a id="pkgs_font"></a>
17171745
#### Font packages
17181746

common/build-helper/haskell.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export CABAL_DIR=/home/cabal

common/build-helper/qmake6.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ exec /usr/lib/qt6/bin/qmake "\$@" -qtconf "${XBPS_WRAPPERDIR}/qt6.conf" \\
7676
QMAKE_CXXFLAGS+="\${CXXFLAGS}" \\
7777
QMAKE_LFLAGS+="\${LDFLAGS}"
7878
_EOF
79+
cat > "${XBPS_WRAPPERDIR}/qtpaths6" <<-_EOF
80+
#!/bin/sh
81+
exec /usr/lib/qt6/bin/qtpaths6 "\$@" -qtconf "${XBPS_WRAPPERDIR}/qt6.conf"
82+
_EOF
83+
chmod +x "${XBPS_WRAPPERDIR}/qtpaths6"
84+
cp -p ${XBPS_WRAPPERDIR}/qtpaths{6,-qt6}
7985
else
8086
cat > "${XBPS_WRAPPERDIR}/qmake6" <<_EOF
8187
#!/bin/sh
@@ -91,6 +97,8 @@ exec /usr/lib/qt6/bin/qmake \
9197
QMAKE_LFLAGS+="\${LDFLAGS}" \
9298
CONFIG+=no_qt_rpath
9399
_EOF
100+
ln -sf /usr/lib/qt6/bin/qtpaths6 "$XBPS_WRAPPERDIR/qtpaths6"
101+
ln -sf /usr/lib/qt6/bin/qtpaths6 "$XBPS_WRAPPERDIR/qtpaths-qt6"
94102
fi
95103
chmod 755 ${XBPS_WRAPPERDIR}/qmake6
96104
cp -p ${XBPS_WRAPPERDIR}/qmake{6,-qt6}

common/build-style/cabal.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#
2+
# This helper is for building haskell projects using Cabal.
3+
#
4+
5+
do_configure() {
6+
: ${cabal_cmd:=cabal}
7+
8+
local _cabal_project_file="cabal.project"
9+
10+
if [ -e "${FILESDIR}/${_cabal_project_file}.freeze" ]; then
11+
cp "${FILESDIR}/${_cabal_project_file}.freeze" .
12+
fi
13+
14+
if [ -n "${cabal_index_state}" ]; then
15+
# index-state alone is enough to fully fix a cabal build
16+
configure_args+=" --index-state=${cabal_index_state}"
17+
elif [ -e "${_cabal_project_file}.freeze" ]; then
18+
# With a freeze file we have to make sure that it fixes
19+
# the index also
20+
if ! grep -q '^index-state:' "${_cabal_project_file}.freeze"; then
21+
msg_error "${_cabal_project_file}.freeze is missing index-state\n"
22+
fi
23+
elif [ -e "${_cabal_project_file}" ]; then
24+
if ! grep -q '^index-state:' "${_cabal_project_file}"; then
25+
msg_error "${_cabal_project_file} is missing index-state\n"
26+
fi
27+
else
28+
msg_error "cabal build not fixed, set cabal_index_state or add a freeze file to FILESDIR\n"
29+
fi
30+
31+
${cabal_cmd} update
32+
${cabal_cmd} configure --prefix=/usr ${configure_args}
33+
}
34+
35+
do_build() {
36+
: ${make_cmd:=cabal}
37+
38+
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
39+
make_build_args+=" --ghc-option=-latomic"
40+
fi
41+
42+
${make_cmd} build ${make_build_target} ${makejobs} ${make_build_args}
43+
}
44+
45+
do_check() {
46+
: ${make_cmd:=cabal}
47+
: ${make_check_target:=test}
48+
49+
${make_check_pre} ${make_cmd} ${make_check_target} ${make_check_args}
50+
}
51+
52+
do_install() {
53+
: ${make_cmd:=cabal}
54+
: ${make_install_target:=all}
55+
56+
if ${make_cmd} list-bin ${make_install_target} >/dev/null 2>&1; then
57+
vbin $(${make_cmd} list-bin ${make_install_target})
58+
else
59+
for name in $(${make_cmd} list-bin ${make_install_target} 2>&1 | tr -d '\n ' | grep -Eo "theexecutable'[^']+'" | tr "'" ' ' | awk '{ print $2 }'); do
60+
local _bin=$(${make_cmd} list-bin exe:$name)
61+
if [ -s "$_bin" ]; then
62+
vbin "$_bin"
63+
fi
64+
done
65+
fi
66+
}

common/build-style/cmake.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ _EOF
6363
# QT_HOST_PATH isn't enough in my system,
6464
# which have binfmts support on and off
6565
cmake_args+=" -DQT_HOST_PATH_CMAKE_DIR=/usr/lib/cmake"
66+
cmake_args+=" -DKF6_HOST_TOOLING=/usr/lib/cmake"
6667
fi
6768

6869
if [[ $build_helper = *"qemu"* ]]; then

common/build-style/void-cross.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,17 @@ _void_cross_build_bootstrap_gcc() {
9898
_void_cross_apply_patch "$f"
9999
done
100100
if [ -f ${wrksrc}/.musl_version ]; then
101+
local musl_version
101102
for f in ${XBPS_SRCPKGDIR}/gcc/files/*-musl.patch; do
102103
_void_cross_apply_patch "$f"
103104
done
105+
musl_version=$(cat "${wrksrc}/.musl_version")
106+
case "$musl_version" in
107+
1.1.*)
108+
sed -i '/define LIBDRUNTIME_MUSL_PRE_TIME64/s/0/1/' \
109+
gcc/config/linux-d.cc
110+
;;
111+
esac
104112
fi
105113
cd ..
106114

@@ -337,7 +345,6 @@ _void_cross_build_musl() {
337345
}
338346

339347
_void_cross_build_libucontext() {
340-
[ -n "$cross_gcc_skip_go" ] && return 0
341348
[ -f ${wrksrc}/.libucontext_build_done ] && return 0
342349

343350
local tgt=$1
@@ -390,7 +397,7 @@ _void_cross_build_gcc() {
390397
mkdir -p ${wrksrc}/gcc_build
391398
cd ${wrksrc}/gcc_build
392399

393-
local langs="c,c++,fortran,objc,obj-c++,ada,lto"
400+
local langs="c,c++,fortran,objc,obj-c++,ada,lto,d"
394401
if [ -z "$cross_gcc_skip_go" ]; then
395402
langs+=",go"
396403
fi
@@ -477,7 +484,9 @@ _void_cross_test_gcc_ver() {
477484
ver=$(cat .gcc_version)
478485
if [ -d "gcc-${ver}" ] && [ -f "gcc-${ver}/gcc/BASE-VER" ] && [ -f "gcc-${ver}/gcc/DATESTAMP" ]; then
479486
basever="$(cat "gcc-${ver}/gcc/BASE-VER")_$(cat "gcc-${ver}/gcc/DATESTAMP")"
480-
mv "gcc-${ver}" "gcc-${basever}"
487+
if [ "$ver" != "$basever" ]; then
488+
mv "gcc-${ver}" "gcc-${basever}"
489+
fi
481490
echo ${basever} > ${wrksrc}/.gcc_version
482491
return
483492
fi
@@ -511,12 +520,12 @@ do_build() {
511520
if [ ! -f .musl_version ]; then
512521
_void_cross_test_ver glibc
513522
libc_ver=$(cat .glibc_version)
523+
export GDCFLAGS_FOR_TARGET="$cross_glibc_cflags"
514524
else
515525
libc_ver=$(cat .musl_version)
516-
if [ -z "$cross_gcc_skip_go" ]; then
517-
_void_cross_test_ver libucontext
518-
libucontext_ver=$(cat .libucontext_version)
519-
fi
526+
_void_cross_test_ver libucontext
527+
libucontext_ver=$(cat .libucontext_version)
528+
export GDCFLAGS_FOR_TARGET="$cross_musl_cflags"
520529
fi
521530

522531
local sysroot="/usr/${tgt}"

common/chroot-style/bwrap.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then
1818
exit 1
1919
fi
2020

21-
exec bwrap --bind "$MASTERDIR" / --ro-bind "$DISTDIR" /void-packages \
22-
--dev /dev --tmpfs /tmp --proc /proc \
23-
${HOSTDIR:+--bind "$HOSTDIR" /host} $EXTRA_ARGS "$@"
21+
if [ -z "$XBPS_TEMP_MASTERDIR" ]; then
22+
exec bwrap --bind "$MASTERDIR" / \
23+
--ro-bind "$DISTDIR" /void-packages \
24+
--dev /dev --tmpfs /tmp --proc /proc \
25+
${HOSTDIR:+--bind "$HOSTDIR" /host} ${EXTRA_ARGS} "$@"
26+
else
27+
exec bwrap --overlay-src "$MASTERDIR" --tmp-overlay / \
28+
--ro-bind "$DISTDIR" /void-packages \
29+
--dev /dev --tmpfs /tmp --proc /proc \
30+
${HOSTDIR:+--bind "$HOSTDIR" /host} ${EXTRA_ARGS} "$@"
31+
fi

common/chroot-style/uchroot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ if [ -z "$MASTERDIR" ] || [ -z "$DISTDIR" ]; then
3333
exit 1
3434
fi
3535

36-
exec xbps-uchroot $EXTRA_ARGS -b $DISTDIR:/void-packages ${HOSTDIR:+-b $HOSTDIR:/host} -- $MASTERDIR $CMD $@
36+
exec xbps-uchroot ${XBPS_TEMP_MASTERDIR:+-O} $EXTRA_ARGS -b $DISTDIR:/void-packages ${HOSTDIR:+-b $HOSTDIR:/host} -- $MASTERDIR $CMD "$@"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hostmakedepends+=" cabal-install git"
2+
build_helper+=" haskell"

0 commit comments

Comments
 (0)