pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/nss Rather than trying to enumerate all object d...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7a4f362fa779
branches:  trunk
changeset: 525714:7a4f362fa779
user:      dmcmahill <dmcmahill%pkgsrc.org@localhost>
date:      Wed Feb 21 23:23:08 2007 +0000

description:
Rather than trying to enumerate all object directories, notice that they all
match *_OPT.OBJ so use that for the install target and simplyfy things quite
a bit.  This should also fix build problems noted on solaris/x86.  Also
dynamically add the libfreebl part to the PLIST.  This should make things
more robust as the exact set of libfreebl*.so libs depends on the OS and
hardward platform.

diffstat:

 devel/nss/Makefile |  59 +++++++++++++++++------------------------------------
 devel/nss/PLIST    |   7 +----
 2 files changed, 21 insertions(+), 45 deletions(-)

diffs (116 lines):

diff -r 0b98f5fc95a3 -r 7a4f362fa779 devel/nss/Makefile
--- a/devel/nss/Makefile        Wed Feb 21 23:18:44 2007 +0000
+++ b/devel/nss/Makefile        Wed Feb 21 23:23:08 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2007/01/21 10:49:57 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2007/02/21 23:23:08 dmcmahill Exp $
 
 DISTNAME=              nss-3.11.4
 CATEGORIES=            security
@@ -13,7 +13,7 @@
 
 BUILD_DIRS=            mozilla/security/nss
 
-USE_TOOLS+=            gmake perl
+USE_TOOLS+=            awk gmake perl
 DIST=                  ${WRKSRC}/mozilla/dist
 BUILD_TARGET=          nss_build_all
 MAKE_ENV+=             LD_LIBS="-L${BUILDLINK_PREFIX.nspr}/lib/nspr ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.nspr}/lib/nspr ${COMPILER_RPATH_FLAG}${LOCALBASE}/lib/nss"
@@ -34,43 +34,6 @@
 MAKEFLAGS+=    NS_USE_GCC=YES
 .endif
 
-.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
-NSS_OBJ_DIR=   ${OPSYS}${OS_VERSION}_OPT.OBJ
-.elif ${OPSYS} == "SunOS"
-.  if ${PKGSRC_COMPILER} == "gcc"
-NSS_OBJ_DIR=   ${OPSYS}${OS_VERSION}_gcc_OPT.OBJ
-.  else
-NSS_OBJ_DIR=   ${OPSYS}${OS_VERSION}_OPT.OBJ
-.  endif
-
-# on solaris/sparc, we get a different set of libs.
-# How about NetBSD/sparc and sparc64?
-.  if ${MACHINE_ARCH} == "sparc"
-SUNOS_TRUE=
-SUNOS_FALSE=   "@comment "
-.  endif
-
-.elif ${OPSYS} == "Linux"
-NSS_SHORT_OS_VERSION!= echo ${OS_VERSION} | ${SED} -e 's/^\([[:digit:]]\.[[:digit:]]\)\..*$$/\1/'
-.  if ${MACHINE_ARCH} == "i386"
-NSS_MACHINE_ARCH=      _x86
-.  elif ${MACHINE_ARCH} == "parisc" || ${MACHINE_ARCH} == "parisc64"
-NSS_MACHINE_ARCH=      _hppa
-.  elif ${MACHINE_ARCH} == "sparc64"
-NSS_MACHINE_ARCH=      _sparc
-.  else
-NSS_MACHINE_ARCH=      _${MACHINE_ARCH}
-.  endif
-NSS_OBJ_DIR=   ${OPSYS}${NSS_SHORT_OS_VERSION}${NSS_MACHINE_ARCH}_glibc_PTH_OPT.OBJ
-.endif
-
-SUNOS_TRUE?=   "@comment "
-SUNOS_FALSE?=
-PLIST_SUBST+=  SUNOS_TRUE=${SUNOS_TRUE}
-PLIST_SUBST+=  SUNOS_FALSE=${SUNOS_FALSE}
-
-NSS_OBJ_DIR?=  ${OPSYS}${OS_VERSION}_OPT.OBJ
-
 pre-configure:
        ${CP} ${FILESDIR}/DragonFly.mk \
                ${WRKSRC}/mozilla/security/coreconf/
