Import upstream in common

This commit is contained in:
KF-Art 2023-11-12 16:04:24 -05:00
parent 10924cb352
commit b697462e4c
44 changed files with 686 additions and 1082 deletions

View file

@ -11,27 +11,43 @@ if [[ $hostmakedepends != *"python3-numpy"* ]]; then
hostmakedepends+=" python3-numpy"
fi
if [ "$CROSS_BUILD" ]; then
if [[ $makedepends != *"python3-numpy"* ]]; then
makedepends+=" python3-numpy"
fi
[ -z "$CROSS_BUILD" ] && return 0
# python3-setuptools finds numpy libs and headers on the host first;
# adding search paths up front allows the target to take priority
CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/core/include"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/core/lib"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/random/lib"
# distutils from python3-numpy looks to environment variables F77 and
# F90 rather than the XBPS-set FC
export F77="${FC}"
export F90="${FC}"
# When compiling and linking FORTRAN, distutils from python3-numpy
# refuses respect any linker name except "gfortran"; symlink to the
# cross-compiler to that the right linker and compiler will be used
if _gfortran=$(command -v "${FC}"); then
ln -sf "${_gfortran}" "${XBPS_WRAPPERDIR}/gfortran"
fi
unset _gfortran
if [[ $makedepends != *"python3-numpy"* ]]; then
makedepends+=" python3-numpy"
fi
# python3-setuptools finds numpy libs and headers on the host first;
# adding search paths up front allows the target to take priority
CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/core/include"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/core/lib"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/random/lib"
# distutils from python3-numpy looks to environment variables F77 and
# F90 rather than the XBPS-set FC
export F77="${FC}"
export F90="${FC}"
# When compiling and linking FORTRAN, distutils from python3-numpy
# refuses respect any linker name except "gfortran"; symlink to the
# cross-compiler to that the right linker and compiler will be used
if _gfortran=$(command -v "${FC}"); then
ln -sf "${_gfortran}" "${XBPS_WRAPPERDIR}/gfortran"
fi
unset _gfortran
# Write a secondary meson cross file for numpy configuration
if [[ "${build_helper}" = *meson* ]]; then
_npy_meson_cross="${XBPS_WRAPPERDIR}/meson/xbps_numpy.cross"
_cross_py_site="${XBPS_CROSS_BASE}/${py3_sitelib}"
if [ ! -e "${_npy_meson_cross}" ] || [ -n "$XBPS_BUILD_FORCEMODE" ]; then
mkdir -p "${XBPS_WRAPPERDIR}/meson"
cat > "${_npy_meson_cross}" <<-EOF
[properties]
numpy-include-dir = '${_cross_py_site}/numpy/core/include'
pythran-include-dir = '${_cross_py_site}/pythran'
EOF
fi
unset _npy_meson_cross _cross_py_site
fi

View file

@ -33,6 +33,10 @@ fi
# For cross-compiling rust -sys crates
export PKG_CONFIG_ALLOW_CROSS=1
# For cross-compiling pyo3 bindings
export PYO3_CROSS_LIB_DIR="${XBPS_CROSS_BASE}/usr/lib"
export PYO3_CROSS_INCLUDE_DIR="${XBPS_CROSS_BASE}/usr/include"
# gettext-rs
export GETTEXT_BIN_DIR=/usr/bin
export GETTEXT_LIB_DIR="${XBPS_CROSS_BASE}/usr/lib/gettext"

View file

@ -31,6 +31,7 @@ _EOF
ppc64*) _CMAKE_SYSTEM_PROCESSOR=ppc64 ;;
ppcle*) _CMAKE_SYSTEM_PROCESSOR=ppcle ;;
ppc*) _CMAKE_SYSTEM_PROCESSOR=ppc ;;
riscv64*) _CMAKE_SYSTEM_PROCESSOR=riscv64 ;;
*) _CMAKE_SYSTEM_PROCESSOR=generic ;;
esac
cat > cross_${XBPS_CROSS_TRIPLET}.cmake <<_EOF
@ -39,6 +40,7 @@ SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER ${CC})
SET(CMAKE_CXX_COMPILER ${CXX})
SET(Rust_CARGO_TARGET ${XBPS_CROSS_RUST_TARGET})
SET(CMAKE_CROSSCOMPILING TRUE)
SET(CMAKE_SYSTEM_PROCESSOR ${_CMAKE_SYSTEM_PROCESSOR})
@ -51,11 +53,10 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
_EOF
cmake_args+=" -DCMAKE_TOOLCHAIN_FILE=${wrksrc}/${build_wrksrc}/${cmake_builddir}/cross_${XBPS_CROSS_TRIPLET}.cmake"
fi
cmake_args+=" -DCMAKE_INSTALL_PREFIX=/usr"
cmake_args+=" -DCMAKE_INSTALL_PREFIX:PATH=/usr"
cmake_args+=" -DCMAKE_BUILD_TYPE=None"
cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib${XBPS_TARGET_WORDSIZE}"
cmake_args+=" -DCMAKE_INSTALL_SYSCONFDIR=/etc"
cmake_args+=" -DFETCHCONTENT_FULLY_DISCONNECTED=ON"
cmake_args+=" -DCMAKE_INSTALL_LIBDIR:PATH=lib${XBPS_TARGET_WORDSIZE}"
cmake_args+=" -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc"
if [ "$CROSS_BUILD" ]; then
cmake_args+=" -DQT_HOST_PATH=/usr"
@ -69,7 +70,7 @@ _EOF
>> cross_${XBPS_CROSS_TRIPLET}.cmake
fi
cmake_args+=" -DCMAKE_INSTALL_SBINDIR=bin"
cmake_args+=" -DCMAKE_INSTALL_SBINDIR:PATH=bin"
export CMAKE_GENERATOR="${CMAKE_GENERATOR:-Ninja}"
# Remove -pipe: https://gitlab.kitware.com/cmake/cmake/issues/19590

View file

