Lines 2-9
Link Here
|
2 |
# $FreeBSD: head/devel/jsoncpp/Makefile 462353 2018-02-19 22:25:14Z yuri $ |
2 |
# $FreeBSD: head/devel/jsoncpp/Makefile 462353 2018-02-19 22:25:14Z yuri $ |
3 |
|
3 |
|
4 |
PORTNAME= jsoncpp |
4 |
PORTNAME= jsoncpp |
5 |
PORTVERSION= 1.8.1 |
5 |
PORTVERSION= 1.8.4 |
6 |
PORTREVISION= 3 |
|
|
7 |
CATEGORIES= devel |
6 |
CATEGORIES= devel |
8 |
|
7 |
|
9 |
MAINTAINER= yuri@FreeBSD.org |
8 |
MAINTAINER= yuri@FreeBSD.org |
Lines 12-59
Link Here
|
12 |
LICENSE= MIT |
11 |
LICENSE= MIT |
13 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
12 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
14 |
|
13 |
|
15 |
USE_GITHUB= yes |
14 |
USES= compiler:c++11-lang dos2unix meson ninja |
16 |
GH_ACCOUNT= open-source-parsers |
|
|
17 |
|
18 |
USES= compiler:c++11-lang dos2unix scons |
19 |
USE_LDCONFIG= yes |
15 |
USE_LDCONFIG= yes |
20 |
|
16 |
|
21 |
PLATFORM= linux-gcc-FreeBSD |
17 |
USE_GITHUB= yes |
22 |
MAKE_ARGS= platform=${PLATFORM} |
18 |
GH_ACCOUNT= open-source-parsers |
23 |
|
|
|
24 |
.include <bsd.port.pre.mk> |
25 |
|
26 |
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 33 || \ |
27 |
${COMPILER_TYPE} == gcc && ${COMPILER_VERSION} >= 48 |
28 |
# Certain new compiler features unlock parts of jsoncpp API (ex. see JSON_HAS_RVALUE_REFERENCES). |
29 |
# Use c++11 above to be the most inclusive. |
30 |
USES+= compiler:c++11-lang |
31 |
# lang/gcc5 fix |
32 |
.if ${COMPILER_TYPE} == clang |
33 |
CXXFLAGS+= --std=c++11 |
34 |
.else |
35 |
CXXFLAGS+= --std=gnu++11 -D_GLIBCXX_USE_C99=1 |
36 |
.endif |
37 |
.endif |
38 |
|
39 |
do-install: |
40 |
@${MKDIR} ${STAGEDIR}${PREFIX}/include/jsoncpp |
41 |
(cd ${WRKSRC}/include/ && ${COPYTREE_SHARE} json/ ${STAGEDIR}${PREFIX}/include/jsoncpp/) |
42 |
${INSTALL_DATA} ${WRKSRC}/libs/${PLATFORM}/libjsoncpp.a \ |
43 |
${STAGEDIR}${PREFIX}/lib |
44 |
${INSTALL_LIB} ${WRKSRC}/libs/${PLATFORM}/libjsoncpp.so.${DISTVERSION} \ |
45 |
${STAGEDIR}${PREFIX}/lib |
46 |
${LN} -s libjsoncpp.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/libjsoncpp.so.1 |
47 |
${LN} -s libjsoncpp.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/libjsoncpp.so |
48 |
${CP} ${WRKSRC}/pkg-config/jsoncpp.pc.in ${STAGEDIR}${PREFIX}/libdata/pkgconfig/jsoncpp.pc |
49 |
@${REINPLACE_CMD} -i '' \ |
50 |
-e 's|@CMAKE_INSTALL_FULL_LIBDIR@|${PREFIX}/lib|g' \ |
51 |
-e 's|@CMAKE_INSTALL_FULL_INCLUDEDIR@|${PREFIX}/include/jsoncpp|g' \ |
52 |
-e 's|@JSONCPP_VERSION@|${DISTVERSION}|g' \ |
53 |
${STAGEDIR}${PREFIX}/libdata/pkgconfig/jsoncpp.pc |
54 |
|
55 |
do-test: |
56 |
@${ECHO} "Please note that 3 testcases are known to fail: https://github.com/open-source-parsers/jsoncpp/issues/628" |
57 |
@cd ${WRKSRC} && CXX=${CXX} ${SCONS} platform=${PLATFORM} check |
58 |
|
19 |
|
59 |
.include <bsd.port.post.mk> |
20 |
.include <bsd.port.mk> |