From: Carl Hetherington Date: Fri, 5 Jan 2018 13:15:37 +0000 (+0000) Subject: Try to fix build on older Ubuntus etc. X-Git-Tag: v2.11.36~1 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=a34e100c7e8f7bce98cf074ecb0507fe6175df61 Try to fix build on older Ubuntus etc. --- diff --git a/src/lib/internet.cc b/src/lib/internet.cc index 1e8c5d8e9..67f6ed2bc 100644 --- a/src/lib/internet.cc +++ b/src/lib/internet.cc @@ -79,6 +79,12 @@ get_from_zip_url (string url, string file, bool pasv, function (_("Could not open downloaded ZIP file")); @@ -94,6 +100,10 @@ get_from_zip_url (string url, string file, bool pasv, function (_("Could not open downloaded ZIP file")); } +#else + struct zip* zip = zip_open (temp_zip.c_str(), 0, 0); +#endif + struct zip_file* file_in_zip = zip_fopen (zip, file.c_str(), 0); if (!file_in_zip) { return optional (_("Unexpected ZIP file contents")); diff --git a/wscript b/wscript index f10692a16..1bb72b6f5 100644 --- a/wscript +++ b/wscript @@ -269,6 +269,15 @@ def configure(conf): # libzip conf.check_cfg(package='libzip', args='--cflags --libs', uselib_store='ZIP', mandatory=True) + conf.check_cxx(fragment=""" + #include + int main() { zip_source_t* foo; } + """, + mandatory=False, + msg="Checking for zip_source_t", + uselib="ZIP", + define_name='DCPOMATIC_HAVE_ZIP_SOURCE_T' + ) # fontconfig conf.check_cfg(package='fontconfig', args='--cflags --libs', uselib_store='FONTCONFIG', mandatory=True)