@ -32,6 +32,16 @@ do_build() {
go_package=${go_package:-$go_import_path}
# Build using Go modules if there's a go.mod file
if [ "${go_mod_mode}" != "off" ] && [ -f go.mod ]; then
if [[ -n "${_go_mod_path}" ]]; then
pushd $(dirname ${_go_mod_path})
fi
# Check if go_import_path matches module
if [ "module $go_import_path" != "$(grep '^module' go.mod | head -n1)" ]; then
msg_error "\"\$go_import_path\" doesn't match the one defined in go.mod!\n"
fi
if [ -z "${go_mod_mode}" ] && [ -d vendor ]; then
msg_normal "Using vendor dir for $pkgname Go dependencies.\n"
go_mod_mode=vendor
@ -40,10 +50,13 @@ do_build() {
# default behavior.
go_mod_mode=
fi
go install -p "$XBPS_MAKEJOBS" -mod="${go_mod_mode}" -modcacherw -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
go install -p "$XBPS_MAKEJOBS" -mod="${go_mod_mode}" -modcacherw -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
if [[ -n "${_go_mod_path}" ]]; then
popd
fi
else
# Otherwise, build using GOPATH
go get -p "$XBPS_MAKEJOBS" -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
go get -p "$XBPS_MAKEJOBS" -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
fi
}

View file

@ -1,94 +1,11 @@
#
# This helper is for templates using meson.
#
do_patch() {
: ${meson_crossfile:=xbps_meson.cross}
if [ "$CROSS_BUILD" ]; then
_MESON_TARGET_ENDIAN=little
# drop the -musl suffix to the target cpu, meson doesn't recognize it
_MESON_TARGET_CPU=${XBPS_TARGET_MACHINE/-musl/}
case "$XBPS_TARGET_MACHINE" in
mips|mips-musl|mipshf-musl)
_MESON_TARGET_ENDIAN=big
_MESON_CPU_FAMILY=mips
;;
armv*)
_MESON_CPU_FAMILY=arm
;;
i686*)
_MESON_CPU_FAMILY=x86
;;
ppc64le*)
_MESON_CPU_FAMILY=ppc64
;;
ppc64*)
_MESON_TARGET_ENDIAN=big
_MESON_CPU_FAMILY=ppc64
;;
ppcle*)
_MESON_CPU_FAMILY=ppc
;;
ppc*)
_MESON_TARGET_ENDIAN=big
_MESON_CPU_FAMILY=ppc
;;
*)
# if we reached here that means that the cpu and cpu_family
# are the same like 'x86_64' and 'aarch64'
_MESON_CPU_FAMILY=${_MESON_TARGET_CPU}
;;
esac
# Record cross-compiling information in cross file.
# CFLAGS and LDFLAGS must be set as c_args and c_link_args.
cat > ${meson_crossfile} <<EOF
[binaries]
c = '${CC}'
cpp = '${CXX}'
ar = '${XBPS_CROSS_TRIPLET}-gcc-ar'
nm = '${NM}'
ld = '${LD}'
strip = '${STRIP}'
readelf = '${READELF}'
objcopy = '${OBJCOPY}'
pkgconfig = '${PKG_CONFIG}'
rust = ['rustc', '--target', '${RUST_TARGET}' ,'--sysroot', '${XBPS_CROSS_BASE}/usr']
g-ir-scanner = '${XBPS_CROSS_BASE}/usr/bin/g-ir-scanner'
g-ir-compiler = '${XBPS_CROSS_BASE}/usr/bin/g-ir-compiler'
g-ir-generate = '${XBPS_CROSS_BASE}/usr/bin/g-ir-generate'
llvm-config = '/usr/bin/llvm-config'
cups-config = '${XBPS_CROSS_BASE}/usr/bin/cups-config'
[properties]
needs_exe_wrapper = true
[built-in options]
c_args = ['$(echo ${CFLAGS} | sed -r "s/\s+/','/g")']
c_link_args = ['$(echo ${LDFLAGS} | sed -r "s/\s+/','/g")']
cpp_args = ['$(echo ${CXXFLAGS} | sed -r "s/\s+/','/g")']
cpp_link_args = ['$(echo ${LDFLAGS} | sed -r "s/\s+/','/g")']
[host_machine]
system = 'linux'
cpu_family = '${_MESON_CPU_FAMILY}'
cpu = '${_MESON_TARGET_CPU}'
endian = '${_MESON_TARGET_ENDIAN}'
EOF
if [[ $build_helper = *"qemu"* ]]; then
sed -e "/\[binaries\]/ a exe_wrapper = '/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static'" \
-i ${meson_crossfile}
fi
unset _MESON_CPU_FAMILY _MESON_TARGET_CPU _MESON_TARGET_ENDIAN
fi
}
do_configure() {
: ${meson_cmd:=meson}
: ${meson_builddir:=build}
: ${meson_crossfile:=xbps_meson.cross}
: ${meson_crossfile:="${XBPS_WRAPPERDIR}/meson/xbps_meson.cross"}
if [ "$CROSS_BUILD" ]; then
configure_args+=" --cross-file=${meson_crossfile}"

View file

@ -1,96 +0,0 @@
#
# This helper is for templates installing python modules.
#
do_build() {
: ${python_versions:="2.7 $py3_ver"}
local pyver= tmp_cflags="$CFLAGS" tmp_ldflags="$LDFLAGS"
for pyver in $python_versions; do
if [ -n "$CROSS_BUILD" ]; then
CFLAGS="$tmp_cflags"
LDFLAGS="$tmp_ldflags"
ADDENV=
PYPREFIX="$XBPS_CROSS_BASE"
CFLAGS+=" -I${XBPS_CROSS_BASE}/include/python${pyver} -I${XBPS_CROSS_BASE}/usr/include"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/lib/python${pyver} -L${XBPS_CROSS_BASE}/usr/lib"
CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
LDSHARED="${CC} -shared $LDFLAGS"
case $pyver in
3.*)
for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
f=${f##*/}
_PYTHON_SYSCONFIGDATA_NAME=${f%.py}
done
ADDENV+=" PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}"
ADDENV+=" _PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME""
esac
env CC="$CC" LDSHARED="$LDSHARED" $ADDENV \
PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" python${pyver} setup.py \
build --build-base=build-${pyver} ${make_build_args}
else
python${pyver} setup.py build --build-base=build-${pyver} ${make_build_args}
fi
done
}
do_check() {
: ${python_versions:="2.7 $py3_ver"}
for pyver in $python_versions; do
ln -s build-${pyver} build
if [ -z "$make_check_target" ]; then
if ! python${pyver} setup.py --help test >/dev/null 2>&1; then
msg_warn "No command 'test' defined by setup.py for python${pyver}.\n"
rm build
return 0
fi
fi
${make_check_pre} python${pyver} setup.py ${make_check_target:-test} ${make_check_args}
rm build
done
}
do_install() {
: ${python_versions:="2.7 $py3_ver"}
local pyver=
for pyver in $python_versions; do
if [ -n "$CROSS_BUILD" ]; then
ADDENV=
PYPREFIX="$XBPS_CROSS_BASE"
CFLAGS+=" -I${XBPS_CROSS_BASE}/include/python${pyver} -I${XBPS_CROSS_BASE}/usr/include"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/lib/python${pyver} -L${XBPS_CROSS_BASE}/usr/lib"
CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
LDSHARED="${CC} -shared $LDFLAGS"
case $pyver in
3.*)
for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
f=${f##*/}
_PYTHON_SYSCONFIGDATA_NAME=${f%.py}
done
ADDENV+=" PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}"
ADDENV+=" _PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME""
esac
env CC="$CC" LDSHARED="$LDSHARED" $ADDENV \
PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" python${pyver} setup.py \
build --build-base=build-${pyver} \
install --prefix=/usr --root=${DESTDIR} ${make_install_args}
else
python${pyver} setup.py build --build-base=build-${pyver} \
install --prefix=/usr --root=${DESTDIR} ${make_install_args}
fi
# Rename unversioned scripts to avoid name conflicts.
if [ -d ${DESTDIR}/usr/bin ]; then
find ${DESTDIR}/usr/bin -type f ! -name "*[[:digit:]]" | while IFS= read -r f _; do
mv "${f}" "${f}${pyver%.*}"
echo "[python-module] Unversioned script renamed to '${f#$DESTDIR}${pyver%.*}'"
done
fi
done
}

View file

@ -4,8 +4,18 @@
do_build() {
: ${make_build_target:=.}
: ${make_build_args:=--no-isolation --wheel}
python3 -m build ${make_build_args} ${make_build_target}
if [ "${CROSS_BUILD}" ] && [[ "${build_helper}" = *meson* ]]; then
local mcross="-Csetup-args=--cross-file=${XBPS_WRAPPERDIR}/meson"
make_build_args+=" ${mcross}/xbps_meson.cross"
if [[ "${build_helper}" = *numpy* ]]; then
make_build_args+=" ${mcross}/xbps_numpy.cross"
fi
fi
python3 -m build --no-isolation --wheel \
${make_build_args} ${make_build_target}
}
do_check() {
@ -19,7 +29,7 @@ do_check() {
testjobs="-n $XBPS_MAKEJOBS"
fi
local testdir="${wrksrc}/tmp/$(date +%s)"
local testdir="${wrksrc}/.xbps-testdir/$(date +%s)"
python3 -m installer --destdir "${testdir}" \
${make_install_args} ${make_install_target:-dist/*.whl}

View file

@ -134,7 +134,7 @@ _void_cross_build_bootstrap_gcc() {
--disable-libmudflap \
--disable-libssp \
--disable-libitm \
--disable-libatomic \
--disable-libatomic --disable-autolink-libatomic \
--disable-gcov \
--disable-threads \
--disable-sjlj-exceptions \
@ -377,6 +377,10 @@ _void_cross_build_gcc() {
msg_normal "Building gcc for ${tgt}\n"
# GIANT HACK: create an empty libatomic.a so gcc cross-compile
# below works.
ar r ${wrksrc}/build_root/usr/${tgt}/usr/lib/libatomic.a
mkdir -p ${wrksrc}/gcc_build
cd ${wrksrc}/gcc_build
@ -641,9 +645,6 @@ do_install() {
ln -sf libgnat-${gcc_major}.so ${DESTDIR}/${sysroot}/usr/lib/libgnat.so
rm -vf ${DESTDIR}/${adalib}/libgna{rl,t}.so
# Remove unnecessary libatomic which is only built for gccgo
rm -rf ${DESTDIR}/${sysroot}/usr/lib/libatomic.*
# If libquadmath was forced (needed for gfortran on some platforms)
# then remove it because it conflicts with libquadmath package
rm -rf ${DESTDIR}/${sysroot}/usr/lib/libquadmath.*

View file

@ -8,6 +8,4 @@ if [ "$CROSS_BUILD" ]; then
makedepends+=" rust-std"
fi
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
build_helper+=" rust"

View file

@ -1,6 +1,6 @@
if [ "$CHROOT_READY" ]; then
if [ "$pkgname" != cmake ]; then
hostmakedepends+=" cmake"
if [ "$pkgname" != cmake-bootstrap ]; then
hostmakedepends+=" cmake-bootstrap"
fi
if [ "${make_cmd:-ninja}" = ninja ]; then
hostmakedepends+=" ninja"
@ -8,3 +8,4 @@ if [ "$CHROOT_READY" ]; then
fi
export CTEST_OUTPUT_ON_FAILURE=TRUE
PATH="$PATH:/usr/libexec/xbps-src/bin"

View file

@ -1,7 +1,7 @@
if [ -z "$hostmakedepends" -o "${hostmakedepends##*gcc-go-tools*}" ]; then
# gc compiler
if [ -z "$archs" ]; then
archs="aarch64* armv[567]* i686* x86_64* ppc64le*"
archs="aarch64* armv[567]* i686* x86_64* ppc64le* riscv64*"
fi
hostmakedepends+=" go"
nopie=yes
@ -9,7 +9,7 @@ else
# gccgo compiler
if [ -z "$archs" ]; then
# we have support for these in our gcc
archs="aarch64* armv[567]* i686* x86_64* ppc64*"
archs="aarch64* armv[567]* i686* x86_64* ppc64* riscv64*"
fi
if [ "$CROSS_BUILD" ]; then
# target compiler to use; otherwise it'll just call gccgo
@ -29,6 +29,7 @@ case "$XBPS_TARGET_MACHINE" in
ppc*) export GOARCH=ppc;;
mipsel*) export GOARCH=mipsle;;
mips*) export GOARCH=mips;;
riscv64*) export GOARCH=riscv64;;
esac
export GOPATH="${wrksrc}/_build-${pkgname}-xbps"
@ -39,6 +40,10 @@ export CGO_CXXFLAGS="$CXXFLAGS"
export CGO_LDFLAGS="$LDFLAGS"
export CGO_ENABLED="${CGO_ENABLED:-1}"
export GO111MODULE=auto
export GOTOOLCHAIN="${GOTOOLCHAIN:-local}"
export GOPROXY="https://proxy.golang.org,direct"
export GOSUMDB="sum.golang.org"
case "$XBPS_TARGET_MACHINE" in
*-musl) export GOCACHE="${XBPS_HOSTDIR}/gocache-muslc" ;;
*) export GOCACHE="${XBPS_HOSTDIR}/gocache-glibc" ;;

View file

@ -1 +1,2 @@
hostmakedepends+=" meson"
build_helper+=" meson"

View file

@ -1,2 +0,0 @@
lib32disabled=yes
makedepends+=" python python3"

View file

@ -123,6 +123,10 @@ case "$XBPS_TARGET_MACHINE" in
. ${_AUTOCONFCACHEDIR}/powerpc-linux
. ${_AUTOCONFCACHEDIR}/powerpc32-linux
;;
riscv*)
. ${_AUTOCONFCACHEDIR}/endian-little
. ${_AUTOCONFCACHEDIR}/riscv64-linux
;;
*) ;;
esac

View file

@ -15,10 +15,10 @@ elif [ -z "${SOURCE_DATE_EPOCH}" ]; then
fi
# check if the template is under version control:
if [ -n "$basepkg" -a -z "$($XBPS_GIT_CMD -C ${XBPS_SRCPKGDIR}/${basepkg} ls-files template)" ]; then
export SOURCE_DATE_EPOCH="$(stat -c %Y ${XBPS_SRCPKGDIR}/${basepkg}/template)"
export SOURCE_DATE_EPOCH="$(stat_mtime ${XBPS_SRCPKGDIR}/${basepkg}/template)"
else
export SOURCE_DATE_EPOCH=$($XBPS_GIT_CMD -C ${XBPS_DISTDIR} cat-file commit HEAD |
sed -n '/^committer /{s/.*> \([0-9][0-9]*\) [-+][0-9].*/\1/p;q}')
sed -n '/^committer /{s/.*> \([0-9][0-9]*\) [-+][0-9].*/\1/p;q;}')
fi
fi

View file

@ -36,3 +36,11 @@ vopt_bool() {
fi
vopt_if "$1" "-D${prop}=true" "-D${prop}=false"
}
vopt_feature() {
local opt="$1" prop="${2:-$1}"
if [ "$#" -gt "2" ]; then
msg_error "vopt_feature $opt: $(($# - 2)) excess parameter(s)\n"
fi
vopt_if "$1" "-D${prop}=enabled" "-D${prop}=disabled"
}

View file

@ -7,7 +7,7 @@ py2_lib="usr/lib/python${py2_ver}"
py2_sitelib="${py2_lib}/site-packages"
py2_inc="usr/include/python${py2_ver}"
py3_ver="3.11"
py3_ver="3.12"
py3_abiver=""
py3_lib="usr/lib/python${py3_ver}"
py3_sitelib="${py3_lib}/site-packages"

View file

@ -5,6 +5,12 @@
for var in $(awk 'BEGIN{for (i in ENVIRON) {print i}}' </dev/null); do
# Those variables in chroot.sh will be kept
case "$var" in
BASH_FUNC_*'%%')
# bash exported functions
var="${var%??}"
var="${var#BASH_FUNC_}"
unset -f "$var"
;;
XBPS_* | IN_CHROOT | CHROOT_READY | SOURCE_DATE_EPOCH)
# xbps-src specific
;;

