From 2002c31d12c520b0ffb2e3d6172c23bad55b64b9 Mon Sep 17 00:00:00 2001 From: Deepak Bhole Date: Tue, 12 Jun 2007 20:20:35 +0000 Subject: [PATCH] - Added a PIC compiled archive (bz# 242305) --- antlr.spec | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/antlr.spec b/antlr.spec index bd818b7..060f3ff 100644 --- a/antlr.spec +++ b/antlr.spec @@ -39,7 +39,7 @@ Summary: ANother Tool for Language Recognition Name: antlr Version: 2.7.7 -Release: 1jpp.3 +Release: 1jpp.4%{?dist} Epoch: 0 License: Public Domain URL: http://www.antlr.org/ @@ -156,6 +156,23 @@ cp work/lib/antlr.jar . # make expects to find it here export CLASSPATH=. %configure --without-examples make + +pushd lib/cpp/src/ + mkdir temp_holder_for_nonpic + mv libantlr.a temp_holder_for_nonpic/ + make clean + + # Compile with PIC + make CXXFLAGS="${CXXFLAGS} -fPIC" + + # Move files out + mv libantlr.a libantlr-pic.a + mv temp_holder_for_nonpic/libantlr.a . + + # Cleanup temp dir + rmdir temp_holder_for_nonpic +popd + find . -type f > /tmp/antlr.filelist rm antlr.jar # no longer needed %endif @@ -186,6 +203,7 @@ cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr-java mkdir -p $RPM_BUILD_ROOT{%{headers},%{_libdir}} install -m 644 lib/cpp/antlr/*.hpp $RPM_BUILD_ROOT%{headers} install -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir} +install -m 644 lib/cpp/src/libantlr-pic.a $RPM_BUILD_ROOT%{_libdir} install -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir} # javadoc @@ -281,6 +299,7 @@ fi %{_javadir}/%{name}*.jar %{headers} %{_libdir}/libantlr.a +%{_libdir}/libantlr-pic.a %defattr(0755,root,root,0755) %ghost %{_bindir}/antlr %{_bindir}/antlr-config @@ -308,6 +327,9 @@ fi %changelog +* Tue Jun 12 2007 Deepak Bhole 2.7.7-1jpp.4.fc8 +- Added a PIC compiled archive (bz# 242305) + * Thu Jun 07 2007 Deepak Bhole 2.7.7-1jpp.3 - Applied patch to fix conditionals (from skasal at redhat dot com)