Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37707388
en ru br
ALT Linux repositórios
S:8.15-alt2
5.0: 1.1.10-alt1
4.1: 1.1.13-alt0.M41.1
4.0: 1.1.13-alt0.M40.1

Group :: Emuladores
RPM: wine-vanilla

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: 0011-build-fake-binary-makes-autoreq-happy.patch
Download


From: Vitaly Lipatov <lav@etersoft.ru>
Date: Tue, 20 Dec 2022 01:01:09 +0300
Subject: [PATCH] build fake binary makes autoreq happy
To: wine-devel <wine-devel@winehq.org>
---
 configure                        | 10 ++++++++++
 configure.ac                     |  8 ++++++++
 loader/Makefile.in               | 15 +++++++++++++--
 loader/wine_make_autoreq_happy.c |  4 ++++
 tools/generate-abs-libs.sh       | 20 ++++++++++++++++++++
 5 files changed, 55 insertions(+), 2 deletions(-)
 create mode 100644 loader/wine_make_autoreq_happy.c
 create mode 100755 tools/generate-abs-libs.sh
diff --git a/configure b/configure
index 226611021d6..8cdd104b8ed 100755
--- a/configure
+++ b/configure
@@ -626,6 +626,7 @@ ac_subst_vars='LTLIBOBJS
 LIBOBJS
 TAGSFLAGS
 RT_LIBS
+WINERUNNER
 WINELOADER_PROGRAMS
 DELAYLOADFLAG
 MSVCRTFLAGS
@@ -17191,6 +17192,8 @@ case "$HOST_ARCH,$PE_ARCHS" in
 esac
 WINELOADER_PROGRAMS="$wine_binary"
 
+WINERUNNER="$wine_binary"
+
 
 case $host_os in
   linux*)
@@ -19811,6 +19814,12 @@ distclean:: clean
 maintainer-clean::
 	rm -f configure include/config.h.in"
 
+as_fn_append wine_rules "
+all: loader/abs-libs.list
+
+loader/abs-libs.list: include/config.h
+	${wine_srcdir}tools/generate-abs-libs.sh \"\$(CC)\" include/config.h > \$@"
+
 
 as_fn_append wine_rules "
 dlls/ntdll/unix/version.c: dummy
@@ -20780,6 +20789,7 @@ NETAPI_LIBS = $NETAPI_LIBS
 MSVCRTFLAGS = $MSVCRTFLAGS
 DELAYLOADFLAG = $DELAYLOADFLAG
 WINELOADER_PROGRAMS = $WINELOADER_PROGRAMS
+WINERUNNER = $WINERUNNER
 RT_LIBS = $RT_LIBS
 TAGSFLAGS = $TAGSFLAGS
 LIBOBJS = $LIBOBJS
diff --git a/configure.ac b/configure.ac
index d438bed30f3..8d9267ff4cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1985,6 +1985,7 @@ case "$HOST_ARCH,$PE_ARCHS" in
   *) wine_binary="wine" ;;
 esac
 AC_SUBST(WINELOADER_PROGRAMS,"$wine_binary")
+AC_SUBST(WINERUNNER,"$wine_binary")
 
 case $host_os in
   linux*)
@@ -3625,6 +3626,13 @@ WINE_APPEND_RULE(
 maintainer-clean::
 	rm -f configure include/config.h.in])
 
+dnl Rules for generate abs libs list
+WINE_APPEND_RULE(
+all: loader/abs-libs.list
+	
+loader/abs-libs.list: include/config.h
+	${wine_srcdir}tools/generate-abs-libs.sh \"\$(CC)\" include/config.h > \$[@])
+
 dnl Rules for generated source files
 
 WINE_APPEND_RULE(
diff --git a/loader/Makefile.in b/loader/Makefile.in
index 30413fc8677..dd05c63917c 100644
--- a/loader/Makefile.in
+++ b/loader/Makefile.in
@@ -2,6 +2,7 @@ SOURCES = \
 	main.c \
 	preloader.c \
 	preloader_mac.c \
+	wine_make_autoreq_happy.c \
 	wine.de.UTF-8.man.in \
 	wine.desktop \
 	wine.fr.UTF-8.man.in \
@@ -10,8 +11,9 @@ SOURCES = \
 	wine.pl.UTF-8.man.in \
 	wine_info.plist.in
 
-PROGRAMS = $(WINELOADER_PROGRAMS)
-INSTALL_LIB = $(WINELOADER_PROGRAMS)
+WINEHAPPY = $(WINERUNNER)_make_autoreq_happy
+PROGRAMS = $(WINELOADER_PROGRAMS) $(WINEHAPPY)
+INSTALL_LIB = $(WINELOADER_PROGRAMS) $(WINEHAPPY)
 UNIX_CFLAGS = -fPIE
 
 preloader_EXTRADEFS = -fno-builtin
@@ -33,3 +35,12 @@ wine_preloader_LDFLAGS = $(WINEPRELOADER_LDFLAGS)
 wine64_preloader_OBJS = preloader.o preloader_mac.o
 wine64_preloader_DEPS = $(WINELOADER_DEPENDS)
 wine64_preloader_LDFLAGS = $(WINEPRELOADER_LDFLAGS)
+
+#EXTRA_TARGETS = abs-libs.list
+wine_make_autoreq_happy_OBJS = wine_make_autoreq_happy.o
+#wine_make_autoreq_happy_DEPS = abs-libs.list
+wine_make_autoreq_happy_LDFLAGS = -Wl,--no-as-needed `cat loader/abs-libs.list`
+
+wine64_make_autoreq_happy_OBJS = wine_make_autoreq_happy.o
+#wine_make_autoreq_happy_DEPS = abs-libs.list
+wine64_make_autoreq_happy_LDFLAGS = -Wl,--no-as-needed `cat loader/abs-libs.list`
diff --git a/loader/wine_make_autoreq_happy.c b/loader/wine_make_autoreq_happy.c
new file mode 100644
index 00000000000..88497544755
--- /dev/null
+++ b/loader/wine_make_autoreq_happy.c
@@ -0,0 +1,4 @@
+int main(void)
+{
+        return 0;
+}
diff --git a/tools/generate-abs-libs.sh b/tools/generate-abs-libs.sh
new file mode 100755
index 00000000000..157c7c7cd87
--- /dev/null
+++ b/tools/generate-abs-libs.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# -m64 -m32
+CC="$1"
+LIBPATH=$($CC -Xlinker --verbose  2>/dev/null | grep SEARCH | sed 's/SEARCH_DIR("=\?\([^"]\+\)"); */\1\n/g'  | grep -vE '^$')
+CONFIGH="$2"
+
+# Note: we ignore libnetapi
+cat "$CONFIGH" | grep "^#define SONAME" | grep -v "SONAME_LIBNETAPI" | sed -e 's|^#define SONAME_.* "\(.*\)"|\1|' >config.test.libs
+test -s config.test.libs || exit
+
+for i in $(cat config.test.libs) ; do
+    for z in $LIBPATH ; do
+        if [ -s $z/$i ] ; then
+            echo $z/$i
+            break
+        fi
+    done
+done
+
+rm config.test.libs
-- 
2.33.8
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009