View file

@ -45,128 +45,7 @@ hook() {
unset found
continue
fi
case $curfile in
*.tar.lzma) cursufx="txz";;
*.tar.lz) cursufx="tlz";;
*.tlz) cursufx="tlz";;
*.tar.xz) cursufx="txz";;
*.txz) cursufx="txz";;
*.tar.bz2) cursufx="tbz";;
*.tbz) cursufx="tbz";;
*.tar.gz) cursufx="tgz";;
*.tgz) cursufx="tgz";;
*.tar.zst) cursufx="tzst";;
*.tzst) cursufx="tzst";;
*.gz) cursufx="gz";;
*.xz) cursufx="xz";;
*.bz2) cursufx="bz2";;
*.zst) cursufx="zst";;
*.tar) cursufx="tar";;
*.zip) cursufx="zip";;
*.rpm) cursufx="rpm";;
*.deb) cursufx="deb";;
*.patch) cursufx="txt";;
*.diff) cursufx="txt";;
*.txt) cursufx="txt";;
*.sh) cursufx="txt";;
*.7z) cursufx="7z";;
*.gem) cursufx="gem";;
*.crate) cursufx="crate";;
*) msg_error "$pkgver: unknown distfile suffix for $curfile.\n";;
esac
case ${cursufx} in
tar|txz|tbz|tlz|tgz|tzst|crate)
$TAR_CMD -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C "$extractdir"
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
;;
gz|bz2|xz|zst)
cp -f $srcdir/$curfile "$extractdir"
cd "$extractdir"
case ${cursufx} in
gz)
gunzip -f $curfile
;;
bz2)
bunzip2 -f $curfile
;;
xz)
unxz -f $curfile
;;
zst)
unzstd $curfile
;;
esac
;;
zip)
if command -v unzip &>/dev/null; then
unzip -o -q $srcdir/$curfile -d "$extractdir"
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
elif command -v bsdtar &>/dev/null; then
bsdtar -xf $srcdir/$curfile -C "$extractdir"
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
else
msg_error "$pkgver: cannot find unzip or bsdtar bin for extraction.\n"
fi
;;
rpm)
if ! command -v bsdtar &>/dev/null; then
msg_error "$pkgver: cannot find bsdtar for extraction.\n"
fi
bsdtar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C "$extractdir"
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
;;
deb)
if command -v bsdtar &>/dev/null; then
bsdtar -x -O -f "$srcdir/$curfile" "data.tar.*" |
bsdtar -C "$extractdir" -x --no-same-permissions --no-same-owner
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
else
msg_error "$pkgver: cannot find bsdtar for extraction.\n"
fi
;;
txt)
cp -f $srcdir/$curfile "$extractdir"
;;
7z)
if command -v 7z &>/dev/null; then
7z x $srcdir/$curfile -o"$extractdir"
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
elif command -v bsdtar &>/dev/null; then
bsdtar -xf $srcdir/$curfile -C "$extractdir"
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
else
msg_error "$pkgver: cannot find 7z or bsdtar bin for extraction.\n"
fi
;;
gem)
innerdir="$extractdir/${wrksrc##*/}"
mkdir -p "$innerdir"
$TAR_CMD -xOf $srcdir/$curfile data.tar.gz |
$TAR_CMD -xz -C "$innerdir" -f -
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
;;
*)
msg_error "$pkgver: cannot guess $curfile extract suffix. ($cursufx)\n"
;;
esac
vsrcextract --no-strip-components -C "$extractdir" "$curfile"
done
cd "$extractdir"

