aboutsummaryrefslogtreecommitdiffstats
path: root/main/nspr
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-05-29 16:30:20 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-05-29 16:30:20 +0000
commitda02122bd4099394d80812b536071bf619e997b7 (patch)
tree5dc90cfefbb02c61faee53747c128b85db1d7a39 /main/nspr
parentfd0cf32e80cc193c56fabc8639e91bf022bc8b06 (diff)
downloadaports-da02122bd4099394d80812b536071bf619e997b7.tar.bz2
aports-da02122bd4099394d80812b536071bf619e997b7.tar.xz
main/nspr: moved from testing
Diffstat (limited to 'main/nspr')
-rw-r--r--main/nspr/APKBUILD64
-rw-r--r--main/nspr/nspr-4.6.1-config-1.patch11
-rw-r--r--main/nspr/nspr-4.7.0-prtime.patch26
-rw-r--r--main/nspr/nspr-4.8-config.patch47
-rw-r--r--main/nspr/nspr-4.8-pkgconfig-gentoo-3.patch126
5 files changed, 274 insertions, 0 deletions
diff --git a/main/nspr/APKBUILD b/main/nspr/APKBUILD
new file mode 100644
index 0000000000..38f9d9c4d1
--- /dev/null
+++ b/main/nspr/APKBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=nspr
+pkgver=4.8.4
+pkgrel=0
+pkgdesc="Netscape Portable Runtime"
+url="http://www.mozilla.org/projects/nspr/"
+license="MPL-1.1 GPL-2 LGPL-2.1"
+depends=
+subpackages="$pkgname-dev"
+source="ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$pkgver/src/nspr-$pkgver.tar.gz
+ nspr-4.6.1-config-1.patch
+ nspr-4.7.0-prtime.patch
+ nspr-4.8-config.patch
+ nspr-4.8-pkgconfig-gentoo-3.patch
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ mkdir build inst
+ for i in "$srcdir"/*.patch; do
+ msg "Applying $i"
+ patch -p1 -i "$i" || return 1
+ done
+ # respect LDFLAGS
+ sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
+ mozilla/nsprpub/config/rules.mk
+}
+
+build() {
+ cd "$_builddir"/build
+ ../mozilla/nsprpub/configure --prefix=/usr \
+ || return 1
+ make CC="${CC:-gcc}" CXX="${CXX:-g++}" || return 1
+}
+
+package() {
+ local file= minor_version=${pkgver#*.}
+ minor_version=${minor_version%.*}
+
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || die "emake install failed"
+
+ cd "$pkgdir"/usr/lib
+ rm -f *.a
+ for file in *.so; do
+ mv ${file} ${file}.${minor_version} || return 1
+ ln -s ${file}.${minor_version} ${file} || return 1
+ done
+
+ cd "$_builddir"/build/config
+ install -Dm755 nspr-config "$pkgdir"/usr/bin/nspr-config || return 1
+ install -Dm644 nspr.pc "$pkgdir"/usr/lib/pkgconfig/nspr.pc || return 1
+ rm -rf "$pkgdir"/usr/bin/prerr.properties \
+ "$pkgdir"/usr/bin/compile-et.pl \
+ "$pkgdir"/usr/share/aclocal/nspr.m4 \
+ "$pkgdir"/usr/include/nspr/md
+}
+
+md5sums="a85bdbe1eb646aa32c785a37d8e3a2f5 nspr-4.8.4.tar.gz
+d204a641dd7cbf6751d14dc6b98835f1 nspr-4.6.1-config-1.patch
+c48e1f47799c1cff7e3bf46dc0e653f1 nspr-4.7.0-prtime.patch
+c790c638a7c9fd1d731272f464f065c6 nspr-4.8-config.patch
+5b67b4339be94d0dbc4337a55eabe73a nspr-4.8-pkgconfig-gentoo-3.patch"
diff --git a/main/nspr/nspr-4.6.1-config-1.patch b/main/nspr/nspr-4.6.1-config-1.patch
new file mode 100644
index 0000000000..b919c7930b
--- /dev/null
+++ b/main/nspr/nspr-4.6.1-config-1.patch
@@ -0,0 +1,11 @@
+--- a/mozilla/nsprpub/configure.orig 2006-01-14 22:41:37.000000000 +0000
++++ b/mozilla/nsprpub/configure 2006-01-14 22:49:14.000000000 +0000
+@@ -3893,7 +3893,7 @@
+ PR_MD_CSRCS=linux.c
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+- DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
++ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@).$(MOD_MINOR_VERSION)'
+ _OPTIMIZE_FLAGS=-O2
+ _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
+ # combo is not yet good at debugging inlined
diff --git a/main/nspr/nspr-4.7.0-prtime.patch b/main/nspr/nspr-4.7.0-prtime.patch
new file mode 100644
index 0000000000..74d5534d5a
--- /dev/null
+++ b/main/nspr/nspr-4.7.0-prtime.patch
@@ -0,0 +1,26 @@
+--- a/mozilla/nsprpub/pr/src/misc/prtime.c.orig 2007-09-14 19:41:08.000000000 +0200
++++ b/mozilla/nsprpub/pr/src/misc/prtime.c 2007-09-14 19:42:17.000000000 +0200
+@@ -1536,7 +1536,7 @@
+ case TT_EET: zone_offset = 2 * 60; break;
+ case TT_JST: zone_offset = 9 * 60; break;
+ default:
+- PR_ASSERT (0);
++ return PR_FAILURE;
+ break;
+ }
+ }
+@@ -1578,11 +1578,12 @@
+ struct tm localTime;
+ time_t secs;
+
+- PR_ASSERT(result->tm_month > -1 &&
++ if (!(result->tm_month > -1 &&
+ result->tm_mday > 0 &&
+ result->tm_hour > -1 &&
+ result->tm_min > -1 &&
+- result->tm_sec > -1);
++ result->tm_sec > -1))
++ return PR_FAILURE;
+
+ /*
+ * To obtain time_t from a tm structure representing the local
diff --git a/main/nspr/nspr-4.8-config.patch b/main/nspr/nspr-4.8-config.patch
new file mode 100644
index 0000000000..4db2517e4e
--- /dev/null
+++ b/main/nspr/nspr-4.8-config.patch
@@ -0,0 +1,47 @@
+--- a/mozilla/nsprpub/lib/libc/src/Makefile.in.orig 2005-06-01 14:28:26.000000000 +0000
++++ b/mozilla/nsprpub/lib/libc/src/Makefile.in 2006-01-15 02:50:39.000000000 +0000
+@@ -112,6 +112,10 @@
+ MKSHLIB += -R '$$ORIGIN'
+ endif
+
++ifeq ($(OS_ARCH), Linux)
++DSO_LDOPTS +=-Wl,-R,'$$ORIGIN'
++endif
++
+ ifeq ($(OS_ARCH),OS2)
+ MAPFILE = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).def
+ GARBAGE += $(MAPFILE)
+--- a/mozilla/nsprpub/lib/ds/Makefile.in.orig 2005-06-01 14:28:25.000000000 +0000
++++ b/mozilla/nsprpub/lib/ds/Makefile.in 2006-01-15 02:52:30.000000000 +0000
+@@ -102,6 +102,10 @@
+ MKSHLIB += -R '$$ORIGIN'
+ endif
+
++ifeq ($(OS_ARCH), Linux)
++DSO_LDOPTS += -Wl,-R,'$$ORIGIN'
++endif
++
+ ifeq ($(OS_ARCH),OS2)
+ MAPFILE = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).def
+ GARBAGE += $(MAPFILE)
+--- a/mozilla/nsprpub/pr/src/Makefile.in.orig 2005-06-01 14:28:27.000000000 +0000
++++ b/mozilla/nsprpub/pr/src/Makefile.in 2006-01-15 03:29:36.000000000 +0000
+@@ -168,6 +168,7 @@
+ else
+ OS_LIBS = -ldl
+ endif
++DSO_LDOPTS +=-Wl,-R,'$$ORIGIN'
+ endif
+
+ ifeq ($(OS_ARCH),HP-UX)
+--- a/mozilla/nsprpub/config/nspr-config.in.orig 2005-05-11 00:53:41.000000000 +0000
++++ b/mozilla/nsprpub/config/nspr-config.in 2006-01-15 06:37:58.000000000 +0000
+@@ -122,7 +122,7 @@
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- libdirs=-L$libdir
++ libdirs="-Wl,-R$libdir -L$libdir"
+ if test -n "$lib_plds"; then
+ libdirs="$libdirs -lplds${major_version}"
+ fi
diff --git a/main/nspr/nspr-4.8-pkgconfig-gentoo-3.patch b/main/nspr/nspr-4.8-pkgconfig-gentoo-3.patch
new file mode 100644
index 0000000000..2525928db4
--- /dev/null
+++ b/main/nspr/nspr-4.8-pkgconfig-gentoo-3.patch
@@ -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