summarylogtreecommitdiffstats
path: root/0001-AUR-Pkgbuild-changes.patch
blob: 2f3105118d34861018777e69575c867a2cd95e6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
From 7009f8d1a4674b7ff7fc1c545aa4506e7d743e87 Mon Sep 17 00:00:00 2001
From: Stelios Tsampas <loathingkernel@gmail.com>
Date: Tue, 7 Feb 2023 21:58:22 +0200
Subject: [PATCH] AUR Pkgbuild changes

---
 Makefile.in                    | 71 ++++++++++++++++++++++++++--------
 compatibilitytool.vdf.template |  2 +-
 configure.sh                   |  2 +
 make/rules-autoconf.mk         |  4 +-
 make/rules-cargo.mk            |  4 +-
 make/rules-cmake.mk            |  4 +-
 make/rules-common.mk           | 18 +++++----
 make/rules-configure.mk        |  4 +-
 make/rules-meson.mk            |  3 +-
 make/rules-winemaker.mk        |  2 +-
 proton                         |  6 +--
 toolmanifest_runtime.vdf       |  3 --
 12 files changed, 83 insertions(+), 40 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index fc46bafc..55e0d465 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -24,7 +24,6 @@ SHELL := /bin/bash
 #   BUILD_NAME      - Name of the build for manifests etc.
 #   STEAMRT_IMAGE   - Name of the docker image to use for building
 
-STEAMRT_IMAGE ?= registry.gitlab.steamos.cloud/proton/sniper/sdk:0.20221017.1-0
 
 ifeq ($(SRCDIR),)
 	foo := $(error SRCDIR not set, do not include Makefile.in directly, run ./configure.sh to generate Makefile)
@@ -50,14 +49,23 @@ else
 endif
 
 CROSSLDFLAGS   += -Wl,--file-alignment,4096
-OPTIMIZE_FLAGS := -O2 -march=nocona -mtune=core-avx2 -mfpmath=sse
+CFLAGS         ?= -O2 -march=nocona -mtune=core-avx2
+OPTIMIZE_FLAGS := $(CFLAGS) -mfpmath=sse
 SANITY_FLAGS   := -fwrapv -fno-strict-aliasing
 DEBUG_FLAGS    := -ggdb -ffunction-sections -fdata-sections -fno-omit-frame-pointer
 COMMON_FLAGS    = $(DEBUG_FLAGS) $(OPTIMIZE_FLAGS) $(SANITY_FLAGS) -ffile-prefix-map=$(CCACHE_BASEDIR)=.
-COMMON_FLAGS32 := -mstackrealign
+COMMON_FLAGS32 := -mstackrealign -mno-avx
 COMMON_FLAGS64 := -mcmodel=small
 CARGO_BUILD_ARG := --release
 
+ifneq ($(USE_LTO), 1)
+GST_LTO :=
+FFMPEG_LTO :=
+else
+GST_LTO := -Db_lto=true
+FFMPEG_LTO := --enable-lto
+endif
+
 $(DST_DIR):
 	mkdir -p $@
 
@@ -68,7 +76,7 @@ all: all-dist | $(DST_DIR)
 all-dist: | $(DST_DIR)
 dist: all
 
-J = $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))
+J = $(patsubst -j%,%,$(SUBJOBS))
 
 include $(SRC)/make/utility.mk
 include $(SRC)/make/rules-source.mk
@@ -99,6 +107,7 @@ $(eval $(call rules-meson,dav1d,64))
 ##
 
 GST_ORC_MESON_ARGS := \
+	$(GST_LTO) \
 	-Dorc-test=disabled
 
 $(eval $(call rules-source,gst_orc,$(SRCDIR)/gst-orc))
@@ -111,9 +120,14 @@ $(eval $(call rules-meson,gst_orc,64))
 ##
 
 GSTREAMER_MESON_ARGS := \
+	$(GST_LTO) \
+	-Ddoc=disabled \
 	-Dgst_parse=false \
 	-Dbenchmarks=disabled \
 	-Dtools=disabled \
+	-Dptp-helper-permissions=capabilities \
+	-Ddbghelp=disabled \
+	-Dintrospection=disabled \
 	-Dbash-completion=disabled
 
 GSTREAMER_DEPENDS = gst_orc
@@ -127,6 +141,11 @@ $(eval $(call rules-meson,gstreamer,64))
 ## graphene
 ##
 
