diff options
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/apr-fix-atomics.patch | 49 | ||||
-rw-r--r-- | gnu/packages/patches/ibus-table-paths.patch | 38 | ||||
-rw-r--r-- | gnu/packages/patches/john-the-ripper-jumbo-with-gcc-11.patch | 50 | ||||
-rw-r--r-- | gnu/packages/patches/linux-libre-wireguard-postup-privkey.patch | 119 | ||||
-rw-r--r-- | gnu/packages/patches/openfoam-4.1-cleanup.patch | 243 | ||||
-rw-r--r-- | gnu/packages/patches/qtbase-qmake-use-libname.patch | 53 |
6 files changed, 190 insertions, 362 deletions
diff --git a/gnu/packages/patches/apr-fix-atomics.patch b/gnu/packages/patches/apr-fix-atomics.patch new file mode 100644 index 0000000000..94cce9b5f1 --- /dev/null +++ b/gnu/packages/patches/apr-fix-atomics.patch @@ -0,0 +1,49 @@ +This patch is taken from Debian, using Debian version 1.7.0-8. +A new patch will be needed when apr is updated. + +# quick and dirty fix for FTBFS on mipsel +# There should be a proper configure check, see +# https://bz.apache.org/bugzilla/show_bug.cgi?id=63566 +Index: apr-1.7.0/include/arch/unix/apr_arch_atomic.h +=================================================================== +--- apr-1.7.0.orig/include/arch/unix/apr_arch_atomic.h ++++ apr-1.7.0/include/arch/unix/apr_arch_atomic.h +@@ -26,6 +26,9 @@ + /* noop */ + #elif HAVE_ATOMIC_BUILTINS + # define USE_ATOMICS_BUILTINS ++# if (__INTPTR_WIDTH__ == 32) && ( defined(__MIPSEL__) || defined(__powerpc__) ) || defined(__m68k__) || defined(__sh__) ++# define NEED_ATOMICS_GENERIC64 ++# endif + #elif defined(SOLARIS2) && SOLARIS2 >= 10 + # define USE_ATOMICS_SOLARIS + # define NEED_ATOMICS_GENERIC64 +Index: apr-1.7.0/atomic/unix/builtins64.c +=================================================================== +--- apr-1.7.0.orig/atomic/unix/builtins64.c ++++ apr-1.7.0/atomic/unix/builtins64.c +@@ -16,7 +16,7 @@ + + #include "apr_arch_atomic.h" + +-#ifdef USE_ATOMICS_BUILTINS ++#if defined(USE_ATOMICS_BUILTINS) && ! defined(NEED_ATOMICS_GENERIC64) + + APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem) + { +Index: apr-1.7.0/atomic/unix/builtins.c +=================================================================== +--- apr-1.7.0.orig/atomic/unix/builtins.c ++++ apr-1.7.0/atomic/unix/builtins.c +@@ -20,7 +20,11 @@ + + APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) + { ++#if defined (NEED_ATOMICS_GENERIC64) ++ return apr__atomic_generic64_init(p); ++#else + return APR_SUCCESS; ++#endif + } + + APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem) diff --git a/gnu/packages/patches/ibus-table-paths.patch b/gnu/packages/patches/ibus-table-paths.patch new file mode 100644 index 0000000000..bc0c5e78e1 --- /dev/null +++ b/gnu/packages/patches/ibus-table-paths.patch @@ -0,0 +1,38 @@ +diff --git a/engine/ibus-engine-table.in b/engine/ibus-engine-table.in +index e79d62a6cad4..675007204abd 100644 +--- a/engine/ibus-engine-table.in ++++ b/engine/ibus-engine-table.in +@@ -24,8 +24,6 @@ prefix=@prefix@ + exec_prefix=@prefix@ + datarootdir=@datarootdir@ + datadir=@datadir@ +-export IBUS_TABLE_LOCATION=@datarootdir@/ibus-table +-export IBUS_TABLE_LIB_LOCATION=@libexecdir@ + + # Set this variable to something > 0 to get more debug output. + # (Debug output may show up in the log file and/or in the lookup table): +diff --git a/engine/ibus-table-createdb.in b/engine/ibus-table-createdb.in +index 91eb28b7cbe5..187dddf2c952 100644 +--- a/engine/ibus-table-createdb.in ++++ b/engine/ibus-table-createdb.in +@@ -24,6 +24,4 @@ exec_prefix=@exec_prefix@ + bindir=@bindir@ + datarootdir=@datarootdir@ + datadir=@datadir@ +-export IBUS_TABLE_DATA_DIR=@datarootdir@ +-export IBUS_TABLE_BIN_PATH=@bindir@ + exec @PYTHON@ @datarootdir@/ibus-table/engine/tabcreatedb.py $@ +diff --git a/setup/ibus-setup-table.in b/setup/ibus-setup-table.in +index 7f7405c37296..ae6f96921c56 100644 +--- a/setup/ibus-setup-table.in ++++ b/setup/ibus-setup-table.in +@@ -22,9 +22,6 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + datarootdir=@datarootdir@ +-export IBUS_PREFIX=@prefix@ +-export IBUS_DATAROOTDIR=@datarootdir@ +-export IBUS_LOCALEDIR=@localedir@ + cd @prefix@/share/ibus-table/setup/ + exec @PYTHON@ main.py $@ + diff --git a/gnu/packages/patches/john-the-ripper-jumbo-with-gcc-11.patch b/gnu/packages/patches/john-the-ripper-jumbo-with-gcc-11.patch new file mode 100644 index 0000000000..67149f15a9 --- /dev/null +++ b/gnu/packages/patches/john-the-ripper-jumbo-with-gcc-11.patch @@ -0,0 +1,50 @@ +From 154ee1156d62dd207aff0052b04c61796a1fde3b Mon Sep 17 00:00:00 2001 +From: Ferry Huberts <ferry.huberts@pelagic.nl> +Date: Tue, 9 Mar 2021 22:04:46 +0100 +Subject: [PATCH] Fix alignment compile errors on GCC 11 + +Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> +--- + src/blake2.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/blake2.h b/src/blake2.h +index b05208117e..b4398f9e13 100644 +--- a/src/blake2.h ++++ b/src/blake2.h +@@ -57,7 +57,7 @@ extern "C" { + uint8_t personal[BLAKE2S_PERSONALBYTES]; // 32 + } blake2s_param; + +- JTR_ALIGN( 64 ) typedef struct __blake2s_state ++ typedef struct JTR_ALIGN( 64 ) __blake2s_state + { + uint32_t h[8]; + uint32_t t[2]; +@@ -82,7 +82,7 @@ extern "C" { + uint8_t personal[BLAKE2B_PERSONALBYTES]; // 64 + } blake2b_param; + +- JTR_ALIGN( 64 ) typedef struct __blake2b_state ++ typedef struct JTR_ALIGN( 64 ) __blake2b_state + { + uint64_t h[8]; + uint64_t t[2]; +@@ -94,7 +94,7 @@ extern "C" { + #if defined(JOHN_NO_SIMD) || (!defined(__SSE2__) && !defined(__SSE4_1__) && !defined(__XOP__)) + typedef struct __blake2sp_state + #else +- JTR_ALIGN( 64 ) typedef struct __blake2sp_state ++ typedef struct JTR_ALIGN( 64 ) __blake2sp_state + #endif + { + blake2s_state S[8][1]; +@@ -106,7 +106,7 @@ extern "C" { + #if defined(JOHN_NO_SIMD) || (!defined(__SSE2__) && !defined(__SSE4_1__) && !defined(__XOP__)) + typedef struct __blake2bp_state + #else +- JTR_ALIGN( 64 ) typedef struct __blake2bp_state ++ typedef struct JTR_ALIGN( 64 ) __blake2bp_state + #endif + { + blake2b_state S[4][1]; diff --git a/gnu/packages/patches/linux-libre-wireguard-postup-privkey.patch b/gnu/packages/patches/linux-libre-wireguard-postup-privkey.patch deleted file mode 100644 index a6050499e1..0000000000 --- a/gnu/packages/patches/linux-libre-wireguard-postup-privkey.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 3ac1bf099766f1e9735883d5127148054cd5b30a Mon Sep 17 00:00:00 2001 -From: "Jason A. Donenfeld" <Jason@zx2c4.com> -Date: Thu, 18 May 2023 03:08:44 +0200 -Subject: wireguard: netlink: send staged packets when setting initial private - key - -Packets bound for peers can queue up prior to the device private key -being set. For example, if persistent keepalive is set, a packet is -queued up to be sent as soon as the device comes up. However, if the -private key hasn't been set yet, the handshake message never sends, and -no timer is armed to retry, since that would be pointless. - -But, if a user later sets a private key, the expectation is that those -queued packets, such as a persistent keepalive, are actually sent. So -adjust the configuration logic to account for this edge case, and add a -test case to make sure this works. - -Maxim noticed this with a wg-quick(8) config to the tune of: - - [Interface] - PostUp = wg set %i private-key somefile - - [Peer] - PublicKey = ... - Endpoint = ... - PersistentKeepalive = 25 - -Here, the private key gets set after the device comes up using a PostUp -script, triggering the bug. - -Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") -Cc: stable@vger.kernel.org -Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> -Link: https://lore.kernel.org/wireguard/87fs7xtqrv.fsf@gmail.com/ -Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> ---- - drivers/net/wireguard/netlink.c | 14 +++++++++----- - tools/testing/selftests/wireguard/netns.sh | 30 ++++++++++++++++++++++++++---- - 2 files changed, 35 insertions(+), 9 deletions(-) - -diff --git a/drivers/net/wireguard/netlink.c b/drivers/net/wireguard/netlink.c -index 43c8c84e7ea8..6d1bd9f52d02 100644 ---- a/drivers/net/wireguard/netlink.c -+++ b/drivers/net/wireguard/netlink.c -@@ -546,6 +546,7 @@ static int wg_set_device(struct sk_buff *skb, struct genl_info *info) - u8 *private_key = nla_data(info->attrs[WGDEVICE_A_PRIVATE_KEY]); - u8 public_key[NOISE_PUBLIC_KEY_LEN]; - struct wg_peer *peer, *temp; -+ bool send_staged_packets; - - if (!crypto_memneq(wg->static_identity.static_private, - private_key, NOISE_PUBLIC_KEY_LEN)) -@@ -564,14 +565,17 @@ static int wg_set_device(struct sk_buff *skb, struct genl_info *info) - } - - down_write(&wg->static_identity.lock); -- wg_noise_set_static_identity_private_key(&wg->static_identity, -- private_key); -- list_for_each_entry_safe(peer, temp, &wg->peer_list, -- peer_list) { -+ send_staged_packets = !wg->static_identity.has_identity && netif_running(wg->dev); -+ wg_noise_set_static_identity_private_key(&wg->static_identity, private_key); -+ send_staged_packets = send_staged_packets && wg->static_identity.has_identity; -+ -+ wg_cookie_checker_precompute_device_keys(&wg->cookie_checker); -+ list_for_each_entry_safe(peer, temp, &wg->peer_list, peer_list) { - wg_noise_precompute_static_static(peer); - wg_noise_expire_current_peer_keypairs(peer); -+ if (send_staged_packets) -+ wg_packet_send_staged_packets(peer); - } -- wg_cookie_checker_precompute_device_keys(&wg->cookie_checker); - up_write(&wg->static_identity.lock); - } - skip_set_private_key: -diff --git a/tools/testing/selftests/wireguard/netns.sh b/tools/testing/selftests/wireguard/netns.sh -index 69c7796c7ca9..405ff262ca93 100755 ---- a/tools/testing/selftests/wireguard/netns.sh -+++ b/tools/testing/selftests/wireguard/netns.sh -@@ -514,10 +514,32 @@ n2 bash -c 'printf 0 > /proc/sys/net/ipv4/conf/all/rp_filter' - n1 ping -W 1 -c 1 192.168.241.2 - [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.3:1" ]] - --ip1 link del veth1 --ip1 link del veth3 --ip1 link del wg0 --ip2 link del wg0 -+ip1 link del dev veth3 -+ip1 link del dev wg0 -+ip2 link del dev wg0 -+ -+# Make sure persistent keep alives are sent when an adapter comes up -+ip1 link add dev wg0 type wireguard -+n1 wg set wg0 private-key <(echo "$key1") peer "$pub2" endpoint 10.0.0.1:1 persistent-keepalive 1 -+read _ _ tx_bytes < <(n1 wg show wg0 transfer) -+[[ $tx_bytes -eq 0 ]] -+ip1 link set dev wg0 up -+read _ _ tx_bytes < <(n1 wg show wg0 transfer) -+[[ $tx_bytes -gt 0 ]] -+ip1 link del dev wg0 -+# This should also happen even if the private key is set later -+ip1 link add dev wg0 type wireguard -+n1 wg set wg0 peer "$pub2" endpoint 10.0.0.1:1 persistent-keepalive 1 -+read _ _ tx_bytes < <(n1 wg show wg0 transfer) -+[[ $tx_bytes -eq 0 ]] -+ip1 link set dev wg0 up -+read _ _ tx_bytes < <(n1 wg show wg0 transfer) -+[[ $tx_bytes -eq 0 ]] -+n1 wg set wg0 private-key <(echo "$key1") -+read _ _ tx_bytes < <(n1 wg show wg0 transfer) -+[[ $tx_bytes -gt 0 ]] -+ip1 link del dev veth1 -+ip1 link del dev wg0 - - # We test that Netlink/IPC is working properly by doing things that usually cause split responses - ip0 link add dev wg0 type wireguard --- -cgit v1.2.3-59-g8ed1b - diff --git a/gnu/packages/patches/openfoam-4.1-cleanup.patch b/gnu/packages/patches/openfoam-4.1-cleanup.patch deleted file mode 100644 index 37effa5c9c..0000000000 --- a/gnu/packages/patches/openfoam-4.1-cleanup.patch +++ /dev/null @@ -1,243 +0,0 @@ -# This patch removes all need for the ThirdParty files of OpenFOAM. - -# Derived from EasyBuild patch by Ward Poelmans <wpoely86@gmail.com>. -# Modified for GNU Guix by Paul Garlick <pgarlick@tourbillion-technology.com>. - -diff -ur OpenFOAM-4.x-version-4.1.org/applications/utilities/mesh/manipulation/setSet/Allwmake OpenFOAM-4.x-version-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake ---- OpenFOAM-4.x-version-4.1.org/applications/utilities/mesh/manipulation/setSet/Allwmake -+++ OpenFOAM-4.x-version-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake -@@ -9,7 +9,7 @@ - # - # use readline if available - # --if [ -f /usr/include/readline/readline.h ] -+if true - then - echo "Found <readline/readline.h> -- enabling readline support." - export COMP_FLAGS="-DHAS_READLINE" -diff -ur OpenFOAM-4.x-version-4.1.org/etc/bashrc OpenFOAM-4.x-version-4.1/etc/bashrc ---- OpenFOAM-4.x-version-4.1.org/etc/bashrc -+++ OpenFOAM-4.x-version-4.1/etc/bashrc -@@ -43,8 +43,10 @@ - # Please set to the appropriate path if the default is not correct. - # - [ $BASH_SOURCE ] && \ --export FOAM_INST_DIR=$(cd ${BASH_SOURCE%/*/*/*} && pwd -P) || \ -+export FOAM_INST_DIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) || \ - export FOAM_INST_DIR=$HOME/$WM_PROJECT -+# For GNU Guix: set initially for build then re-set at runtime -+# - # export FOAM_INST_DIR=~$WM_PROJECT - # export FOAM_INST_DIR=/opt/$WM_PROJECT - # export FOAM_INST_DIR=/usr/local/$WM_PROJECT -diff -ur OpenFOAM-4.x-version-4.1.org/etc/config.sh/CGAL OpenFOAM-4.x-version-4.1/etc/config.sh/CGAL ---- OpenFOAM-4.x-version-4.1.org/etc/config.sh/CGAL -+++ OpenFOAM-4.x-version-4.1/etc/config.sh/CGAL -@@ -36,37 +36,7 @@ - # - #------------------------------------------------------------------------------ - --boost_version=boost-system --cgal_version=cgal-system --#cgal_version=CGAL-4.8 -- --if [ -z "$SOURCE_CGAL_VERSIONS_ONLY" ] --then -- -- common_path=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER -- -- export BOOST_ARCH_PATH=$common_path/$boost_version -- export CGAL_ARCH_PATH=$common_path/$cgal_version -- -- if [ "$FOAM_VERBOSE" -a "$PS1" ] -- then -- echo "Using CGAL and boost" 1>&2 -- echo " $cgal_version at $CGAL_ARCH_PATH" 1>&2 -- echo " $boost_version at $BOOST_ARCH_PATH" 1>&2 -- fi -- -- if [ -d "$CGAL_ARCH_PATH" -a "$cgal_version" != "cgal-system" ] -- then -- _foamAddLib $CGAL_ARCH_PATH/lib -- fi -- -- if [ -d "$BOOST_ARCH_PATH" -a "$boost_version" != "boost-system" ] -- then -- _foamAddLib $BOOST_ARCH_PATH/lib -- fi -- -- unset boost_version cgal_version common_path -- --fi -+export CGAL_ARCH_PATH=$CGAL_ROOT -+export BOOST_ARCH_PATH=$BOOST_ROOT - - #------------------------------------------------------------------------------ -diff -ur OpenFOAM-4.x-version-4.1.org/etc/config.sh/gperftools OpenFOAM-4.x-version-4.1/etc/config.sh/gperftools ---- OpenFOAM-4.x-version-4.1.org/etc/config.sh/gperftools -+++ OpenFOAM-4.x-version-4.1/etc/config.sh/gperftools -@@ -29,13 +29,5 @@ - # - #------------------------------------------------------------------------------ - --version=svn --gperftools_install=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER -- --GPERFTOOLS_VERSION=gperftools-$version --GPERFTOOLS_ARCH_PATH=$gperftools_install/$GPERFTOOLS_VERSION -- --export PATH=$GPERFTOOLS_ARCH_PATH/bin:$PATH --export LD_LIBRARY_PATH=$GPERFTOOLS_ARCH_PATH/lib:$LD_LIBRARY_PATH - - #------------------------------------------------------------------------------ -diff -ur OpenFOAM-4.x-version-4.1.org/etc/config.sh/metis OpenFOAM-4.x-version-4.1/etc/config.sh/metis ---- OpenFOAM-4.x-version-4.1.org/etc/config.sh/metis -+++ OpenFOAM-4.x-version-4.1/etc/config.sh/metis -@@ -34,7 +34,7 @@ - # - #------------------------------------------------------------------------------ - --export METIS_VERSION=metis-5.1.0 --export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$METIS_VERSION -+export METIS_VERSION=metis-$METISVERSION -+export METIS_ARCH_PATH=$METIS_ROOT - - #------------------------------------------------------------------------------ -diff -ur OpenFOAM-4.x-version-4.1.org/etc/config.sh/scotch OpenFOAM-4.x-version-4.1/etc/config.sh/scotch ---- OpenFOAM-4.x-version-4.1.org/etc/config.sh/scotch -+++ OpenFOAM-4.x-version-4.1/etc/config.sh/scotch -@@ -37,7 +37,7 @@ - # - #------------------------------------------------------------------------------ - --export SCOTCH_VERSION=scotch_6.0.3 --export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$SCOTCH_VERSION -+export SCOTCH_VERSION=scotch_$SCOTCHVERSION -+export SCOTCH_ARCH_PATH=$SCOTCH_ROOT - - #------------------------------------------------------------------------------ -diff -ur OpenFOAM-4.x-version-4.1.org/etc/config.sh/settings OpenFOAM-4.x-version-4.1/etc/config.sh/settings ---- OpenFOAM-4.x-version-4.1.org/etc/config.sh/settings -+++ OpenFOAM-4.x-version-4.1/etc/config.sh/settings -@@ -279,6 +279,9 @@ - ;; - system) - # Use system compiler -+ # Use system GMP and MPFR packages -+ export GMP_ARCH_PATH=$GMP_ROOT -+ export MPFR_ARCH_PATH=$MPFR_ROOT - ;; - *) - echo "Warn: WM_COMPILER_TYPE='$WM_COMPILER_TYPE' is unsupported" 1>&2 -diff -ur OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/ptscotchDecomp/Make/options OpenFOAM-4.x-version-4.1/src/parallel/decompose/ptscotchDecomp/Make/options ---- OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/ptscotchDecomp/Make/options -+++ OpenFOAM-4.x-version-4.1/src/parallel/decompose/ptscotchDecomp/Make/options -@@ -5,8 +5,7 @@ - $(PFLAGS) $(PINC) \ - -I$(SCOTCH_ROOT)/include \ - -I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \ -- -I/usr/include/scotch \ - -I../decompositionMethods/lnInclude - - LIB_LIBS = \ -- -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt -+ -L$(SCOTCH_ROOT)/lib -L$(MPI_ARCH_PATH)/lib -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt -diff -ur OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/scotchDecomp/Make/options OpenFOAM-4.x-version-4.1/src/parallel/decompose/scotchDecomp/Make/options ---- OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/scotchDecomp/Make/options -+++ OpenFOAM-4.x-version-4.1/src/parallel/decompose/scotchDecomp/Make/options -@@ -9,8 +9,7 @@ - $(PFLAGS) $(PINC) \ - -I$(SCOTCH_ROOT)/include \ - -I$(SCOTCH_ARCH_PATH)/include \ -- -I/usr/include/scotch \ - -I../decompositionMethods/lnInclude - - LIB_LIBS = \ -- -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt -+ -L$(SCOTCH_ROOT)/lib -lscotch -lscotcherrexit -lrt -diff -ur OpenFOAM-4.x-version-4.1.org/wmake/makefiles/general OpenFOAM-4.x-version-4.1/wmake/makefiles/general ---- OpenFOAM-4.x-version-4.1.org/wmake/makefiles/general -+++ OpenFOAM-4.x-version-4.1/wmake/makefiles/general -@@ -33,7 +33,6 @@ - # The Makefile uses a POSIX shell - #------------------------------------------------------------------------------ - --SHELL = /bin/sh - - - #------------------------------------------------------------------------------ -diff -ur OpenFOAM-4.x-version-4.1.org/wmake/wmake OpenFOAM-4.x-version-4.1/wmake/wmake ---- OpenFOAM-4.x-version-4.1.org/wmake/wmake -+++ OpenFOAM-4.x-version-4.1/wmake/wmake -@@ -163,7 +163,7 @@ - then - if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ] - then -- lockDir=$HOME/.$WM_PROJECT/.wmake -+ lockDir=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P)/.$WM_PROJECT/.wmake - - if [ -d $lockDir ] - then -diff -ur OpenFOAM-4.x-version-4.1.org/wmake/wmakeScheduler OpenFOAM-4.x-version-4.1/wmake/wmakeScheduler ---- OpenFOAM-4.x-version-4.1.org/wmake/wmakeScheduler -+++ OpenFOAM-4.x-version-4.1/wmake/wmakeScheduler -@@ -53,7 +53,7 @@ - # csh sets HOST, bash sets HOSTNAME - : ${HOST:=$HOSTNAME} - --lockDir=$HOME/.$WM_PROJECT/.wmake -+lockDir=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P)/.$WM_PROJECT/.wmake - - # Fallback - 1 core on current host - : ${WM_HOSTS:=$HOST:1} -diff -ur OpenFOAM-4.x-version-4.1.org/wmake/wmakeSchedulerUptime OpenFOAM-4.x-version-4.1/wmake/wmakeSchedulerUptime ---- OpenFOAM-4.x-version-4.1.org/wmake/wmakeSchedulerUptime -+++ OpenFOAM-4.x-version-4.1/wmake/wmakeSchedulerUptime -@@ -53,7 +53,7 @@ - # csh sets HOST, bash sets HOSTNAME - : ${HOST:=$HOSTNAME} - --lockDir=$HOME/.$WM_PROJECT/.wmake -+lockDir=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P)/.$WM_PROJECT/.wmake - # Fallback - 1 core on current host - : ${WM_HOSTS:=$HOST:1} - -diff -ur OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/metisDecomp/metisDecomp.C OpenFOAM-4.x-version-4.1/src/parallel/decompose/metisDecomp/metisDecomp.C ---- OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/metisDecomp/metisDecomp.C -+++ OpenFOAM-4.x-version-4.1/src/parallel/decompose/metisDecomp/metisDecomp.C -@@ -67,7 +67,7 @@ - - // Processor weights initialised with no size, only used if specified in - // a file -- Field<scalar> processorWeights; -+ Field<floatScalar> processorWeights; - - // Cell weights (so on the vertices of the dual) - List<label> cellWeights; -diff -ur OpenFOAM-4.x-version-4.1.org/wmake/rules/General/CGAL OpenFOAM-4.x-version-4.1/wmake/rules/General/CGAL ---- OpenFOAM-4.x-version-4.1.org/wmake/rules/General/CGAL -+++ OpenFOAM-4.x-version-4.1/wmake/rules/General/CGAL -@@ -6,9 +6,10 @@ - -I/usr/include - - CGAL_LIBS = \ -- -L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \ -- -L$(GMP_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) \ -+ -L$(MPFR_ARCH_PATH)/lib \ -+ -L$(GMP_ARCH_PATH)/lib \ - -L$(BOOST_ARCH_PATH)/lib \ - -L$(CGAL_ARCH_PATH)/lib \ - -lCGAL \ -+ -lgmp \ - -lmpfr -diff -ur OpenFOAM-4.x-version-4.1.org/wmake/rules/linux64Gcc/c++ OpenFOAM-4.x-version-4.1/wmake/rules/linux64Gcc/c++ ---- OpenFOAM-4.x-version-4.1.org/wmake/rules/linux64Gcc/c++ -+++ OpenFOAM-4.x-version-4.1/wmake/rules/linux64Gcc/c++ -@@ -20,5 +20,5 @@ - - LINK_LIBS = $(c++DBUG) - --LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed --LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed -+LINKLIBSO = $(CC) $(c++FLAGS) $(LDFLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed -+LINKEXE = $(CC) $(c++FLAGS) $(LDFLAGS) -Xlinker --add-needed -Xlinker --no-as-needed diff --git a/gnu/packages/patches/qtbase-qmake-use-libname.patch b/gnu/packages/patches/qtbase-qmake-use-libname.patch new file mode 100644 index 0000000000..0bc2094d86 --- /dev/null +++ b/gnu/packages/patches/qtbase-qmake-use-libname.patch @@ -0,0 +1,53 @@ +Patch retrieved from NixOS +https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch + +From 8880bc263a366aeb82056f0bf3f1b17b6ec26900 Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Thu, 13 Apr 2023 23:42:29 +0800 +Subject: [PATCH 1/6] qtbase: qmake: always use libname instead of absolute + path in qmake files + +In generated qmake files, absolute paths to qt libraries are embedded +and then used in linker flags. However as the libraries can be provided +by qt modules other than the one currently being built, the ebedded +paths can be incorrect. +--- + cmake/QtFinishPrlFile.cmake | 7 ++++--- + cmake/QtGenerateLibHelpers.cmake | 3 --- + 2 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake +index 32169e418c..4e754af367 100644 +--- a/cmake/QtFinishPrlFile.cmake ++++ b/cmake/QtFinishPrlFile.cmake +@@ -61,9 +61,10 @@ foreach(line ${lines}) + endif() + list(APPEND adjusted_libs "-framework" "${CMAKE_MATCH_1}") + else() +- # Not a framework, transform the Qt module into relocatable relative path. +- qt_strip_library_version_suffix(relative_lib "${relative_lib}") +- list(APPEND adjusted_libs "$$[QT_INSTALL_LIBS]/${relative_lib}") ++ # Not a framework, extract the library name and prepend an -l to make ++ # it relocatable. ++ qt_transform_absolute_library_paths_to_link_flags(lib_with_link_flag "${lib}") ++ list(APPEND adjusted_libs "${lib_with_link_flag}") + endif() + endif() + else() +diff --git a/cmake/QtGenerateLibHelpers.cmake b/cmake/QtGenerateLibHelpers.cmake +index e3f4bbf881..f8bd26acc7 100644 +--- a/cmake/QtGenerateLibHelpers.cmake ++++ b/cmake/QtGenerateLibHelpers.cmake +@@ -70,9 +70,6 @@ function(qt_transform_absolute_library_paths_to_link_flags out_var library_path_ + string(TOLOWER "${dir}" dir_lower) + # If library_path isn't in default link directories, we should add it to link flags. + list(FIND IMPLICIT_LINK_DIRECTORIES_LOWER "${dir_lower}" index) +- if(${index} EQUAL -1) +- list(APPEND out_list "-L\"${dir}\"") +- endif() + list(APPEND out_list "${lib_name_with_link_flag}") + else() + list(APPEND out_list "${library_path}") +-- +2.39.2 + |