@@ -79,7 +42,7 @@
        ${INSTALL_DATA_DIR} ${PREFIX}/include/nss
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/nss
        (cd ${DIST}/public && ${PAX} -Lrwpe . ${PREFIX}/include/nss/ )
-       (cd ${DIST}/${NSS_OBJ_DIR}/lib && \
+       (cd ${DIST}/*_OPT.OBJ/lib && \
                ${PAX} -Lrwpe *.${SO_SUFFIX} ${PREFIX}/lib/nss/ )
        set -e; \
        { ${ECHO} "Name: NSS"; \
@@ -91,7 +54,23 @@
              "-lnss3 -lsmime3 -lssl3 -lsoftokn3 "${BUILDLINK_LIBS.pthread:Q}; \
        } >${PREFIX}/lib/pkgconfig/nss.pc
 
+# The exact set of libfreebl* libs built and installed depends on the
+# operating system and platform.  For example, on solaris/sparc you might
+# get 
+#  libfreebl_32fpu_3.so
+#  libfreebl_32int_3.so
+#  libfreebl_32int64_3.so
+# and on others
+#  libfreebl3.so
+# Since this has been a continual problem in many mozilla packages, just
+# do that part dynamically rather than trying to always keep our conditionals
+# up to date.
+PLIST_SRC=     ${WRKDIR}/PLIST
 post-install:
+       ${AWK} '/@comment libfreebl/ {exit} {print}' ${.CURDIR}/PLIST > ${PLIST_SRC}
+       ls ${PREFIX}/lib/nss/libfreebl*.${SO_SUFFIX} | ${SORT} | \
+               ${SED} 's;${PREFIX}/;;g' >> ${PLIST_SRC}
+       ${AWK} 'ok == 1 {print} /@comment libfreebl/ {ok=1}' ${.CURDIR}/PLIST >> ${PLIST_SRC}
        cd ${PREFIX}/include/nss && ${CHMOD} ${SHAREMODE} nss/*.h dbm/*.h nss/*.api
 
 BUILDLINK_API_DEPENDS.nspr+=   nspr>=4.4.1nb2
diff -r 0b98f5fc95a3 -r 7a4f362fa779 devel/nss/PLIST
--- a/devel/nss/PLIST   Wed Feb 21 23:18:44 2007 +0000
+++ b/devel/nss/PLIST   Wed Feb 21 23:23:08 2007 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2007/01/20 18:55:09 wiz Exp $
+@comment $NetBSD: PLIST,v 1.8 2007/02/21 23:23:08 dmcmahill Exp $
 include/nss/dbm/cdefs.h
 include/nss/dbm/mcom_db.h
 include/nss/dbm/ncompat.h
@@ -93,10 +93,7 @@
 include/nss/nss/sslproto.h
 include/nss/nss/sslt.h
 include/nss/nss/watcomfx.h
-${SUNOS_FALSE}lib/nss/libfreebl3.${SO_SUFFIX}
-${SUNOS_TRUE}lib/nss/libfreebl_32fpu_3.${SO_SUFFIX}
-${SUNOS_TRUE}lib/nss/libfreebl_32int64_3.${SO_SUFFIX}
-${SUNOS_TRUE}lib/nss/libfreebl_32int_3.${SO_SUFFIX}
+@comment libfreebl
 lib/nss/libnss3.${SO_SUFFIX}
 lib/nss/libnssckbi.${SO_SUFFIX}
 lib/nss/libsmime3.${SO_SUFFIX}



Home | Main Index | Thread Index | Old Index