summaryrefslogtreecommitdiff
path: root/devel/nspr
diff options
context:
space:
mode:
authorbjs <bjs>2007-09-25 04:18:25 +0000
committerbjs <bjs>2007-09-25 04:18:25 +0000
commite5c36d66f03b5ec563ca3e7b87ecebef182e5e53 (patch)
tree41cf48d21d793330bced71efe51dbebc4992cfd5 /devel/nspr
parenteb13b91e539623e35ff4e8e00d0134417020fa35 (diff)
downloadpkgsrc-e5c36d66f03b5ec563ca3e7b87ecebef182e5e53.tar.gz
Update to version 4.6.7 (bugfix release). See new patches
for more information about them. While here, fix pkglint warnings. ok'd by joerg@
Diffstat (limited to 'devel/nspr')
-rw-r--r--devel/nspr/Makefile13
-rw-r--r--devel/nspr/buildlink3.mk31
-rw-r--r--devel/nspr/distinfo18
-rw-r--r--devel/nspr/hacks.mk13
-rw-r--r--devel/nspr/patches/patch-aa10
-rw-r--r--devel/nspr/patches/patch-ab31
-rw-r--r--devel/nspr/patches/patch-ag27
-rw-r--r--devel/nspr/patches/patch-ah54
-rw-r--r--devel/nspr/patches/patch-ai24
-rw-r--r--devel/nspr/patches/patch-ak51
-rw-r--r--devel/nspr/patches/patch-al36
-rw-r--r--devel/nspr/patches/patch-am18
12 files changed, 294 insertions, 32 deletions
diff --git a/devel/nspr/Makefile b/devel/nspr/Makefile
index 6467d092a1e..c6081b84dad 100644
--- a/devel/nspr/Makefile
+++ b/devel/nspr/Makefile
@@ -1,16 +1,15 @@
-# $NetBSD: Makefile,v 1.21 2007/03/18 18:49:46 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2007/09/25 04:18:25 bjs Exp $
-DISTNAME= nspr-4.6.6
+DISTNAME= nspr-4.6.7
CATEGORIES= devel
-MASTER_SITES= http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.6.6/src/ \
- ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.6.6/src/
+MASTER_SITES= ${MASTER_SITE_MOZILLA:=/nspr/releases/v4.6.7/src/}
MAINTAINER= mjl@luckie.org.nz
HOMEPAGE= http://www.mozilla.org/projects/nspr/index.html
COMMENT= Platform-neutral API for system level and libc like functions
WRKSRC= ${WRKDIR}/${DISTNAME}/mozilla/nsprpub
-CONFIGURE_DIRS= ${WRKSRC}/build
+CONFIGURE_DIRS= build
USE_TOOLS+= autoconf213 gmake
USE_LANGUAGES= c c++
@@ -24,6 +23,8 @@ CONFIGURE_ENV+= LIBRUNPATH=${PREFIX:Q}/lib/nspr
.include "../../mk/bsd.prefs.mk"
+CFLAGS+= -D_DONT_CAST_PTHREAD_T # XXX pthread_t can be 64-bit
+
.if ${OBJECT_FMT} == "ELF"
SO_SUFFIX= so
.elif ${OBJECT_FMT} == "Mach-O"
@@ -90,6 +91,8 @@ CONFIGURE_ARGS+= --without-pthreads
.else
CONFIGURE_ARGS+= --with-pthreads
.include "../../mk/pthread.buildlink3.mk"
+# XXX TODO
+#.include "../../mk/resolv.buildlink3.mk"
.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/nspr/buildlink3.mk b/devel/nspr/buildlink3.mk
index 4f258d19dbc..7d3835f7dbe 100644
--- a/devel/nspr/buildlink3.mk
+++ b/devel/nspr/buildlink3.mk
@@ -1,9 +1,9 @@
-# $NetBSD: buildlink3.mk,v 1.8 2006/12/05 17:43:06 tron Exp $
+# $NetBSD: buildlink3.mk,v 1.9 2007/09/25 04:18:25 bjs Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
NSPR_BUILDLINK3_MK:= ${NSPR_BUILDLINK3_MK}+
-.if !empty(BUILDLINK_DEPTH:M+)
+.if ${BUILDLINK_DEPTH} == "+"
BUILDLINK_DEPENDS+= nspr
.endif
@@ -11,21 +11,24 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nnspr}
BUILDLINK_PACKAGES+= nspr
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}nspr
-.if !empty(NSPR_BUILDLINK3_MK:M+)
+.if ${NSPR_BUILDLINK3_MK} == "+"
+
+. include "../../mk/bsd.fast.prefs.mk"
+
BUILDLINK_API_DEPENDS.nspr+= nspr>=4.4.1nb1
-.if ${OPSYS} == "Darwin"
-BUILDLINK_ABI_DEPENDS.nspr+= nspr>=4.6.1nb3
-.else
-BUILDLINK_ABI_DEPENDS.nspr+= nspr>=4.6.1nb1
-.endif
-BUILDLINK_PKGSRCDIR.nspr?= ../../devel/nspr
+. if ${OPSYS} == "Darwin"
+BUILDLINK_API_DEPENDS.nspr+= nspr>=4.6.1nb3
+. else
+BUILDLINK_API_DEPENDS.nspr+= nspr>=4.6.1nb1
+. endif
-BUILDLINK_FILES.nspr+= lib/nspr/*
-BUILDLINK_FILES.nspr+= include/nspr/*
+BUILDLINK_PKGSRCDIR.nspr?= ../../devel/nspr
+BUILDLINK_FILES.nspr+= lib/nspr/*
+BUILDLINK_FILES.nspr+= include/nspr/*
-BUILDLINK_INCDIRS.nspr+= include/nspr
-BUILDLINK_LIBDIRS.nspr+= lib/nspr
-BUILDLINK_RPATHDIRS.nspr+= lib/nspr
+BUILDLINK_INCDIRS.nspr+= include/nspr
+BUILDLINK_LIBDIRS.nspr+= lib/nspr
+BUILDLINK_RPATHDIRS.nspr+= lib/nspr
.endif # NSPR_BUILDLINK3_MK
diff --git a/devel/nspr/distinfo b/devel/nspr/distinfo
index cbc808a2eaf..53888c31ddf 100644
--- a/devel/nspr/distinfo
+++ b/devel/nspr/distinfo
@@ -1,10 +1,16 @@
-$NetBSD: distinfo,v 1.7 2007/03/18 18:49:46 wiz Exp $
+$NetBSD: distinfo,v 1.8 2007/09/25 04:18:25 bjs Exp $
-SHA1 (nspr-4.6.6.tar.gz) = 5e0d35f0ae968dc7a38387688ecd9ea6002dcf5e
-RMD160 (nspr-4.6.6.tar.gz) = d296242b55ce88f665c91ab0f13e03e1a54c1552
-Size (nspr-4.6.6.tar.gz) = 1302662 bytes
-SHA1 (patch-aa) = 9e374afe504ca3bd3a27e0c05d95e09968181c51
-SHA1 (patch-ab) = af2366bf0419b6aad3c8812762f6304239b788a4
+SHA1 (nspr-4.6.7.tar.gz) = cf45319d02285ec5479445a1e9adfb9e94f55a6a
+RMD160 (nspr-4.6.7.tar.gz) = 11a0d8b14ebdd441f6899c464b77144704ab638e
+Size (nspr-4.6.7.tar.gz) = 1303759 bytes
+SHA1 (patch-aa) = 41b8aea520b5aa41abc38aff1ff44a0fc4b66923
+SHA1 (patch-ab) = fc668ceb47f9063ba9b0514a5da31bda0ca23916
SHA1 (patch-ac) = 365b3a5158db94f1976ecfd2ede120201717ad83
SHA1 (patch-ad) = d0d724ec9cc24e3d6a8f0581696c3a379c272a08
SHA1 (patch-af) = 7a94606109277b5af00197164a854f16d4259c0f
+SHA1 (patch-ag) = 2150cae88a39eaf4588084ad62c611a83e339c75
+SHA1 (patch-ah) = 34749dda8e07d9535ef5e158261d0202b7f0e058
+SHA1 (patch-ai) = ca4d824540f62a97e2072ef0927b6b8f0a362a0a
+SHA1 (patch-ak) = b090f571d539cd15f3ebad7c671bb71531e0f817
+SHA1 (patch-al) = 80d75bfcebc271dc222cef982a887cd1735e7692
+SHA1 (patch-am) = 43cd968495d271bf7394877caf28598745aedf31
diff --git a/devel/nspr/hacks.mk b/devel/nspr/hacks.mk
new file mode 100644
index 00000000000..278ba0ad07b
--- /dev/null
+++ b/devel/nspr/hacks.mk
@@ -0,0 +1,13 @@
+# $NetBSD: hacks.mk,v 1.1 2007/09/25 04:18:26 bjs Exp $
+
+.if !defined(NSPR_HACKS_MK)
+NSPR_HACKS_MK= # defined
+
+.include "../../mk/compiler.mk"
+
+.if !empty(CC_VERSION:Mgcc-[34]*)
+CFLAGS+= -fno-strict-aliasing
+PKG_HACKS+= no-strict-aliasing
+.endif
+
+.endif
diff --git a/devel/nspr/patches/patch-aa b/devel/nspr/patches/patch-aa
index 8ba56fd0bd1..cd4f9059a34 100644
--- a/devel/nspr/patches/patch-aa
+++ b/devel/nspr/patches/patch-aa
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.2 2007/03/18 18:49:47 wiz Exp $
+$NetBSD: patch-aa,v 1.3 2007/09/25 04:18:26 bjs Exp $
---- pr/include/md/_netbsd.cfg.orig 2004-04-25 15:00:47.000000000 +0000
+--- pr/include/md/_netbsd.cfg.orig 2004-04-25 11:00:47.000000000 -0400
+++ pr/include/md/_netbsd.cfg
@@ -48,7 +48,8 @@
@@ -16,8 +16,8 @@ $NetBSD: patch-aa,v 1.2 2007/03/18 18:49:47 wiz Exp $
#define PR_ALIGN_OF_DOUBLE 4
#define PR_ALIGN_OF_POINTER 4
--#elif defined(__sparc__) || defined(__MIPSEB__)
-+#elif defined(__sparc_v9__)
+-#elif defined(__sparc) || defined(__MIPSEB__)
++#elif defined(__sparc_v9)
+
+#undef IS_LITTLE_ENDIAN
+#define IS_BIG_ENDIAN 1
@@ -63,7 +63,7 @@ $NetBSD: patch-aa,v 1.2 2007/03/18 18:49:47 wiz Exp $
+#define PR_ALIGN_OF_DOUBLE 8
+#define PR_ALIGN_OF_POINTER 8
+
-+#elif defined(__sparc__) || defined(__MIPSEB__) || defined(__ARMEB__)
++#elif defined(__sparc) || defined(__MIPSEB__) || defined(__ARMEB__)
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1
diff --git a/devel/nspr/patches/patch-ab b/devel/nspr/patches/patch-ab
index 6b3dcbfde82..cda9e80497f 100644
--- a/devel/nspr/patches/patch-ab
+++ b/devel/nspr/patches/patch-ab
@@ -1,6 +1,9 @@
-$NetBSD: patch-ab,v 1.3 2007/03/18 18:49:47 wiz Exp $
+$NetBSD: patch-ab,v 1.4 2007/09/25 04:18:26 bjs Exp $
---- pr/include/md/_netbsd.h.orig 2006-04-05 21:38:13.000000000 +0000
+We really don't want to use getproto reentrant functions. Also,
+add missing extern decls.
+
+--- pr/include/md/_netbsd.h.orig 2006-04-05 17:38:13.000000000 -0400
+++ pr/include/md/_netbsd.h
@@ -47,6 +47,8 @@
#define _PR_SI_ARCHITECTURE "x86"
@@ -11,3 +14,27 @@ $NetBSD: patch-ab,v 1.3 2007/03/18 18:49:47 wiz Exp $
#elif defined(__m68k__)
#define _PR_SI_ARCHITECTURE "m68k"
#elif defined(__powerpc__)
+@@ -92,12 +94,6 @@
+ #define _PR_INET6_PROBE
+ #endif
+
+-#if __NetBSD_Version__ >= 106370000
+-/* NetBSD 1.6ZK */
+-#define _PR_HAVE_GETPROTO_R
+-#define _PR_HAVE_GETPROTO_R_INT
+-#endif
+-
+ #define USE_SETJMP
+
+ #ifndef _PR_PTHREADS
+@@ -243,6 +239,10 @@ struct _MDCPU {
+
+ #endif /* ! _PR_PTHREADS */
+
++extern void _MD_EarlyInit(void);
++extern PRIntervalTime _PR_UNIX_GetInterval(void);
++extern PRIntervalTime _PR_UNIX_TicksPerSecond(void);
++
+ #define _MD_EARLY_INIT _MD_EarlyInit
+ #define _MD_FINAL_INIT _PR_UnixInit
+ #define _MD_GET_INTERVAL _PR_UNIX_GetInterval
diff --git a/devel/nspr/patches/patch-ag b/devel/nspr/patches/patch-ag
new file mode 100644
index 00000000000..a0753a5efe6
--- /dev/null
+++ b/devel/nspr/patches/patch-ag
@@ -0,0 +1,27 @@
+$NetBSD: patch-ag,v 1.1 2007/09/25 04:18:26 bjs Exp $
+
+Get the physical memory size using hw.physmem on _PR_HAVE_SYSCTL
+platforms.
+
+--- pr/src/misc/prsystem.c.orig 2006-07-14 18:33:47.000000000 -0400
++++ pr/src/misc/prsystem.c
+@@ -356,6 +356,19 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMem
+ odm_terminate();
+ }
+
++#elif defined(_PR_HAVE_SYSCTL)
++
++ int mib[2];
++ unsigned long physmem;
++ size_t len;
++
++ mib[0] = CTL_HW;
++ mib[1] = HW_PHYSMEM;
++ len = sizeof(physmem);
++ if(sysctl(mib, 2, &physmem, &len, NULL, 0) == 0
++ && len == sizeof(physmem))
++ bytes = physmem;
++
+ #else
+
+ PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
diff --git a/devel/nspr/patches/patch-ah b/devel/nspr/patches/patch-ah
new file mode 100644
index 00000000000..437807f1aef
--- /dev/null
+++ b/devel/nspr/patches/patch-ah
@@ -0,0 +1,54 @@
+$NetBSD: patch-ah,v 1.1 2007/09/25 04:18:26 bjs Exp $
+
+Does this package really ever need priority scheduling? #undef it.
+If _DONT_CAST_PTHREAD_T is defined, then do as the macro says. After
+all, it could be 64-bit. From FreeBSD ports.
+
+--- pr/src/pthreads/ptthread.c.orig 2006-11-30 19:34:12.000000000 -0500
++++ pr/src/pthreads/ptthread.c
+@@ -52,6 +52,10 @@
+ #include <string.h>
+ #include <signal.h>
+
++/* XXX should nspr ever really need to set priority? */
++
++#undef _POSIX_THREAD_PRIORITY_SCHEDULING
++
+ /*
+ * Record whether or not we have the privilege to set the scheduling
+ * policy and priority of threads. 0 means that privilege is available.
+@@ -979,12 +983,20 @@ PR_IMPLEMENT(void) PR_ProcessExit(PRIntn
+ _exit(status);
+ }
+
++#ifndef _DONT_CAST_PTHREAD_T
+ PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred)
++#else
++PR_IMPLEMENT(pthread_t) PR_GetThreadID(PRThread *thred)
++#endif /* _DONT_CAST_PTHREAD_T */
+ {
+ #if defined(_PR_DCETHREADS)
+ return (PRUint32)&thred->id; /* this is really a sham! */
+ #else
++#ifndef _DONT_CAST_PTHREAD_T
+ return (PRUint32)thred->id; /* and I don't know what they will do with it */
++#else
++ return thred->id; /* and I don't know what they will do with it */
++#endif /* _DONT_CAST_PTHREAD_T */
+ #endif
+ }
+
+@@ -1116,7 +1128,13 @@ PR_IMPLEMENT(PRStatus) PR_EnumerateThrea
+ PRIntn count = 0;
+ PRStatus rv = PR_SUCCESS;
+ PRThread* thred = pt_book.first;
++#ifdef _DONT_CAST_PTHREAD_T
++#if !defined(_PR_DCETHREADS) && (defined(DEBUG) || defined(FORCE_PR_ASSERT))
++#endif /* _DONT_CAST_PTHREAD_T */
+ PRThread *me = PR_CurrentThread();
++#ifdef _DONT_CAST_PTHREAD_T
++#endif
++#endif /* _DONT_CAST_PTHREAD_T */
+
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin PR_EnumerateThreads\n"));
+ /*
diff --git a/devel/nspr/patches/patch-ai b/devel/nspr/patches/patch-ai
new file mode 100644
index 00000000000..c56970e11a1
--- /dev/null
+++ b/devel/nspr/patches/patch-ai
@@ -0,0 +1,24 @@
+$NetBSD: patch-ai,v 1.1 2007/09/25 04:18:27 bjs Exp $
+
+Kill some warnings. From FreeBSD.
+
+--- pr/include/prcountr.h.orig 2004-04-25 11:00:47.000000000 -0400
++++ pr/include/prcountr.h
+@@ -426,7 +426,7 @@ NSPR_API(void)
+ #define PR_GET_COUNTER(counter,handle)\
+ (counter) = PR_GetCounter((handle))
+ #else
+-#define PR_GET_COUNTER(counter,handle) 0
++#define PR_GET_COUNTER(counter,handle)
+ #endif
+
+ NSPR_API(PRUint32)
+@@ -500,7 +500,7 @@ NSPR_API(void)
+ #define PR_FIND_NEXT_COUNTER_QNAME(next,handle)\
+ (next) = PR_FindNextCounterQname((handle))
+ #else
+-#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) NULL
++#define PR_FIND_NEXT_COUNTER_QNAME(next,handle)
+ #endif
+
+ NSPR_API(PRCounterHandle)
diff --git a/devel/nspr/patches/patch-ak b/devel/nspr/patches/patch-ak
new file mode 100644
index 00000000000..64730c70f19
--- /dev/null
+++ b/devel/nspr/patches/patch-ak
@@ -0,0 +1,51 @@
+$NetBSD: patch-ak,v 1.1 2007/09/25 04:18:27 bjs Exp $
+
+--- pr/src/pthreads/ptsynch.c.orig 2004-11-22 16:24:53.000000000 -0500
++++ pr/src/pthreads/ptsynch.c
+@@ -62,7 +62,7 @@ static pthread_t pt_zero_tid; /* a null
+ #endif /* defined(_PR_DCETHREADS) */
+ #endif /* defined(DEBUG) */
+
+-#if defined(FREEBSD)
++#if defined(FREEBSD) && (defined(DEBUG) || defined(FORCE_PR_ASSERT))
+ /*
+ * On older versions of FreeBSD, pthread_mutex_trylock returns EDEADLK.
+ * Newer versions return EBUSY. We still need to support both.
+@@ -342,7 +342,10 @@ PR_IMPLEMENT(PRCondVar*) PR_NewCondVar(P
+ PR_ASSERT(lock != NULL);
+ if (cv != NULL)
+ {
+- int rv = _PT_PTHREAD_COND_INIT(cv->cv, _pt_cvar_attr);
++#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
++ int rv =
++#endif
++ _PT_PTHREAD_COND_INIT(cv->cv, _pt_cvar_attr);
+ PR_ASSERT(0 == rv);
+ cv->lock = lock;
+ cv->notify_pending = 0;
+@@ -357,7 +360,11 @@ PR_IMPLEMENT(void) PR_DestroyCondVar(PRC
+ {
+ if (0 > PR_AtomicDecrement(&cvar->notify_pending))
+ {
+- PRIntn rv = pthread_cond_destroy(&cvar->cv); PR_ASSERT(0 == rv);
++#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
++ PRIntn rv =
++#endif
++ pthread_cond_destroy(&cvar->cv);
++ PR_ASSERT(0 == rv);
+ #if defined(DEBUG)
+ memset(cvar, 0xaf, sizeof(PRCondVar));
+ pt_debug.cvars_destroyed += 1;
+@@ -1079,8 +1086,11 @@ PR_IMPLEMENT(PRCondVar*) PRP_NewNakedCon
+ cv = PR_NEW(PRCondVar);
+ if (cv != NULL)
+ {
++#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
+ int rv;
+- rv = _PT_PTHREAD_COND_INIT(cv->cv, _pt_cvar_attr);
++ rv =
++#endif
++ _PT_PTHREAD_COND_INIT(cv->cv, _pt_cvar_attr);
+ PR_ASSERT(0 == rv);
+ cv->lock = _PR_NAKED_CV_LOCK;
+ }
diff --git a/devel/nspr/patches/patch-al b/devel/nspr/patches/patch-al
new file mode 100644
index 00000000000..c1e07c44f2d
--- /dev/null
+++ b/devel/nspr/patches/patch-al
@@ -0,0 +1,36 @@
+$NetBSD: patch-al,v 1.1 2007/09/25 04:18:27 bjs Exp $
+
+Fixup locking order. From OpenBSD.
+
+--- pr/src/misc/prinit.c.orig 2006-11-30 19:34:11.000000000 -0500
++++ pr/src/misc/prinit.c
+@@ -435,6 +435,12 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
+ _PR_LogCleanup();
+
+ /*
++ * accesses the current thread
++ */
++ _PR_CleanupNet();
++ _PR_CleanupIO();
++
++ /*
+ * This part should look like the end of _PR_NativeRunThread
+ * and _PR_UserRunThread.
+ */
+@@ -446,6 +452,7 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
+ PR_DELETE(me->stack);
+ PR_DELETE(me);
+ }
++ _PR_MD_SET_CURRENT_THREAD(NULL);
+
+ /*
+ * XXX: We are freeing the heap memory here so that Purify won't
+@@ -454,8 +461,6 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
+ * Ideally, for each _PR_InitXXX(), there should be a corresponding
+ * _PR_XXXCleanup() that we can call here.
+ */
+- _PR_CleanupNet();
+- _PR_CleanupIO();
+ #ifdef WINNT
+ _PR_CleanupCPUs();
+ #endif
diff --git a/devel/nspr/patches/patch-am b/devel/nspr/patches/patch-am
new file mode 100644
index 00000000000..ba484026e65
--- /dev/null
+++ b/devel/nspr/patches/patch-am
@@ -0,0 +1,18 @@
+$NetBSD: patch-am,v 1.1 2007/09/25 04:18:27 bjs Exp $
+
+Fix another cast of pthread_t.
+
+--- pr/include/private/pprthred.h.orig 2004-04-25 11:00:56.000000000 -0400
++++ pr/include/private/pprthred.h
+@@ -91,7 +91,11 @@ NSPR_API(void) PR_DetachThread(void);
+ ** Get the id of the named thread. Each thread is assigned a unique id
+ ** when it is created or attached.
+ */
++#ifndef _DONT_CAST_PTHREAD_T
+ NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread);
++#else
++NSPR_API(pthread_t) PR_GetThreadID(PRThread *thread);
++#endif
+
+ /*
+ ** Set the procedure that is called when a thread is dumped. The procedure