commit:     0e56106a0e898af399438fefd237e1479ce0ef85
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 31 14:00:33 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Dec 31 14:00:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e56106a

app-emulation/dosemu: lookup tool-prefixed nm

While at it allow user's NM.

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/762778
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../dosemu/dosemu-1.4.1_pre20130107-r5.ebuild      |  1 +
 .../dosemu/files/dosemu-1.4.1_pre20130107-nm.patch | 44 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild 
b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild
index 5700973fde6..409834bb73d 100644
--- a/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild
+++ b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild
@@ -56,6 +56,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-fix-inline.patch
        "${FILESDIR}"/${P}-lto.patch
        "${FILESDIR}"/${P}-as.patch
+       "${FILESDIR}"/${P}-nm.patch
 )
 
 pkg_pretend() {

diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-nm.patch 
b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-nm.patch
new file mode 100644
index 00000000000..73bfd9dfbc5
--- /dev/null
+++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-nm.patch
@@ -0,0 +1,44 @@
+https://bugs.gentoo.org/762778
+--- a/Makefile.conf.in
++++ b/Makefile.conf.in
+@@ -82,6 +82,8 @@ REQUIRED:=@REQUIRED@
+ OS=@CONFIG_HOST@
+ RANLIB:=@RANLIB@
+ 
++NM:=@NM@
++
+ @ASPI_SUPPORT@
+ @USE_DL_PLUGINS@
+ @USE_APBUILD@
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,6 +39,7 @@ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ AC_PROG_RANLIB
+ AC_PROG_YACC
++AC_CHECK_TOOL(NM, nm)
+ dnl The bison problem
+ if test -z "`echo $YACC | grep bison`" ; then
+   AC_MSG_WARN( )
+--- a/src/arch/linux/Makefile.main
++++ b/src/arch/linux/Makefile.main
+@@ -80,7 +80,7 @@ emu.o: emu.c
+ $(BINPATH)/bin/$(DOSBIN): emu.o $(LIBS_)
+       $(LD) $(ALL_LDFLAGS) $(DOSBIN_LDFLAGS) -o $@ emu.o \
+          -Wl,--whole-archive $(LIBS_) -Wl,--no-whole-archive $(LIBS)
+-      @nm $(BINPATH)/bin/$(DOSBIN) | grep -v '\(compiled\)\|\(\.o$$\)\|\( a 
\)' | \
++      @$(NM) $(BINPATH)/bin/$(DOSBIN) | grep -v '\(compiled\)\|\(\.o$$\)\|\( 
a \)' | \
+               sort > $(BINPATH)/bin/dosemu.map
+       @ln -sf $(DOSBIN) $(BINPATH)/bin/dos
+ ifdef X_SUPPORT
+--- a/src/plugin/term/Makefile
++++ b/src/plugin/term/Makefile
+@@ -33,7 +33,7 @@ SLANGLIB:=`relaytool --partial-map partial.map --relay slang 
\
+ libslang.so.1-UTF8 libslang-utf8.so.1 libslang.so.1 $(SLANGLIB)`
+ 
+ partial.map: $(OBJS)
+-      nm $(OBJS) | LC_ALL=C grep SL | LC_ALL=C sort | LC_ALL=C uniq | \
++      $(NM) $(OBJS) | LC_ALL=C grep SL | LC_ALL=C sort | LC_ALL=C uniq | \
+         LC_ALL=C sed -e 's/ *U \(SL[^_]*_[a-z0-9].*\)/F \1/' \
+                      -e 's/ *U \(SL[^_]*_[A-Z0-9].*\)/V \1/' > $@
+       echo 'F SLsmg_write_nwchars' >> $@

Reply via email to