+GRAPHENE_MESON_ARGS := \
+	-Dtests=false \
+	-Dintrospection=disabled \
+	-Dinstalled_tests=false
+
 $(eval $(call rules-source,graphene,$(SRCDIR)/graphene))
 $(eval $(call rules-meson,graphene,32))
 $(eval $(call rules-meson,graphene,64))
@@ -137,6 +156,9 @@ $(eval $(call rules-meson,graphene,64))
 ##
 
 GST_BASE_MESON_ARGS := \
+	$(GST_LTO) \
+	-Ddoc=disabled \
+	-Dtools=disabled \
 	-Dauto_features=disabled \
 	-Dadder=enabled \
 	-Dapp=enabled \
@@ -170,6 +192,8 @@ $(eval $(call rules-meson,gst_base,64))
 ##
 
 GST_GOOD_MESON_ARGS := \
+	$(GST_LTO) \
+	-Ddoc=disabled \
 	-Dauto_features=disabled \
 	-Daudioparsers=enabled \
 	-Dautodetect=enabled \
@@ -200,11 +224,17 @@ $(eval $(call rules-meson,gst_good,64))
 
 FFMPEG_CONFIGURE_ARGS := \
 	--enable-shared \
+	$(FFMPEG_LTO) \
 	--disable-static \
 	--disable-everything \
 	--disable-programs \
 	--disable-doc \
 
+FFMPEG_LTO_OPTS64 := --disable-inline-asm
+FFMPEG_LTO_OPTS32 := --disable-inline-asm
+FFMPEG_CONFIGURE_ARGS64 = --optflags="$(COMMON_FLAGS) $(COMMON_FLAGS64)" $(FFMPEG_LTO_OPTS64)
+FFMPEG_CONFIGURE_ARGS32 = --optflags="$(COMMON_FLAGS) $(COMMON_FLAGS32)" $(FFMPEG_LTO_OPTS32)
+
 $(eval $(call rules-source,ffmpeg,$(SRCDIR)/ffmpeg))
 $(eval $(call rules-configure,ffmpeg,32))
 $(eval $(call rules-configure,ffmpeg,64))
@@ -396,7 +426,11 @@ WINE_SOURCE_ARGS = \
   --exclude dlls/winevulkan/winevulkan.spec
 
 WINE_CONFIGURE_ARGS = \
+  --with-x \
+  --with-gstreamer \
   --with-mingw \
+  --without-oss \
+  --disable-win16 \
   --disable-tests
 
 WINE_CONFIGURE_ARGS32 = \
@@ -466,6 +500,9 @@ DXVK_MESON_ARGS32 = --bindir=$(DXVK_DST32)/lib/wine/dxvk
 DXVK_MESON_ARGS64 = --bindir=$(DXVK_DST64)/lib64/wine/dxvk
 DXVK_DEPENDS = glslang
 
+DXVK_CPPFLAGS= -msse -msse2
+DXVK_LDFLAGS= -static -static-libgcc -static-libstdc++
+
 $(eval $(call rules-source,dxvk,$(SRCDIR)/dxvk))
 $(eval $(call rules-meson,dxvk,32,CROSS))
 $(eval $(call rules-meson,dxvk,64,CROSS))
@@ -488,6 +525,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
 
+DXVK_NVAPI_CPPFLAGS= -msse -msse2
+DXVK_NVAPI_LDFLAGS= -static -static-libgcc -static-libstdc++
+
 $(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))
@@ -558,6 +598,9 @@ VKD3D_PROTON_MESON_ARGS32 = --bindir=$(VKD3D_PROTON_DST32)/lib/wine/vkd3d-proton
 VKD3D_PROTON_MESON_ARGS64 = --bindir=$(VKD3D_PROTON_DST64)/lib64/wine/vkd3d-proton
 VKD3D_PROTON_DEPENDS = glslang
 
+VKD3D_PROTON_CPPFLAGS= -msse -msse2
+VKD3D_PROTON_LDFLAGS= -static -static-libgcc -static-libstdc++
+
 $(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))
