1 # Created by: Maxim Sobolev <sobomax@FreeBSD.org>
7 MASTER_SITES= MOZILLA/${PORTNAME}/releases/v${PORTVERSION}/src
9 MAINTAINER= gecko@FreeBSD.org
10 COMMENT= Platform-neutral API for system level and libc like functions
12 WRKSRC= ${WRKDIR}/${DISTNAME}/nspr/build
16 CPE_PRODUCT= netscape_portable_runtime
19 USE_AUTOTOOLS= autoconf
20 CONFIGURE_ARGS= --srcdir=${WRKSRC:H}
21 CONFIGURE_WRKSRC= ${WRKSRC}/..
23 MAKE_ENV= DIST=${WRKSRC}/dist
25 LIBRARIES= libnspr4.so.1 libplc4.so.1 libplds4.so.1
29 DEBUG_CONFIGURE_ENABLE=debug
32 cd ${WRKSRC} && ${CONFIGURE_ENV} \
33 ../${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
36 ${MKDIR} ${STAGEDIR}${PREFIX}/include/nspr
37 ${TAR} -C ${WRKSRC}/dist/include --dereference -cf - . | \
38 ${TAR} -C ${STAGEDIR}${PREFIX}/include -xof -
39 ${FIND} ${STAGEDIR}${PREFIX}/include/nspr -type d | \
40 ${XARGS} ${CHMOD} 0755
41 ${FIND} ${STAGEDIR}${PREFIX}/include/nspr -type f | \
42 ${XARGS} ${CHMOD} ${SHAREMODE}
43 ${TAR} -C ${WRKSRC}/dist/lib --dereference -cf - . | \
44 ${TAR} -C ${STAGEDIR}${PREFIX}/lib -xof -
45 ${INSTALL_SCRIPT} ${WRKSRC}/config/nspr-config ${STAGEDIR}${PREFIX}/bin
46 ${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig
47 ${INSTALL_DATA} ${WRKSRC}/config/nspr.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig
48 .for lib in ${LIBRARIES}
49 .if defined(STRIP) && ${STRIP} != ""
50 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${lib}
52 ${CHMOD} ${LIBMODE} ${STAGEDIR}${PREFIX}/lib/${lib}
53 ${LN} -sf ${lib} ${STAGEDIR}${PREFIX}/lib/${lib:R}
57 ${DO_MAKE_BUILD} -C ${WRKSRC}/pr/tests
58 ${LN} -sf libmy.so.1 ${WRKSRC}/pr/tests/dll/libmy.so
59 cd ${WRKSRC}/pr/tests && ../../../pr/tests/runtests.sh
62 ${DO_MAKE_BUILD} -C ${WRKSRC}/lib/tests
63 ${WRKSRC}/lib/tests/string
64 ${WRKSRC}/lib/tests/base64t
65 # The test below is commented out, because arena requires
66 # command-line arguments. If you can provide reasonable values
67 # for it, please contact ${MAINTAINER}. Thank you.
68 # ${WRKSRC}/lib/tests/arena
71 test: libtests prtests
73 #regression-test: test
75 #.if defined(PACKAGE_BUILDING)
80 # Please, consider running ``make test'' to find any
81 # possible build problems.
85 .include <bsd.port.mk>