Don't strip binaries too early, build with $RPM_LD_FLAGS (#802020).

This commit is contained in:
Ville Skyttä 2012-03-11 12:57:21 +02:00
parent 3db1996868
commit 5b10157e28
2 changed files with 26 additions and 1 deletions

20
jna-3.4.0-build.patch Normal file
View File

@ -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)

View File

@ -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@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@lfarkas.org> - 3.4.0-1
- Update to 3.4.0