@@ -813,14 +856,14 @@ $(FONTS_OBJ)/source-han/%.ttf: $$(%.ttf_CIDFONT) $$(%.ttf_FEATURES) $$(%.ttf_SEQ
 	mkdir -p $(FONTS_OBJ)/source-han
 	# Do not immediately create the target file, so that make is interrupted
 	# it will restart again
-	afdko makeotfexe -f $($(notdir $@)_CIDFONT) -omitMacNames -ff $($(notdir $@)_FEATURES) \
+	makeotfexe -f $($(notdir $@)_CIDFONT) -omitMacNames -ff $($(notdir $@)_FEATURES) \
 		-lic ADOBE -mf $($(notdir $@)_MENUNAMEDB) -r -nS -cs 25 -ch $($(notdir $@)_UNISOURCE) \
 		-ci $($(notdir $@)_SEQUENCES) -o $@.tmp
-	afdko tx -cff +S -no_futile $($(notdir $@)_CIDFONT) $@.cff
+	tx -cff +S -no_futile $($(notdir $@)_CIDFONT) $@.cff
 	# sftnedit uses a hardcoded temporary file in the local directory, so we have
 	# to run it in a dedicated temporary directory to prevent concurrent instances
 	# to step onto each other's feet
-	(TEMP_DIR=`mktemp -d` && cd $$TEMP_DIR && afdko sfntedit -a CFF=$(abspath $($(notdir $@)).cff) $(abspath $@.tmp) && rm -fr $$TEMP_DIR)
+	(TEMP_DIR=`mktemp -d` && cd $$TEMP_DIR && sfntedit -a CFF=$(abspath $($(notdir $@)).cff) $(abspath $@.tmp) && rm -fr $$TEMP_DIR)
 	mv $@.tmp $@
 
 $(FONTS_OBJ)/ume-gothic/%.ttf: $$(%.ttf_FONT) $$(%.ttf_NAMETABLE_PATCH)
@@ -830,12 +873,12 @@ $(FONTS_OBJ)/ume-gothic/%.ttf: $$(%.ttf_FONT) $$(%.ttf_NAMETABLE_PATCH)
 	ttx -o $@ -m $($(notdir $@)_FONT) $(FONTS_OBJ)/ume-gothic/$(notdir $(basename $($(notdir $@)_NAMETABLE_PATCH))).ttx
 
 $(simsun.ttc): $(simsun.ttf) $(nsimsun.ttf)
-	afdko otf2otc -o $@.tmp $^
-	afdko otf2ttf -o $@ $@.tmp
+	otf2otc -o $@.tmp $^
+	otf2ttf -o $@ $@.tmp
 	rm $@.tmp
 
 $(msgothic.ttc): $(msgothic.ttf) $(mspgothic.ttf) $(msuigothic.ttf)
-	afdko otf2otc -o $@ $^
+	otf2otc -o $@ $^
 
 $(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) \
 		$(noto_sans_georgian.ttf) $(noto_sans_gujarati.ttf) $(noto_sans_hebrew.ttf) $(noto_sans_khmer.ttf) $(noto_sans_tamil.ttf) \
@@ -961,8 +1004,8 @@ all-dist: $(DIST_OVR32) $(DIST_OVR64)
 ##
 
 default_pfx: wine gst_good gst_libav gst_plugins_rs lsteamclient steamexe vrclient wineopenxr dxvk dxvk-nvapi vkd3d-proton
-	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 '{}' '+'
+	find $(DST_LIBDIR64)/wine -type f -execdir chmod go-w '{}' '+'
 	rm -rf $(abspath $(DIST_PREFIX))
 	python3 $(SRCDIR)/default_pfx.py $(abspath $(DIST_PREFIX)) $(abspath $(DST_DIR))
 
@@ -1103,7 +1146,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
-	export CCACHE_DISABLE := 1
 	override DOCKER_OPTS := $(CCACHE_ENV) -e CCACHE_DISABLE=1 $(DOCKER_OPTS)
 endif
 
@@ -1118,9 +1160,6 @@ ifeq ($(CONTAINER_ENGINE),)
 	CONTAINER_ENGINE := docker
 endif
 
-DOCKER_BASE = $(CONTAINER_ENGINE) run --rm -v $(SRC):$(SRC)$(CONTAINER_MOUNT_OPTS) -v $(OBJ):$(OBJ)$(CONTAINER_MOUNT_OPTS) \
-                -w $(OBJ) -e MAKEFLAGS \
-                $(DOCKER_OPTS) $(STEAMRT_IMAGE)
 
 .PHONY: dist deploy redist
 .DEFAULT dist deploy redist:
diff --git a/compatibilitytool.vdf.template b/compatibilitytool.vdf.template
index 5ac60e8b..e580cd20 100644
--- a/compatibilitytool.vdf.template
+++ b/compatibilitytool.vdf.template
@@ -14,7 +14,7 @@
       "install_path" "."
 
       // For this template, we're going to substitute the display_name key in here, e.g.:
-      "display_name" "##BUILD_NAME##"
+      "display_name" "##BUILD_NAME## (Unsupported AUR package [native])"
 
       "from_oslist"  "windows"
       "to_oslist"    "linux"
diff --git a/configure.sh b/configure.sh
index f7b70544..98ca6ca7 100755
--- a/configure.sh
+++ b/configure.sh
@@ -123,6 +123,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" "$steamrt_image" || die "Specified container engine \"$arg_container_engine\" doesn't work"
   else
@@ -135,6 +136,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 ad04eeb8..53eda5bc 100644
--- a/make/rules-autoconf.mk
+++ b/make/rules-autoconf.mk
@@ -32,9 +32,9 @@ $$(OBJ)/.$(1)-configure$(3): $$(OBJ)/.$(1)-pre-configure
 $$(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 $$@
 endef
 
diff --git a/make/rules-cargo.mk b/make/rules-cargo.mk
index ea76678b..45bd7381 100644
--- a/make/rules-cargo.mk
+++ b/make/rules-cargo.mk
@@ -13,8 +13,10 @@ $$(OBJ)/.$(1)-configure$(3):
 $$(OBJ)/.$(1)-build$(3):
 	@echo ":: building $(3)bit $(1)..." >&2
 	cd $$($(2)_SRC) && env $$($(2)_ENV$(3)) \
+	cargo update --locked --offline --verbose --workspace
+	cd $$($(2)_SRC) && env $$($(2)_ENV$(3)) \
 	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 520d88ac..ab898810 100644
--- a/make/rules-cmake.mk
+++ b/make/rules-cmake.mk
@@ -28,9 +28,9 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/CMakeLists.txt
 $$(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 $$@
 endef
 
diff --git a/make/rules-common.mk b/make/rules-common.mk
index b057bb72..fc995910 100644
--- a/make/rules-common.mk
+++ b/make/rules-common.mk
@@ -104,7 +104,11 @@ $(2)_LIBFLAGS$(3) = $$(foreach d,$$($(2)_DEPS$(3)),-L$$($$(d)_LIBDIR$(3))) \
 # native version doesn't exist.
 
 $(2)_ENV$(3) = \
+    WINEDEBUG="-all" \
+    WINEPREFIX="$$(OBJ)/pfx-wine$(3)" \
+    WINEDLLOVERRIDES="winemenubuilder=d;" \
     CARGO_TARGET_$$(call toupper,$$(CARGO_TARGET_$(3)))_LINKER="$$(TARGET_$(4)$(3))-gcc" \
+    CARGO_TARGET_$$(call toupper,$$(CARGO_TARGET_$(3)))_RUSTFLAGS="$$(RUSTFLAGS)" \
     CCACHE_BASEDIR="$$(CCACHE_BASEDIR)" \
     STRIP="$$(STRIP)" \
     AR="$$(TARGET_$(4)$(3))-ar" \
@@ -118,7 +122,7 @@ $(2)_ENV$(3) = \
     PATH="$$(call list-join,:,$$(foreach d,$$($(2)_DEPS$(3)),$$($$(d)_BINDIR$(3))),,:):$$$$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))" \
-    PKG_CONFIG_LIBDIR="/usr/lib/$$(PKG_CONFIG_TARGET_$(4)$(3))/pkgconfig:/usr/share/pkgconfig" \
+    PKG_CONFIG_LIBDIR="/usr/lib$(3)/pkgconfig:/usr/share/pkgconfig" \
     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" \
@@ -142,7 +146,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)" \
-    CROSSPKG_CONFIG_LIBDIR="/usr/lib/$$(PKG_CONFIG_TARGET_CROSS$(3))/pkgconfig:/usr/share/pkgconfig" \
+    CROSSPKG_CONFIG_LIBDIR="/usr/lib$(3)/pkgconfig:/usr/share/pkgconfig" \
 
 endif
 
@@ -155,14 +159,14 @@ else
 install-strip = objcopy --file-alignment=4096 --strip-debug $(1) $(2)/$(notdir $(1)) && rm -f $(2)/$(notdir $(1)).debug
 endif
 
-TARGET_32 := i686-linux-gnu
-TARGET_64 := x86_64-linux-gnu
+TARGET_32 := i686-pc-linux-gnu
+TARGET_64 := x86_64-pc-linux-gnu
 TARGET_CROSS32 := i686-w64-mingw32
 TARGET_CROSS64 := x86_64-w64-mingw32
 
-PKG_CONFIG_TARGET_32 := i386-linux-gnu
-PKG_CONFIG_TARGET_64 := x86_64-linux-gnu
-PKG_CONFIG_TARGET_CROSS32 := i386-w64-mingw32
+PKG_CONFIG_TARGET_32 := i686-pc-linux-gnu
+PKG_CONFIG_TARGET_64 := x86_64-pc-linux-gnu
+PKG_CONFIG_TARGET_CROSS32 := i686-w64-mingw32
 PKG_CONFIG_TARGET_CROSS64 := x86_64-w64-mingw32
 
 LIBDIR_WINE_32 := wine/i386-unix
diff --git a/make/rules-configure.mk b/make/rules-configure.mk
index 29eee132..642c6d70 100644
--- a/make/rules-configure.mk
+++ b/make/rules-configure.mk
@@ -25,9 +25,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 $$@
 endef
 
diff --git a/make/rules-meson.mk b/make/rules-meson.mk
index 2bf2db8c..0fbf9912 100644
--- a/make/rules-meson.mk
+++ b/make/rules-meson.mk
@@ -48,6 +48,7 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/meson.build
 
 	env $$($(2)_ENV$(3)) \
 	meson "$$($(2)_OBJ$(3))" "$$($(2)_SRC)" \
+	      --wrap-mode=nodownload \
 	      --prefix="$$($(2)_DST$(3))" \
 	      --libdir="lib$(subst 32,,$(3))" \
 	      --buildtype=plain \
@@ -61,7 +62,7 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/meson.build
 $$(OBJ)/.$(1)-build$(3):
 	@echo ":: building $(3)bit $(1)..." >&2
 	env $$($(2)_ENV$(3)) \
-	ninja $$(filter -j%,$$(MAKEFLAGS)) -C "$$($(2)_OBJ$(3))" install $(-v?)
+	ninja -j$$(SUBJOBS) -C "$$($(2)_OBJ$(3))" install $(-v?)
 	touch $$@
 endef
 
diff --git a/make/rules-winemaker.mk b/make/rules-winemaker.mk
index 5c3b59a3..ed6589e0 100644
--- a/make/rules-winemaker.mk
+++ b/make/rules-winemaker.mk
@@ -28,7 +28,7 @@ $$(OBJ)/.$(1)-build$(3):
 	@echo ":: building $(3)bit $(1)..." >&2
 	rsync -arx "$$($(2)_SRC)/" "$$($(2)_OBJ$(3))/"
 	env $$($(2)_ENV$(3)) \
-	$$(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 --$(lastword $(subst ., ,$(4))) --fake-module -E "$(basename $(4)).spec" -o "$(4).fake"
 	mkdir -p $$($(2)_LIBDIR$(3))/$(LIBDIR_WINE_$(3))
diff --git a/proton b/proton
index 3a7c9073..bbd7bfc0 100755
--- a/proton
+++ b/proton
@@ -423,7 +423,6 @@ class Proton:
         self.wine_bin = self.bin_dir + "wine"
         self.wine64_bin = self.bin_dir + "wine64"
         self.wineserver_bin = self.bin_dir + "wineserver"
-        self.dist_lock = FileLock(self.path("dist.lock"), timeout=-1)
 
     def path(self, d):
         return self.base_dir + d
@@ -1610,8 +1609,6 @@ if __name__ == "__main__":
 
     g_proton = Proton(os.path.dirname(sys.argv[0]))
 
-    if g_proton.need_tarball_extraction():
-        g_proton.extract_tarball()
 
     g_compatdata = CompatData(os.environ["STEAM_COMPAT_DATA_PATH"])
 
@@ -1620,7 +1617,8 @@ if __name__ == "__main__":
     g_session.init_wine()
 
     if g_proton.missing_default_prefix():
-        g_proton.make_default_prefix()
+        log("Default prefix is missing, something is very wrong.")
+        sys.exit(1)
 
     g_session.init_session(sys.argv[1] != "runinprefix")
 
diff --git a/toolmanifest_runtime.vdf b/toolmanifest_runtime.vdf
index beddcbbb..b6f36788 100644
--- a/toolmanifest_runtime.vdf
+++ b/toolmanifest_runtime.vdf
@@ -2,7 +2,4 @@
 {
   "version" "2"
   "commandline" "/proton %verb%"
-  "require_tool_appid" "1628350"
-  "use_sessions" "1"
-  "compatmanager_layer_name" "proton"
 }
-- 
2.40.0