wine: fix gstreamer on WoW builds

This commit is contained in:
Martino Fontana 2023-06-21 15:36:37 +02:00
parent 2c9ecd1f04
commit 61dd9efa12
2 changed files with 27 additions and 3 deletions

View File

@ -1,4 +1,4 @@
## build described at http://wiki.winehq.org/Wine64
## build described at https://wiki.winehq.org/Building_Wine#Shared_WoW64
source $stdenv/setup
preFlags="${configureFlags}"
@ -17,6 +17,26 @@ configurePhase
buildPhase
# checkPhase
# Remove 64 bit gstreamer from PKG_CONFIG_PATH
IFS=":" read -ra LIST_ARRAY <<< "$PKG_CONFIG_PATH"
IFS=":" read -ra REMOVE_ARRAY <<< "@pkgconfig64remove@"
NEW_LIST_ARRAY=()
for ELEMENT in "${LIST_ARRAY[@]}"; do
TO_ADD=1
for REMOVE in "${REMOVE_ARRAY[@]}"; do
if [[ "$REMOVE" == "$ELEMENT" ]]; then
TO_ADD=0
break
fi
done
if [[ $TO_ADD -eq 1 ]]; then
NEW_LIST_ARRAY+=("$ELEMENT")
fi
done
PKG_CONFIG_PATH=$(IFS=":"; echo "${NEW_LIST_ARRAY[*]}")
cd $TMP/wine-wow
sourceRoot=`pwd`
configureFlags="${preFlags} --with-wine64=../wine64"

View File

@ -1,4 +1,4 @@
{ stdenv_32bit, lib, pkgs, pkgsi686Linux, pkgsCross, callPackage, moltenvk,
{ stdenv_32bit, lib, pkgs, pkgsi686Linux, pkgsCross, callPackage, substituteAll, moltenvk,
wineRelease ? "stable",
supportFlags
}:
@ -34,7 +34,11 @@ in with src; {
geckos = [ gecko32 gecko64 ];
mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc mingwW64.buildPackages.gcc ];
monos = [ mono ];
buildScript = ./builder-wow.sh;
buildScript = substituteAll {
src = ./builder-wow.sh;
# pkgconfig has trouble picking the right architecture
pkgconfig64remove = lib.makeSearchPathOutput "dev" "lib/pkgconfig" [ pkgs.glib pkgs.gst_all_1.gstreamer ];
};
platforms = [ "x86_64-linux" ];
mainProgram = "wine64";
};