diff --git a/releases.json b/releases.json index 51b7df00d..27580e0b7 100644 --- a/releases.json +++ b/releases.json @@ -1541,6 +1541,7 @@ "libturbojpeg" ], "versions": [ + "3.0.3-1", "3.0.2-1", "3.0.1-1", "3.0.0-5", diff --git a/subprojects/libjpeg-turbo.wrap b/subprojects/libjpeg-turbo.wrap index 9d545ba8f..45bbcb2d7 100644 --- a/subprojects/libjpeg-turbo.wrap +++ b/subprojects/libjpeg-turbo.wrap @@ -1,8 +1,8 @@ [wrap-file] -directory = libjpeg-turbo-3.0.2 -source_url = https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.2/libjpeg-turbo-3.0.2.tar.gz -source_filename = libjpeg-turbo-3.0.2.tar.gz -source_hash = c2ce515a78d91b09023773ef2770d6b0df77d674e144de80d63e0389b3a15ca6 +directory = libjpeg-turbo-3.0.3 +source_url = https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.3/libjpeg-turbo-3.0.3.tar.gz +source_filename = libjpeg-turbo-3.0.3.tar.gz +source_hash = 343e789069fc7afbcdfe44dbba7dbbf45afa98a15150e079a38e60e44578865d patch_directory = libjpeg-turbo [provide] diff --git a/subprojects/packagefiles/libjpeg-turbo/meson.build b/subprojects/packagefiles/libjpeg-turbo/meson.build index 2ee2dce09..7331f7b6f 100644 --- a/subprojects/packagefiles/libjpeg-turbo/meson.build +++ b/subprojects/packagefiles/libjpeg-turbo/meson.build @@ -1,5 +1,5 @@ project('libjpeg-turbo', 'c', - version : '3.0.2', + version : '3.0.3', license : 'bsd-like', meson_version : '>= 0.64.0') @@ -13,7 +13,7 @@ host_cpu = host_machine.cpu_family() cdata = configuration_data() cdata.set('CMAKE_PROJECT_NAME', meson.project_name()) cdata.set('VERSION', meson.project_version()) -cdata.set('COPYRIGHT_YEAR', '1991-2023') +cdata.set('COPYRIGHT_YEAR', '1991-2024') jpeg_lib_version = 80 so_major = jpeg_lib_version / 10 @@ -77,13 +77,13 @@ if meson.can_run_host_binaries() code = ''' #include #include - int is_shifting_signed (long arg) { + static int is_shifting_signed (long arg) { long res = arg >> 4; if (res == -0x7F7E80CL) return 1; /* right shift is signed */ /* see if unsigned-shift hack will fix it. */ /* we can't just test exact value since it depends on width of long... */ - res |= (~0L) << (32-4); + res |= 0xFFFFFFFFL << (32-4); if (res == -0x7F7E80CL) return 0; /* right shift is unsigned */ printf(\"Right shift isn't acting as I expect it to.\\\\n\"); diff --git a/subprojects/packagefiles/libjpeg-turbo/simd/meson.build b/subprojects/packagefiles/libjpeg-turbo/simd/meson.build index b12c31aa8..7116fa827 100644 --- a/subprojects/packagefiles/libjpeg-turbo/simd/meson.build +++ b/subprojects/packagefiles/libjpeg-turbo/simd/meson.build @@ -42,6 +42,17 @@ if host_cpu in ['x86', 'x86_64'] if have_simd add_project_arguments('-DPIC', language: 'nasm') x64 = host_cpu == 'x86_64' + # simulate upstream's "is ELF" check by excluding non-ELF OSes + if x64 and host_machine.system() not in ['cygwin', 'darwin', 'windows'] + if cc.compiles(''' + #if (__CET__ & 3) == 0 + #error \"CET not enabled\" + #endif + int main(void) { return 0; } + ''') + add_project_arguments('-D__CET__', language: 'nasm') + endif + endif dir = x64 ? 'x86_64' : 'i386' simd_src = x64 ? simd_src_x86_64 : simd_src_i386 simd = static_library('simd', dir / 'jsimd.c',