1 # Ports collection Makefile for: nspr
2 # Date created: 18 December 2001
3 # Whom: Maxim Sobolev <sobomax@FreeBSD.org>
5 # $FreeBSD: ports/devel/nspr/Makefile,v 1.57 2012/11/27 00:21:27 svnexp Exp $
6 # $MCom: ports-experimental/devel/nspr/Makefile,v 1.6 2008/03/12 13:06:56 ahze Exp $
12 MASTER_SITE_SUBDIR= nspr/releases/v${PORTVERSION}/src
14 MAINTAINER= gecko@FreeBSD.org
15 COMMENT= A platform-neutral API for system level and libc like functions
17 WRKSRC= ${WRKDIR}/${DISTNAME}/mozilla/nsprpub/build
23 CONFIGURE_SCRIPT=../configure
24 CONFIGURE_ARGS= --srcdir=${WRKSRC:H} \
26 CONFIGURE_ENV= BSD_PTHREAD_LIBS=${PTHREAD_LIBS}
28 MAKE_ENV= DIST=${WRKSRC}/dist
30 LIBS= libnspr4.so.1 libplc4.so.1 libplds4.so.1
32 .include <bsd.port.pre.mk>
35 BROKEN= Does not compile on arm
38 .if !defined(WITH_DEBUG)
39 CONFIGURE_ARGS+=--disable-debug
43 @${REINPLACE_CMD} -e 's,-lpthread,${PTHREAD_LIBS},g ; s,echo aout,echo elf,g' ${WRKSRC}/${CONFIGURE_SCRIPT}
46 ${MKDIR} ${PREFIX}/include/nspr
47 ${TAR} -C ${WRKSRC}/dist/include --dereference -cf - . | \
48 ${TAR} -C ${PREFIX}/include -xof -
49 ${FIND} ${PREFIX}/include/nspr -type d | \
50 ${XARGS} ${CHMOD} 0755
51 ${FIND} ${PREFIX}/include/nspr -type f | \
52 ${XARGS} ${CHMOD} ${SHAREMODE}
53 ${TAR} -C ${WRKSRC}/dist/lib --dereference -cf - . | \
54 ${TAR} -C ${PREFIX}/lib -xof -
55 ${INSTALL_SCRIPT} ${WRKSRC}/config/nspr-config ${PREFIX}/bin
56 ${MKDIR} ${PREFIX}/libdata/pkgconfig
57 ${INSTALL_DATA} ${WRKSRC}/config/nspr.pc ${PREFIX}/libdata/pkgconfig
59 .if defined(STRIP) && ${STRIP} != ""
60 ${STRIP_CMD} ${PREFIX}/lib/${lib}
62 ${CHMOD} ${BINMODE} ${PREFIX}/lib/${lib}
63 ${LN} -sf ${lib} ${PREFIX}/lib/${lib:R}
67 ${SETENV} PTHREAD_LIBS="${PTHREAD_LIBS}" ${GMAKE} -C ${WRKSRC}/pr/tests
68 ${LN} -sf libmy.so.1 ${WRKSRC}/pr/tests/dll/libmy.so
69 cd ${WRKSRC}/pr/tests && ../../../pr/tests/runtests.sh
72 ${GMAKE} -C ${WRKSRC}/lib/tests
73 ${WRKSRC}/lib/tests/string
74 ${WRKSRC}/lib/tests/base64t
75 # The test below is commented out, because arena requires
76 # command-line arguments. If you can provide reasonable values
77 # for it, please contact ${MAINTAINER}. Thank you.
78 # ${WRKSRC}/lib/tests/arena
81 test: libtests prtests
83 #regression-test: test
85 #.if defined(PACKAGE_BUILDING)
90 # Please, consider running ``make test'' to find any
91 # possible build problems.
95 .include <bsd.port.post.mk>