diff --git a/srcpkgs/acct/template b/srcpkgs/acct/template index 860bb6b28ccf12..56d2a2be0d85de 100644 --- a/srcpkgs/acct/template +++ b/srcpkgs/acct/template @@ -4,20 +4,17 @@ version=6.6.4 revision=2 build_style=gnu-configure short_desc="GNU Accounting Utilities" -homepage="https://www.gnu.org/software/acct/" -license="GPL-3.0-or-later" maintainer="Orphaned " +license="GPL-3.0-or-later" +homepage="https://www.gnu.org/software/acct/" distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.gz" checksum=4c15bf2b58b16378bcc83f70e77d4d40ab0b194acf2ebeefdb507f151faa663f -if [ "$CROSS_BUILD" ]; then - post_extract() { - case "$XBPS_TARGET_MACHINE" in - *-musl) cp $FILESDIR/locs-musl locs ;; - *) cp $FILESDIR/locs-glibc locs ;; - esac - } -fi +post_extract() { + if [ "$CROSS_BUILD" ]; then + cp "$FILESDIR/locs-$XBPS_TARGET_LIBC" locs + fi +} post_install() { # The last(1) command is provided by util-linux diff --git a/srcpkgs/avahi/template b/srcpkgs/avahi/template index c6cbd386013599..cc4a8853cbcd26 100644 --- a/srcpkgs/avahi/template +++ b/srcpkgs/avahi/template @@ -40,9 +40,6 @@ system_accounts="avahi:23" if [ "$CROSS_BUILD" ]; then hostmakedepends+=" automake libtool glib-devel gettext-devel" - pre_configure() { - autoreconf -if - } fi post_extract() { @@ -50,6 +47,12 @@ post_extract() { cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/build-db.txt "${_build_db}" } +pre_configure() { + if [ "$CROSS_BUILD" ]; then + autoreconf -if + fi +} + post_install() { # Python modules will be built in avahi-discover subpackage rm -rf ${DESTDIR}/usr/lib/python* diff --git a/srcpkgs/bc/template b/srcpkgs/bc/template index d98201dbf5d357..13945d9be4159d 100644 --- a/srcpkgs/bc/template +++ b/srcpkgs/bc/template @@ -21,15 +21,20 @@ disable_parallel_build=yes if [ "$CROSS_BUILD" ]; then hostmakedepends+=" bc" - pre_build() { - # don’t run target built binary 'fbc'; - # run host 'bc' instead - sed -i -e 's|^\(\s\+\)./fbc|\1bc|g' bc/Makefile - } fi + +post_patch() { + # don’t run target built binary 'fbc'; + # run host 'bc' instead + if [ "$CROSS_BUILD" ]; then + vsed -i -e 's|^\(\s\+\)./fbc|\1bc|g' bc/Makefile + fi +} + do_build() { make ${makejobs} LEX="flex -I" } + do_check() { # LFS tells us that there are 10 know failures # What happens here @@ -49,6 +54,7 @@ do_check() { echo "TESTS PASSED" fi } + post_install() { mv ${DESTDIR}/usr/bin/{,gnu-}bc mv ${DESTDIR}/usr/bin/{,gnu-}dc diff --git a/srcpkgs/ddcutil/template b/srcpkgs/ddcutil/template index 30e13640e96553..70bd071a9fdc79 100644 --- a/srcpkgs/ddcutil/template +++ b/srcpkgs/ddcutil/template @@ -17,14 +17,18 @@ distfiles="https://github.com/rockowitz/ddcutil/archive/v${version}.tar.gz" checksum=7bf4420778894caf37ca5f7bade34f7a31d996d92618bb85e18de55a5e5ac465 case "$XBPS_TARGET_MACHINE" in - *-musl) makedepends+=" libexecinfo-devel musl-legacy-compat" + *-musl) + makedepends+=" libexecinfo-devel musl-legacy-compat" LDFLAGS="-lexecinfo" - post_extract() { - vsed -i -e "/AM_CFLAGS += -Wpedantic/d" src/app_sysenv/Makefile.am - } ;; esac +post_patch() { + case "$XBPS_TARGET_MACHINE" in + *-musl) vsed -i -e "/AM_CFLAGS += -Wpedantic/d" src/app_sysenv/Makefile.am ;; + esac +} + pre_configure() { NOCONFIGURE=1 ./autogen.sh } diff --git a/srcpkgs/diction/template b/srcpkgs/diction/template index 4beee8c9564a55..8e33efd29a95cf 100644 --- a/srcpkgs/diction/template +++ b/srcpkgs/diction/template @@ -10,11 +10,11 @@ homepage="https://www.gnu.org/software/diction/diction.html" distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.gz" checksum=35c2f1bf8ddf0d5fa9f737ffc8e55230736e5d850ff40b57fdf5ef1d7aa024f6 -if [ -n "$CROSS_BUILD" ]; then - pre_configure() { +post_patch() { + if [ "$CROSS_BUILD" ]; then # cannot check for broken realloc when cross compiling # but we know from native build that it’s not broken # so remove the check (default is not broken) - sed -i -e "/checking for broken realloc/,/USE_NLS=no/ {/USE_NLS=no/!d}" configure - } -fi + vsed -i -e "/checking for broken realloc/,/USE_NLS=no/ {/USE_NLS=no/!d}" configure + fi +} diff --git a/srcpkgs/freerdp/template b/srcpkgs/freerdp/template index bc69379e32cd89..ffecd027bb1098 100644 --- a/srcpkgs/freerdp/template +++ b/srcpkgs/freerdp/template @@ -60,11 +60,13 @@ if [ "$CROSS_BUILD" ]; then configure_args+=" -DCMAKE_CXX_COMPILER_AR=/usr/bin/${XBPS_CROSS_TRIPLET}-ar -DCMAKE_CXX_COMPILER_RANLIB=/usr/bin/${XBPS_CROSS_TRIPLET}-ranlib" +fi - pre_configure() { +pre_configure() { + if [ "$CROSS_BUILD" ]; then export CXX="$XBPS_WRAPPERDIR/${XBPS_CROSS_TRIPLET}-c++" - } -fi + fi +} # first we want to separate -server, everything else then goes to client subpackages="libfreerdp-server freerdp-server libfreerdp freerdp-devel diff --git a/srcpkgs/fs-uae/template b/srcpkgs/fs-uae/template index c631a1b3627014..b6d4e5b2a110ad 100644 --- a/srcpkgs/fs-uae/template +++ b/srcpkgs/fs-uae/template @@ -17,8 +17,15 @@ case "$XBPS_TARGET_MACHINE" in *) configure_args+=" --disable-jit" ;; esac -if [ "$CROSS_BUILD" ]; then - post_configure() { +post_patch() { + if [ "$XBPS_TARGET_LIBC" = musl ]; then + vsed -i -e 's/| RTLD_DEEPBIND//' src/dlopen.cpp + fi + vsed -i -e '/^NoDisplay/d' share/applications/fs-uae.desktop +} + +post_configure() { + if [ "$CROSS_BUILD" ]; then make $makejobs \ CC=$CC_FOR_BUILD CFLAGS=$CFLAGS_FOR_BUILD \ CXX=$CXX_FOR_BUILD CXXFLAGS=$CXXFLAGS_FOR_BUILD \ @@ -31,12 +38,5 @@ if [ "$CROSS_BUILD" ]; then rm src/readcpu.o gen/cpudefs.o make $makejobs src/readcpu.o gen/cpudefs.o touch gen/* - } -fi - -post_extract() { - case "$XBPS_TARGET_MACHINE" in - *-musl) sed -i -e 's/| RTLD_DEEPBIND//' src/dlopen.cpp ;; - esac - sed -i -e '/^NoDisplay/d' share/applications/fs-uae.desktop + fi } diff --git a/srcpkgs/gap/template b/srcpkgs/gap/template index e95f7ed7b54d22..1a4b2b8790c462 100644 --- a/srcpkgs/gap/template +++ b/srcpkgs/gap/template @@ -13,15 +13,6 @@ changelog="https://raw.githubusercontent.com/gap-system/gap/master/CHANGES.md" distfiles="https://github.com/gap-system/gap/releases/download/v${version}/gap-${version}.tar.gz" checksum=6049d53e99b12e25c2d848db21ac4a06380a46fe4c4157243d556fe06930042c -if [ "$XBPS_CHECK_PKGS" = full ]; then - do_check() { - # disable failing test - rm -f tst/teststandard/testLuxPahlings/example_4.4.18.tst - # about 5 minutes single core - ./gap tst/teststandard.g - } -fi - _GAPROOT=/usr/share/gap/ # minimal required packages @@ -41,11 +32,6 @@ post_extract() { mv pkg.install pkg } -post_install() { - vmkdir ${_GAPROOT} - vcopy pkg ${_GAPROOT} -} - pre_check() { msg_normal "Check that loading packages works\n" for p in ${_GAPPKGS}; do @@ -57,6 +43,20 @@ pre_check() { done | ./gap --quitonbreak -b -q -r } +do_check() { + if [ "$XBPS_CHECK_PKGS" = full ]; then + # disable failing test + rm -f tst/teststandard/testLuxPahlings/example_4.4.18.tst + # about 5 minutes single core + ./gap tst/teststandard.g + fi +} + +post_install() { + vmkdir ${_GAPROOT} + vcopy pkg ${_GAPROOT} +} + gap-devel_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" diff --git a/srcpkgs/gdbm/template b/srcpkgs/gdbm/template index 67cbb9587baaf1..465d226a04d13c 100644 --- a/srcpkgs/gdbm/template +++ b/srcpkgs/gdbm/template @@ -13,11 +13,14 @@ checksum=6a24504a14de4a744103dcb936be976df6fbe88ccff26065e54c1c47946f4a5e if [ "$CROSS_BUILD" ]; then hostmakedepends="libtool automake gettext-devel" - pre_configure() { - autoreconf -fi - } fi +pre_configure() { + if [ "$CROSS_BUILD" ]; then + autoreconf -fi + fi +} + post_install() { # create symlinks for compatibility vmkdir usr/include/gdbm diff --git a/srcpkgs/guitarix2/template b/srcpkgs/guitarix2/template index 96503b445f49d6..e88e7ccb4baf40 100644 --- a/srcpkgs/guitarix2/template +++ b/srcpkgs/guitarix2/template @@ -30,14 +30,12 @@ case "$XBPS_TARGET_MACHINE" in *) configure_args+=" --disable-sse" ;; esac -if [ -n "$CROSS_BUILD" ]; then - post_extract() { +post_patch() { + if [ -n "$CROSS_BUILD" ]; then # don’t test load the ladspa plugin when cross compiling vsed -i "/features='test_loadable',/d" src/ladspa/wscript - } -fi + fi -post_patch() { # we want to replace all occurrences of always_inline that are not in # brackets or prefixed by _. # defining always_inline as done by default breaks the [[gnu::always_inline]] attribute diff --git a/srcpkgs/higan/template b/srcpkgs/higan/template index 9bf6e7e475fb94..32aebbc5826b2e 100644 --- a/srcpkgs/higan/template +++ b/srcpkgs/higan/template @@ -20,18 +20,17 @@ checksum=18457ac2608ab548983c3266ae38e6397d1801773969a796a672e2d9c56c69c5 build_options="icarus" build_options_default="icarus" -pre_install() { - vlicense $wrksrc/LICENSE.txt -} - -if [ "$build_option_icarus" ];then - post_build() { +post_build() { + if [ "$build_option_icarus" ];then cd $wrksrc/icarus make ${makejobs} compiler=${CXX} platform=linux - } + fi +} - post_install() { +post_install() { + if [ "$build_option_icarus" ];then cd $wrksrc/icarus make STRIP=true compiler=${CXX} platform=linux prefix=${DESTDIR}/usr install - } -fi + fi + vlicense $wrksrc/LICENSE.txt +} diff --git a/srcpkgs/liblrdf/template b/srcpkgs/liblrdf/template index 242ba4daa0c10d..2a246e8cd82ed7 100644 --- a/srcpkgs/liblrdf/template +++ b/srcpkgs/liblrdf/template @@ -5,6 +5,7 @@ revision=2 build_style=gnu-configure hostmakedepends="automake libtool pkg-config" makedepends="ladspa-sdk raptor-devel" +checkdepends="swh-plugins" short_desc="Lightweight RDF library with special support for LADSPA plugins" maintainer="Orphaned " license="GPL-2.0-only" @@ -12,15 +13,19 @@ homepage="https://github.com/swh/LRDF" distfiles="https://github.com/swh/LRDF/archive/v${version}.tar.gz" checksum=d579417c477ac3635844cd1b94f273ee2529a8c3b6b21f9b09d15f462b89b1ef +post_patch() { + vsed -i -e 's,/usr/local/share/ladspa,/usr/share/ladspa,g' examples/{instances,remove}_test.c +} + pre_configure() { autoreconf -fi } -if [ -n "$CROSS_BUILD" ]; then - post_build() { - sed -i -e "s|${XBPS_CROSS_BASE}||" lrdf.pc - } -fi +post_build() { + if [ -n "$CROSS_BUILD" ]; then + vsed -i -e "s|${XBPS_CROSS_BASE}||" lrdf.pc + fi +} liblrdf-devel_package() { depends="raptor-devel ${sourcepkg}>=${version}_${revision}" diff --git a/srcpkgs/libvdpau-va-gl/template b/srcpkgs/libvdpau-va-gl/template index fae0c22f424696..6f683f3f8ed9da 100644 --- a/srcpkgs/libvdpau-va-gl/template +++ b/srcpkgs/libvdpau-va-gl/template @@ -13,10 +13,14 @@ changelog="https://raw.githubusercontent.com/i-rinat/libvdpau-va-gl/master/Chang distfiles="${homepage}/releases/download/v${version}/libvdpau-va-gl-${version}.tar.gz" checksum=7d9121540658eb0244859e63da171ca3869e784afbeaf202f44471275c784af4 -if [ "$CROSS_BUILD" ]; then - # Compile tooling executed on the host with host CXX, otherwise cross fails - pre_build() { +pre_build() { + if [ "$CROSS_BUILD" ]; then + # Compile tooling executed on the host with host CXX, otherwise cross fails ${CXX_host} -O2 -pipe -c -o build/glsl/CMakeFiles/shader-bundle-tool.dir/shader-bundle-tool.cc.o glsl/shader-bundle-tool.cc ${CXX_host} -o build/glsl/shader-bundle-tool build/glsl/CMakeFiles/shader-bundle-tool.dir/shader-bundle-tool.cc.o - } -fi + fi +} + +post_install() { + vlicense LICENSE +} diff --git a/srcpkgs/mosquitto/template b/srcpkgs/mosquitto/template index 6c236edb17df61..d2d31d19d89dd9 100644 --- a/srcpkgs/mosquitto/template +++ b/srcpkgs/mosquitto/template @@ -25,12 +25,9 @@ make_dirs="/var/lib/mosquitto 0755 ${system_accounts} ${system_accounts}" CFLAGS="-fcommon" post_extract() { - case "$XBPS_TARGET_MACHINE" in - *-musl) - post_extract() { - vsed -e 's/-lanl//' -i config.mk - } - esac + if [ "$XBPS_TARGET_LIBC" = musl ]; then + vsed -e 's/-lanl//' -i config.mk + fi } pre_check() { @@ -38,10 +35,6 @@ pre_check() { vsed -i test/lib/Makefile -e /02-subscribe-qos/d } -pre_install() { - sed -i 's,sbin,bin,g' */Makefile -} - post_install() { vlicense edl-v10 LICENSE mv ${DESTDIR}/etc/${pkgname}/${pkgname}.conf.example \ diff --git a/srcpkgs/pcre/template b/srcpkgs/pcre/template index 3f29793d9dc376..9a697c6759d4b7 100644 --- a/srcpkgs/pcre/template +++ b/srcpkgs/pcre/template @@ -19,13 +19,12 @@ case "$XBPS_TARGET_MACHINE" in *) configure_args+=" --disable-stack-for-recursion" ;; esac -post_install() { - vlicense LICENCE -} - if [ "$CROSS_BUILD" ]; then hostmakedepends="automake libtool" - pre_configure() { +fi + +pre_configure() { + if [ "$CROSS_BUILD" ]; then # Mips needs a hint if an FPU is available or not case "$XBPS_TARGET_MACHINE" in mips-musl|mipsel-musl) @@ -36,8 +35,12 @@ if [ "$CROSS_BUILD" ]; then ;; esac autoreconf -fi - } -fi + fi +} + +post_install() { + vlicense LICENCE +} libpcrecpp_package() { short_desc+=" - C++ shared libraries" diff --git a/srcpkgs/perl-DBD-mysql/template b/srcpkgs/perl-DBD-mysql/template index bc381eb7a295b8..d55ba2d05ce460 100644 --- a/srcpkgs/perl-DBD-mysql/template +++ b/srcpkgs/perl-DBD-mysql/template @@ -14,8 +14,8 @@ homepage="https://metacpan.org/release/DBD-mysql" distfiles="https://search.cpan.org/CPAN/authors/id/D/DV/DVEEDEN/DBD-mysql-${version}.tar.gz" checksum=a83f57af7817787de0ef56fb15fdfaf4f1c952c8f32ff907153b66d2da78ff5b -if [ "$CROSS_BUILD" ]; then - pre_configure() { - sed -i "/^assert_lib/,+2d" Makefile.PL - } -fi +post_patch() { + if [ "$CROSS_BUILD" ]; then + vsed -i "/^assert_lib/,+2d" Makefile.PL + fi +} diff --git a/srcpkgs/perl-Math-Prime-Util-GMP/template b/srcpkgs/perl-Math-Prime-Util-GMP/template index f0306c7aadaf5e..819141842e84f3 100644 --- a/srcpkgs/perl-Math-Prime-Util-GMP/template +++ b/srcpkgs/perl-Math-Prime-Util-GMP/template @@ -13,8 +13,8 @@ homepage="https://github.com/danaj/Math-Prime-Util-GMP" distfiles="${CPAN_SITE}/Math/${pkgname/perl-/}-${version}.tar.gz" checksum=2697c7fd5c7e35fdec7f50ed56a67be807a2f22657589e637dad3592744003be -if [ "$CROSS_BUILD" ]; then - pre_configure() { - sed -i -e "s/^check_lib_or_exit(lib => 'gmp', header => 'gmp.h');//" Makefile.PL - } -fi +post_patch() { + if [ "$CROSS_BUILD" ]; then + vsed -i -e "s/^check_lib_or_exit(lib => 'gmp', header => 'gmp.h');//" Makefile.PL + fi +} diff --git a/srcpkgs/perl-Math-Prime-Util/template b/srcpkgs/perl-Math-Prime-Util/template index bae531e4cc210f..9a3e4be93af8b1 100644 --- a/srcpkgs/perl-Math-Prime-Util/template +++ b/srcpkgs/perl-Math-Prime-Util/template @@ -13,8 +13,8 @@ homepage="https://github.com/danaj/Math-Prime-Util" distfiles="${CPAN_SITE}/Math/${pkgname/perl-/}-${version}.tar.gz" checksum=4afa6dd8cdb97499bd4eca6925861812c29d9f5a0f1ac27ad9d2d9c9b5602894 -if [ "$CROSS_BUILD" ]; then - pre_configure() { - sed -i -e "s/^\(my \$have_gmp =\).*/\1 1;/" Makefile.PL - } -fi +post_patch() { + if [ "$CROSS_BUILD" ]; then + vsed -i -e "s/^\(my \$have_gmp =\).*/\1 1;/" Makefile.PL + fi +} diff --git a/srcpkgs/shake/patches/cmake.patch b/srcpkgs/shake/patches/cmake.patch new file mode 100644 index 00000000000000..5ea71230f26758 --- /dev/null +++ b/srcpkgs/shake/patches/cmake.patch @@ -0,0 +1,50 @@ +From 8dca2c8eec28759ca8d1d091f356e7915b8fffbe Mon Sep 17 00:00:00 2001 +From: Brice Arnould +Date: Sat, 12 Mar 2022 23:31:13 +0100 +Subject: [PATCH] Update CMake list to avoid it breaking + +Fixes issue Update CMakeFiles #26. +--- + CMakeLists.txt | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6184bc2..fb1ac1d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-# Copyright (C) 2006-2011 Brice Arnould. ++# Copyright (C) 2006-2022 Brice Arnould. + # + # This file is part of ShaKe. + # +@@ -16,16 +16,12 @@ + # + + #### MACROS AND WORKAROUNDS #### +-CMAKE_MINIMUM_REQUIRED (VERSION 2.4) +-if(COMMAND cmake_policy) # Needed by CMake 2.4 +- cmake_policy(SET CMP0005 OLD) +-endif(COMMAND cmake_policy) ++CMAKE_MINIMUM_REQUIRED (VERSION 3.14) + set (CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) + + MACRO (add_help2man_manpage file command) +- get_target_property (HELP2MAN_COMMAND ${command} LOCATION) + add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${file} +- COMMAND ${HELP2MAN_LOCATION} ARGS -s8 -N -i ${CMAKE_CURRENT_SOURCE_DIR}/doc/fdl-man_insert -I ${CMAKE_CURRENT_SOURCE_DIR}/doc/${command}-man_insert -o ${CMAKE_CURRENT_BINARY_DIR}/${file} ${HELP2MAN_COMMAND} ++ COMMAND ${HELP2MAN_LOCATION} ARGS -s8 -N -i ${CMAKE_CURRENT_SOURCE_DIR}/doc/fdl-man_insert -I ${CMAKE_CURRENT_SOURCE_DIR}/doc/${command}-man_insert -o ${CMAKE_CURRENT_BINARY_DIR}/${file} $ + DEPENDS ${command} + COMMENT "Building manpage for ${command}") + ENDMACRO () +@@ -57,8 +53,8 @@ add_custom_target (doc ALL + + ## LINUX ## + IF (CMAKE_SYSTEM_NAME MATCHES Linux) +- add_definitions ("-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64") # For 64 bits files +- add_definitions ("-D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L") # For posix_fallocate ++ add_definitions (-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) # For 64 bits files ++ add_definitions (-D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L) # For posix_fallocate + list (APPEND CMAKE_REQUIRED_LIBRARIES attr) + target_link_libraries (shake attr) + target_link_libraries (unattr attr) diff --git a/srcpkgs/shake/template b/srcpkgs/shake/template index eccaccd7564940..63d7ed222a0c83 100644 --- a/srcpkgs/shake/template +++ b/srcpkgs/shake/template @@ -20,12 +20,15 @@ fi if [ -n "$CROSS_BUILD" ]; then hostmakedepends+=" shake" - post_extract() { - sed -i -e 's;get_target_property (HELP2MAN_COMMAND ${command} LOCATION);set(HELP2MAN_COMMAND ${command});' \ - CMakeLists.txt - } fi +post_patch() { + if [ "$CROSS_BUILD" ]; then + vsed -i -e 's;get_target_property (HELP2MAN_COMMAND ${command} LOCATION);set(HELP2MAN_COMMAND ${command});' \ + CMakeLists.txt + fi +} + post_install() { vdoc README.md } diff --git a/srcpkgs/silc-client/template b/srcpkgs/silc-client/template index 99bfe43ce8dd50..01ccf13d1c2798 100644 --- a/srcpkgs/silc-client/template +++ b/srcpkgs/silc-client/template @@ -25,7 +25,10 @@ if [ "$build_option_perl" ]; then hostmakedepends+=" perl" else configure_args+=" --without-perl" - post_install() { - rm -rf ${DESTDIR}/usr/share/silc/scripts - } fi + +post_install() { + if [ -z "$build_option_perl" ]; then + rm -rf ${DESTDIR}/usr/share/silc/scripts + fi +}