git: b5aa1e879ce9 - main - games/taisei: remove USE_GCC and clean up dependency handling
Dmitry Marakasov
amdmi3 at FreeBSD.org
Wed May 12 12:01:09 UTC 2021
The branch main has been updated by amdmi3:
URL: https://cgit.FreeBSD.org/ports/commit/?id=b5aa1e879ce9b41787355fa847728d5d40adf17a
commit b5aa1e879ce9b41787355fa847728d5d40adf17a
Author: Dmitry Marakasov <amdmi3 at FreeBSD.org>
AuthorDate: 2021-05-11 12:57:21 +0000
Commit: Dmitry Marakasov <amdmi3 at FreeBSD.org>
CommitDate: 2021-05-12 11:55:21 +0000
games/taisei: remove USE_GCC and clean up dependency handling
---
games/taisei/Makefile | 3 +--
games/taisei/files/patch-meson.build | 40 ++++++++++++++++++++++++-----
games/taisei/files/patch-meson__options.txt | 8 ++++++
3 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/games/taisei/Makefile b/games/taisei/Makefile
index 638186eb4350..a58b24f83885 100644
--- a/games/taisei/Makefile
+++ b/games/taisei/Makefile
@@ -27,9 +27,8 @@ USES= compiler:c11 desktop-file-utils meson pkgconfig \
SHEBANG_FILES= scripts/*.py
MESON_ARGS= -Dversion_fallback=${PORTVERSION} -Db_lto=false
MESON_ARGS+= --wrap-mode=nofallback
-#MESON_ARGS+= -DOPENSSLLIB="${OPENSSLLIB}" -DOPENSSLINC="${OPENSSLINC}"
+MESON_ARGS+= -DOPENSSLLIB="${OPENSSLLIB}" -DOPENSSLINC="${OPENSSLINC}"
USE_SDL= sdl2 ttf2 mixer2
-#USE_GCC= yes
PORTDOCS= *
PORTDATA= *
diff --git a/games/taisei/files/patch-meson.build b/games/taisei/files/patch-meson.build
index 9c3124486d54..0b0cfd60cf7a 100644
--- a/games/taisei/files/patch-meson.build
+++ b/games/taisei/files/patch-meson.build
@@ -1,14 +1,42 @@
+* Make all depends required, thus deterministic.
+
+* Redefine libcrypto dependency - there are no means of detection for
+system OpenSSL on FreeBSD (e.g. no pkgconfig file), so we need to
+point the build right to the library. Additionally, since OpenSSL
+may also come from ports, respect OPENSSLLIB passed from the framework
+to pick the right library. This works with system OpenSSL, _may_
+work with OpenSSL from ports and will probably _not_ work with
+OpenSSL form ports where OPENSSL_DEFAULT is set to base, as it will
+still pick includes from /usr/local.
+
+* Make sure to never detect gamemode which is missing on FreeBSD anyway.
+
--- meson.build.orig 2021-04-30 18:54:50 UTC
+++ meson.build
-@@ -151,8 +151,9 @@ dep_webpdecoder = dependency('libwebpdecoder', version
- dep_zip = dependency('libzip', version : '>=1.2', required : false, static : static, fallback : ['libzip', 'libzip_dep'])
+@@ -142,19 +142,19 @@ endif
+ static = get_option('static') or ['emscripten', 'nx'].contains(host_machine.system())
+
+ dep_freetype = dependency('freetype2', required : true, static : static, fallback : ['freetype', 'freetype_dep'])
+-dep_opusfile = dependency('opusfile', required : false, static : static, fallback : ['opusfile', 'opusfile_dep'])
++dep_opusfile = dependency('opusfile', required : true, static : static, fallback : ['opusfile', 'opusfile_dep'])
+ dep_png = dependency('libpng', version : '>=1.5', required : true, static : static, fallback : ['libpng', 'png_dep'])
+ dep_sdl2 = dependency('sdl2', version : '>=2.0.6', required : true, static : static, fallback : ['sdl2', 'sdl2_dep'])
+-dep_sdl2_mixer = dependency('SDL2_mixer', version : '>=2.0.4', required : false, static : static, fallback : ['sdl2_mixer', 'sdl2_mixer_dep'])
++dep_sdl2_mixer = dependency('SDL2_mixer', version : '>=2.0.4', required : true, static : static, fallback : ['sdl2_mixer', 'sdl2_mixer_dep'])
+ dep_webp = dependency('libwebp', version : '>=0.5', required : true, static : static, fallback : ['libwebp', 'webpdecoder_dep'])
+-dep_webpdecoder = dependency('libwebpdecoder', version : '>=0.5', required : false, static : static)
+-dep_zip = dependency('libzip', version : '>=1.2', required : false, static : static, fallback : ['libzip', 'libzip_dep'])
++dep_webpdecoder = dependency('libwebpdecoder', version : '>=0.5', required : true, static : static)
++dep_zip = dependency('libzip', version : '>=1.2', required : true, static : static, fallback : ['libzip', 'libzip_dep'])
dep_zlib = dependency('zlib', required : true, static : static, fallback : ['zlib', 'zlib_dep'])
dep_cglm = dependency('cglm', version : '>=0.7.8', required : true, static : static, fallback : ['cglm', 'cglm_dep'])
-dep_crypto = dependency('libcrypto', required : false, static : static)
-dep_gamemode = dependency('gamemode', required : false, static : static)
-+dep_crypto = cc.find_library('crypto', required : true) # does not respect OPENSSLLIB/OPENSSLINC
-+#dep_crypto = declare_dependency(link_with:shared_library(get_option('OPENSSLLIB') / 'libcrypto.so'), include_directories:include_directories(get_option('OPENSSLINC'))) # does not work in modern meson
-+dep_gamemode = dependency('', required : false) # no gamemode on freebsd
++dep_crypto = cc.find_library('crypto', dirs : get_option('OPENSSLLIB'), required : true)
++dep_gamemode = dependency('', required : false)
+
+-dep_m = cc.find_library('m', required : false)
++dep_m = cc.find_library('m', required : true)
- dep_m = cc.find_library('m', required : false)
+ dep_glad = subproject('glad').get_variable('glad_dep')
diff --git a/games/taisei/files/patch-meson__options.txt b/games/taisei/files/patch-meson__options.txt
new file mode 100644
index 000000000000..a558ef8a612c
--- /dev/null
+++ b/games/taisei/files/patch-meson__options.txt
@@ -0,0 +1,8 @@
+--- meson_options.txt.orig 2021-04-30 18:54:50 UTC
++++ meson_options.txt
+@@ -197,3 +197,5 @@ option(
+ value : true,
+ description : 'Allow use of some GNU C extensions (if supported by compiler)'
+ )
++
++option('OPENSSLLIB', type : 'string')
More information about the dev-commits-ports-all
mailing list