commit:     14be4a0ea20880015e350f99b0f0140a10877736
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Tue May 31 14:20:27 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 31 23:44:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14be4a0e

dev-java/jna: do not call STRIP directly

Closes: https://bugs.gentoo.org/754999
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/25702
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-java/jna/files/5.11.0-makefile-flags.patch | 34 ++++++++++++++++++++++++++
 dev-java/jna/jna-5.11.0.ebuild                 |  4 +--
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/dev-java/jna/files/5.11.0-makefile-flags.patch 
b/dev-java/jna/files/5.11.0-makefile-flags.patch
new file mode 100644
index 000000000000..4a84abebf45d
--- /dev/null
+++ b/dev-java/jna/files/5.11.0-makefile-flags.patch
@@ -0,0 +1,34 @@
+--- a/native/Makefile
++++ b/native/Makefile
+@@ -81,7 +81,7 @@ LIBPFX=lib
+ LIBSFX=.so
+ ARSFX=.a
+ JNISFX=$(LIBSFX)
+-CC=gcc
++CC?=gcc
+ LD=$(CC)
+ LIBS=
+ # Default to Sun recommendations for JNI compilation
+@@ -94,10 +94,10 @@ CFLAGS_EXTRA=
+ COUT=-o $@
+ CINCLUDES=$(JAVA_INCLUDES) -I"$(JAVAH)" -I$(FFI_BUILD)/include
+ CDEFINES=-D_REENTRANT
+-PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
+-CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
++PCFLAGS=-Wall -Wno-unused -Wno-parentheses
++CFLAGS+= $(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) 
$(CINCLUDES) \
+        -DJNA_JNI_VERSION='"$(JNA_JNI_VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
+-LDFLAGS=-o $@ -shared
++LDFLAGS+= -o $@ -shared
+ ifeq ($(DYNAMIC_LIBFFI),true)
+ CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo)
+ LIBS += $(shell pkg-config --libs libffi 2>/dev/null || echo -lffi)
+@@ -108,7 +108,7 @@ endif
+ # Avoid bug in X11-based 1.5/1.6 VMs; dynamically load instead of linking
+ # See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6539705
+ #LIBS=-L"$(LIBDIR)" -ljawt
+-STRIP=strip -x
++STRIP?=strip -x
+ # end defaults
+ 
+ # Android build (cross-compile) requires the android NDK.

diff --git a/dev-java/jna/jna-5.11.0.ebuild b/dev-java/jna/jna-5.11.0.ebuild
index be8f367f117d..44173ced3c04 100644
--- a/dev-java/jna/jna-5.11.0.ebuild
+++ b/dev-java/jna/jna-5.11.0.ebuild
@@ -46,7 +46,7 @@ RDEPEND="
 DOCS=( README.md CHANGES.md OTHERS TODO )
 PATCHES=(
        "${FILESDIR}/5.10.0-build.xml.patch"
-       "${FILESDIR}/4.2.2-makefile-flags.patch"
+       "${FILESDIR}/5.11.0-makefile-flags.patch"
 )
 
 JAVA_ANT_REWRITE_CLASSPATH="true"
@@ -65,7 +65,7 @@ pkg_setup() {
        # Any spaces in paths returned by toolchain-funcs and options like 
MAKEOPTS
        # could cause trouble in EANT_EXTRA_ARGS when Java eclasses process the
        # variable's value, so define them in ANT_OPTS instead
-       ANT_OPTS="-DCC='$(tc-getCC)'"
+       ANT_OPTS="-DCC='$(tc-getCC)' -DSTRIP='$(tc-getSTRIP)'"
        # Parallel build does not respect dependency relationships between 
objects
        ANT_OPTS+=" -DEXTRA_MAKE_OPTS='${MAKEOPTS} -j1'"
 }

Reply via email to