ensure -Wl, -R is passed via pkg-config
authorJory Pratt <anarchy@gentoo.org>
Sun, 16 May 2010 18:39:14 +0000 (18:39 +0000)
committerJory Pratt <anarchy@gentoo.org>
Sun, 16 May 2010 18:39:14 +0000 (18:39 +0000)
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64

dev-libs/nspr/ChangeLog
dev-libs/nspr/Manifest
dev-libs/nspr/files/nspr-4.8-pkgconfig-gentoo-3.patch [new file with mode: 0644]
dev-libs/nspr/nspr-4.8.4-r1.ebuild [new file with mode: 0644]

index 3588efdc40de0e1ecfa0952715e975df4c344cc3..c095eae976de1b517f76f1e95e40fbe90f9c431c 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for dev-libs/nspr
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/ChangeLog,v 1.141 2010/05/09 16:50:39 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/ChangeLog,v 1.142 2010/05/16 18:39:14 anarchy Exp $
+
+*nspr-4.8.4-r1 (16 May 2010)
+
+  16 May 2010; <anarchy@gentoo.org>
+  +files/nspr-4.8-pkgconfig-gentoo-3.patch, +nspr-4.8.4-r1.ebuild:
+  ensure -Wl, -R is passed via pkg-config
 
   09 May 2010; Raúl Porcel <armin76@gentoo.org> nspr-4.8.4.ebuild:
   alpha/arm/ia64/sparc stable wrt #314025
index 91e211d256b26400554acc63b457be6eaefcc4ce..94e6acec6b88e0ed83df8d1d11ad680b7549f1bb 100644 (file)
@@ -4,9 +4,11 @@ AUX nspr-4.6.1-lang.patch 1718 RMD160 6c3fb440f4b4004289de3f65b996936bcfcbaa45 S
 AUX nspr-4.7.0-prtime.patch 964 RMD160 a963c21fb1ce5e8913d3c41753ca37b24e80798d SHA1 b47ffa12022ea83b738e5d847e61cca026ec7f07 SHA256 3fd4f3c68257dced021c0bfa00245d0da2d6c64205135b1cc89f96a3375dffc7
 AUX nspr-4.8-config.patch 1429 RMD160 1988289c042f97ad8c3681b7febbbea45a3de9a6 SHA1 0055fb2f27865e3bcc6d6a9e6f79b633443295d6 SHA256 7cb63ea677ad9c92dde4513b16258f092b463738cb145edd95dd671bcfaa2150
 AUX nspr-4.8-pkgconfig-gentoo-2.patch 4711 RMD160 3709911449facde45d1bebc60e9e1593aa691af5 SHA1 c41c608247aa712f783a1ec8ea2943b79dee44eb SHA256 5cd96bcb47f9678d4aac95d91d975101d31f038b05bd3f5b191a262d733b8943
+AUX nspr-4.8-pkgconfig-gentoo-3.patch 4726 RMD160 c8e93e2a06b90d6e69a12dce4cfabaebf05b552b SHA1 5d4c67e7b3c0760fd8bb576b8623cbe967b01253 SHA256 f1197ff0f220425d38cae47667ea585cc999fb182cb5c13896e4449fde2d5b6d
 DIST nspr-4.8.4.tar.gz 1196103 RMD160 654b86f773130f74a19df3a06e40917a4cef9eb7 SHA1 c4af8c2956674ff0f17b4247516716e92db40cf6 SHA256 8c119a1702acf7568e5de887e84b34470a929639ee5a89271df2ba57a31f6746
 DIST nspr-4.8.tar.gz 1170419 RMD160 f63468de3613793a8b564e967f3a963aab977c99 SHA1 ac30ec18bf0d070a9663d1a8c2d258004f3f42ad SHA256 a2de84aa21a7bbabd93c4f172123d58c6432c2358807bb260ac338b2dc61dbfe
