-
Notifications
You must be signed in to change notification settings - Fork 731
/
Makefile
56 lines (41 loc) · 1.95 KB
/
Makefile
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
PORTNAME= filament
DISTVERSIONPREFIX= v
DISTVERSION= 1.51.2
CATEGORIES= graphics
MAINTAINER= yuri@FreeBSD.org
COMMENT= Real-time physically based rendering engine
WWW= https://google.github.io/filament/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN_armv7= compilation breaks: unexpected token in operand, see https://github.com/google/filament/issues/6131
BROKEN_i386= compilation breaks: register r11 is only available in 64-bit mode
BROKEN_powerpc= compilation breaks: invalid register name, see https://github.com/google/filament/issues/7552
BROKEN_powerpc64= compilation breaks: invalid register name, see https://github.com/google/filament/issues/7552
BROKEN_powerpc64le= compilation breaks: invalid register name, see https://github.com/google/filament/issues/7552
BUILD_DEPENDS= bash:shells/bash \
evdev-proto>0:devel/evdev-proto
USES= cmake compiler:c++17-lang localbase:ldflags python:build sdl shebangfix xorg
USE_SDL= sdl2
USE_XORG= x11
USE_GITHUB= yes
GH_ACCOUNT= google
SHEBANG_FILES= build/launch-c.in build/launch-cxx.in
#CMAKE_ON= BUILD_SHARED_LIBS # not yet supported, see https://github.com/google/filament/issues/1075
CMAKE_OFF= USE_STATIC_LIBCXX FILAMENT_ENABLE_JAVA
CMAKE_ARGS+= -DDIST_DIR="." # prevent subdirectory for libraries
CMAKE_ARGS+= -DUSE_CCACHE:BOOL=${CCACHE_ENABLED:tu}
CMAKE_ARGS+= -DPython3_EXECUTABLE=${PYTHON_CMD}
LDFLAGS+= -lexecinfo -lSDL2
OPTIONS_DEFINE= SAMPLES
OPTIONS_SUB= yes
SAMPLES_DESC= Build samples
SAMPLES_CMAKE_OFF= -DFILAMENT_SKIP_SAMPLES=ON
# gltf_viewer is broken with the Vulkan backend, see https://github.com/google/filament/issues/6445
post-patch:
@${REINPLACE_CMD} -e 's|"/proc/self/exe"|"/proc/curproc/file"|' ${WRKSRC}/libs/utils/src/linux/Path.cpp
post-install:
# remove unnecessary files
@cd ${STAGEDIR}${PREFIX} && ${RM} -r README.md LICENSE docs
# remove conflicting file, see https://github.com/google/filament/issues/5957
@${RM} ${STAGEDIR}${PREFIX}/lib/libzstd.a
.include <bsd.port.mk>