aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Engberg <diizzy@FreeBSD.org>2023-04-27 10:07:40 +0000
committerDaniel Engberg <diizzy@FreeBSD.org>2023-04-27 12:01:43 +0000
commit4ea6ffb836ed71110fff16f6569e6957fcdeaa91 (patch)
treeeed415a7eb7094c5edf8cc5450d396ebfde87c13
parentf1a196b59cb5d07606ce3dd7da8d54aaef74b9aa (diff)
downloadports-4ea6ffb836ed71110fff16f6569e6957fcdeaa91.tar.gz
ports-4ea6ffb836ed71110fff16f6569e6957fcdeaa91.zip
games/hedgewars: Move to FFmpeg 4
Fails to build with FFmpeg 6 PR: 270248 Approved by: portmgr (blanket, build fix) Sponsored by: Blinkinblox
-rw-r--r--games/hedgewars/Makefile4
-rw-r--r--games/hedgewars/files/patch-cmake__modules_FindLIBAV.cmake11
2 files changed, 14 insertions, 1 deletions
diff --git a/games/hedgewars/Makefile b/games/hedgewars/Makefile
index 5a7087cd2265..3b2f1b95dfd9 100644
--- a/games/hedgewars/Makefile
+++ b/games/hedgewars/Makefile
@@ -41,7 +41,7 @@ OPTIONS_EXCLUDE_i386= VIDEOREC # some pascal issues preventing to use it
VIDEOREC_DESC= Enable video recording (requires ffmpeg)
-VIDEOREC_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg
+VIDEOREC_LIB_DEPENDS= libavcodec.so.58:multimedia/ffmpeg4
VIDEOREC_PLIST_FILES= lib/libavwrapper.so \
lib/libavwrapper.so.1.0
VIDEOREC_CMAKE_OFF= -DNOVIDEOREC=1
@@ -60,6 +60,8 @@ post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/cmake_modules/*.cmake
@${REINPLACE_CMD} -e "s|'liblua'|'liblua-${LUA_VER}'|" ${WRKSRC}/hedgewars/LuaPas.pas
@${REINPLACE_CMD} -e "/linklib/ s|lua|&-${LUA_VER}|" ${WRKSRC}/hedgewars/LuaPas.pas
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${PATCH_WRKSRC}/cmake_modules/FindLIBAV.cmake
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
diff --git a/games/hedgewars/files/patch-cmake__modules_FindLIBAV.cmake b/games/hedgewars/files/patch-cmake__modules_FindLIBAV.cmake
new file mode 100644
index 000000000000..19b2fd55e4dd
--- /dev/null
+++ b/games/hedgewars/files/patch-cmake__modules_FindLIBAV.cmake
@@ -0,0 +1,11 @@
+--- cmake_modules/FindLIBAV.cmake.orig 2023-04-25 07:46:45 UTC
++++ cmake_modules/FindLIBAV.cmake
+@@ -19,6 +19,8 @@
+ # BSD license.
+ #
+
++set(CMAKE_PREFIX_PATH "%%LOCALBASE%%/ffmpeg4;%%LOCALBASE%%/ffmpeg4/libexec")
++
+ include(FindPackageHandleStandardArgs)
+
+