+EBUILD nspr-4.8.4-r1.ebuild 2734 RMD160 6de4bcde9664eb8ed9fffeb55da7240f825adf2e SHA1 765c223028e7408c920528af2df1909a465eb3f8 SHA256 289828766b1bdec7046fa5888907637dd08da3d3813f504ebf703d90277a6276
 EBUILD nspr-4.8.4.ebuild 2725 RMD160 8df403234624725cade72be796f1ea997d67771a SHA1 044a78cfffa7f102ff607471d44bc6a607bdc58a SHA256 9b380328303f373e4081664175a7b099d236a7f0c4c907356faabe92939848ca
 EBUILD nspr-4.8.ebuild 2547 RMD160 a712f9f925c0bd045904a56d8b3a7ce09c44b9bb SHA1 26005a81d7cfd5ff5d571431da4452cff7cde536 SHA256 c49138f629d41b2958583b212a137908c5508228be87756217057c5c2e036e8d
-MISC ChangeLog 18333 RMD160 5be92f3fbc5d7986f4247c5544d89642332da5f6 SHA1 da42679ed6a52c36274c012ea815fba80b6b6ebc SHA256 36fd2d0f6af613233f41d314ff0e66ddd17666f5bf512f0ef989e3aef0e82883
+MISC ChangeLog 18509 RMD160 36ec0b290a11e0e67a6efa29a06068befe21584f SHA1 e6f6d7d8f34ea33524f79e54a356c57e995af208 SHA256 5b2e2a475e156d479c84272bd6dca66290d76e3416a9b9d9aece3b1ac7cc5247
 MISC metadata.xml 160 RMD160 d5a9f0bf8989621c2bde30facb53bcae00aba709 SHA1 5015c07af2083f20f9552d7fb11afb5ea69af345 SHA256 0cc5126362a12cee42ec1197c528a804cf36859329dd2c6d9225726831d14b8b
