diff options
author | Jason E. Hale <jhale@FreeBSD.org> | 2023-12-28 20:12:53 +0000 |
---|---|---|
committer | Jason E. Hale <jhale@FreeBSD.org> | 2023-12-28 23:03:32 +0000 |
commit | 447a6897dddebd4ad863c2a11556707a0392cf6b (patch) | |
tree | f7937a817b64b338a8afceda10ed616cd5e84677 | |
parent | 44e6073453c1cb286ef303cd1459383f7d6d3149 (diff) | |
download | ports-447a6897dddebd4ad863c2a11556707a0392cf6b.tar.gz ports-447a6897dddebd4ad863c2a11556707a0392cf6b.zip |
games/fs2open: Fix configure with CMake >= 3.28.0
While here, "unbundle" devel/jansson which is automatically linked
to if installed. Otherwise, a bundled copy is built and statically
linked to.
PR: 275730
Approved by: portmgr (blanket)
-rw-r--r-- | games/fs2open/Makefile | 2 | ||||
-rw-r--r-- | games/fs2open/files/patch-lib_freetype.cmake | 27 |
2 files changed, 29 insertions, 0 deletions
diff --git a/games/fs2open/Makefile b/games/fs2open/Makefile index af2f7428912e..39217bef2638 100644 --- a/games/fs2open/Makefile +++ b/games/fs2open/Makefile @@ -1,6 +1,7 @@ PORTNAME= fs2open DISTVERSIONPREFIX= release_ DISTVERSION= 23_2_1 +PORTREVISION= 1 CATEGORIES= games MAINTAINER= pkubaj@FreeBSD.org @@ -13,6 +14,7 @@ LICENSE_FILE= ${WRKSRC}/Copying.md LICENSE_PERMS= dist-mirror auto-accept LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ + libjansson.so:devel/jansson \ libpng.so:graphics/png \ libfreetype.so:print/freetype2 diff --git a/games/fs2open/files/patch-lib_freetype.cmake b/games/fs2open/files/patch-lib_freetype.cmake new file mode 100644 index 000000000000..f68461c60d94 --- /dev/null +++ b/games/fs2open/files/patch-lib_freetype.cmake @@ -0,0 +1,27 @@ +Fix configure with CMake >= 3.28.0 where the FindFreetype module uses +freetype-config.cmake if found, which already defines the freetype +target. + +--- lib/freetype.cmake.orig 2023-11-03 16:14:29 UTC ++++ lib/freetype.cmake +@@ -1,7 +1,7 @@ + +-add_library(freetype INTERFACE) +- + if(PLATFORM_WINDOWS OR PLATFORM_MAC) ++ add_library(freetype INTERFACE) ++ + # We use prebuilt binaries for windows and mac + get_prebuilt_path(PREBUILT_PATH) + set(FREETYPE_ROOT_DIR "${PREBUILT_PATH}/freetype") +@@ -21,6 +21,10 @@ else() + + else() + find_package(Freetype REQUIRED) ++ ++ if(NOT TARGET freetype) ++ add_library(freetype INTERFACE) ++ endif() + + target_include_directories(freetype INTERFACE ${FREETYPE_INCLUDE_DIRS}) + target_link_libraries(freetype INTERFACE ${FREETYPE_LIBRARIES}) |