summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2021-11-25 22:07:40 -0600
committerDudemanguy <random342@airmail.cc>2021-11-26 04:43:43 +0000
commitec97b3f2798dd61e0e851b8049ee4e6a3e46a09d (patch)
treec512038f9608deeab6651cc9f334058b1ca13783
parent51da9d257e1953b011b3cac488f54e5e8d7a5a25 (diff)
downloadmpv-ec97b3f2798dd61e0e851b8049ee4e6a3e46a09d.tar.bz2
mpv-ec97b3f2798dd61e0e851b8049ee4e6a3e46a09d.tar.xz
meson: add a temporary workaround for iconv crap
The initial iconv dependency worked everywhere but was broken on freebsd. This was fixed in 0.60.2 but the fix accidentally broke mingw (ouch; kind of my fault for not double checking). There's another PR to fix this but that won't land until 0.60.3 so for the meantime just if/else this (both freebsd and windows work with the system method) until we want to bump the meson version (probably not for a while since opensuse tumbleweed is weirdly slow).
-rw-r--r--meson.build16
1 files changed, 9 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index c3a7ca89f1..7a57b9eb12 100644
--- a/meson.build
+++ b/meson.build
@@ -639,14 +639,16 @@ if dvdnav.found() and dvdread.found()
sources += files('stream/stream_dvdnav.c')
endif
-iconv = dependency('iconv', required: get_option('iconv'))
+#TODO: remove this crap one day.
+#Freebsd requires 0.60.2 or up to work without specifying the method.
+#Windows breaks on exactly 0.60.2 (will have to wait for 0.60.3).
+if host_machine.system() == 'freebsd' or host_machine.system() == 'windows'
+ iconv_method = 'system'
+else
+ iconv_method = 'auto'
+endif
+iconv = dependency('iconv', method: iconv_method, required: get_option('iconv'))
if iconv.found()
- # It is possible for FreeBSD to also have GNU's libiconv installed.
- # We don't need this since mpv does not use any GNU-specific features.
- # Get iconv via the system method instead in this case.
- if host_machine.system() == 'freebsd'
- iconv = dependency('iconv', method: 'system')
- endif
dependencies += iconv
features += 'iconv'
endif