[jna] Don't strip binaries too early, build with $RPM_LD_FLAGS (#802020).
Ville Skyttä
scop at fedoraproject.org
Sun Mar 11 10:57:32 UTC 2012
commit 5b10157e2897427960ff66817a16b6a5e16c6b14
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Mar 11 12:57:21 2012 +0200
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 deletions(-)
---
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ä <ville.skytta at iki.fi> - 3.4.0-2
+- Don't strip binaries too early, build with $RPM_LD_FLAGS (#802020).
+
* Wed Mar 7 2012 Levente Farkas <lfarkas at lfarkas.org> - 3.4.0-1
- Update to 3.4.0
More information about the scm-commits
mailing list