Dear Ryan, Saispo, macports-dev-list,
attached is a patch containing all the recommended changes.
Thanks for your help.
Kind regards
Thomas Reifferscheid
PS:
thomas$ head -1 patch-port_nss.diff
diff -Naur ports/net/nss.orig/Portfile ports/net/nss/Portfile
Ryan Schmidt wrote:
On Nov 15, 2007, at 02:26, [EMAIL PROTECTED] wrote:
Added: trunk/dports/net/nss/Portfile
===================================================================
--- trunk/dports/net/nss/Portfile (rev 0)
+++ trunk/dports/net/nss/Portfile 2007-11-15 08:26:49 UTC (rev 31067)
@@ -0,0 +1,43 @@
+# $Id$
+PortSystem 1.0
+name nss
+version 3.11.7
+categories net
+maintainers [EMAIL PROTECTED]
+description Network Security Service libraries.
+depends_lib port:nspr
+
+long_description ${description}
+configure { }
FYI, "use_configure no" is better than "configure {}".
+homepage http://www.mozilla.org/projects/security/pki/nss/
+master_sites
ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_7_RTM/src/
\
+
http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_7_RTM/src/
+checksums nss-3.11.7.tar.gz md5 82594a0773cedd7bb7aa25009a25f5a3 \
[snip]
To avoid having to change these version numbers every time you update
the port version, you can use
set my_release NSS_[strsed ${version} {g/[.]/_/}]_RTM
master_sites
ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/
\
http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/
checksums nss-${version}.tar.gz md5 82594a0773cedd7bb7aa25009a25f5a3 \
Added: trunk/dports/net/nss/files/patch-Darwin.mk.diff
===================================================================
---
trunk/dports/net/nss/files/patch-Darwin.mk.diff
(rev 0)
+++ trunk/dports/net/nss/files/patch-Darwin.mk.diff 2007-11-15
08:26:49 UTC (rev 31067)
@@ -0,0 +1,11 @@
+--- mozilla/security/coreconf/Darwin.mk.orig 2007-11-14
19:41:02.000000000 +0100
++++ mozilla/security/coreconf/Darwin.mk 2007-11-14
19:41:20.000000000 +0100
+@@ -111,7 +111,7 @@
+
+ DSO_CFLAGS = -fPIC
+ # May override this with -bundle to create a loadable module.
+-DSO_LDOPTS = -dynamiclib -compatibility_version 1
-current_version 1 -install_name @executable_path/$(notdir $@)
-headerpad_max_install_names
++DSO_LDOPTS = -dynamiclib -compatibility_version 1
-current_version 1 -install_name @executable_path/$(notdir $@)
-headerpad_max_install_names -L/opt/local/lib
You mustn't hard-code "/opt/local" into ports. MacPorts can be
installed in any prefix; /opt/local just happens to be the default. If
you must use a patchfile for this, use something like "@@PREFIX@@"
instead of "/opt/local" in your patchfiles. Then replace "@@PREFIX@@"
with ${prefix} using a reinplace in the portfile.
+ MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
+ DLL_SUFFIX = dylib
Added: trunk/dports/net/nss/files/patch-UNIX.mk.diff
===================================================================
---
trunk/dports/net/nss/files/patch-UNIX.mk.diff
(rev 0)
+++ trunk/dports/net/nss/files/patch-UNIX.mk.diff 2007-11-15
08:26:49 UTC (rev 31067)
@@ -0,0 +1,11 @@
+--- mozilla/security/coreconf/UNIX.mk.orig 2007-11-14
19:41:08.000000000 +0100
++++ mozilla/security/coreconf/UNIX.mk 2007-11-14
19:41:24.000000000 +0100
+@@ -46,7 +46,7 @@
+ DEFINES += -UDEBUG -DNDEBUG
+ else
+ OPTIMIZER += -g
+- DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)
++ DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)
-I/opt//local/include/nspr/ -L/opt/local/lib
Ditto.
+ endif
+
+ ifdef BUILD_TREE
Added: trunk/dports/net/nss/files/patch-config.mk.diff
===================================================================
---
trunk/dports/net/nss/files/patch-config.mk.diff
(rev 0)
+++ trunk/dports/net/nss/files/patch-config.mk.diff 2007-11-15
08:26:49 UTC (rev 31067)
@@ -0,0 +1,11 @@
+--- mozilla/security/nss/lib/ckfw/builtins/config.mk.orig
2007-11-14 19:51:59.000000000 +0100
++++ mozilla/security/nss/lib/ckfw/builtins/config.mk 2007-11-14
19:52:38.000000000 +0100
+@@ -60,7 +60,7 @@
+ # To create a loadable module on Darwin, we must use -bundle.
+ #
+ ifeq ($(OS_TARGET),Darwin)
+-DSO_LDOPTS = -bundle
++DSO_LDOPTS = -bundle -L/opt/local/lib
Ditto.
+ endif
+
+ ifeq ($(OS_TARGET),SunOS)
diff -Naur ports/net/nss.orig/Portfile ports/net/nss/Portfile
--- ports/net/nss.orig/Portfile 2007-11-16 09:26:27.000000000 +0100
+++ ports/net/nss/Portfile 2007-11-16 09:26:28.000000000 +0100
@@ -8,15 +8,18 @@
depends_lib port:nspr
long_description ${description}
-configure { }
+use_configure no
homepage http://www.mozilla.org/projects/security/pki/nss/
platforms darwin
-master_sites ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_7_RTM/src/ \
- http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_11_7_RTM/src/
-checksums nss-3.11.7.tar.gz md5 82594a0773cedd7bb7aa25009a25f5a3 \
- patch-Unix.mk.diff md5 9adba605169d66fe845445eb7fcf86ea \
- patch-Darwin.mk.diff md5 d9f3f354106b78b645744204f1d111b1 \
- patch-config.mk.diff md5 fb9bbd51b04e44fbcdd403c4153bbdfe
+
+set my_release NSS_[strsed ${version} {g/[.]/_/}]_RTM
+
+master_sites ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/ \
+ http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${my_release}/src/
+checksums nss-${version}.tar.gz md5 82594a0773cedd7bb7aa25009a25f5a3 \
+ patch-UNIX.mk.diff md5 e88cf59da681c182b91a1658ceabb678 \
+ patch-Darwin.mk.diff md5 650b2c4926e1a2be90ecc6b2ade0db77 \
+ patch-config.mk.diff md5 2ec7d4b8dcf50d43d58c153c2ea47db4
worksrcdir ${worksrcpath}
patchfiles patch-Darwin.mk.diff \
@@ -29,6 +32,10 @@
mozilla/security/nss/cmd/platlibs.mk \
mozilla/security/nss/lib/smime/config.mk \
mozilla/security/nss/lib/ssl/config.mk
+ reinplace "s|@@PREFIX@@|${prefix}|g" \
+ mozilla/security/coreconf/Darwin.mk \
+ mozilla/security/coreconf/UNIX.mk \
+ mozilla/security/nss/lib/ckfw/builtins/config.mk
}
build {system "cd ${worksrcdir} && make -C mozilla/security/coreconf/nsinstall && make -C mozilla/security/dbm && make -C mozilla/security/nss"}
diff -Naur ports/net/nss.orig/files/patch-Darwin.mk.diff ports/net/nss/files/patch-Darwin.mk.diff
--- ports/net/nss.orig/files/patch-Darwin.mk.diff 2007-11-16 09:26:27.000000000 +0100
+++ ports/net/nss/files/patch-Darwin.mk.diff 2007-11-16 09:26:28.000000000 +0100
@@ -5,7 +5,7 @@
DSO_CFLAGS = -fPIC
# May override this with -bundle to create a loadable module.
-DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_name @executable_path/$(notdir $@) -headerpad_max_install_names
-+DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_name @executable_path/$(notdir $@) -headerpad_max_install_names -L/opt/local/lib
++DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_name @executable_path/$(notdir $@) -headerpad_max_install_names -L@@PREFIX@@/lib
MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
DLL_SUFFIX = dylib
diff -Naur ports/net/nss.orig/files/patch-UNIX.mk.diff ports/net/nss/files/patch-UNIX.mk.diff
--- ports/net/nss.orig/files/patch-UNIX.mk.diff 2007-11-16 09:26:27.000000000 +0100
+++ ports/net/nss/files/patch-UNIX.mk.diff 2007-11-16 09:26:28.000000000 +0100
@@ -5,7 +5,7 @@
else
OPTIMIZER += -g
- DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)
-+ DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami) -I/opt//local/include/nspr/ -L/opt/local/lib
++ DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami) -I@@PREFIX@@/include/nspr/ -L@@PREFIX@@/lib
endif
ifdef BUILD_TREE
diff -Naur ports/net/nss.orig/files/patch-config.mk.diff ports/net/nss/files/patch-config.mk.diff
--- ports/net/nss.orig/files/patch-config.mk.diff 2007-11-16 09:26:27.000000000 +0100
+++ ports/net/nss/files/patch-config.mk.diff 2007-11-16 09:26:28.000000000 +0100
@@ -5,7 +5,7 @@
#
ifeq ($(OS_TARGET),Darwin)
-DSO_LDOPTS = -bundle
-+DSO_LDOPTS = -bundle -L/opt/local/lib
++DSO_LDOPTS = -bundle -L@@PREFIX@@/lib
endif
ifeq ($(OS_TARGET),SunOS)
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-dev