the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: nspr.0d
Version: 4.8.4
Revision: 4
BuildDepends: fink (>= 0.24.12)
Depends: %N-shlibs (= %v-%r)
Conflicts: nspr
Replaces: nspr
BuildDependsOnly: true
Source: http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%v/src/nspr-%v.tar.gz
Source-MD5: a85bdbe1eb646aa32c785a37d8e3a2f5
SourceDirectory: nspr-%v/mozilla/nsprpub
Source2: mirror:debian:pool/main/n/nspr/nspr_4.8.4-1.debian.tar.gz
Source2-MD5: 883c40375f5e5f880a4f656c3933b596
PatchFile: %n.patch
PatchFile-MD5: 0725bc07a0ed64badb1d0a88ca3d8985
PatchScript: <<
#!/bin/sh -ev
patch -p3 < %{PatchFile}
for file in \
30_pkgconfig.patch \
99_configure.patch \
; do
echo "applying $file"
patch -p3 < ../../../debian/patches/$file
done
echo "NSS is available under the Mozilla Public License Version 1.1/GPL 2.0/LGPL 2.1." > LICENSE
<<
NoSetCPPFLAGS: true
NoSetLDFLAGS: true
ConfigureParams: --disable-debug --disable-dependency-tracking --enable-macos-target=10.4 --libdir=%p/lib/nspr
CompileScript: <<
#!/bin/sh -ev
if grep -q 64 %p/var/lib/fink/path-prefix-10.6/compiler_wrapper
then export USE_64=1; enable64="--enable-64bit"
else enable64="--disable-64bit"
fi
./configure %c $enable64
make
<<
InstallScript: <<
#!/bin/sh -ev
make -j1 install DESTDIR=%d
# counteract side-effect of burying the libs
mv %i/lib/nspr/pkgconfig %i/lib
SO_VERSION=0d
for file in libnspr4 libplc4 libplds4; do
ln -sf "$file.${SO_VERSION}.dylib" "%i/lib/nspr/$file.dylib"
done
<<
DocFiles: LICENSE
SplitOff: <<
Package: %N-shlibs
Files: <<
lib/nspr/libnspr4.0d.dylib
lib/nspr/libplc4.0d.dylib
lib/nspr/libplds4.0d.dylib
<<
Shlibs: <<
%p/lib/nspr/libnspr4.0d.dylib 1.0.0 %n (>= 4.8-1)
%p/lib/nspr/libplc4.0d.dylib 1.0.0 %n (>= 4.8-1)
%p/lib/nspr/libplds4.0d.dylib 1.0.0 %n (>= 4.8-1)
<<
DocFiles: LICENSE
<<
Description: Netscape Portable Runtime
DescDetail: <<
Netscape Portable Runtime (NSPR) provides a platform-neutral
API for system level and libc like functions. The API is
used in the Mozilla client, many of Netscape/AOL/iPlanet's
and other software offerings.
<<
DescPackaging: <<
dmacks overhauled 4.6.7-1 -> 4.8-1 all the following:
Upstream does not update compatibility_version when added new
public symbols! Maybe that's why debian hacked soname in
recent versions? We'll do that too: rename %n nspr -> nspr.0d
Bury library files so don't accidentally find them (many pkgs
seem to need BuildConflicts:nspr)
macos-target for consistency among all fink-supported
platforms (cleaner to use %c than patch configure fallbacks).
do not use SDKs...don't need portability or fat.
#Grab debian's patch for soname handling. Seems like they have
#lots of platforms covered and portably handle linker symlinks.
^-- uses libFOO.so.X.Y.Z (postfix libversion naming) and doesn't
actually do anything when used under fink (dunno why) so just
use their "SO_VERSION=0d" and manually hack it instead of
fiddling with their patch
Steal debian's nspr.pc patch (other fink packages may look for
nspr via pkg-config)
autoreconf generates syntax-error'd configure, so make sure to
patch configure, not just configure.in
make sure we get build-dir lib instead of usin local -L path.
But no external deps, so scrap -I and -L for %p altogether
instead of tracing and fixing makefile-variable spaghetti.
Don't leak internal-emulation poll() symbol into public of
libnspr ABI. It's not part of public API nor used by other
libs in nspr suite, and linker gets annoyed and confused when
other things link against libnspr because libSystem already
has that symbol.
<<
License: OSI-Approved
Maintainer: Daniel Macks
Homepage: http://www.mozilla.org/projects/nspr/
diff -Nurd -x'*~' nspr-4.8.4.orig/mozilla/nsprpub/config/rules.mk nspr-4.8.4/mozilla/nsprpub/config/rules.mk
--- nspr-4.8.4.orig/mozilla/nsprpub/config/rules.mk 2009-12-09 16:24:37.000000000 -0500
+++ nspr-4.8.4/mozilla/nsprpub/config/rules.mk 2010-03-26 00:47:38.000000000 -0400
@@ -131,7 +131,8 @@
SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr.a
else
ifdef MKSHLIB
-SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+SO_VERSION=0d
+SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(SO_VERSION).$(DLL_SUFFIX)
endif
endif
diff -Nurd -x'*~' nspr-4.8.4.orig/mozilla/nsprpub/configure nspr-4.8.4/mozilla/nsprpub/configure
--- nspr-4.8.4.orig/mozilla/nsprpub/configure 2010-02-08 13:41:35.000000000 -0500
+++ nspr-4.8.4/mozilla/nsprpub/configure 2010-03-26 00:48:02.000000000 -0400
@@ -108,6 +108,16 @@
infodir='${prefix}/info'
mandir='${prefix}/man'
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
@@ -496,16 +506,6 @@
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
@@ -1218,8 +1218,6 @@
powerpc-apple-darwin8*:i?86-apple-darwin*)
_SAVE_CFLAGS=$CFLAGS
_SAVE_CXXFLAGS=$CXXLAGS
- CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
- CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
;;
esac
@@ -3362,7 +3360,7 @@
;;
esac
DSO_CFLAGS=-fPIC
- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
_OPTIMIZE_FLAGS=-O2
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
STRIP="$STRIP -x -S"
@@ -3371,6 +3369,8 @@
MDCPUCFG_H=_darwin.cfg
PR_MD_CSRCS=darwin.c
PR_MD_ASFILES=os_Darwin.s
+ LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(SO_VERSION).dylib'
+ LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(SO_VERSION).dylib'
# Add Mac OS X support for loading CFM & CFBundle plugins
if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
diff -Nurd -x'*~' nspr-4.8.4.orig/mozilla/nsprpub/pr/src/md/unix/unix.c nspr-4.8.4/mozilla/nsprpub/pr/src/md/unix/unix.c
--- nspr-4.8.4.orig/mozilla/nsprpub/pr/src/md/unix/unix.c 2010-02-09 22:03:35.000000000 -0500
+++ nspr-4.8.4/mozilla/nsprpub/pr/src/md/unix/unix.c 2010-05-23 14:47:55.000000000 -0400
@@ -3627,7 +3627,7 @@
* that calls poll(), we emulate poll() using select().
*/
-int poll(struct pollfd *filedes, unsigned long nfds, int timeout)
+int __attribute__((visibility("hidden"))) poll(struct pollfd *filedes, unsigned long nfds, int timeout)
{
int i;
int rv;
diff -Nurd -x'*~' nspr-4.8.4.orig/mozilla/nsprpub/pr/src/misc/prtime.c nspr-4.8.4/mozilla/nsprpub/pr/src/misc/prtime.c
--- nspr-4.8.4.orig/mozilla/nsprpub/pr/src/misc/prtime.c 2009-08-26 17:26:18.000000000 -0400
+++ nspr-4.8.4/mozilla/nsprpub/pr/src/misc/prtime.c 2010-03-26 00:48:02.000000000 -0400
@@ -1526,7 +1526,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;
}
}
@@ -1574,11 +1574,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