From ec97b3f2798dd61e0e851b8049ee4e6a3e46a09d Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Thu, 25 Nov 2021 22:07:40 -0600 Subject: 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). --- meson.build | 16 +++++++++------- 1 file 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 -- cgit v1.2.3