diff --git a/dev-libs/nspr/files/nspr-4.8-pkgconfig-gentoo-3.patch b/dev-libs/nspr/files/nspr-4.8-pkgconfig-gentoo-3.patch
new file mode 100644 (file)
index 0000000..2525928
--- /dev/null
@@ -0,0 +1,126 @@
+diff -urN nspr-4.8-orig/mozilla/nsprpub/config/config.mk nspr-4.8/mozilla/nsprpub/config/config.mk
+--- nspr-4.8-orig/mozilla/nsprpub/config/config.mk     2009-09-12 00:43:47.678357452 -0500
++++ nspr-4.8/mozilla/nsprpub/config/config.mk  2009-09-12 00:44:19.383381757 -0500
+@@ -162,3 +162,4 @@
+ RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include
+ RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin
+ RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib
++RELEASE_PC_DIR = $(RELEASE_LIB_DIR)/pkgconfig
+diff -urN nspr-4.8-orig/mozilla/nsprpub/config/Makefile.in nspr-4.8/mozilla/nsprpub/config/Makefile.in
+--- nspr-4.8-orig/mozilla/nsprpub/config/Makefile.in   2009-09-12 00:43:47.678357452 -0500
++++ nspr-4.8/mozilla/nsprpub/config/Makefile.in        2009-09-12 00:44:19.384379661 -0500
+@@ -52,9 +52,10 @@
+ 
+ # autoconf.mk must be deleted last (from the top-level directory)
+ # because it is included by every makefile.
+-DIST_GARBAGE  = nsprincl.mk nsprincl.sh nspr-config
++DIST_GARBAGE  = nsprincl.mk nsprincl.sh nspr-config nspr.pc
+ 
+ RELEASE_BINS  = nspr-config
++RELEASE_PC    = nspr.pc
+ 
+ include $(topsrcdir)/config/config.mk
+ 
+diff -urN nspr-4.8-orig/mozilla/nsprpub/config/nspr-config.in nspr-4.8/mozilla/nsprpub/config/nspr-config.in
+--- nspr-4.8-orig/mozilla/nsprpub/config/nspr-config.in        2009-09-12 00:43:47.677356194 -0500
++++ nspr-4.8/mozilla/nsprpub/config/nspr-config.in     2009-09-12 00:45:53.723359547 -0500
+@@ -92,13 +92,13 @@
+ 
+ # Set variables that may be dependent upon other variables
+ if test -z "$exec_prefix"; then
+-    exec_prefix=@exec_prefix@
++    exec_prefix=`pkg-config --variable=exec_prefix nspr`
+ fi
+ if test -z "$includedir"; then
+-    includedir=@includedir@
++    includedir=`pkg-config --variable=includedir nspr`
+ fi
+ if test -z "$libdir"; then
+-    libdir=@libdir@
++    libdir=`pkg-config --variable=libdir nspr`
+ fi
+ 
+ if test "$echo_prefix" = "yes"; then
+diff -urN nspr-4.8-orig/mozilla/nsprpub/config/nspr.pc.in nspr-4.8/mozilla/nsprpub/config/nspr.pc.in
+--- nspr-4.8-orig/mozilla/nsprpub/config/nspr.pc.in    1969-12-31 18:00:00.000000000 -0600
++++ nspr-4.8/mozilla/nsprpub/config/nspr.pc.in 2009-09-12 00:44:19.410432811 -0500
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: NSPR
++Description: The Netscape Portable Runtime
++Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@
++Libs: -L${libdir} -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ -lpthread -Wl,-R${libdir}
++Cflags: -I${includedir}
++
+diff -urN nspr-4.8-orig/mozilla/nsprpub/config/rules.mk nspr-4.8/mozilla/nsprpub/config/rules.mk
+--- nspr-4.8-orig/mozilla/nsprpub/config/rules.mk      2009-09-12 00:43:47.677356194 -0500
++++ nspr-4.8/mozilla/nsprpub/config/rules.mk   2009-09-12 00:44:19.435517111 -0500
+@@ -211,7 +211,7 @@
+       rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH) $(DIST_GARBAGE)
+       +$(LOOP_OVER_DIRS)
+ 
+-install:: $(RELEASE_BINS) $(RELEASE_HEADERS) $(RELEASE_LIBS)
++install:: $(RELEASE_BINS) $(RELEASE_HEADERS) $(RELEASE_LIBS) $(RELEASE_PC)
+ ifdef RELEASE_BINS
+       $(NSINSTALL) -t -m 0755 $(RELEASE_BINS) $(DESTDIR)$(bindir)
+ endif
+@@ -221,6 +221,9 @@
+ ifdef RELEASE_LIBS
+       $(NSINSTALL) -t -m 0755 $(RELEASE_LIBS) $(DESTDIR)$(libdir)/$(lib_subdir)
+ endif
++ifdef RELEASE_PC
++      $(NSINSTALL) -t -m 0644 $(RELEASE_PC) $(DESTDIR)$(libdir)/pkgconfig/
++endif
+       +$(LOOP_OVER_DIRS)
+ 
+ release:: export
+@@ -272,6 +275,23 @@
+       fi
+       cp $(RELEASE_HEADERS) $(RELEASE_HEADERS_DEST)
+ endif
++ifdef RELEASE_PC
++      @echo "Copying pkg-config files to release directory"
++      @if test -z "$(BUILD_NUMBER)"; then \
++              echo "BUILD_NUMBER must be defined"; \
++              false; \
++      else \
++              true; \
++      fi
++      @if test ! -d $(RELEASE_PC_DEST); then \
++              rm -rf $(RELEASE_PC_DEST); \
++              $(NSINSTALL) -D $(RELEASE_PC_DEST);\
++      else \
++              true; \
++      fi
++      cp $(RELEASE_PC) $(RELEASE_PC_DEST)
++endif
++
+       +$(LOOP_OVER_DIRS)
+ 
+ alltags:
+diff -urN nspr-4.8-orig/mozilla/nsprpub/configure nspr-4.8/mozilla/nsprpub/configure
+--- nspr-4.8-orig/mozilla/nsprpub/configure    2009-09-12 00:43:47.600359058 -0500
++++ nspr-4.8/mozilla/nsprpub/configure 2009-09-12 00:44:19.444380569 -0500
+@@ -6037,6 +6037,7 @@
+ config/nsprincl.mk
+ config/nsprincl.sh
+ config/nspr-config
++config/nspr.pc
+ lib/Makefile 
+ lib/ds/Makefile 
+ lib/libc/Makefile 
+diff -urN nspr-4.8-orig/mozilla/nsprpub/configure.in nspr-4.8/mozilla/nsprpub/configure.in
+--- nspr-4.8-orig/mozilla/nsprpub/configure.in 2009-09-12 00:43:47.678357452 -0500
++++ nspr-4.8/mozilla/nsprpub/configure.in      2009-09-12 00:44:19.451396074 -0500
+@@ -2871,6 +2871,7 @@
+ config/nsprincl.mk
+ config/nsprincl.sh
+ config/nspr-config
++config/nspr.pc
+ lib/Makefile 
+ lib/ds/Makefile 
+ lib/libc/Makefile 
diff --git a/dev-libs/nspr/nspr-4.8.4-r1.ebuild b/dev-libs/nspr/nspr-4.8.4-r1.ebuild
new file mode 100644 (file)
index 0000000..7c3626e
--- /dev/null
@@ -0,0 +1,86 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/nspr/nspr-4.8.4-r1.ebuild,v 1.1 2010/05/16 18:39:14 anarchy Exp $
+
+inherit eutils multilib toolchain-funcs versionator
+
+MIN_PV="$(get_version_component_range 2)"
+
+DESCRIPTION="Netscape Portable Runtime"
+HOMEPAGE="http://www.mozilla.org/projects/nspr/"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/${P}.tar.gz"
+
+LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="debug"
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       mkdir build inst
+       epatch "${FILESDIR}"/${PN}-4.8-config.patch
+       epatch "${FILESDIR}"/${PN}-4.6.1-config-1.patch
+       epatch "${FILESDIR}"/${PN}-4.6.1-lang.patch
+       epatch "${FILESDIR}"/${PN}-4.7.0-prtime.patch
+       epatch "${FILESDIR}"/${PN}-4.8-pkgconfig-gentoo-3.patch
+
+       # Respect LDFLAGS
+       sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
+               mozilla/nsprpub/config/rules.mk
+}
+
+src_compile() {
+       cd "${S}"/build
+
+       echo > "${T}"/test.c
+       $(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o
+       case $(file "${T}"/test.o) in
+               *64-bit*) myconf="${myconf} --enable-64bit";;
+               *32-bit*) ;;
+               *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
+       esac
+
+       myconf="${myconf} --libdir=/usr/$(get_libdir)"
+
+       ECONF_SOURCE="../mozilla/nsprpub" econf \
+               $(use_enable debug) \
+               $(use_enable !debug optimize) \
+               ${myconf} || die "econf failed"
+       emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" || die "failed to build"
+}
+
+src_install () {
+       # Their build system is royally confusing, as usual
+       MINOR_VERSION=${MIN_PV} # Used for .so version
+       cd "${S}"/build
+       emake DESTDIR="${D}" install || die "emake install failed"
+
+       cd "${D}"/usr/$(get_libdir)
+       for file in *.a; do
+               einfo "removing static libraries as upstream has requested!"
+               rm -f ${file} || die "failed to remove staic libraries."
+       done
+
+       for file in *.so; do
+               mv ${file} ${file}.${MINOR_VERSION} || die "failed to mv files around"
+               ln -s ${file}.${MINOR_VERSION} ${file} || die "failed to symlink files."
+       done
+
+       # install nspr-config
+       dobin "${S}"/build/config/nspr-config || die "failed to install nspr-config"
+
+       # create pkg-config file
+       insinto /usr/$(get_libdir)/pkgconfig/
+       doins "${S}"/build/config/nspr.pc || die "failed to insall nspr pkg-config file"
+
+       # Remove stupid files in /usr/bin
+       rm -f "${D}"/usr/bin/prerr.properties || die "failed to cleanup unneeded files"
+}
+
+pkg_postinst() {
+       ewarn
+       ewarn "Please make sure you run revdep-rebuild after upgrade."
+       ewarn "This is *extremely* important to ensure your system nspr works properly."
+       ewarn
+}