diff --git a/graphics/filament/Makefile b/graphics/filament/Makefile index 4fc6f4584900..242fd880ad33 100644 --- a/graphics/filament/Makefile +++ b/graphics/filament/Makefile @@ -1,46 +1,49 @@ PORTNAME= filament DISTVERSIONPREFIX= v DISTVERSION= 1.26.0 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_i386= compilation breaks: register r11 is only available in 64-bit mode BUILD_DEPENDS= bash:shells/bash \ evdev-proto>0:devel/evdev-proto -USES= cmake compiler:c++17-lang localbase:ldflags sdl xorg +USES= cmake compiler:c++17-lang localbase:ldflags 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} LDFLAGS+= -lexecinfo -lSDL2 OPTIONS_DEFINE= SAMPLES OPTIONS_SUB= yes SAMPLES_DESC= Build samples SAMPLES_CMAKE_OFF= -DFILAMENT_SKIP_SAMPLES=ON 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 diff --git a/graphics/filament/files/patch-CMakeLists.txt b/graphics/filament/files/patch-CMakeLists.txt index fac357ef46bd..c6ad0a518526 100644 --- a/graphics/filament/files/patch-CMakeLists.txt +++ b/graphics/filament/files/patch-CMakeLists.txt @@ -1,10 +1,19 @@ ---- CMakeLists.txt.orig 2022-08-18 20:34:20 UTC +--- CMakeLists.txt.orig 2022-08-31 16:04:08 UTC +++ CMakeLists.txt +@@ -66,7 +66,7 @@ endif() + # Support for ccache + # ================================================================================================== + find_program(CCACHE_PROGRAM ccache) +-if (CCACHE_PROGRAM) ++if (USE_CCACHE AND CCACHE_PROGRAM) + set(C_LAUNCHER "${CCACHE_PROGRAM}") + set(CXX_LAUNCHER "${CCACHE_PROGRAM}") + @@ -99,6 +99,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # ================================================================================================== if (UNIX AND NOT APPLE AND NOT ANDROID AND NOT WEBGL) set(LINUX TRUE) + message("setting LINUX=TRUE ... will treat the system as Linux-compatible") endif() if (LINUX)