[32562] trunk/dports/devel/nspr
afb at macports.org
afb at macports.org
Mon Jan 7 15:37:57 PST 2008
Revision: 32562
http://trac.macosforge.org/projects/macports/changeset/32562
Author: afb at macports.org
Date: 2008-01-07 15:37:55 -0800 (Mon, 07 Jan 2008)
Log Message:
-----------
allow building as +universal (reiffert #13861)
Modified Paths:
--------------
trunk/dports/devel/nspr/Portfile
Added Paths:
-----------
trunk/dports/devel/nspr/files/patch-Makefile.in.diff
trunk/dports/devel/nspr/files/patch-autoconf.mk.diff
trunk/dports/devel/nspr/files/patch-configure.in.diff
trunk/dports/devel/nspr/files/patch-configure.in.universal.diff
trunk/dports/devel/nspr/files/patch-objs.mk.diff
trunk/dports/devel/nspr/files/patch-prtime.c.diff
trunk/dports/devel/nspr/files/patch-pth.h.diff
Removed Paths:
-------------
trunk/dports/devel/nspr/files/nspr-4.6.1-config-1.patch
trunk/dports/devel/nspr/files/nspr-4.6.1-lang.patch
trunk/dports/devel/nspr/files/nspr-4.6.1-prtime.patch
trunk/dports/devel/nspr/files/patch-nspr-4.6.6-pthread_kill.diff
Modified: trunk/dports/devel/nspr/Portfile
===================================================================
--- trunk/dports/devel/nspr/Portfile 2008-01-07 23:36:09 UTC (rev 32561)
+++ trunk/dports/devel/nspr/Portfile 2008-01-07 23:37:55 UTC (rev 32562)
@@ -4,8 +4,9 @@
name nspr
version 4.6.6
+revision 1
categories devel
-maintainers nomaintainer
+maintainers rsync at reifferscheid.org
platforms darwin
description A platform-neutral API for system level and libc like functions.
@@ -16,22 +17,37 @@
ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${version}/src/
checksums md5 ba49bc35e2068f54893d3ea7031ad59c
-worksrcdir ${worksrcpath}/mozilla/nsprpub
+worksrcdir ${worksrcdir}/mozilla/nsprpub
-patchfiles nspr-4.6.1-config-1.patch \
- nspr-4.6.1-lang.patch \
- nspr-4.6.1-prtime.patch
+patchfiles patch-Makefile.in.diff \
+ patch-autoconf.mk.diff \
+ patch-configure.in.diff \
+ patch-objs.mk.diff \
+ patch-prtime.c.diff \
+ patch-pth.h.diff
post-patch {
reinplace "s|@executable_path|${prefix}/lib|g" \
- ${worksrcpath}/configure
+ ${worksrcpath}/configure.in
}
configure.args --prefix=${prefix} \
--disable-debug
-build {system "cd ${worksrcdir} && make"}
+variant universal {
+ patchfiles-delete patch-configure.in.diff
+ patchfiles-append patch-configure.in.universal.diff
+ configure.args-append --enable-macosx-universal
+ configure.cflags-append ${configure.universal_cflags}
+ configure.cxxflags-append ${configure.universal_cxxflags}
+ configure.ldflags-append ${configure.universal_ldflags}
+ depends_lib port:autoconf213
+ use_autoconf yes
+ autoconf.cmd autoconf213
+}
+build { system "cd ${worksrcpath} && make" }
+
destroot {
xinstall -m 755 -d ${destroot}${prefix}/bin
xinstall -m 755 ${worksrcpath}/config/nspr-config ${destroot}${prefix}/bin
@@ -58,5 +74,5 @@
}
platform darwin 9 {
- patchfiles-append patch-nspr-4.6.6-pthread_kill.diff
+ patchfiles-append patch-pth.h.diff
}
Deleted: trunk/dports/devel/nspr/files/nspr-4.6.1-config-1.patch
===================================================================
--- trunk/dports/devel/nspr/files/nspr-4.6.1-config-1.patch 2008-01-07 23:36:09 UTC (rev 32561)
+++ trunk/dports/devel/nspr/files/nspr-4.6.1-config-1.patch 2008-01-07 23:37:55 UTC (rev 32562)
@@ -1,11 +0,0 @@
---- configure.orig 2006-01-14 22:41:37.000000000 +0000
-+++ 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
Deleted: trunk/dports/devel/nspr/files/nspr-4.6.1-lang.patch
===================================================================
--- trunk/dports/devel/nspr/files/nspr-4.6.1-lang.patch 2008-01-07 23:36:09 UTC (rev 32561)
+++ trunk/dports/devel/nspr/files/nspr-4.6.1-lang.patch 2008-01-07 23:37:55 UTC (rev 32562)
@@ -1,41 +0,0 @@
-The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
-option parsing, it may break.
-
-http://bugs.gentoo.org/103483
-
---- configure.org
-+++ configure
-@@ -54,6 +54,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=
-@@ -452,16 +463,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.
Deleted: trunk/dports/devel/nspr/files/nspr-4.6.1-prtime.patch
===================================================================
--- trunk/dports/devel/nspr/files/nspr-4.6.1-prtime.patch 2008-01-07 23:36:09 UTC (rev 32561)
+++ trunk/dports/devel/nspr/files/nspr-4.6.1-prtime.patch 2008-01-07 23:37:55 UTC (rev 32562)
@@ -1,26 +0,0 @@
---- pr/src/misc/prtime.c-orig 2004-04-25 10:01:01.000000000 -0500
-+++ pr/src/misc/prtime.c 2006-02-23 12:07:35.098166000 -0600
-@@ -1509,7 +1509,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;
- }
- }
-@@ -1551,11 +1551,12 @@
- struct tm localTime;
- time_t secs;
-
-- PR_ASSERT(tm.tm_month > -1
-+ if (!(tm.tm_month > -1
- && tm.tm_mday > 0
- && tm.tm_hour > -1
- && tm.tm_min > -1
-- && tm.tm_sec > -1);
-+ && tm.tm_sec > -1))
-+ return PR_FAILURE;
-
- /*
- * To obtain time_t from a tm structure representing the local
Added: trunk/dports/devel/nspr/files/patch-Makefile.in.diff
===================================================================
--- trunk/dports/devel/nspr/files/patch-Makefile.in.diff (rev 0)
+++ trunk/dports/devel/nspr/files/patch-Makefile.in.diff 2008-01-07 23:37:55 UTC (rev 32562)
@@ -0,0 +1,21 @@
+--- ./pr/src/md/unix/Makefile.in.orig 2004-04-25 17:00:59.000000000 +0200
++++ ./pr/src/md/unix/Makefile.in 2008-01-05 17:34:21.000000000 +0100
+@@ -93,7 +93,18 @@
+
+ include $(topsrcdir)/config/rules.mk
+
++ifeq ($(MACOSX_UNIVERSAL),1)
++os_Darwin_x86.o: os_Darwin_x86.s
++ $(CC) -c -o $@ -arch i386 $(subst -arch ppc,,$(CFLAGS)) $<
++os_Darwin_ppc.o: os_Darwin_ppc.s
++ $(CC) -c -o $@ -arch ppc $(subst -arch i386,,$(CFLAGS)) $<
++os_Darwin_universal.o: os_Darwin_ppc.o os_Darwin_x86.o
++ lipo -arch i386 os_Darwin_x86.o -arch ppc os_Darwin_ppc.o -create -output os_Darwin_universal.o
++
++export:: $(TARGETS) os_Darwin_x86.o os_Darwin_ppc.o os_Darwin_universal.o
++else
+ export:: $(TARGETS)
++endif
+
+ ifeq ($(OS_ARCH),SunOS)
+ ifneq ($(OS_RELEASE),4.1.3_U1)
Added: trunk/dports/devel/nspr/files/patch-autoconf.mk.diff
===================================================================
--- trunk/dports/devel/nspr/files/patch-autoconf.mk.diff (rev 0)
+++ trunk/dports/devel/nspr/files/patch-autoconf.mk.diff 2008-01-07 23:37:55 UTC (rev 32562)
@@ -0,0 +1,10 @@
+--- ./config/autoconf.mk.in.orig 2006-02-22 23:53:55.000000000 +0100
++++ ./config/autoconf.mk.in 2008-01-05 17:33:44.000000000 +0100
+@@ -121,6 +121,7 @@
+ export MACOSX_DEPLOYMENT_TARGET
+ endif
+
++MACOSX_UNIVERSAL = @MACOSX_UNIVERSAL@
+ MACOS_SDK_DIR = @MACOS_SDK_DIR@
+
+ NEXT_ROOT = @NEXT_ROOT@
Added: trunk/dports/devel/nspr/files/patch-configure.in.diff
===================================================================
--- trunk/dports/devel/nspr/files/patch-configure.in.diff (rev 0)
+++ trunk/dports/devel/nspr/files/patch-configure.in.diff 2008-01-07 23:37:55 UTC (rev 32562)
@@ -0,0 +1,40 @@
+--- ./configure.in.orig 2008-01-05 17:29:57.000000000 +0100
++++ ./configure.in 2008-01-05 17:37:29.000000000 +0100
+@@ -61,6 +61,7 @@
+ USE_CPLUS=
+ USE_IPV6=
+ USE_MDUPDATE=
++MACOSX_UNIVERSAL=
+ _MACOSX_DEPLOYMENT_TARGET=
+ _OPTIMIZE_FLAGS=-O
+ _DEBUG_FLAGS=-g
+@@ -246,6 +247,11 @@
+ [10.1 for ppc, 10.4 for x86]],
+ [_MACOSX_DEPLOYMENT_TARGET=$enableval])
+
++AC_ARG_ENABLE(macosx-universal,
++ [ --enable-macosix-universal Enable use of certain compilers' mdupdate feature],
++ [ if test "$enableval" = "yes"; then
++ MACOSX_UNIVERSAL=1
++ fi ])
+ dnl ========================================================
+ dnl =
+ dnl = Set the threading model
+@@ -1397,7 +1403,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
+@@ -2719,7 +2725,7 @@
+ AC_SUBST(OS_RELEASE)
+ AC_SUBST(OS_TEST)
+ AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
+-
++AC_SUBST(MACOSX_UNIVERSAL)
+ AC_SUBST(DEFINES)
+ AC_SUBST(DEFS)
+ AC_SUBST(AR)
Added: trunk/dports/devel/nspr/files/patch-configure.in.universal.diff
===================================================================
--- trunk/dports/devel/nspr/files/patch-configure.in.universal.diff (rev 0)
+++ trunk/dports/devel/nspr/files/patch-configure.in.universal.diff 2008-01-07 23:37:55 UTC (rev 32562)
@@ -0,0 +1,49 @@
+--- configure.in.orig 2008-01-05 17:29:57.000000000 +0100
++++ configure.in 2008-01-05 19:42:14.000000000 +0100
+@@ -61,6 +61,7 @@
+ USE_CPLUS=
+ USE_IPV6=
+ USE_MDUPDATE=
++MACOSX_UNIVERSAL=
+ _MACOSX_DEPLOYMENT_TARGET=
+ _OPTIMIZE_FLAGS=-O
+ _DEBUG_FLAGS=-g
+@@ -246,6 +247,11 @@
+ [10.1 for ppc, 10.4 for x86]],
+ [_MACOSX_DEPLOYMENT_TARGET=$enableval])
+
++AC_ARG_ENABLE(macosx-universal,
++ [ --enable-macosix-universal Enable use of certain compilers' mdupdate feature],
++ [ if test "$enableval" = "yes"; then
++ MACOSX_UNIVERSAL=1
++ fi ])
+ dnl ========================================================
+ dnl =
+ dnl = Set the threading model
+@@ -979,7 +985,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='-arch i386 -arch ppc -dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+ # Use the standard preprocessor (cpp)
+ CFLAGS="$CFLAGS -no-cpp-precomp"
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+@@ -1397,7 +1403,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
+@@ -2719,7 +2725,7 @@
+ AC_SUBST(OS_RELEASE)
+ AC_SUBST(OS_TEST)
+ AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
+-
++AC_SUBST(MACOSX_UNIVERSAL)
+ AC_SUBST(DEFINES)
+ AC_SUBST(DEFS)
+ AC_SUBST(AR)
Deleted: trunk/dports/devel/nspr/files/patch-nspr-4.6.6-pthread_kill.diff
===================================================================
--- trunk/dports/devel/nspr/files/patch-nspr-4.6.6-pthread_kill.diff 2008-01-07 23:36:09 UTC (rev 32561)
+++ trunk/dports/devel/nspr/files/patch-nspr-4.6.6-pthread_kill.diff 2008-01-07 23:37:55 UTC (rev 32562)
@@ -1,13 +0,0 @@
---- pr/include/md/_pth.h-orig 2007-10-29 05:25:26.000000000 +0900
-+++ pr/include/md/_pth.h 2007-10-29 05:26:05.000000000 +0900
-@@ -205,10 +205,6 @@
- /*
- * These platforms don't have pthread_kill()
- */
--#if defined(DARWIN)
--#define pthread_kill(thread, sig) ENOSYS
--#endif
--
- #if defined(OSF1) || defined(VMS)
- #define PT_PRIO_MIN PRI_OTHER_MIN
- #define PT_PRIO_MAX PRI_OTHER_MAX
Added: trunk/dports/devel/nspr/files/patch-objs.mk.diff
===================================================================
--- trunk/dports/devel/nspr/files/patch-objs.mk.diff (rev 0)
+++ trunk/dports/devel/nspr/files/patch-objs.mk.diff 2008-01-07 23:37:55 UTC (rev 32562)
@@ -0,0 +1,14 @@
+--- ./pr/src/md/unix/objs.mk.orig 2004-04-25 17:00:59.000000000 +0200
++++ ./pr/src/md/unix/objs.mk 2008-01-05 17:34:28.000000000 +0100
+@@ -58,6 +58,11 @@
+ CSRCS += $(PR_MD_CSRCS)
+ ASFILES += $(PR_MD_ASFILES)
+
++ifeq ($(MACOSX_UNIVERSAL),1)
++OBJS += $(addprefix md/unix/$(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
++ md/unix/os_Darwin_universal.o
++else
+ OBJS += $(addprefix md/unix/$(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
+ $(addprefix md/unix/$(OBJDIR)/,$(ASFILES:.s=.$(OBJ_SUFFIX)))
++endif
+
Added: trunk/dports/devel/nspr/files/patch-prtime.c.diff
===================================================================
--- trunk/dports/devel/nspr/files/patch-prtime.c.diff (rev 0)
+++ trunk/dports/devel/nspr/files/patch-prtime.c.diff 2008-01-07 23:37:55 UTC (rev 32562)
@@ -0,0 +1,26 @@
+--- ./pr/src/misc/prtime.c.orig 2008-01-05 17:39:26.000000000 +0100
++++ ./pr/src/misc/prtime.c 2008-01-05 17:40:58.000000000 +0100
+@@ -1553,7 +1553,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;
+ }
+ }
+@@ -1595,11 +1595,12 @@
+ struct tm localTime;
+ time_t secs;
+
+- PR_ASSERT(tm.tm_month > -1
++ if (!(tm.tm_month > -1
+ && tm.tm_mday > 0
+ && tm.tm_hour > -1
+ && tm.tm_min > -1
+- && tm.tm_sec > -1);
++ && tm.tm_sec > -1))
++ return PR_FAILURE;
+
+ /*
+ * To obtain time_t from a tm structure representing the local
Added: trunk/dports/devel/nspr/files/patch-pth.h.diff
===================================================================
--- trunk/dports/devel/nspr/files/patch-pth.h.diff (rev 0)
+++ trunk/dports/devel/nspr/files/patch-pth.h.diff 2008-01-07 23:37:55 UTC (rev 32562)
@@ -0,0 +1,12 @@
+--- ./pr/include/md/_pth.h.orig 2008-01-05 17:41:20.000000000 +0100
++++ ./pr/include/md/_pth.h 2008-01-05 17:42:22.000000000 +0100
+@@ -205,9 +205,6 @@
+ /*
+ * These platforms don't have pthread_kill()
+ */
+-#if defined(DARWIN)
+-#define pthread_kill(thread, sig) ENOSYS
+-#endif
+
+ #if defined(OSF1) || defined(VMS)
+ #define PT_PRIO_MIN PRI_OTHER_MIN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080107/f71fc47c/attachment-0001.html
More information about the macports-changes
mailing list