diff --git a/devel/nspr/Makefile b/devel/nspr/Makefile index ba6cceb45c5d..37d937132ddd 100644 --- a/devel/nspr/Makefile +++ b/devel/nspr/Makefile @@ -1,50 +1,50 @@ # Created by: Maxim Sobolev # $FreeBSD$ PORTNAME= nspr -DISTVERSION= 4.11 +DISTVERSION= 4.12 CATEGORIES= devel MASTER_SITES= MOZILLA/${PORTNAME}/releases/v${PORTVERSION}/src MAINTAINER= gecko@FreeBSD.org COMMENT= Platform-neutral API for system level and libc like functions USES= cpe gmake pathfix CPE_VENDOR= mozilla CPE_PRODUCT= netscape_portable_runtime WRKSRC_SUBDIR= nspr GNU_CONFIGURE= yes USE_LDCONFIG= yes OPTIONS_DEFINE= DEBUG TEST DEBUG_CONFIGURE_ENABLE=debug post-patch: # Do not install tools to build itself @${REINPLACE_CMD} -e '/RELEASE_BINS/d' \ ${WRKSRC}/pr/src/misc/Makefile.in post-build-TEST-on: @${DO_MAKE_BUILD} -C ${BUILD_WRKSRC}/lib/tests @${DO_MAKE_BUILD} -C ${BUILD_WRKSRC}/pr/tests @${LN} -fs libmy.so.1 ${BUILD_WRKSRC}/pr/tests/dll/libmy.so post-install: @for file in ${STAGEDIR}${PREFIX}/lib/*.so*; do \ ${STRIP_CMD} $$file; \ ${CHMOD} ${LIBMODE} $$file; \ ${LN} -fs $${file##*/} $${file%.*}; \ done do-test-TEST-on: ${TEST_WRKSRC}/lib/tests/string ${TEST_WRKSRC}/lib/tests/base64t cd ${TEST_WRKSRC}/pr/tests && ${WRKSRC}/pr/tests/runtests.sh # The test below is commented out, because arena requires # command-line arguments. If you can provide reasonable values # for it, please contact ${MAINTAINER}. Thank you. # ${TEST_WRKSRC}/lib/tests/arena # .include diff --git a/devel/nspr/distinfo b/devel/nspr/distinfo index fe56b25ee5c1..970cb9571d89 100644 --- a/devel/nspr/distinfo +++ b/devel/nspr/distinfo @@ -1,2 +1,2 @@ -SHA256 (nspr-4.11.tar.gz) = cb320a9eee7028275ac0fce7adc39dee36f14f02fd8432fce1b7e1aa5e3685c2 -SIZE (nspr-4.11.tar.gz) = 1134106 +SHA256 (nspr-4.12.tar.gz) = e0b10a1e569153668ff8bdea6c7e491b389fab69c2f18285a1ebf7c2ea4269de +SIZE (nspr-4.12.tar.gz) = 1135458 diff --git a/devel/nspr/files/patch-bug782111 b/devel/nspr/files/patch-bug782111 deleted file mode 100644 index 42727d672980..000000000000 --- a/devel/nspr/files/patch-bug782111 +++ /dev/null @@ -1,35 +0,0 @@ ---- pr/src/pthreads/ptthread.c.orig 2015-11-20 22:19:14 UTC -+++ pr/src/pthreads/ptthread.c -@@ -21,6 +21,10 @@ - #include - #include - -+#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY) -+#include -+#endif -+ - #ifdef SYMBIAN - /* In Open C sched_get_priority_min/max do not work properly, so we undefine - * _POSIX_THREAD_PRIORITY_SCHEDULING here. -@@ -1733,7 +1737,7 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThre - { - PRThread *thread; - size_t nameLen; -- int result; -+ int result = 0; - - if (!name) { - PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -@@ -1751,8 +1755,10 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThre - return PR_FAILURE; - memcpy(thread->name, name, nameLen + 1); - --#if defined(OPENBSD) || defined(FREEBSD) -- result = pthread_set_name_np(thread->id, name); -+#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY) -+ pthread_set_name_np(thread->id, name); -+#elif defined(NETBSD) -+ pthread_setname_np(thread->id, "%s", name); - #else /* not BSD */ - /* - * On OSX, pthread_setname_np is only available in 10.6 or later, so test diff --git a/devel/nspr/files/patch-pr-include-md-freebsd.cfg b/devel/nspr/files/patch-pr-include-md-freebsd.cfg deleted file mode 100644 index b0ae2e186b72..000000000000 --- a/devel/nspr/files/patch-pr-include-md-freebsd.cfg +++ /dev/null @@ -1,55 +0,0 @@ ---- pr/include/md/_freebsd.cfg.orig 2015-08-19 15:32:22.000000000 +0000 -+++ pr/include/md/_freebsd.cfg 2015-11-04 11:36:54.441654000 +0000 -@@ -342,6 +342,52 @@ - #define PR_BYTES_PER_WORD_LOG2 2 - #define PR_BYTES_PER_DWORD_LOG2 3 - -+#elif defined(__aarch64__) -+ -+#undef IS_BIG_ENDIAN -+#define IS_LITTLE_ENDIAN 1 -+#define IS_64 -+ -+#define PR_BYTES_PER_BYTE 1 -+#define PR_BYTES_PER_SHORT 2 -+#define PR_BYTES_PER_INT 4 -+#define PR_BYTES_PER_INT64 8 -+#define PR_BYTES_PER_LONG 8 -+#define PR_BYTES_PER_FLOAT 4 -+#define PR_BYTES_PER_DOUBLE 8 -+#define PR_BYTES_PER_WORD 8 -+#define PR_BYTES_PER_DWORD 8 -+ -+#define PR_BITS_PER_BYTE 8 -+#define PR_BITS_PER_SHORT 16 -+#define PR_BITS_PER_INT 32 -+#define PR_BITS_PER_INT64 64 -+#define PR_BITS_PER_LONG 64 -+#define PR_BITS_PER_FLOAT 32 -+#define PR_BITS_PER_DOUBLE 64 -+#define PR_BITS_PER_WORD 64 -+ -+#define PR_BITS_PER_BYTE_LOG2 3 -+#define PR_BITS_PER_SHORT_LOG2 4 -+#define PR_BITS_PER_INT_LOG2 5 -+#define PR_BITS_PER_INT64_LOG2 6 -+#define PR_BITS_PER_LONG_LOG2 6 -+#define PR_BITS_PER_FLOAT_LOG2 5 -+#define PR_BITS_PER_DOUBLE_LOG2 6 -+#define PR_BITS_PER_WORD_LOG2 6 -+ -+#define PR_ALIGN_OF_SHORT 2 -+#define PR_ALIGN_OF_INT 4 -+#define PR_ALIGN_OF_LONG 8 -+#define PR_ALIGN_OF_INT64 8 -+#define PR_ALIGN_OF_FLOAT 4 -+#define PR_ALIGN_OF_DOUBLE 8 -+#define PR_ALIGN_OF_POINTER 8 -+#define PR_ALIGN_OF_WORD 8 -+ -+#define PR_BYTES_PER_WORD_LOG2 3 -+#define PR_BYTES_PER_DWORD_LOG2 3 -+ - #elif defined(__arm__) - - #if defined(__ARMEB__) || defined(__ARM_BIG_ENDIAN__) diff --git a/devel/nspr/files/patch-pr-include-md-freebsd.h b/devel/nspr/files/patch-pr-include-md-freebsd.h deleted file mode 100644 index b60029a3846b..000000000000 --- a/devel/nspr/files/patch-pr-include-md-freebsd.h +++ /dev/null @@ -1,11 +0,0 @@ ---- pr/include/md/_freebsd.h.orig 2015-08-19 15:32:22.000000000 +0000 -+++ pr/include/md/_freebsd.h 2015-11-04 11:38:01.257876000 +0000 -@@ -29,6 +29,8 @@ - #define _PR_SI_ARCHITECTURE "powerpc64" - #elif defined(__powerpc__) - #define _PR_SI_ARCHITECTURE "powerpc" -+#elif defined(__aarch64__) -+#define _PR_SI_ARCHITECTURE "aarch64" - #elif defined(__arm__) - #define _PR_SI_ARCHITECTURE "arm" - #elif defined(__mips64__) diff --git a/devel/nspr/files/patch-warnings b/devel/nspr/files/patch-warnings index 2d3bc5fc07e1..b25ff0bd657c 100644 --- a/devel/nspr/files/patch-warnings +++ b/devel/nspr/files/patch-warnings @@ -1,116 +1,63 @@ --- pr/include/prcountr.h.orig 2015-10-16 13:22:19 UTC +++ pr/include/prcountr.h @@ -394,7 +394,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) @@ -468,7 +468,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) ---- pr/src/io/prprf.c.orig 2015-10-16 13:22:19 UTC -+++ pr/src/io/prprf.c -@@ -697,7 +697,7 @@ static int dosprintf(SprintfState *ss, c - char *hexp; - int rv, i; - struct NumArg* nas = NULL; -- struct NumArg* nap; -+ struct NumArg* nap = NULL; - struct NumArg nasArray[ NAS_DEFAULT_NUM ]; - char pattern[20]; - const char* dolPt = NULL; /* in "%4$.2f", dolPt will point to . */ ---- pr/src/io/prscanf.c.orig 2015-10-16 13:22:19 UTC -+++ pr/src/io/prscanf.c -@@ -194,7 +194,7 @@ static PRStatus - GetInt(ScanfState *state, int code) - { - char buf[FMAX + 1], *p; -- int ch; -+ int ch = -1; - static const char digits[] = "0123456789abcdefABCDEF"; - PRBool seenDigit = PR_FALSE; - int base; -@@ -304,7 +304,7 @@ static PRStatus - GetFloat(ScanfState *state) - { - char buf[FMAX + 1], *p; -- int ch; -+ int ch = -1; - PRBool seenDigit = PR_FALSE; - - if (state->width == 0 || state->width > FMAX) { --- pr/src/misc/pralarm.c.orig 2015-10-16 13:22:19 UTC +++ pr/src/misc/pralarm.c @@ -101,7 +101,7 @@ static void PR_CALLBACK pr_alarmNotifier while (why != abort) { - PRIntervalTime pause; + PRIntervalTime pause = 0; PR_Lock(alarm->lock); while (why == scan) --- pr/src/misc/prdtoa.c.orig 2015-10-16 13:22:19 UTC +++ pr/src/misc/prdtoa.c @@ -2751,7 +2751,7 @@ dtoa to hold the suppressed trailing zeros. */ - int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, + int bbits, b2, b5, be, dig, i, ieps, ilim = -1, ilim0, ilim1 = -1, j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, spec_case, try_quick; Long L; ---- pr/src/misc/prtpool.c.orig 2015-10-16 13:22:19 UTC -+++ pr/src/misc/prtpool.c -@@ -281,8 +281,8 @@ PRThreadPool *tp = (PRThreadPool *) arg; - int pollfd_cnt, pollfds_used; - int rv; - PRCList *qp, *nextqp; --PRPollDesc *pollfds; --PRJob **polljobs; -+PRPollDesc *pollfds = NULL; -+PRJob **polljobs = NULL; - int poll_timeout; - PRIntervalTime now; - --- pr/src/pthreads/ptio.c.orig 2015-10-16 13:22:19 UTC +++ pr/src/pthreads/ptio.c -@@ -3765,7 +3765,7 @@ static PRInt32 _pr_poll_with_poll( - * We use these variables to figure out how much time has - * elapsed and how much of the timeout still remains. - */ -- PRIntervalTime start, elapsed, remaining; -+ PRIntervalTime start = 0, elapsed, remaining; - - if (pt_TestAbort()) return -1; - @@ -4934,6 +4934,7 @@ PR_IMPLEMENT(PRInt32) PR_Select( if (timeout == PR_INTERVAL_NO_TIMEOUT) { tvp = NULL; + start = 0; /* Not needed, but shuts down a warning */ } else { tv.tv_sec = (PRInt32)PR_IntervalToSeconds(timeout); tv.tv_usec = (PRInt32)PR_IntervalToMicroseconds( --- pr/src/pthreads/ptsynch.c.orig 2015-10-16 13:22:19 UTC +++ pr/src/pthreads/ptsynch.c @@ -30,7 +30,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.