1 # $NetBSD: Makefile,v 1.33 2010/01/16 14:22:30 tnn Exp $
4 .include "../../devel/xulrunner/dist.mk"
5 PKGNAME= ${DISTNAME:S/firefox-3.5/nspr-${NSPR_RELEASE}/:S/.source//}
9 MAINTAINER= tnn@NetBSD.org
10 HOMEPAGE= http://www.mozilla.org/projects/nspr/index.html
11 COMMENT= Platform-neutral API for system level and libc like functions
13 PKG_DESTDIR_SUPPORT= user-destdir
14 CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}security/nss/tests/libpkix/libpkix.sh
17 CONFIGURE_DIRS= nsprpub
19 USE_TOOLS+= autoconf213 gmake perl
20 REPLACE_PERL+= nsprpub/pr/src/misc/compile-et.pl
22 CONFIGURE_ARGS+= --disable-debug
23 CONFIGURE_ARGS+= --with-pthreads
24 CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/nspr
25 CONFIGURE_ENV+= LIBRUNPATH=${PREFIX:Q}/lib/nspr
27 .include "../../mk/bsd.prefs.mk"
29 SUBST_CLASSES+= nspr-config
30 SUBST_STAGE.nspr-config= pre-configure
31 SUBST_MESSAGE.nspr-config= Fixing nspr-config run path
32 SUBST_FILES.nspr-config= nsprpub/config/nspr-config.in
33 SUBST_SED.nspr-config= -e 's|-L$$libdir|"${COMPILER_RPATH_FLAG}$$libdir -L$$libdir"|g'
35 .if ${OBJECT_FMT} == "ELF"
37 .elif ${OBJECT_FMT} == "Mach-O"
42 PLIST_SUBST+= SO_SUFFIX=${SO_SUFFIX:Q}
45 # see nsprpub/pr/src/md/unix/Makefile.in
46 # for the bit about 32-bit sun4u machines installing an extra file.
47 # That is why we have this specific test and modify the PLIST
48 .if ${OPSYS} == "SunOS"
49 . if defined(ABI) && ${ABI} == "64"
50 CONFIGURE_ARGS+= --enable-64bit
52 HW_CLASS!= ${UNAME} -m
53 . if ${HW_CLASS} == "sun4u"
59 .if ${OPSYS} == "Linux"
60 . if defined(ABI) && ${ABI} == "64"
61 CONFIGURE_ARGS+= --enable-64bit
65 .if ${OPSYS} == "Darwin" && exists(/Developer/Headers/FlatCarbon)
66 BUILDLINK_PASSTHRU_DIRS+= Developer/Headers/FlatCarbon
70 # sanity check: make sure the nspr release is what we think it is.
71 @set -e; if [ '"${NSPR_RELEASE}"' != \
72 "`${AWK} '/PR_VERSION/ {print $$3}' < \
73 ${WRKSRC}/nsprpub/pr/include/prinit.h`" ]; then \
74 ${ECHO} "package is out of date"; \
77 cd ${WRKSRC}/nsprpub && autoconf
81 ${ECHO} "Name: NSPR"; \
82 ${ECHO} "Description: The Netscape Portable Runtime"; \
83 ${ECHO} "Version: ${NSPR_RELEASE}"; \
84 ${ECHO} "Cflags: -I${PREFIX}/include/nspr"; \
85 ${ECHO} "Libs: -L${PREFIX}/lib/nspr" \
86 "${COMPILER_RPATH_FLAG}${PREFIX}/lib/nspr" \
87 "-lplds4 -lplc4 -lnspr4 -pthread" \
90 INSTALLATION_DIRS+= lib/pkgconfig
93 ${INSTALL_DATA} ${WRKDIR}/nspr.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
95 .include "../../mk/pthread.buildlink3.mk"
96 .include "../../mk/bsd.pkg.mk"