blob: 7f997f41d8c14e460ec097688be44eeb4fcb5dcb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
PORTNAME= cbang
PORTVERSION= 1.8.0
PORTREVISION= 2
CATEGORIES= devel
MAINTAINER= thierry@FreeBSD.org
COMMENT= C! (cbang) is a library of cross-platform C++ utilities
WWW= https://cbang.org/
LICENSE= LGPL21
BUILD_DEPENDS= boost-libs>0:devel/boost-libs
LIB_DEPENDS= libv8.so:lang/v8 \
libre2.so:devel/re2 \
liblz4.so:archivers/liblz4 \
libevent.so:devel/libevent \
libexpat.so:textproc/expat2 \
libyaml.so:textproc/libyaml \
libsnappy.so:archivers/snappy \
libsysinfo.so:devel/libsysinfo \
libleveldb.so:databases/leveldb
USE_GITHUB= yes
GH_ACCOUNT= CauldronDevelopmentLLC
USES= compiler:c++17-lang localbase mysql:client python:test scons \
sqlite ssl
USE_CXXSTD= gnu++17
USE_LDCONFIG= yes
OPTIONS_DEFINE= DEBUG DOCS
DEBUG_BUILD_DEPENDS= gnulibiberty>0:devel/gnulibiberty
DEBUG_LIB_DEPENDS= libbfd.so:devel/libbfd
MAKE_ARGS+= cc="${CC}" \
cxx="${CXX}" \
ccflags="${CCFLAGS}" \
cxxflags="${CXXFLAGS}" \
cxxstd="c++17" \
libpath="/lib" \
sharedlib=1 \
prefix="${STAGEDIR}${PREFIX}" \
compiler="${CHOSEN_COMPILER_TYPE:C/gcc/gnu/}" \
disable_local="zlib bzip2 lz4 sqlite3 expat libevent re2 libyaml"
# With boost in disable_local, libcbang-boost.a is not built
# disable_local="zlib bzip2 lz4 sqlite3 expat boost libevent re2 libyaml"
MAKE_ENV+= LIBPATH="${LIBPATH}" \
LIBRARY_PATH="${LIBPATH}:${LIBPATH}/mysql"
LIBVER= 1.7.2
PLIST_SUB= VER=${LIBVER}
TEST_WRKSRC= ${WRKSRC}/tests
DO_MAKE_TEST= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS}
pre-configure:
${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
${TEST_WRKSRC}/testHarness
post-install:
cd ${STAGEDIR}${PREFIX}/lib && \
${LN} -sf libcbang0.so.${LIBVER} libcbang0.so && \
${LN} -sf libcbang0.so.${LIBVER} libcbang0.so.1
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libcbang0.so.${LIBVER}
# Needed to build CAMotics
${INSTALL_DATA} ${WRKSRC}/include/cbang/config.h \
${STAGEDIR}${PREFIX}/include/cbang/
${INSTALL_DATA} ${WRKSRC}/lib/libcbang-boost.a \
${STAGEDIR}${PREFIX}/lib
${MKDIR} ${STAGEDIR}${DATADIR}
cd ${WRKSRC} && ${COPYTREE_SHARE} config ${STAGEDIR}${DATADIR}
${RM} ${STAGEDIR}${DATADIR}/config/cbang/__init__.py.orig
do-test:
(cd ${TEST_WRKSRC} && ${DO_MAKE_TEST} && ./testHarness)
.include <bsd.port.mk>
|