From b75e78cc550b0d92894ad76510a67b548c8ed901 Mon Sep 17 00:00:00 2001 From: Kai Engert Date: May 26 2006 19:42:53 +0000 Subject: - Update to 4.6.2 - Tweak nspr-config to be identical on all platforms. --- diff --git a/nspr-config-pc.patch b/nspr-config-pc.patch new file mode 100644 index 0000000..cf31395 --- /dev/null +++ b/nspr-config-pc.patch @@ -0,0 +1,48 @@ +--- mozilla/nsprpub/config/nspr-config-pc.in.x123 2005-05-11 02:53:41.000000000 +0200 ++++ mozilla/nsprpub/config/nspr-config-pc.in 2006-05-24 20:52:12.000000000 +0200 +@@ -98,7 +98,7 @@ + includedir=@includedir@ + fi + if test -z "$libdir"; then +- libdir=@libdir@ ++ libdir=`pkg-config --variable=libdir nspr` + fi + + if test "$echo_prefix" = "yes"; then +@@ -132,12 +132,12 @@ + if test -n "$lib_nspr"; then + libdirs="$libdirs -lnspr${major_version}" + fi +- os_ldflags="@LDFLAGS@" ++ os_ldflags=`pkg-config --variable=ldflags nspr` + for i in $os_ldflags ; do + if echo $i | grep \^-L >/dev/null; then + libdirs="$libdirs $i" + fi + done +- echo $libdirs @OS_LIBS@ ++ echo $libdirs `pkg-config --variable=os_libs nspr` + fi + +--- mozilla/nsprpub/configure.in.x123 2006-05-24 20:52:12.000000000 +0200 ++++ mozilla/nsprpub/configure.in 2006-05-24 20:53:53.000000000 +0200 +@@ -2667,6 +2667,8 @@ + config/nsprincl.mk + config/nsprincl.sh + config/nspr-config ++config/nspr-config-pc ++config/nspr-config-vars + lib/Makefile + lib/ds/Makefile + lib/libc/Makefile +--- mozilla/nsprpub/configure.x123 2006-05-24 20:52:12.000000000 +0200 ++++ mozilla/nsprpub/configure 2006-05-24 20:54:05.000000000 +0200 +@@ -5899,6 +5899,8 @@ + config/nsprincl.mk + config/nsprincl.sh + config/nspr-config ++config/nspr-config-pc ++config/nspr-config-vars + lib/Makefile + lib/ds/Makefile + lib/libc/Makefile diff --git a/nspr-config-vars.in b/nspr-config-vars.in new file mode 100644 index 0000000..ebf0aa4 --- /dev/null +++ b/nspr-config-vars.in @@ -0,0 +1,2 @@ +ldflags=@LDFLAGS@ +os_libs=@OS_LIBS@ diff --git a/nspr.spec b/nspr.spec index 74c090a..83cee54 100644 --- a/nspr.spec +++ b/nspr.spec @@ -1,16 +1,16 @@ Summary: Netscape Portable Runtime Name: nspr -Version: 4.6.1 -Release: 2.2 +Version: 4.6.2 +Release: 1 License: MPL/GPL/LGPL URL: http://www.mozilla.org/projects/nspr/ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-root Source0: %{name}-%{version}.tar.gz Source1: nspr.pc.in +Source2: nspr-config-vars.in -Patch1: nspr-4.6.1-gcc-visibility.patch -Patch2: nspr-4.6.1-disable-gcc-ansi.patch +Patch1: nspr-config-pc.patch Provides: mozilla-nspr Obsoletes: mozilla-nspr @@ -35,9 +35,17 @@ Header files for doing development with the Netscape Portable Runtime. %setup -q -# patches +# Original nspr-config is not suitable for our distribution, +# because on different platforms it contains different dynamic content. +# Therefore we produce an adjusted copy of nspr-config that will be +# identical on all platforms. +# However, we need to use original nspr-config to produce some variables +# that go into nspr.pc for pkg-config. + +cp ./mozilla/nsprpub/config/nspr-config.in ./mozilla/nsprpub/config/nspr-config-pc.in %patch1 -p0 -%patch2 -p0 + +cp %{SOURCE2} ./mozilla/nsprpub/config/ %build @@ -60,22 +68,25 @@ make DESTDIR=$RPM_BUILD_ROOT \ make real_install - NSPR_LIBS=`./config/nspr-config --libs` NSPR_CFLAGS=`./config/nspr-config --cflags` NSPR_VERSION=`./config/nspr-config --version` %{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig + +cat ./config/nspr-config-vars > \ + $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nspr.pc + cat %{SOURCE1} | sed -e "s,%%libdir%%,%{_libdir},g" \ -e "s,%%prefix%%,%{_prefix},g" \ -e "s,%%exec_prefix%%,%{_prefix},g" \ -e "s,%%includedir%%,%{_includedir}/nspr4,g" \ -e "s,%%NSPR_VERSION%%,$NSPR_VERSION,g" \ -e "s,%%FULL_NSPR_LIBS%%,$NSPR_LIBS,g" \ - -e "s,%%FULL_NSPR_CFLAGS%%,$NSPR_CFLAGS,g" > \ + -e "s,%%FULL_NSPR_CFLAGS%%,$NSPR_CFLAGS,g" >> \ $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nspr.pc %{__mkdir_p} $RPM_BUILD_ROOT/%{_bindir} -%{__cp} ./config/nspr-config $RPM_BUILD_ROOT/%{_bindir} +%{__cp} ./config/nspr-config-pc $RPM_BUILD_ROOT/%{_bindir}/nspr-config # Get rid of the things we don't want installed (per upstream) %{__rm} -rf \ @@ -109,6 +120,10 @@ cat %{SOURCE1} | sed -e "s,%%libdir%%,%{_libdir},g" \ %{_bindir}/nspr-config %changelog +* Fri May 26 2006 Kai Engert - 4.6.2-1 +- Update to 4.6.2 +- Tweak nspr-config to be identical on all platforms. + * Fri Feb 10 2006 Jesse Keating - 4.6.1-2.2 - bump again for double-long bug on ppc(64)