From 5b10157e2897427960ff66817a16b6a5e16c6b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 11 Mar 2012 12:57:21 +0200 Subject: [PATCH] Don't strip binaries too early, build with $RPM_LD_FLAGS (#802020). --- jna-3.4.0-build.patch | 20 ++++++++++++++++++++ jna.spec | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 jna-3.4.0-build.patch diff --git a/jna-3.4.0-build.patch b/jna-3.4.0-build.patch new file mode 100644 index 0000000..46e9366 --- /dev/null +++ b/jna-3.4.0-build.patch @@ -0,0 +1,20 @@ +diff -up jna-3.4.0/native/Makefile~ jna-3.4.0/native/Makefile +--- jna-3.4.0/native/Makefile~ 2011-11-26 15:17:49.000000000 +0200 ++++ jna-3.4.0/native/Makefile 2012-03-10 11:36:05.667190103 +0200 +@@ -86,7 +86,7 @@ CDEFINES=-D_REENTRANT + PCFLAGS=-W -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=$(RPM_LD_FLAGS) -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) +@@ -276,7 +276,6 @@ $(RSRC): $(BUILD)/jnidispatch.rc + + $(LIBRARY): $(JNIDISPATCH_OBJS) $(FFI_LIB) + $(LD) $(LDFLAGS) $(JNIDISPATCH_OBJS) $(FFI_LIB) $(LIBS) +- $(STRIP) $@ + + $(TESTLIB): $(BUILD)/testlib.o + $(LD) $(LDFLAGS) $< $(LIBS) diff --git a/jna.spec b/jna.spec index 651f5e7..a1ac4f4 100644 --- a/jna.spec +++ b/jna.spec @@ -1,6 +1,6 @@ Name: jna Version: 3.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Pure Java access to native libraries Group: Development/Libraries @@ -16,6 +16,7 @@ URL: https://jna.dev.java.net/ Source0: %{name}-%{version}.tar.bz2 Source1: pom-%{name}.xml Source2: pom-platform.xml +Patch0: jna-3.4.0-build.patch # This patch is Fedora-specific for now until we get the huge # JNI library location mess sorted upstream Patch1: jna-3.4.0-loadlibrary.patch @@ -81,6 +82,7 @@ This package contains the contributed examples for %{name}. %prep %setup -q -n %{name}-%{version} +%patch0 -p1 -b .build sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1 %patch2 -p1 -b .tests-headless chmod -Rf a+rX,u+w,g-w,o-w . @@ -189,6 +191,9 @@ rm -rf %{buildroot} %changelog +* Sun Mar 11 2012 Ville Skyttä - 3.4.0-2 +- Don't strip binaries too early, build with $RPM_LD_FLAGS (#802020). + * Wed Mar 7 2012 Levente Farkas - 3.4.0-1 - Update to 3.4.0