blob: 3bccce59ed585062a694d8644e5a43ad77e7cd7f (
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
77
78
79
80
81
82
|
PORTNAME= klayout
PORTVERSION= 0.27.9
DISTVERSIONPREFIX= v
CATEGORIES= cad
MAINTAINER= hrs@FreeBSD.org
COMMENT= Qt-based chip mask layout viewing and editing tool
LICENSE= GPLv2
BROKEN_i386= type 'hash<long long>' does not provide a call operator
BROKEN_powerpc= type 'hash<long long>' does not provide a call operator
BROKEN_sparc64= does not compile on sparc64: gcc bug
USES= compiler:c++0x gmake gl python qt:5
USE_GITHUB= yes
GH_ACCOUNT= KLayout
USE_GL= gl
USE_RUBY= yes
USE_QT= core buildtools designer gui multimedia network printsupport \
qmake sql svg testlib uitools widgets xml xmlpatterns
USE_LDCONFIG= yes
CXXFLAGS+= -fdeclspec -fPIC -I${LOCALBASE}/include/qt5 \
${QT5MODULES:S,^,-I${LOCALBASE}/include/qt5/Qt,}
LDFLAGS+= ${LIBS} ${QT5MODULES:S,^,-lQt5,} \
-L${LOCALBASE}/lib/qt5 -lpthread
QT5MODULES= Core Designer Gui Multimedia MultimediaWidgets \
Network PrintSupport Sql Svg Test Widgets Xml XmlPatterns
MAKE_ENV= INSTALLROOT=${STAGEDIR} \
PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR}
BUILD_WRKSRC= ${WRKSRC}/build-release
INSTALL_WRKSRC= ${WRKSRC}/build-release
TEST_WRKSRC= ${WRKSRC}/build-release
do-configure:
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} ${SH} build.sh \
-with-qtbinding \
-qt5 \
-rpath "${PREFIX}/lib/klayout" \
-prefix "${PREFIX}" \
-python ${PYTHON_CMD} \
-ruby ${RUBY} \
-dry-run
post-configure:
${ECHO_CMD} "#define PLUGINS_BASEDIR \"${PREFIX}/lib/klayout\"" \
> ${WRKSRC}/src/lay/lay/laySystemPathsDefaults.h
pre-install:
for D in lib db tl rdb pya; do \
${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/klayout/$${D}; \
done
for D in db_plugins lay_plugins; do \
${MKDIR} ${STAGEDIR}${PREFIX}/lib/klayout/$${D}; \
done
post-install:
cd ${INSTALL_WRKSRC} && \
${STRIP_CMD} `${FIND} libklayout*so* -type f` && \
${MV} libklayout*so* ${STAGEDIR}${PREFIX}/lib/klayout
.for D in db_plugins lay_plugins
cd ${INSTALL_WRKSRC}/$D && \
${STRIP_CMD} `${FIND} *so* -type f` && \
${MV} *so* ${STAGEDIR}${PREFIX}/lib/klayout/$D
.endfor
cd ${INSTALL_WRKSRC}/pymod && \
${STRIP_CMD} `${FIND} lib*so* -type f` && \
${MV} lib*so* ${STAGEDIR}${PREFIX}/lib/klayout
cd ${STAGEDIR}${PYTHON_SITELIBDIR}/klayout && \
${STRIP_CMD} `${FIND} *.so -type f`
cd ${INSTALL_WRKSRC} && \
${INSTALL_PROGRAM} klayout strm* ${STAGEDIR}${PREFIX}/bin
do-test:
cd ${TEST_WRKSRC} && \
${SETENV} QT_QPA_PLATFORM=offscreen TESTTMP=testtmp TESTSRC=.. \
LD_LIBRARY_PATH=${STAGEDIR}${PREFIX}/lib/klayout/db_plugins:${STAGEDIR}${PREFIX}/lib/klayout/lay_plugins \
./ut_runner
.include <bsd.port.mk>
|