View file

@ -253,7 +253,7 @@ hook() {
if [[ $cksum = $filesum ]]; then
dfgood=$((dfgood + 1))
else
inode=$(stat "$distfile" --printf "%i")
inode=$(stat_inode "$distfile")
msg_warn "$pkgver: wrong checksum found for ${curfile} - purging\n"
find ${XBPS_SRCDISTDIR} -inum ${inode} -delete -print
fi

View file

@ -15,8 +15,7 @@ hook() {
rm -f ${PKGDESTDIR}/usr/share/info/dir
fi
find ${PKGDESTDIR}/usr/share/info -type f -follow | while read f
do
find ${PKGDESTDIR}/usr/share/info -type f -follow | while read -r f; do
j=$(echo "$f"|sed -e "$fpattern")
[ "$j" = "" ] && continue
[ "$j" = "/usr/share/info/dir" ] && continue

View file

@ -9,8 +9,7 @@ hook() {
fi
# rewrite symlinks
find $mandir -type l -regex '.*\.\(gz\|bz2\)' | while read f
do
find $mandir -type l -regex '.*\.\(gz\|bz2\)' | while read -r f; do
lnkat=$(readlink "$f")
ln -s ${lnkat%.*} ${f%.*}
rm $f

View file

@ -2,7 +2,7 @@
hook() {
if [ -d "${PKGDESTDIR}" ]; then
find "${PKGDESTDIR}" -mindepth 1 -type d -empty -print -delete|sort -r|while read f; do
find "${PKGDESTDIR}" -mindepth 1 -type d -empty -print -delete|sort -r|while read -r f; do
_dir="${f##${PKGDESTDIR}}"
msg_warn "$pkgver: removed empty dir: ${_dir}\n"
done

View file

@ -65,7 +65,7 @@ hook() {
STRIPCMD=/usr/bin/$STRIP
find ${PKGDESTDIR} -type f | while read f; do
find ${PKGDESTDIR} -type f | while read -r f; do
if [[ $f =~ ^${PKGDESTDIR}/usr/lib/debug/ ]]; then
continue
fi

View file

@ -16,7 +16,8 @@ hook() {
# s,/usr/armv7l-linux-musleabihf/usr,/usr,g
# trailing /usr to avoid clashing with
# other $XBPS_CROSS_BASE and $XBPS_CROSS_TRIPLET.
sed -i -e "s,$XBPS_CROSS_BASE/usr,/usr,g" "$f"
sed -i --follow-symlinks \
-e "s,$XBPS_CROSS_BASE/usr,/usr,g" "$f"
fi
done
}

View file

@ -238,7 +238,7 @@ hook() {
generic_wrapper3 libetpan-config
generic_wrapper3 giblib-config
python_wrapper python-config 2.7
python_wrapper python3-config 3.11
python_wrapper python3-config 3.12
apr_apu_wrapper apr-1-config
apr_apu_wrapper apu-1-config
}

View file

@ -47,6 +47,7 @@ store_pkgdestdir_rundeps() {
hook() {
local depsftmp f lf j mapshlibs sorequires _curdep elfmagic broken_shlibs verify_deps
local _shlib_dir="${XBPS_STATEDIR}/shlib-provides"
# Disable trap on ERR, xbps-uhelper cmd might return error... but not something
# to be worried about because if there are broken shlibs this hook returns
@ -69,7 +70,7 @@ hook() {
exec 3<&0 # save stdin
exec < $depsftmp
while read f; do
while read -r f; do
lf=${f#${PKGDESTDIR}}
if [ "${skiprdeps/${lf}/}" != "${skiprdeps}" ]; then
msg_normal "Skipping dependency scan for ${lf}\n"
@ -95,65 +96,42 @@ hook() {
# above, the mapping is done thru the common/shlibs file.
#
for f in ${verify_deps}; do
unset _f j rdep _rdep rdepcnt soname _pkgname _rdepver found
_f=$(echo "$f"|sed -E 's|\+|\\+|g')
rdep="$(grep -E "^${_f}[[:blank:]]+.*$" $mapshlibs|cut -d ' ' -f2)"
rdepcnt="$(grep -E "^${_f}[[:blank:]]+.*$" $mapshlibs|cut -d ' ' -f2|wc -l)"
if [ -z "$rdep" ]; then
unset _rdep _pkgname _rdepver
if [ "$(find ${PKGDESTDIR} -name "$f")" ]; then
# Ignore libs by current pkg
soname=$(find ${PKGDESTDIR} -name "$f")
if [ -z "$soname" ]; then
echo " SONAME: $f <-> $pkgname (ignored)"
continue
# If this library is provided by a subpkg of sourcepkg, use that subpkg
elif _pkgname="$(cd "$_shlib_dir" && grep -F -l -x "$f" *.soname 2>/dev/null)"; then
# If that library has SONAME, add it to shlibs-requires, too.
_pkgname=${_pkgname%.soname}
_sdep="${_pkgname}-${version}_${revision}"
sorequires+="${f} "
elif _pkgname="$(cd "$_shlib_dir" && grep -F -l -x "$f" *.nosoname 2>/dev/null)"; then
_pkgname=${_pkgname%.nosoname}
_sdep="${_pkgname}-${version}_${revision}"
else
_rdep="$(awk -v sl="$f" '$1 == sl { print $2; exit; }' "$mapshlibs")"
if [ -z "$_rdep" ]; then
msg_red_nochroot " SONAME: $f <-> UNKNOWN PKG PLEASE FIX!\n"
broken_shlibs=1
else
echo " SONAME: $f <-> $pkgname (ignored)"
continue
fi
continue
elif [ "$rdepcnt" -gt 1 ]; then
unset j found
# Check if shlib is provided by multiple pkgs.
for j in ${rdep}; do
_pkgname=$($XBPS_UHELPER_CMD getpkgname "$j")
# if there's a SONAME matching pkgname, use it.
for x in ${pkgname} ${subpackages}; do
[[ $_pkgname == $x ]] && found=1 && break
done
[[ $found ]] && _rdep=$j && break
done
if [ -z "${_rdep}" ]; then
# otherwise pick up the first one.
for j in ${rdep}; do
[ -z "${_rdep}" ] && _rdep=$j
done
_pkgname=$($XBPS_UHELPER_CMD getpkgname "${_rdep}" 2>/dev/null)
_rdepver=$($XBPS_UHELPER_CMD getpkgversion "${_rdep}" 2>/dev/null)
if [ -z "${_pkgname}" -o -z "${_rdepver}" ]; then
msg_red_nochroot " SONAME: $f <-> UNKNOWN PKG PLEASE FIX!\n"
broken_shlibs=1
continue
fi
else
_rdep=$rdep
fi
_pkgname=$($XBPS_UHELPER_CMD getpkgname "${_rdep}" 2>/dev/null)
_rdepver=$($XBPS_UHELPER_CMD getpkgversion "${_rdep}" 2>/dev/null)
if [ -z "${_pkgname}" -o -z "${_rdepver}" ]; then
msg_red_nochroot " SONAME: $f <-> UNKNOWN PKG PLEASE FIX!\n"
broken_shlibs=1
continue
fi
# Check if pkg is a subpkg of sourcepkg; if true, ignore version
# in common/shlibs.
_sdep="${_pkgname}>=${_rdepver}"
for _subpkg in ${subpackages}; do
if [ "${_subpkg}" = "${_pkgname}" ]; then
_sdep="${_pkgname}-${version}_${revision}"
break
fi
done
_sdep="${_pkgname}>=${_rdepver}"
if [ "${_pkgname}" != "${pkgname}" ]; then
echo " SONAME: $f <-> ${_sdep}"
# By this point, SONAME can't be found in current pkg
sorequires+="${f} "
else
# Ignore libs by current pkg
echo " SONAME: $f <-> ${_rdep} (ignored)"
continue
fi
echo " SONAME: $f <-> ${_sdep}"
add_rundep "${_sdep}"
done
#

View file

@ -1,168 +0,0 @@
# This hook creates a new PKGDESTDIR with 32bit files for x86_64.
#
# Variables that can be used in templates:
# - lib32depends: if set, 32bit pkg will use this rather than "depends".
# - lib32disabled: if set, no 32bit pkg will be created.
# - lib32files: additional files to add to the 32bit pkg (abs paths, separated by blanks).
# - lib32symlinks: makes a symlink from lib32 to lib of the specified file (basename).
# - lib32mode:
# * if unset only files for libraries will be copied.
# * if set to "full" all files will be copied.
hook() {
local destdir32=${XBPS_DESTDIR}/${pkgname}-32bit-${version}
# By default always enabled unless "lib32disabled" is set.
if [ -n "$lib32disabled" ]; then
return
fi
# This hook will only work when building for x86.
if [ "$XBPS_TARGET_MACHINE" != "i686" ]; then
return
fi
if [ -z "$lib32mode" ]; then
# Library mode, copy only relevant files to new destdir.
#
# If /usr/lib does not exist don't continue...
# except for devel packages, for which empty 32bit package will be created
if ! [ -d ${PKGDESTDIR}/usr/lib ] && ! [[ ${pkgname} == *-devel ]]; then
return
fi
mkdir -p ${destdir32}/usr/lib32
if [ -d ${PKGDESTDIR}/usr/lib ]; then
cp -a ${PKGDESTDIR}/usr/lib/* ${destdir32}/usr/lib32
fi
# Only keep shared libs, static libs, and pkg-config files.
find "${destdir32}" -not \( \
-name '*.pc' -or \
-name '*.so' -or \
-name '*.so.*' -or \
-name '*.a' -or \
-name '*.la' -or \
-name '*.o' -or \
-type d \
\) -delete
# Remove empty dirs.
while IFS= read -r -d '' f; do
_dir="${f##${destdir32}}"
[ -z "${_dir}" ] && continue
rmdir --ignore-fail-on-non-empty -p "$f" &>/dev/null
done < <(find ${destdir32} -type d -empty -print0 | sort -uz)
# Switch pkg-config files to lib32.
if [ -d ${destdir32}/usr/lib32/pkgconfig ]; then
sed -e 's,/usr/lib$,/usr/lib32,g' \
-e 's,${exec_prefix}/lib$,${exec_prefix}/lib32,g' \
-i ${destdir32}/usr/lib32/pkgconfig/*.pc
fi
elif [ "$lib32mode" = "full" ]; then
# Full 32bit mode; copy everything to new destdir.
mkdir -p ${destdir32}
cp -a ${PKGDESTDIR}/* ${destdir32}/
# remove symlink
if [ -h ${destdir32}/usr/lib32 ]; then
rm ${destdir32}/usr/lib32
fi
# if /usr/lib dir exists move it to lib32.
if [ -d ${destdir32}/usr/lib ]; then
mv ${destdir32}/usr/lib ${destdir32}/usr/lib32
fi
fi
if [[ ${pkgname} == *-devel ]]; then
mkdir -p ${destdir32}
fi
if [ ! -d ${destdir32} ]; then
return
fi
# If the rdeps file exist (runtime deps), copy and then modify it for
# 32bit dependencies.
trap - ERR
: > ${destdir32}/rdeps
if [ -s "$PKGDESTDIR/rdeps" ]; then
if [ -n "$lib32depends" ]; then
_deps="${lib32depends}"
else
_deps="$(<${PKGDESTDIR}/rdeps)"
fi
for f in ${_deps}; do
unset found pkgn pkgv _shprovides
pkgn="$($XBPS_UHELPER_CMD getpkgdepname $f)"
if [ -z "${pkgn}" ]; then
pkgn="$($XBPS_UHELPER_CMD getpkgname $f)"
if [ -z "${pkgn}" ]; then
msg_error "$pkgver: invalid dependency $f\n"
fi
pkgv="-$($XBPS_UHELPER_CMD getpkgversion ${f})"
else
pkgv="$($XBPS_UHELPER_CMD getpkgdepversion ${f})"
fi
# If dependency is a development pkg switch it to 32bit.
if [[ $pkgn == *-devel ]]; then
echo " RDEP: $f -> ${pkgn}-32bit${pkgv} (development)"
printf "${pkgn}-32bit${pkgv} " >> ${destdir32}/rdeps
continue
fi
# If dependency does not have "shlib-provides" do not
# change it to 32bit.
for x in ${subpackages}; do
if [ "$x" = "$pkgn" ]; then
found=1
break
fi
done
if [ -z "$found" ]; then
# Dependency is not a subpkg, check shlib-provides
# via binpkgs.
_shprovides="$($XBPS_QUERY_CMD -R --property=shlib-provides "$pkgn")"
if [ -n "${_shprovides}" ]; then
echo " RDEP: $f -> ${pkgn}-32bit${pkgv} (shlib-provides)"
printf "${pkgn}-32bit${pkgv} " >> ${destdir32}/rdeps
else
echo " RDEP: $f -> ${pkgn}${pkgv} (no shlib-provides)"
printf "${pkgn}${pkgv} " >> ${destdir32}/rdeps
fi
else
if [ -s ${XBPS_DESTDIR}/${pkgn}-${version}/shlib-provides ]; then
# Dependency is a subpkg; check if it provides any shlib
# and convert to 32bit if true.
echo " RDEP: $f -> ${pkgn}-32bit${pkgv} (subpkg, shlib-provides)"
printf "${pkgn}-32bit${pkgv} " >> ${destdir32}/rdeps
else
echo " RDEP: $f -> ${pkgn}${pkgv} (subpkg, no shlib-provides)"
printf "${pkgn}${pkgv} " >> ${destdir32}/rdeps
fi
fi
done
fi
# Also install additional files set via "lib32files".
for f in ${lib32files}; do
echo "$pkgver: installing additional files: $f ..."
_targetdir=${destdir32}/${f%/*}/
mkdir -p ${_targetdir/\/usr\/lib/\/usr\/lib32}
cp -a ${PKGDESTDIR}/${f} ${_targetdir/\/usr\/lib/\/usr\/lib32}
done
# Additional symlinks to the native libdir.
for f in ${lib32symlinks}; do
echo "$pkgver: symlinking $f to the native libdir..."
if [ "${f%/*}" != "${f}" ]; then
mkdir -p ${destdir32}/usr/lib{,32}/${f%/*}/
else
mkdir -p ${destdir32}/usr/lib{,32}/
fi
ln -sfr ${destdir32}/usr/lib32/$f ${destdir32}/usr/lib/$f
done
# If it's a development pkg add a dependency to the 64bit pkg.
if [[ $pkgn == *-devel ]]; then
echo " RDEP: ${pkgver}"
printf "${pkgver} " >> ${destdir32}/rdeps
fi
printf "\n" >> ${destdir32}/rdeps
}

View file

@ -1,56 +0,0 @@
# This hook executes the following tasks:
# - generates shlib-provides file for xbps-create(1)
collect_sonames() {
local _destdir="$1" f _soname _fname _pattern
local _pattern="^[[:alnum:]]+(.*)+\.so(\.[0-9]+)*$"
local _versioned_pattern="^[[:alnum:]]+(.*)+\.so(\.[0-9]+)+$"
local _tmpfile=$(mktemp) || exit 1
if [ ! -d ${_destdir} ]; then
rm -f ${_tmpfile}
return 0
fi
# real pkg
find ${_destdir} -type f -name "*.so*" | while read f; do
_fname="${f##*/}"
case "$(file -bi "$f")" in
application/x-sharedlib*|application/x-pie-executable*)
# shared library
_soname=$(${OBJDUMP} -p "$f"|grep SONAME|awk '{print $2}')
# Register all versioned sonames, and
# unversioned sonames only when in libdir.
if [[ ${_soname} =~ ${_versioned_pattern} ]] ||
[[ ${_soname} =~ ${_pattern} &&
( -e ${_destdir}/usr/lib/${_fname} ||
-e ${_destdir}/usr/lib32/${_fname} ) ]]; then
echo "${_soname}" >> ${_tmpfile}
echo " SONAME ${_soname} from ${f##${_destdir}}"
fi
;;
esac
done
for f in ${shlib_provides}; do
echo "$f" >> ${_tmpfile}
done
if [ -s "${_tmpfile}" ]; then
tr '\n' ' ' < "${_tmpfile}" > ${_destdir}/shlib-provides
echo >> ${_destdir}/shlib-provides
fi
rm -f ${_tmpfile}
}
hook() {
local _destdir32=${XBPS_DESTDIR}/${pkgname}-32bit-${version}
if [ -n "$noshlibprovides" ]; then
return 0
fi
# native pkg
collect_sonames ${PKGDESTDIR}
# 32bit pkg
collect_sonames ${_destdir32}
}

View file

@ -171,7 +171,7 @@ hook() {
_pattern="^${_shlib}\.so\.[0-9]+(.*)[[:blank:]]+${_pkgname}-[^-]+_[0-9]+"
fi
grep -E "${_pattern}" $mapshlibs | { \
while read conflictFile conflictPkg ignore; do
while read -r conflictFile conflictPkg ignore; do
found=1
conflictRev=${conflictFile#*.so.}
if [ -n "$ignore" -a "$ignore" != "$XBPS_TARGET_MACHINE" ]; then

View file

@ -109,7 +109,7 @@ list_interesting_files() {
if partial_check; then
list_newly_built_files
else
xlocate / | sed s'/ -> .*//' | grep -F -f <(xlocate / | cut -f 2- | sed s'/ -> .*//' | sort | uniq -d)
xlocate / | sed s'/ -> .*//' | grep -F -f <(xlocate / | sed 's/[^[:space:]]*[[:space:]]*//' | sed s'/ -> .*//' | sort | uniq -d)
fi
}

View file

@ -84,7 +84,7 @@ def find_cycles(depmap, xbpsdir):
try: deps = pkgs.pop(p)
except KeyError: break
# Any of the dependencies here contributes to a cycle
# Any of the dependencies here contributes to a cycle
p = min(deps)
if len(deps) > 1:
print('Multipath: {} -> {}, choosing first'.format(p, deps))
@ -97,8 +97,8 @@ if __name__ == '__main__':
parser = ArgumentParser(description='Cycle detector for xbps-src')
parser.add_argument('-j', '--jobs', default=None,
type=int, help='Number of parallel jobs')
parser.add_argument('-c', '--cachedir',
default=None, help='''Directory to use as cache for xbps-src show-build-deps. Directory must exist already.''')
parser.add_argument('-c', '--cachedir', default=None,
help='Directory used to cache build dependencies (must exist)')
parser.add_argument('-d', '--directory',
default=None, help='Path to void-packages repo')
@ -108,13 +108,12 @@ if __name__ == '__main__':
try: args.directory = os.environ['XBPS_DISTDIR']
except KeyError: args.directory = '.'
cachedir = args.cachedir
pool = multiprocessing.Pool(processes = args.jobs)
pattern = os.path.join(args.directory, 'srcpkgs', '*')
depmap = dict(pool.starmap(enum_depends,
((os.path.basename(g), args.directory, cachedir)
for g in glob.iglob(pattern))))
pkgs = {os.path.realpath(p) for p in glob.iglob(pattern)}
depargs = ((os.path.basename(g), args.directory, args.cachedir) for g in pkgs)
depmap = dict(pool.starmap(enum_depends, depargs))
find_cycles(depmap, args.directory)

File diff suppressed because it is too large Load diff

View file

@ -24,5 +24,6 @@ git diff-tree -r --no-renames --name-only --diff-filter=AM \
"$base" "$tip" \
-- 'srcpkgs/*/template' |
cut -d/ -f 2 |
xargs ./xbps-src sort-dependencies |
tee /tmp/templates |
sed "s/^/ /" >&2

View file

@ -1,9 +0,0 @@
#!/bin/sh
#
# changed_templates.sh
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master

View file

@ -22,7 +22,10 @@ APSL-1.0
APSL-1.1
APSL-1.2
APSL-2.0
ASWF-Digital-Assets-1.0
ASWF-Digital-Assets-1.1
Abstyles
AdaCore-doc
Adobe-2006
Adobe-Glyph
Afmparse
@ -36,8 +39,11 @@ Artistic-1.0-Perl
Artistic-1.0-cl8
Artistic-1.0
Artistic-2.0
Asterisk-exception
Autoconf-exception-2.0
Autoconf-exception-3.0
Autoconf-exception-generic
Autoconf-exception-macro
BSD-1-Clause
BSD-2-Clause-Patent
BSD-2-Clause-Views
@ -55,6 +61,10 @@ BSD-3-Clause
BSD-4-Clause-Shortened
BSD-4-Clause-UC
BSD-4-Clause
BSD-4.3RENO
BSD-4.3TAHOE
BSD-Advertising-Acknowledgement
BSD-Attribution-HPND-disclaimer
BSD-Protection
BSD-Source-Code
BSL-1.0
@ -66,10 +76,13 @@ Beerware
Bison-exception-2.2
BitTorrent-1.0
BitTorrent-1.1
Bitstream-Charter
Bitstream-Vera
BlueOak-1.0.0
Boehm-GC
Bootloader-exception
Borceux
Brian-Gladman-3-Clause
C-UDA-1.0
CAL-1.0-Combined-Work-Exception
CAL-1.0
@ -99,6 +112,7 @@ CC-BY-NC-ND-3.0-IGO
CC-BY-NC-ND-3.0
CC-BY-NC-ND-4.0
CC-BY-NC-SA-1.0
CC-BY-NC-SA-2.0-DE
CC-BY-NC-SA-2.0-FR
CC-BY-NC-SA-2.0-UK
CC-BY-NC-SA-2.0
@ -120,6 +134,7 @@ CC-BY-SA-2.1-JP
CC-BY-SA-2.5
CC-BY-SA-3.0-AT
CC-BY-SA-3.0-DE
CC-BY-SA-3.0-IGO
CC-BY-SA-3.0
CC-BY-SA-4.0
CC-PDDC
@ -141,7 +156,9 @@ CERN-OHL-1.2
CERN-OHL-P-2.0
CERN-OHL-S-2.0
CERN-OHL-W-2.0
CFITSIO
CLISP-exception-2.0
CMU-Mach
CNRI-Jython
CNRI-Python-GPL-Compatible
CNRI-Python
@ -153,8 +170,10 @@ CUA-OPL-1.0
Caldera
ClArtistic
Classpath-exception-2.0
Clips
Community-Spec-1.0
Condor-1.1
Cornell-Lossless-JPEG
Crossword
CrystalStacker
Cube
@ -216,10 +235,12 @@ GFDL-1.3-only
GFDL-1.3-or-later
GL2PS
GLWTPL
GNAT-exception
GPL-1.0-only
GPL-1.0-or-later
GPL-2.0-only
GPL-2.0-or-later
GPL-3.0-interface-exception
GPL-3.0-linking-exception
GPL-3.0-linking-source-exception
GPL-3.0-only
@ -230,6 +251,11 @@ GStreamer-exception-2008
Giftware
Glide
Glulxe
Graphics-Gems
HP-1986
HPND-Markus-Kuhn
HPND-export-US
HPND-sell-variant-MIT-disclaimer
HPND-sell-variant
HPND
HTMLTIDY
@ -237,6 +263,8 @@ HaskellReport
Hippocratic-2.1
IBM-pibs
ICU
IEC-Code-Components-EULA
IJG-short
IJG
IPA
IPL-1.0
@ -244,13 +272,16 @@ ISC
ImageMagick
Imlib2
Info-ZIP
Inner-Net-2.0
Intel-ACPI
Intel
Interbase-1.0
JPL-image
JPNIC
JSON
Jam
JasPer-2.0
Kazlib
KiCad-libraries-exception
Knuth-CTAN
LAL-1.2
@ -263,7 +294,9 @@ LGPL-3.0-linking-exception
LGPL-3.0-only
LGPL-3.0-or-later
LGPLLR
LLGPL
LLVM-exception
LOOP
LPL-1.0
LPL-1.02
LPPL-1.0
@ -274,6 +307,7 @@ LPPL-1.3c
LZMA-SDK-9.11-to-9.20
LZMA-SDK-9.22
LZMA-exception
Latex2e-translated-notice
Latex2e
Leptonica
LiLiQ-P-1.1
@ -282,11 +316,16 @@ LiLiQ-Rplus-1.1
Libpng
Libtool-exception
Linux-OpenIB
Linux-man-pages-1-para
Linux-man-pages-copyleft-2-para
Linux-man-pages-copyleft-var
Linux-man-pages-copyleft
Linux-syscall-note
MIT-0
MIT-CMU
MIT-Festival
MIT-Modern-Variant
MIT-Wu
MIT-advertising
MIT-enna
MIT-feh
@ -302,6 +341,7 @@ MS-PL
MS-RL
MTLL
MakeIndex
Martin-Birgmeier
Minpack
MirOS
Motosoto
@ -318,6 +358,7 @@ NGPL
NICTA-1.0
NIST-PD-fallback
NIST-PD
NIST-Software
NLOD-1.0
NLOD-2.0
NLPL
@ -342,6 +383,7 @@ OCLC-2.0
OCaml-LGPL-linking-exception
ODC-By-1.0
ODbL-1.0
OFFIS
OFL-1.0-RFN
OFL-1.0-no-RFN
OFL-1.0
@ -371,8 +413,10 @@ OLDAP-2.5
OLDAP-2.6
OLDAP-2.7
OLDAP-2.8
OLFL-1.3
OML
OPL-1.0
OPL-UK-3.0
OPUBL-1.0
OSET-PL-2.1
OSL-1.0
@ -381,6 +425,7 @@ OSL-2.0
OSL-2.1
OSL-3.0
OpenJDK-assembly-exception-1.0
OpenPBS-2.3
OpenSSL
PDDL-1.0
PHP-3.0
@ -395,6 +440,8 @@ PolyForm-Small-Business-1.0.0
PostgreSQL
Python-2.0.1
Python-2.0
QPL-1.0-INRIA-2004-exception
QPL-1.0-INRIA-2004
QPL-1.0
Qhull
Qt-GPL-exception-1.0
@ -413,6 +460,7 @@ SCEA
SGI-B-1.0
SGI-B-1.1
SGI-B-2.0
SGP4
SHL-0.5
SHL-0.51
SHL-2.0
@ -426,6 +474,7 @@ SPL-1.0
SSH-OpenSSH
SSH-short
SSPL-1.0
SWI-exception
SWL
Saxpath
SchemeReport
@ -437,21 +486,29 @@ Spencer-86
Spencer-94
Spencer-99
SugarCRM-1.1.3
SunPro
Swift-exception
Symlinks
TAPR-OHL-1.0
TCL
TCP-wrappers
TMate
TORQUE-1.1
TOSL
TPDL
TPL-1.0
TTWL
TU-Berlin-1.0
TU-Berlin-2.0
TermReadKey
UCAR
UCL-1.0
UPL-1.0
Unicode-DFS-2015
Unicode-DFS-2016
Unicode-TOU
Universal-FOSS-exception-1.0
UnixCrypt
Unlicense
VOSTROM
VSL-1.0
@ -461,13 +518,16 @@ W3C-20150513
W3C
WTFPL
Watcom-1.0
Widget-Workshop
Wsuipa
WxWindows-exception-3.1
X11-distribute-modifications-variant
X11
XFree86-1.1
XSkat
Xdebug-1.03
Xerox
Xfig
Xnet
YPL-1.0
YPL-1.1
@ -484,6 +544,7 @@ bzip2-1.0.6
checkmk
copyleft-next-0.3.0
copyleft-next-0.3.1
cryptsetup-OpenSSL-exception
curl
deprecated_AGPL-1.0
deprecated_AGPL-3.0
@ -517,6 +578,7 @@ deprecated_bzip2-1.0.5
deprecated_eCos-2.0
deprecated_wxWindows
diffmark
dtoa
dvipdfm
eCos-exception-2.0
eGenix
@ -528,9 +590,11 @@ gnuplot
i2p-gpl-java-exception
iMatix
libpng-2.0
libpri-OpenH323-exception
libselinux-1.0
libtiff
libutil-David-Nugent
metamail
mif-exception
mpi-permissive
mpich2
@ -538,8 +602,12 @@ mplus
openvpn-openssl-exception
psfrag
psutils
snprintf
u-boot-exception-2.0
vsftpd-openssl-exception
w3m
x11vnc-openssl-exception
xinetd
xlock
xpp
zlib-acknowledgement

View file

@ -2,8 +2,6 @@
#
# prepare.sh
[ "$XLINT" ] && exit 0
/bin/echo -e '\x1b[32mUpdating etc/conf...\x1b[0m'
echo XBPS_BUILD_ENVIRONMENT=void-packages-ci >> etc/conf
echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf

View file

@ -2,8 +2,6 @@
#
# xlint.sh
[ "$XLINT" ] || exit 0
EXITCODE=0
read base tip < /tmp/revisions

View file

@ -8,11 +8,11 @@ ARGS=("$@")
i=0
while [ $i -lt ${#ARGS[@]} ]; do
arg="${ARGS[$i]}"
if [ "$incpath" ]; then
if [ -n "$incpath" ]; then
if [ "$arg" = "/usr/include" ]; then
echo "[cc-wrapper] ignoring -I $arg"
echo "[cc-wrapper] ignoring ${incpath} $arg"
else
MYARGS+=("-I${arg}")
MYARGS+=("${incpath}${arg}")
fi
unset incpath
elif [ "$libpath" ]; then
@ -23,13 +23,13 @@ while [ $i -lt ${#ARGS[@]} ]; do
MYARGS+=("-L${arg}")
fi
unset libpath
elif [ "$arg" = "-I" ]; then
incpath=1
elif [ "$arg" = "-I" -o "$arg" = "-isystem" ]; then
incpath="$arg"
elif [ "$arg" = "-L" ]; then
libpath=1
elif [ "$arg" = "-I/usr/include" -o "$arg" = "-L/usr/lib" \
elif [ "$arg" = "-I/usr/include" -o "$arg" = "-isystem/usr/include" \
-o "$arg" = "-L/usr/lib32" -o "$arg" = "-L/usr/lib64" \
-o "$arg" = "-L/lib" ]; then
-o "$arg" = "-L/usr/lib" -o "$arg" = "-L/lib" ]; then
echo "[cc-wrapper] ignoring $arg"
else
MYARGS+=("${arg}")

View file

@ -1,5 +1,41 @@
# vim: set ts=4 sw=4 et:
# A portable abstraction for stat(1)
#
# The stat(1) command has different syntaxes between GNU flavor
# and BSD flavor; implementations generally follow one or the other
#
if ! stat -c "%s" / > /dev/null 2>&1; then
# BSD stat
stat_size() {
stat -f %z "$1"
}
stat_inode() {
stat -f %i "$1"
}
stat_mtime() {
stat -f %m "$1"
}
else
# GNU stat
stat_size() {
stat -c %s "$1"
}
stat_inode() {
stat -c %i "$1"
}
stat_mtime() {
stat -c %Y "$1"
}
fi
run_func() {
local func="$1" desc="$2" funcname="$3" restoretrap= logpipe= logfile= teepid=
@ -289,6 +325,7 @@ get_endian() {
ppc*le) echo "le";;
ppc*) echo "be";;
x86_64) echo "le";;
riscv64) echo "le";;
esac
}
@ -316,6 +353,7 @@ get_wordsize() {
ppc64*) echo "64";;
ppc*) echo "32";;
x86_64) echo "64";;
riscv64) echo "64";;
esac
}

View file

@ -16,7 +16,7 @@ remove_pkg_cross_deps() {
$XBPS_REMOVE_XCMD -Ryo > $tmplogf 2>&1
rval=$?
while [ $rval -eq 0 ]; do
local curs=$(stat -c %s $tmplogf)
local curs=$(stat_size $tmplogf)
if [ $curs -eq $prevs ]; then
break
fi

View file

@ -65,11 +65,11 @@ remove_pkg_autodeps() {
remove_pkg_cross_deps
$XBPS_RECONFIGURE_CMD -a >> $tmplogf 2>&1
prevs=$(stat -c %s $tmplogf)
prevs=$(stat_size $tmplogf)
echo yes | $XBPS_REMOVE_CMD -Ryod 2>> $errlogf 1>> $tmplogf
rval=$?
while [ $rval -eq 0 ]; do
local curs=$(stat -c %s $tmplogf)
local curs=$(stat_size $tmplogf)
if [ $curs -eq $prevs ]; then
break
fi

View file

@ -57,7 +57,7 @@ purge_distfiles() {
cur=0
percent=-1
for distfile in ${distfiles[@]}; do
inode=$(stat "$distfile" --printf "%i")
inode=$(stat_inode "$distfile")
if [ -z "${inodes[$inode]}" ]; then
inodes[$inode]="$distfile"
else
@ -77,7 +77,7 @@ purge_distfiles() {
hash_distfile=${file##*/}
hash=${hash_distfile:0:$HASHLEN}
[ -n "${my_hashes[$hash]}" ] && continue
inode=$(stat "$file" --printf "%i")
inode=$(stat_inode "$file")
echo "Obsolete $hash (inode: $inode)"
( IFS="|"; for f in ${inodes[$inode]}; do rm -vf "$f"; rmdir "${f%/*}" 2>/dev/null; done )
done

View file

@ -13,6 +13,10 @@ update_check() {
if [ "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
echo "using $XBPS_TARGET_PKG/update overrides" 1>&2
fi
if [ -n "$disabled" ]; then
echo "update-check DISABLED for $original_pkgname: $disabled" 1>&2
return 0
fi
elif [ -z "$distfiles" ]; then
if [ "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
echo "NO DISTFILES found for $original_pkgname" 1>&2