diff options
Diffstat (limited to 'proton-sanitize_makefile.patch')
-rw-r--r-- | proton-sanitize_makefile.patch | 142 |
1 files changed, 77 insertions, 65 deletions
diff --git a/proton-sanitize_makefile.patch b/proton-sanitize_makefile.patch index 750d6785e384..b46378108dfe 100644 --- a/proton-sanitize_makefile.patch +++ b/proton-sanitize_makefile.patch @@ -1,8 +1,8 @@ -diff --git a/build/makefile_base.mak b/build/makefile_base.mak -index 363e91c..e9f3c3c 100644 ---- a/build/makefile_base.mak -+++ b/build/makefile_base.mak -@@ -62,7 +62,6 @@ ifeq ($(ENABLE_CCACHE),1) +diff --git a/Makefile.in b/Makefile.in +index 227d627..49581dc 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -63,7 +63,6 @@ ifeq ($(ENABLE_CCACHE),1) export CCACHE_DIR := $(if $(CCACHE_DIR),$(CCACHE_DIR),$(HOME)/.ccache) override DOCKER_OPTS := -v $(CCACHE_DIR):$(CCACHE_DIR)$(CONTAINER_MOUNT_OPTS) $(CCACHE_ENV) -e CCACHE_DIR=$(CCACHE_DIR) $(DOCKER_OPTS) else @@ -10,7 +10,7 @@ index 363e91c..e9f3c3c 100644 override DOCKER_OPTS := $(CCACHE_ENV) -e CCACHE_DISABLE=1 $(DOCKER_OPTS) endif -@@ -120,7 +119,7 @@ container-build: +@@ -121,7 +120,7 @@ container-build: all32 $(MAKECMDGOALS32): container-build all64 $(MAKECMDGOALS64): container-build else @@ -19,7 +19,7 @@ index 363e91c..e9f3c3c 100644 endif -@@ -170,7 +169,8 @@ else +@@ -171,11 +170,12 @@ else endif CROSSLDFLAGS += -Wl,--file-alignment,4096 @@ -29,10 +29,15 @@ index 363e91c..e9f3c3c 100644 SANITY_FLAGS := -fwrapv -fno-strict-aliasing DEBUG_FLAGS := -gdwarf-2 -gstrict-dwarf COMMON_FLAGS = $(DEBUG_FLAGS) $(OPTIMIZE_FLAGS) $(SANITY_FLAGS) -ffile-prefix-map=$(CCACHE_BASEDIR)=. -@@ -354,8 +354,8 @@ ALL_TARGETS += dist +-COMMON_FLAGS32 := -mstackrealign ++COMMON_FLAGS32 := -mstackrealign -mno-avx + CARGO_BUILD_ARG := --release + + ## +@@ -362,8 +362,8 @@ ALL_TARGETS += dist GOAL_TARGETS += dist - dist_prefix: wine gst_good + dist_prefix: wine gst_good gst_libav gst_plugins_rs - find $(DST_LIBDIR32)/wine -type f -execdir chmod a-w '{}' '+' - find $(DST_LIBDIR64)/wine -type f -execdir chmod a-w '{}' '+' + find $(DST_LIBDIR32)/wine -type f -execdir chmod go-w '{}' '+' @@ -40,51 +45,28 @@ index 363e91c..e9f3c3c 100644 rm -rf $(abspath $(DIST_PREFIX)) python3 $(SRCDIR)/default_pfx.py $(abspath $(DIST_PREFIX)) $(abspath $(DST_DIR)) $(STEAM_RUNTIME_RUNSH) -@@ -408,6 +408,9 @@ endif # ifeq ($(CONTAINER),) +@@ -430,6 +430,11 @@ $(eval $(call rules-meson,dav1d,64)) ## GST_COMMON_MESON_ARGS := \ + -Db_lto=true \ + -Db_pie=true \ + -Ddoc=disabled \ - -Dexamples=disabled \ - -Dtests=disabled \ - -Dgtk_doc=disabled \ -@@ -420,6 +423,7 @@ GST_COMMON_MESON_ARGS := \ ++ -Dintrospection=disabled \ ++ -Dgobject-cast-checks=disabled \ + -Dorc=enabled GST_ORC_MESON_ARGS := \ - -Dorc-test=disabled \ -+ -Dpackage-name="GStreamer Orc (Proton)" \ - $(GST_COMMON_MESON_ARGS) - - $(eval $(call rules-source,gst_orc,$(SRCDIR)/gst-orc)) -@@ -436,6 +440,9 @@ GSTREAMER_MESON_ARGS := \ +@@ -450,6 +455,8 @@ GSTREAMER_MESON_ARGS := \ -Dbenchmarks=disabled \ -Dtools=disabled \ -Dbash-completion=disabled \ + -Dptp-helper-permissions=capabilities \ + -Ddbghelp=disabled \ -+ -Dpackage-name="GStreamer (Proton)" \ $(GST_COMMON_MESON_ARGS) GSTREAMER_DEPENDS = gst_orc -@@ -474,6 +481,7 @@ GST_BASE_MESON_ARGS := \ - -Dxshm=disabled \ - -Dxvideo=disabled \ - -Dtools=disabled \ -+ -Dpackage-name="GStreamer Base Plugins (Proton)" \ - $(GST_COMMON_MESON_ARGS) - - GST_BASE_DEPENDS = gst_orc gstreamer -@@ -535,6 +543,7 @@ GST_GOOD_MESON_ARGS := \ - -Dximagesrc=disabled \ - -Dy4m=disabled \ - -Dtools=disabled \ -+ -Dpackage-name="GStreamer Good Plugins (Proton)" \ - $(GST_COMMON_MESON_ARGS) - - GST_GOOD_DEPENDS = gst_orc gstreamer gst_base -@@ -693,10 +702,20 @@ WINE_SOURCE_ARGS = \ +@@ -691,7 +698,13 @@ WINE_SOURCE_ARGS = \ --exclude include/config.h.in \ WINE_CONFIGURE_ARGS = \ @@ -92,20 +74,13 @@ index 363e91c..e9f3c3c 100644 + --with-gstreamer \ + --with-faudio \ --with-mingw \ - --without-xpresent \ -+ --without-ldap \ + --without-vkd3d \ + --without-oss \ + --disable-win16 \ --disable-tests -+WINE_CFLAGS= -fno-builtin-sin -fno-builtin-sinf -fno-builtin-cos -fno-builtin-cosf -+WINE_CXXFLAGS= -fno-builtin-sin -fno-builtin-sinf -fno-builtin-cos -fno-builtin-cosf -+ WINE_CONFIGURE_ARGS64 = --enable-win64 - - WINE_DEPENDS = gst_orc gstreamer gst_base faudio jxrlib -@@ -756,6 +775,9 @@ $(OBJ)/.vrclient-post-source: +@@ -754,6 +767,9 @@ $(OBJ)/.vrclient-post-source: DXVK_MESON_ARGS32 = --bindir=$(DXVK_DST32)/lib/wine/dxvk DXVK_MESON_ARGS64 = --bindir=$(DXVK_DST64)/lib64/wine/dxvk @@ -115,7 +90,7 @@ index 363e91c..e9f3c3c 100644 $(eval $(call rules-source,dxvk,$(SRCDIR)/dxvk)) $(eval $(call rules-meson,dxvk,32,CROSS)) $(eval $(call rules-meson,dxvk,64,CROSS)) -@@ -778,6 +800,9 @@ $(OBJ)/.dxvk-post-build32: +@@ -776,6 +792,9 @@ $(OBJ)/.dxvk-post-build32: DXVK_NVAPI_MESON_ARGS32 = --bindir=$(DXVK_NVAPI_DST32)/lib/wine/nvapi DXVK_NVAPI_MESON_ARGS64 = --bindir=$(DXVK_NVAPI_DST64)/lib64/wine/nvapi @@ -125,7 +100,7 @@ index 363e91c..e9f3c3c 100644 $(eval $(call rules-source,dxvk-nvapi,$(SRCDIR)/dxvk-nvapi)) $(eval $(call rules-meson,dxvk-nvapi,32,CROSS)) $(eval $(call rules-meson,dxvk-nvapi,64,CROSS)) -@@ -841,10 +866,13 @@ VKD3D_PROTON_SOURCE_ARGS = \ +@@ -839,10 +858,13 @@ VKD3D_PROTON_SOURCE_ARGS = \ --exclude vkd3d_build.h.in \ --exclude vkd3d_version.h.in \ @@ -140,6 +115,26 @@ index 363e91c..e9f3c3c 100644 $(eval $(call rules-source,vkd3d-proton,$(SRCDIR)/vkd3d-proton)) $(eval $(call rules-meson,vkd3d-proton,32,CROSS)) $(eval $(call rules-meson,vkd3d-proton,64,CROSS)) +diff --git a/configure.sh b/configure.sh +index 48d6004..33eb9f3 100755 +--- a/configure.sh ++++ b/configure.sh +@@ -141,6 +141,7 @@ function configure() { + CONTAINER_MOUNT_OPTS=:Z + fi + ++ if [ "$arg_container_engine" != "none" ]; then + if [[ -n "$arg_container_engine" ]]; then + check_container_engine "$arg_container_engine" || die "Specified container engine \"$arg_container_engine\" doesn't work" + else +@@ -153,6 +154,7 @@ function configure() { + die "${arg_container_engine:-Container engine discovery} has failed. Please fix your setup." + fi + fi ++ fi + + stat "Using $arg_container_engine." + diff --git a/make/rules-autoconf.mk b/make/rules-autoconf.mk index 0827caa..4e6d19f 100644 --- a/make/rules-autoconf.mk @@ -157,22 +152,23 @@ index 0827caa..4e6d19f 100644 endif endef diff --git a/make/rules-cargo.mk b/make/rules-cargo.mk -index 2dbfe75..6afbc42 100644 +index b2af34c..c132fff 100644 --- a/make/rules-cargo.mk +++ b/make/rules-cargo.mk -@@ -14,7 +14,9 @@ $$(OBJ)/.$(1)-configure$(3): +@@ -14,8 +14,10 @@ $$(OBJ)/.$(1)-configure$(3): $$(OBJ)/.$(1)-build$(3): @echo ":: building $(3)bit $(1)..." >&2 cd $$($(2)_SRC) && env $$($(2)_ENV$(3)) \ -- cargo build $$(filter -j%,$$(MAKEFLAGS)) --target "$$(CARGO_TARGET_$(3))" --target-dir $$($(2)_OBJ$(3)) $$(CARGO_BUILD_ARG) + cargo update --offline --verbose + cd $$($(2)_SRC) && env $$($(2)_ENV$(3)) \ -+ cargo build -j$$(SUBJOBS) --locked --offline --verbose --target "$$(CARGO_TARGET_$(3))" --target-dir $$($(2)_OBJ$(3)) $$(CARGO_BUILD_ARG) - touch $$@ - endif - endef + cargo build \ +- $$(filter -j%,$$(MAKEFLAGS)) \ ++ -j$$(SUBJOBS) --locked --offline --verbose \ + --target "$$(CARGO_TARGET_$(3))" \ + --target-dir $$($(2)_OBJ$(3)) \ + $$(CARGO_BUILD_ARG) \ diff --git a/make/rules-cmake.mk b/make/rules-cmake.mk -index 0e18df9..2150cba 100644 +index c70751a..1096dc1 100644 --- a/make/rules-cmake.mk +++ b/make/rules-cmake.mk @@ -28,9 +28,9 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/CMakeLists.txt @@ -188,10 +184,10 @@ index 0e18df9..2150cba 100644 endif endef diff --git a/make/rules-common.mk b/make/rules-common.mk -index 4d72ac0..7b1b13b 100644 +index 0e38bb8..5fed88e 100644 --- a/make/rules-common.mk +++ b/make/rules-common.mk -@@ -119,8 +119,12 @@ $(2)_LIBFLAGS$(3) = $$(foreach d,$$($(2)_DEPS$(3)),-L$$($$(d)_LIBDIR$(3))) \ +@@ -113,8 +113,12 @@ $(2)_LIBFLAGS$(3) = $$(foreach d,$$($(2)_DEPS$(3)),-L$$($$(d)_LIBDIR$(3))) \ # native version doesn't exist. $(2)_ENV$(3) = \ @@ -204,7 +200,7 @@ index 4d72ac0..7b1b13b 100644 CCACHE_BASEDIR="$$(CCACHE_BASEDIR)" \ STRIP="$$(STRIP)" \ AR="$$(TARGET_$(4)$(3))-ar" \ -@@ -134,7 +138,7 @@ $(2)_ENV$(3) = \ +@@ -128,7 +132,7 @@ $(2)_ENV$(3) = \ PATH="$$(call list-join,:,$$(foreach d,$$($(2)_DEPS$(3)),$$($$(d)_BINDIR$(3))),,:):$$(SRC)/glslang/bin:$$$$PATH" \ LD_LIBRARY_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_DEPS$(3)),$$($$(d)_LIBDIR$(3))),,:)$$$$LD_LIBRARY_PATH" \ PKG_CONFIG_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_DEPS$(3)),$$($$(d)_LIBDIR$(3))/pkgconfig))" \ @@ -213,7 +209,7 @@ index 4d72ac0..7b1b13b 100644 CFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3))" \ CPPFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CPPFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3))" \ CXXFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CXXFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3)) -std=c++17" \ -@@ -158,7 +162,7 @@ $(2)_ENV$(3) += \ +@@ -152,7 +156,7 @@ $(2)_ENV$(3) += \ CROSSCPPFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CPPFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3))" \ CROSSCXXFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CXXFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3)) -std=c++17" \ CROSSLDFLAGS="$$($(2)_LIBFLAGS$(3)) $$($(2)_LDFLAGS$(3)) $$($(2)_LDFLAGS) $$(CROSSLDFLAGS)" \ @@ -222,7 +218,7 @@ index 4d72ac0..7b1b13b 100644 endif -@@ -171,14 +175,14 @@ else +@@ -165,14 +169,14 @@ else install-strip = objcopy --file-alignment=4096 --strip-debug $(1) $(2)/$(notdir $(1)) && rm -f $(2)/$(notdir $(1)).debug endif @@ -241,7 +237,23 @@ index 4d72ac0..7b1b13b 100644 +PKG_CONFIG_TARGET_CROSS32 := i686-w64-mingw32 PKG_CONFIG_TARGET_CROSS64 := x86_64-w64-mingw32 - $(OBJ)/.%-post-build32: + LIBDIR_WINE_32 := wine/i386-unix +diff --git a/make/rules-configure.mk b/make/rules-configure.mk +index d04a3c5..18ac684 100644 +--- a/make/rules-configure.mk ++++ b/make/rules-configure.mk +@@ -26,9 +26,9 @@ $$(OBJ)/.$(1)-configure$(3): + $$(OBJ)/.$(1)-build$(3): + @echo ":: building $(3)bit $(1)..." >&2 + cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(MAKE) ++ $$(MAKE) -j$$(SUBJOBS) + cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(MAKE) install ++ $$(MAKE) -j$$(SUBJOBS) install + touch $$@ + endif + endef diff --git a/make/rules-meson.mk b/make/rules-meson.mk index d603bfd..f798edf 100644 --- a/make/rules-meson.mk @@ -256,7 +268,7 @@ index d603bfd..f798edf 100644 endif endef diff --git a/make/rules-winemaker.mk b/make/rules-winemaker.mk -index d8e6d12..33697b9 100644 +index 69688a0..1c0d1d3 100644 --- a/make/rules-winemaker.mk +++ b/make/rules-winemaker.mk @@ -29,7 +29,7 @@ $$(OBJ)/.$(1)-build$(3): @@ -266,5 +278,5 @@ index d8e6d12..33697b9 100644 - $$(MAKE) -C "$$($(2)_OBJ$(3))" LIBRARIES="$$($(2)_LDFLAGS)" + $$(MAKE) -j$$(SUBJOBS) -C "$$($(2)_OBJ$(3))" LIBRARIES="$$($(2)_LDFLAGS)" cd "$$($(2)_OBJ$(3))" && touch "$(basename $(4)).spec" && env $$($(2)_ENV$(3)) \ - winebuild --dll --fake-module -E "$(basename $(4)).spec" -o "$(4).fake" - mkdir -p $$($(2)_DST$(3))/lib$(subst 32,,$(3))/wine/fakedlls/ + winebuild --$(lastword $(subst ., ,$(4))) --fake-module -E "$(basename $(4)).spec" -o "$(4).fake" + mkdir -p $$($(2)_LIBDIR$(3))/$(LIBDIR_WINE_$(3)) |