|
| 1 | +From 270a3ace75b60498a1fd80f0c1ce0335b51d4a7b Mon Sep 17 00:00:00 2001 |
| 2 | +From: Stelios Tsampas <loathingkernel@gmail.com> |
| 3 | +Date: Wed, 26 Apr 2023 14:22:23 +0300 |
| 4 | +Subject: [PATCH 1/4] AUR PKGBUILD changes |
| 5 | + |
| 6 | +--- |
| 7 | + Makefile.in | 32 +++++++++++++++++++------------- |
| 8 | + compatibilitytool.vdf.template | 2 +- |
| 9 | + configure.sh | 2 ++ |
| 10 | + make/rules-cargo.mk | 5 +++-- |
| 11 | + make/rules-cmake.mk | 1 + |
| 12 | + make/rules-common.mk | 11 +++++++++-- |
| 13 | + make/rules-meson.mk | 5 +++-- |
| 14 | + proton | 5 ++--- |
| 15 | + toolmanifest_x86_64.vdf | 1 - |
| 16 | + 9 files changed, 40 insertions(+), 24 deletions(-) |
| 17 | + |
| 18 | +diff --git a/Makefile.in b/Makefile.in |
| 19 | +index d9581828..ad685e2c 100644 |
| 20 | +--- a/Makefile.in |
| 21 | ++++ b/Makefile.in |
| 22 | +@@ -51,12 +51,15 @@ DIST_VERSION := $(DST_BASE)/version |
| 23 | + DEPLOY_DIR := ./deploy |
| 24 | + REDIST_DIR := ./redist |
| 25 | + |
| 26 | +-i386_CFLAGS := -mstackrealign -march=nocona -mtune=core-avx2 -mfpmath=sse |
| 27 | +-x86_64_CFLAGS := -mcmodel=small -march=nocona -mtune=core-avx2 -mfpmath=sse |
| 28 | ++x86_COMMON_CFLAGS ?= -march=nocona -mtune=core-avx2 |
| 29 | ++ |
| 30 | ++i386_CFLAGS := -mstackrealign $(x86_COMMON_CFLAGS) -mfpmath=sse |
| 31 | ++x86_64_CFLAGS := -mcmodel=small $(x86_COMMON_CFLAGS) -mfpmath=sse |
| 32 | + aarch64_CFLAGS := -march=armv8.2-a -mtune=cortex-x3 |
| 33 | + arm64ec_CFLAGS := -march=armv8.2-a -mtune=cortex-x3 |
| 34 | + |
| 35 | +-CFLAGS = -O2 -fwrapv -fno-strict-aliasing |
| 36 | ++CFLAGS ?= -O2 |
| 37 | ++CFLAGS += -fwrapv -fno-strict-aliasing |
| 38 | + CFLAGS += -ggdb -ffunction-sections -fdata-sections -fno-omit-frame-pointer |
| 39 | + CFLAGS += -ffile-prefix-map=$(CCACHE_BASEDIR)=. |
| 40 | + |
| 41 | +@@ -1027,6 +1030,9 @@ DXVK_x86_64_MESON_ARGS = --bindir=$(DXVK_x86_64_DST)/lib/wine/dxvk/x86_64-window |
| 42 | + DXVK_arm64ec_MESON_ARGS = --bindir=$(DXVK_arm64ec_DST)/lib/wine/dxvk/aarch64-windows |
| 43 | + DXVK_HOST_DEPENDS = glslang |
| 44 | + |
| 45 | ++# AVX-enabled builds not supported due to stack alignment issues. |
| 46 | ++DXVK_CFLAGS = -mno-avx -mno-avx2 |
| 47 | ++ |
| 48 | + $(eval $(call rules-source,dxvk,$(SRCDIR)/dxvk)) |
| 49 | + $(eval $(call rules-meson,dxvk,i386,windows)) |
| 50 | + $(eval $(call rules-meson,dxvk,x86_64,windows)) |
| 51 | +@@ -1091,6 +1097,9 @@ VKD3D_CFLAGS = -fno-lto |
| 52 | + VKD3D_LDFLAGS = -static-libgcc $(CROSSLDFLAGS) |
| 53 | + VKD3D_DEPENDS = vulkan-headers spirv-headers |
| 54 | + |
| 55 | ++# AVX-enabled builds not supported due to stack alignment issues. |
| 56 | ++VKD3D_CFLAGS += -mno-avx -mno-avx2 |
| 57 | ++ |
| 58 | + VKD3D_i386_LIBDIR = $(VKD3D_i386_DST)/lib |
| 59 | + VKD3D_x86_64_LIBDIR = $(VKD3D_x86_64_DST)/lib |
| 60 | + |
| 61 | +@@ -1423,15 +1432,15 @@ $(FONTS_OBJ)/source-han/%.ttf: $$(%.ttf_CIDFONT) $$(%.ttf_FEATURES) $$(%.ttf_SEQ |
| 62 | + mkdir -p $(FONTS_OBJ)/source-han |
| 63 | + # Do not immediately create the target file, so that make is interrupted |
| 64 | + # it will restart again |
| 65 | +- afdko makeotfexe -f $($(notdir $@)_CIDFONT) -omitMacNames -ff $($(notdir $@)_FEATURES) \ |
| 66 | ++ makeotfexe -f $($(notdir $@)_CIDFONT) -omitMacNames -ff $($(notdir $@)_FEATURES) \ |
| 67 | + -lic ADOBE -mf $($(notdir $@)_MENUNAMEDB) -r -nS -cs 25 -ch $($(notdir $@)_UNISOURCE) \ |
| 68 | + -ci $($(notdir $@)_SEQUENCES) -o $@.tmp |
| 69 | +- afdko tx -cff +S -no_futile $($(notdir $@)_CIDFONT) $@.cff |
| 70 | ++ tx -cff +S -no_futile $($(notdir $@)_CIDFONT) $@.cff |
| 71 | + # sftnedit uses a hardcoded temporary file in the local directory, so we have |
| 72 | + # to run it in a dedicated temporary directory to prevent concurrent instances |
| 73 | + # to step onto each other's feet |
| 74 | +- (TEMP_DIR=`mktemp -d` && cd $$TEMP_DIR && afdko sfntedit -a CFF=$(abspath $($(notdir $@)).cff) $(abspath $@.tmp) && rm -fr $$TEMP_DIR) |
| 75 | +- if [ "$(notdir $@)" = "msyh.ttf" ]; then afdko otf2ttf -o $@.tmp.ttf $@.tmp; mv -f $@.tmp.ttf $@.tmp; fi |
| 76 | ++ (TEMP_DIR=`mktemp -d` && cd $$TEMP_DIR && sfntedit -a CFF=$(abspath $($(notdir $@)).cff) $(abspath $@.tmp) && rm -fr $$TEMP_DIR) |
| 77 | ++ if [ "$(notdir $@)" = "msyh.ttf" ]; then otf2ttf -o $@.tmp.ttf $@.tmp; mv -f $@.tmp.ttf $@.tmp; fi |
| 78 | + mv $@.tmp $@ |
| 79 | + |
| 80 | + $(FONTS_OBJ)/ume-gothic/%.ttf: $$(%.ttf_FONT) $$(%.ttf_NAMETABLE_PATCH) |
| 81 | +@@ -1441,12 +1450,12 @@ $(FONTS_OBJ)/ume-gothic/%.ttf: $$(%.ttf_FONT) $$(%.ttf_NAMETABLE_PATCH) |
| 82 | + ttx -o $@ -m $($(notdir $@)_FONT) $(FONTS_OBJ)/ume-gothic/$(notdir $(basename $($(notdir $@)_NAMETABLE_PATCH))).ttx |
| 83 | + |
| 84 | + $(simsun.ttc): $(simsun.ttf) $(nsimsun.ttf) |
| 85 | +- afdko otf2otc -o $@.tmp $^ |
| 86 | +- afdko otf2ttf -o $@ $@.tmp |
| 87 | ++ otf2otc -o $@.tmp $^ |
| 88 | ++ otf2ttf -o $@ $@.tmp |
| 89 | + rm $@.tmp |
| 90 | + |
| 91 | + $(msgothic.ttc): $(msgothic.ttf) $(mspgothic.ttf) $(msuigothic.ttf) |
| 92 | +- afdko otf2otc -o $@ $^ |
| 93 | ++ otf2otc -o $@ $^ |
| 94 | + |
| 95 | + $(micross.ttf): $(FONTS)/scripts/merge.py $(noto_sans.ttf) $(noto_sans_arabic.ttf) $(noto_sans_armenian.ttf) $(noto_sans_bengali.ttf) $(noto_sans_coptic.ttf) \ |
| 96 | + $(noto_sans_georgian.ttf) $(noto_sans_gujarati.ttf) $(noto_sans_hebrew.ttf) $(noto_sans_khmer.ttf) $(noto_sans_tamil.ttf) \ |
| 97 | +@@ -1851,9 +1860,6 @@ ifeq ($(CONTAINER_ENGINE),) |
| 98 | + CONTAINER_ENGINE := docker |
| 99 | + endif |
| 100 | + |
| 101 | +-DOCKER_BASE = $(CONTAINER_ENGINE) run --rm -v $(SRC):$(SRC)$(CONTAINER_MOUNT_OPTS) -v $(OBJ):$(OBJ)$(CONTAINER_MOUNT_OPTS) \ |
| 102 | +- -w $(OBJ) -e MAKEFLAGS \ |
| 103 | +- $(DOCKER_OPTS) $(STEAMRT_IMAGE) |
| 104 | + |
| 105 | + .PHONY: dist deploy redist symstore-tarball |
| 106 | + .DEFAULT dist deploy redist symstore-tarball: |
| 107 | +diff --git a/compatibilitytool.vdf.template b/compatibilitytool.vdf.template |
| 108 | +index 090eff5c..354a9466 100644 |
| 109 | +--- a/compatibilitytool.vdf.template |
| 110 | ++++ b/compatibilitytool.vdf.template |
| 111 | +@@ -14,7 +14,7 @@ |
| 112 | + "install_path" "." |
| 113 | + |
| 114 | + // For this template, we're going to substitute the display_name key in here, e.g.: |
| 115 | +- "display_name" "##BUILD_NAME##" |
| 116 | ++ "display_name" "##BUILD_NAME## (Unsupported AUR package [native])" |
| 117 | + |
| 118 | + "from_oslist" "windows" |
| 119 | + "to_oslist" "linux" |
| 120 | +diff --git a/configure.sh b/configure.sh |
| 121 | +index 80f4f1ab..a71035da 100755 |
| 122 | +--- a/configure.sh |
| 123 | ++++ b/configure.sh |
| 124 | +@@ -143,6 +143,7 @@ function configure() { |
| 125 | + CONTAINER_MOUNT_OPTS=:Z |
| 126 | + fi |
| 127 | + |
| 128 | ++ if [ "$arg_container_engine" != "none" ]; then |
| 129 | + if [[ -n "$arg_container_engine" ]]; then |
| 130 | + check_container_engine "$arg_container_engine" "$steamrt_image" || die "Specified container engine \"$arg_container_engine\" doesn't work" |
| 131 | + else |
| 132 | +@@ -155,6 +156,7 @@ function configure() { |
| 133 | + die "${arg_container_engine:-Container engine discovery} has failed. Please fix your setup." |
| 134 | + fi |
| 135 | + fi |
| 136 | ++ fi |
| 137 | + |
| 138 | + stat "Using $arg_container_engine." |
| 139 | + |
| 140 | +diff --git a/make/rules-cargo.mk b/make/rules-cargo.mk |
| 141 | +index 87f41266..87f27487 100644 |
| 142 | +--- a/make/rules-cargo.mk |
| 143 | ++++ b/make/rules-cargo.mk |
| 144 | +@@ -14,8 +14,9 @@ $$(OBJ)/.$(1)-$(3)-configure: |
| 145 | + |
| 146 | + $$(OBJ)/.$(1)-$(3)-build: |
| 147 | + @echo ":: building $(1)-$(3)..." >&2 |
| 148 | +- cd $$($(2)_SRC) && env $$($(2)_$(3)_ENV) \ |
| 149 | ++ +cd $$($(2)_SRC) && env $$($(2)_$(3)_ENV) \ |
| 150 | + cargo build $(--quiet?) --release \ |
| 151 | ++ --locked --offline --verbose \ |
| 152 | + $$(filter -j%,$$(MAKEFLAGS)) \ |
| 153 | + --target-dir $$($(2)_$(3)_OBJ) \ |
| 154 | + $$($(3)-$(4)_CARGO_ARGS) \ |
| 155 | +@@ -42,5 +43,5 @@ aarch64-unix_CARGO_ARGS := --target $(aarch64-unix_CARGO_TARGET) |
| 156 | + # HACK: forced to gcc-10 because Sniper's (SteamRT) gcc-14 doesn't come with |
| 157 | + # shared libgcc_s.so and cargo/rustc (?) forces shared linking with that lib. |
| 158 | + ifeq ($(TARGET_ARCH),x86_64) |
| 159 | +- CARGO_LINKERS := $(foreach a,$(unix_ARCHS),CARGO_TARGET_$(call toupper,$($(a)-unix_CARGO_TARGET))_LINKER="$($(a)-unix_TARGET)-gcc-10") |
| 160 | ++ CARGO_LINKERS := $(foreach a,$(unix_ARCHS),CARGO_TARGET_$(call toupper,$($(a)-unix_CARGO_TARGET))_LINKER="$($(a)-unix_TARGET)-gcc") |
| 161 | + endif |
| 162 | +diff --git a/make/rules-cmake.mk b/make/rules-cmake.mk |
| 163 | +index 33a11fe4..9764b2ea 100644 |
| 164 | +--- a/make/rules-cmake.mk |
| 165 | ++++ b/make/rules-cmake.mk |
| 166 | +@@ -18,6 +18,7 @@ $$(OBJ)/.$(1)-$(3)-configure: $$($(2)_SRC)/CMakeLists.txt |
| 167 | + -DCMAKE_INSTALL_PREFIX="$$($(2)_$(3)_DST)" \ |
| 168 | + -DCMAKE_INSTALL_LIBDIR="lib/$$($(3)-$(4)_LIBDIR)" \ |
| 169 | + -DCMAKE_BUILD_TYPE=plain \ |
| 170 | ++ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ |
| 171 | + $$($(3)-$(4)_CMAKE_ARGS) \ |
| 172 | + $$($(2)_CMAKE_ARGS) \ |
| 173 | + $$($(2)_$(3)_CMAKE_ARGS) |
| 174 | +diff --git a/make/rules-common.mk b/make/rules-common.mk |
| 175 | +index a8bceafd..37e4457e 100644 |
| 176 | +--- a/make/rules-common.mk |
| 177 | ++++ b/make/rules-common.mk |
| 178 | +@@ -114,7 +114,14 @@ $(2)_$(3)-unix_LIBFLAGS = $$(foreach d,$$($(2)_$(3)_DEPS),-Wl,-rpath-link=$$($$( |
| 179 | + # We also always need to specify the linker for the host architecture - a bunch |
| 180 | + # of crates build host-native bits via build.rs. |
| 181 | + |
| 182 | ++ |
| 183 | ++PKG_CONFIG_PATH_i386 := /usr/lib32/pkgconfig |
| 184 | ++PKG_CONFIG_PATH_x86_64 := /usr/lib64/pkgconfig |
| 185 | ++ |
| 186 | ++ |
| 187 | + $(2)_$(3)_ENV = \ |
| 188 | ++ WINEDEBUG="-all" \ |
| 189 | ++ WINEDLLOVERRIDES="winemenubuilder=d;" \ |
| 190 | + $$(CARGO_LINKERS) \ |
| 191 | + CCACHE_BASEDIR="$$(CCACHE_BASEDIR)" \ |
| 192 | + STRIP="$$(STRIP)" \ |
| 193 | +@@ -128,8 +135,8 @@ $(2)_$(3)_ENV = \ |
| 194 | + PKG_CONFIG="$$($$(HOST_ARCH)-unix_TARGET)-pkg-config" \ |
| 195 | + PATH="$$(call list-join,:,$$(foreach d,$$($(2)_$(3)_HOST_DEPS),$$($$(d)_$$(HOST_ARCH)_BINDIR)),,:):$$$$PATH" \ |
| 196 | + LD_LIBRARY_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_$(3)_HOST_DEPS),$$($$(d)_$$(HOST_ARCH)_LIBDIR)/$$($$(HOST_ARCH)-unix_LIBDIR)),,:)$$$$LD_LIBRARY_PATH" \ |
| 197 | +- PKG_CONFIG_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_$(3)_DEPS),$$($$(d)_$(3)_LIBDIR)/$$($(3)-$(4)_LIBDIR)/pkgconfig))" \ |
| 198 | +- PKG_CONFIG_LIBDIR="/usr/lib/$$($(3)-$(4)_LIBDIR)/pkgconfig:/usr/share/pkgconfig:$$(call list-join,:,$$(foreach d,$$($(2)_$(3)_DEPS),$$($$(d)_$(3)_DST)/share/pkgconfig))" \ |
| 199 | ++ PKG_CONFIG_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_$(3)_DEPS),$$($$(d)_$(3)_LIBDIR)/$$($(3)-$(4)_LIBDIR)/pkgconfig) $$(PKG_CONFIG_PATH_$(3)))" \ |
| 200 | ++ PKG_CONFIG_LIBDIR="/usr/lib/$$($(3)-$(4)_LIBDIR)/pkgconfig:$$(PKG_CONFIG_PATH_$(3)):/usr/share/pkgconfig:$$(call list-join,:,$$(foreach d,$$($(2)_$(3)_DEPS),$$($$(d)_$(3)_DST)/share/pkgconfig))" \ |
| 201 | + CMAKE_PREFIX_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_$(3)_DEPS),$$($$(d)_$(3)_DST)))" \ |
| 202 | + CFLAGS="$$($(2)_$(3)_INCFLAGS) $$($(2)_CFLAGS) $$($(3)_CFLAGS) $$(CFLAGS)" \ |
| 203 | + CPPFLAGS="$$($(2)_$(3)_INCFLAGS) $$($(2)_CFLAGS) $$($(3)_CFLAGS) $$(CFLAGS)" \ |
| 204 | +diff --git a/make/rules-meson.mk b/make/rules-meson.mk |
| 205 | +index 6a90a63f..ca41706f 100644 |
| 206 | +--- a/make/rules-meson.mk |
| 207 | ++++ b/make/rules-meson.mk |
| 208 | +@@ -46,10 +46,11 @@ $$(OBJ)/.$(1)-$(3)-configure: $$($(2)_SRC)/meson.build meson-source |
| 209 | + echo "$$$$$(2)_$(3)_MESON_CROSS" | env $$($(2)_$(3)_ENV) sh >"$$($(2)_$(3)_OBJ)/cross.txt" |
| 210 | + |
| 211 | + env $$($(2)_$(3)_ENV) \ |
| 212 | +- $$(OBJ)/src-meson/meson.py "$$($(2)_$(3)_OBJ)" "$$($(2)_SRC)" \ |
| 213 | ++ meson "$$($(2)_$(3)_OBJ)" "$$($(2)_SRC)" \ |
| 214 | + --prefix="$$($(2)_$(3)_DST)" \ |
| 215 | + --libdir="lib/$$($(3)-$(4)_LIBDIR)" \ |
| 216 | + --buildtype=plain \ |
| 217 | ++ --wrap-mode=nodownload \ |
| 218 | + --cross-file=$$($(2)_$(3)_OBJ)/cross.txt \ |
| 219 | + $$($(3)-$(4)_MESON_ARGS) \ |
| 220 | + $$($(2)_MESON_ARGS) \ |
| 221 | +@@ -61,7 +62,7 @@ $$(OBJ)/.$(1)-$(3)-configure: $$($(2)_SRC)/meson.build meson-source |
| 222 | + $$(OBJ)/.$(1)-$(3)-build: |
| 223 | + @echo ":: building $(1)-$(3)..." >&2 |
| 224 | + +env $$($(2)_$(3)_ENV) \ |
| 225 | +- ninja -C "$$($(2)_$(3)_OBJ)" install |
| 226 | ++ ninja -C "$$($(2)_$(3)_OBJ)" install $(-v?) |
| 227 | + touch $$@ |
| 228 | + endif |
| 229 | + endef |
| 230 | +diff --git a/proton b/proton |
| 231 | +index 1e762b22..5b5e43d6 100755 |
| 232 | +--- a/proton |
| 233 | ++++ b/proton |
| 234 | +@@ -2371,8 +2371,6 @@ if __name__ == "__main__": |
| 235 | + |
| 236 | + g_proton = Proton(os.path.dirname(sys.argv[0])) |
| 237 | + |
| 238 | +- g_proton.cleanup_legacy_dist() |
| 239 | +- g_proton.do_steampipe_fixups() |
| 240 | + |
| 241 | + g_compatdata = CompatData(os.environ["STEAM_COMPAT_DATA_PATH"]) |
| 242 | + |
| 243 | +@@ -2381,7 +2379,8 @@ if __name__ == "__main__": |
| 244 | + g_session.init_wine() |
| 245 | + |
| 246 | + if g_proton.missing_default_prefix(): |
| 247 | +- g_proton.make_default_prefix() |
| 248 | ++ log("Default prefix is missing, something is very wrong.") |
| 249 | ++ sys.exit(1) |
| 250 | + |
| 251 | + g_session.init_session(sys.argv[1] != "runinprefix") |
| 252 | + |
| 253 | +diff --git a/toolmanifest_x86_64.vdf b/toolmanifest_x86_64.vdf |
| 254 | +index beddcbbb..5404093e 100644 |
| 255 | +--- a/toolmanifest_x86_64.vdf |
| 256 | ++++ b/toolmanifest_x86_64.vdf |
| 257 | +@@ -2,7 +2,6 @@ |
| 258 | + { |
| 259 | + "version" "2" |
| 260 | + "commandline" "/proton %verb%" |
| 261 | +- "require_tool_appid" "1628350" |
| 262 | + "use_sessions" "1" |
| 263 | + "compatmanager_layer_name" "proton" |
| 264 | + } |
| 265 | +-- |
| 266 | +2.53.0 |
| 267 | + |
0 commit comments