Line 0
Link Here
|
|
|
1 |
# $FreeBSD$ |
2 |
|
3 |
PORTNAME= xptools |
4 |
DISTVERSION= wed_161r1 |
5 |
CATEGORIES= games |
6 |
|
7 |
MAINTAINER= mike.d.ft402@gmail.com |
8 |
COMMENT= X-Plane Scenery Tools |
9 |
|
10 |
LICENSE= MIT |
11 |
|
12 |
# Platform-specific defines in patch-src_XESCore_Airports.cpp. |
13 |
# Somewhere on FlightGear wiki it is said WED would only work for AMD64 anyway. |
14 |
ONLY_FOR_ARCHS= amd64 |
15 |
|
16 |
LIB_DEPENDS= libboost_system.so:devel/boost-libs \ |
17 |
libcurl.so:ftp/curl \ |
18 |
libexpat.so:textproc/expat2 \ |
19 |
libfreetype.so:print/freetype2 \ |
20 |
libgmp.so:math/gmp \ |
21 |
libjasper.so:graphics/jasper \ |
22 |
libgeotiff.so:graphics/libgeotiff \ |
23 |
libproj.so:graphics/proj \ |
24 |
libmpfr.so:math/mpfr \ |
25 |
libpng.so:graphics/png \ |
26 |
libshp.so:devel/shapelib \ |
27 |
libsquish.so:graphics/squish \ |
28 |
libtiff.so:graphics/tiff \ |
29 |
lib3ds.so:graphics/lib3ds \ |
30 |
libGLw.so:graphics/libGLw \ |
31 |
libGLU.so:graphics/libGLU |
32 |
|
33 |
BUILD_DEPENDS= gnustat:sysutils/coreutils |
34 |
|
35 |
# Bundled cgal and libdime: |
36 |
BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3 \ |
37 |
${LOCALBASE}/lib/libntl.a:math/ntl |
38 |
BUILD_DEPENDS+= cmake:devel/cmake |
39 |
|
40 |
USE_GITHUB= yes |
41 |
GH_ACCOUNT= X-Plane |
42 |
GH_SUBDIR= libs:xptools_libs |
43 |
GH_TAGNAME= 982173e:xptools_libs |
44 |
|
45 |
USES= gmake jpeg sqlite ssl |
46 |
USE_CXXSTD= c++11 |
47 |
USE_BINUTILS= yes |
48 |
USE_QT4= corelib gui moc opengl |
49 |
USE_GL+= gl |
50 |
|
51 |
BINARIES= DDSTool DSFTool MeshTool ObjConverter ObjView RenderFarm RenderFarmUI WED XGrinder XPlaneSupportLin.p |
52 |
|
53 |
OPTIONS_DEFINE= OPTIMIZED_CFLAGS DEBUG |
54 |
|
55 |
.include <bsd.port.options.mk> |
56 |
|
57 |
.if ${PORT_OPTIONS:MDEBUG} |
58 |
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} |
59 |
IGNORE= the Makefile has no flags for both debug and optimization |
60 |
.else |
61 |
ALL_TARGET= debug |
62 |
.endif |
63 |
.else |
64 |
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} |
65 |
ALL_TARGET= release-opt |
66 |
.else |
67 |
ALL_TARGET= release |
68 |
.endif |
69 |
.endif |
70 |
|
71 |
post-patch: |
72 |
@${REINPLACE_CMD} \ |
73 |
-e's:g++:${CXX}:g' \ |
74 |
-e's|gcc|${CC}|g' \ |
75 |
${WRKSRC}/makerules/global/toplevel.mk \ |
76 |
${WRKSRC}/src/OneOffs/Makefile |
77 |
@${REINPLACE_CMD} \ |
78 |
-e's:-Wl,--exclude-libs,libpng.a::g' \ |
79 |
-e's:\./libs/local$$(MULTI_SUFFIX)/lib/libCGAL.a:XYZZY&:g' \ |
80 |
-e's: \./libs/local$$(MULTI_SUFFIX)/lib/libCGAL_Core.a::g' \ |
81 |
-e's:\./libs/local$$(MULTI_SUFFIX)/lib/libdime.a:XYZZY&:g' \ |
82 |
-e's: .*libz.a: /usr/lib/libz.a /usr/lib/libbz2.a /usr/lib/liblzma.a:g' \ |
83 |
-e's: \./libs/local$$(MULTI_SUFFIX)/lib: ${PREFIX}/lib:g' \ |
84 |
-e's: ${PREFIX}/lib/libtiff.a:& ${PREFIX}/lib/libjbig.a:g' \ |
85 |
-e's:XYZZY::g' \ |
86 |
-e's: -ldl: -lexecinfo -lelf:g' \ |
87 |
${WRKSRC}/makerules/ac3d \ |
88 |
${WRKSRC}/makerules/DDSTool \ |
89 |
${WRKSRC}/makerules/DSFTool \ |
90 |
${WRKSRC}/makerules/ObjConverter \ |
91 |
${WRKSRC}/makerules/ObjView \ |
92 |
${WRKSRC}/makerules/RenderFarm \ |
93 |
${WRKSRC}/makerules/WED \ |
94 |
${WRKSRC}/makerules/XGrinder |
95 |
|
96 |
pre-build: |
97 |
cd ${WRKSRC}/libs && ${GMAKE} |
98 |
|
99 |
do-install: |
100 |
.for f in ${BINARIES} |
101 |
${INSTALL_PROGRAM} ${WRKSRC}/build/*/*/${f} ${STAGEDIR}${PREFIX}/bin |
102 |
.endfor |
103 |
|
104 |
.include <bsd.port.mk> |