Skip to content

Commit

Permalink
Merge branch 'master' into hyprland
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit authored Jul 7, 2024
2 parents bd84839 + 8438d9b commit fcf40a5
Show file tree
Hide file tree
Showing 2,321 changed files with 57,466 additions and 18,023 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
paths:
- 'srcpkgs/**'

workflow_dispatch:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
4 changes: 3 additions & 1 deletion Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ package accordingly. Additionally, the following functions are available:
- *vopt_feature()* `vopt_feature <option> <property>`

Same as `vopt_bool`, but uses `-D<property=enabled` and
`-D<property>=disabled` respectively.
`-D<property>=disabled` respectively.

The following example shows how to change a source package that uses GNU
configure to enable a new build option to support PNG images:
Expand Down Expand Up @@ -1630,6 +1630,8 @@ In most cases version is inferred from shebang, install path or build style.
Only required for some multi-language
applications (e.g., the application is written in C while the command is
written in Python) or just single Python file ones that live in `/usr/bin`.
If `python_version` is set to `ignore`, python-containing shebangs will not be rewritten.
Use this only if a package should not be using a system version of python.

Also, a set of useful variables are defined to use in the templates:

Expand Down
2 changes: 1 addition & 1 deletion common/build-helper/meson.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ cat > "${XBPS_WRAPPERDIR}/meson/xbps_meson.cross" <<-EOF
strip = '${STRIP}'
readelf = '${READELF}'
objcopy = '${OBJCOPY}'
pkgconfig = '${PKG_CONFIG}'
pkg-config = '${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'
Expand Down
3 changes: 3 additions & 0 deletions common/build-helper/rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ export LIBSQLITE3_SYS_USE_PKG_CONFIG=1

# jemalloc-sys
export JEMALLOC_SYS_WITH_LG_PAGE=16

# libgit2-sys
export LIBGIT2_NO_VENDOR=1
2 changes: 1 addition & 1 deletion common/build-style/go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ do_build() {
fi
else
# Otherwise, build using GOPATH
go get -p "$XBPS_MAKEJOBS" -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
go install -p "$XBPS_MAKEJOBS" -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
fi
}

Expand Down
39 changes: 23 additions & 16 deletions common/build-style/qmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@
do_configure() {
local qmake
local qmake_args
local qt
if [ -x "/usr/lib/qt5/bin/qmake" ]; then
qmake="/usr/lib/qt5/bin/qmake"
local qt=${QT:-}
local builddir="${wrksrc}/${build_wrksrc}"
cd ${builddir}
if [ "${QT}" ]; then
qt=${QT}
if [ ! -x "/usr/lib/${qt}/bin/qmake" ]; then
msg_error "${QT} is requested, but not found\n"
fi
elif [ -x "/usr/lib/qt5/bin/qmake" ]; then
qt="qt5"
elif [ -x "/usr/lib/qt6/bin/qmake" ]; then
qmake="/usr/lib/qt6/bin/qmake"
qt="qt6"
fi
if [ -z "${qmake}" ]; then
else
msg_error "${pkgver}: Could not find qmake - missing in hostmakedepends?\n"
fi
qmake="/usr/lib/${qt}/bin/qmake"
if [ "$CROSS_BUILD" ]; then
case $XBPS_TARGET_MACHINE in
i686*) _qt_arch=i386;;
Expand All @@ -25,8 +30,8 @@ do_configure() {
ppc64*) _qt_arch=power64;;
ppc*) _qt_arch=power;;
esac
mkdir -p "${wrksrc}/.target-spec/linux-g++"
cat > "${wrksrc}/.target-spec/linux-g++/qmake.conf" <<_EOF
mkdir -p "${builddir}/.target-spec/linux-g++"
cat > "${builddir}/.target-spec/linux-g++/qmake.conf" <<_EOF
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
Expand Down Expand Up @@ -54,10 +59,10 @@ QMAKE_CXXFLAGS = ${CXXFLAGS}
QMAKE_LFLAGS = ${LDFLAGS}
load(qt_config)
_EOF
echo "#include \"${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h\"" > "${wrksrc}/.target-spec/linux-g++/qplatformdefs.h"
echo "#include \"${XBPS_CROSS_BASE}/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h\"" > "${builddir}/.target-spec/linux-g++/qplatformdefs.h"

mkdir -p "${wrksrc}/.host-spec/linux-g++"
cat > "${wrksrc}/.host-spec/linux-g++/qmake.conf" <<_EOF
mkdir -p "${builddir}/.host-spec/linux-g++"
cat > "${builddir}/.host-spec/linux-g++/qmake.conf" <<_EOF
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
Expand All @@ -84,8 +89,8 @@ QMAKE_CXXFLAGS = ${CXXFLAGS_host}
QMAKE_LFLAGS = ${LDFLAGS_host}
load(qt_config)
_EOF
echo '#include "/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h"' > "${wrksrc}/.host-spec/linux-g++/qplatformdefs.h"
cat > "${wrksrc}/qt.conf" <<_EOF
echo '#include "/usr/lib/${qt}/mkspecs/linux-g++/qplatformdefs.h"' > "${builddir}/.host-spec/linux-g++/qplatformdefs.h"
cat > "${builddir}/qt.conf" <<_EOF
[Paths]
Sysroot=${XBPS_CROSS_BASE}
Prefix=/usr
Expand All @@ -108,10 +113,10 @@ HostData=/usr/lib/${qt}
HostBinaries=/usr/lib/${qt}/bin
HostLibraries=/usr/lib
HostLibraryExecutables=/usr/lib/${qt}/libexec
Spec=${wrksrc}/.host-spec/linux-g++
TargetSpec=${wrksrc}/.target-spec/linux-g++
Spec=${builddir}/.host-spec/linux-g++
TargetSpec=${builddir}/.target-spec/linux-g++
_EOF
qmake_args="-qtconf ${wrksrc}/qt.conf PKG_CONFIG_EXECUTABLE=${XBPS_WRAPPERDIR}/${PKG_CONFIG}"
qmake_args="-qtconf ${builddir}/qt.conf PKG_CONFIG_EXECUTABLE=${XBPS_WRAPPERDIR}/${PKG_CONFIG}"
${qmake} ${qmake_args} \
PREFIX=/usr \
QT_INSTALL_PREFIX=/usr \
Expand All @@ -134,13 +139,15 @@ _EOF
}

do_build() {
cd "${wrksrc}/${build_wrksrc}"
: ${make_cmd:=make}

${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} \
CC="$CC" CXX="$CXX" LINK="$CXX"
}

do_install() {
cd "${wrksrc}/${build_wrksrc}"
: ${make_cmd:=make}
: ${make_install_target:=install}

Expand Down
21 changes: 18 additions & 3 deletions common/chroot-style/uchroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,27 @@ readonly EXTRA_ARGS="$4"
readonly CMD="$5"
shift 5

if ! command -v xbps-uchroot >/dev/null 2>&1; then
msg_red() {
# error messages in bold/red
[ -n "$NOCOLORS" ] || printf >&2 "\033[1m\033[31m"
printf "=> ERROR: %s\\n" "$@" >&2
[ -n "$NOCOLORS" ] || printf >&2 "\033[m"
}

readonly XBPS_UCHROOT_CMD="$(command -v xbps-uchroot 2>/dev/null)"

if [ -z "$XBPS_UCHROOT_CMD" ]; then
msg_red "could not find xbps-uchroot"
exit 1
fi

if ! [ -x "$XBPS_UCHROOT_CMD" ]; then
msg_red "xbps-uchroot is not executable. Are you in the $(stat -c %G "$XBPS_UCHROOT_CMD") group?"
exit 1
fi

if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then
echo "$0 MASTERDIR/DISTDIR not set"
if [ -z "$MASTERDIR" ] || [ -z "$DISTDIR" ]; then
msg_red "$0: MASTERDIR/DISTDIR not set"
exit 1
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ _EOF
fi
fi

if [ -n "$python_version" ]; then
if [ -n "$python_version" ] && [ "$python_version" != ignore ]; then
pycompile_version=${python_version}
fi

Expand Down
1 change: 0 additions & 1 deletion common/hooks/pre-configure/02-script-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,5 @@ hook() {
generic_wrapper3 giblib-config
python_wrapper python-config 2.7
python_wrapper python3-config 3.12
apr_apu_wrapper apr-1-config
apr_apu_wrapper apu-1-config
}
4 changes: 4 additions & 0 deletions common/hooks/pre-pkg/03-rewrite-python-shebang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ hook() {
pyver="$python_version"
fi

if [ "$python_version" = ignore ]; then
return
fi

if [ -n "$pyver" ]; then
default_shebang="#!/usr/bin/python${pyver%.*}"
fi
Expand Down
7 changes: 6 additions & 1 deletion common/hooks/pre-pkg/04-generate-runtime-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ hook() {
for f in ${verify_deps}; do
unset _rdep _pkgname _rdepver

if [ "$(find ${PKGDESTDIR} -name "$f")" ]; then
local _findargs="-name"
# if SONAME is a path, find should use -wholename
if [[ "$f" = */* ]]; then
_findargs="-wholename"
fi
if [ "$(find "${PKGDESTDIR}" $_findargs "$f")" ]; then
# Ignore libs by current pkg
echo " SONAME: $f <-> $pkgname (ignored)"
continue
Expand Down
7 changes: 7 additions & 0 deletions common/scripts/xbps-cycles.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,20 @@ def find_cycles(depmap, xbpsdir):
help='Directory used to cache build dependencies (must exist)')
parser.add_argument('-d', '--directory',
default=None, help='Path to void-packages repo')
parser.add_argument('-Q', dest='check_pkgs', action='store_const',
const='yes', help='Use build dependencies for check -Q')
parser.add_argument('-K', dest='check_pkgs', action='store_const',
const='full', help='Use build dependencies for check -K')

args = parser.parse_args()

if not args.directory:
try: args.directory = os.environ['XBPS_DISTDIR']
except KeyError: args.directory = '.'

if args.check_pkgs:
os.environ['XBPS_CHECK_PKGS'] = args.check_pkgs

pool = multiprocessing.Pool(processes = args.jobs)

pattern = os.path.join(args.directory, 'srcpkgs', '*')
Expand Down
Loading

0 comments on commit fcf40a5

Please sign in to comment.