Skip to content

Commit 8887f3e

Browse files
xclaessejpakkane
authored andcommitted
libjpeg-turbo: Uses nasm language
1 parent b6ed1d7 commit 8887f3e

File tree

4 files changed

+13
-49
lines changed

4 files changed

+13
-49
lines changed

ci_config.json

+3
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,9 @@
371371
"brew_packages": [
372372
"nasm"
373373
],
374+
"choco_packages": [
375+
"nasm"
376+
],
374377
"debian_packages": [
375378
"nasm"
376379
]

releases.json

+1
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,7 @@
13241324
"libturbojpeg"
13251325
],
13261326
"versions": [
1327+
"3.0.0-4",
13271328
"3.0.0-3",
13281329
"3.0.0-2",
13291330
"3.0.0-1",

subprojects/packagefiles/libjpeg-turbo/meson.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project('libjpeg-turbo', 'c',
22
version : '3.0.0',
33
license : 'bsd-like',
4-
meson_version : '>= 0.59.0')
4+
meson_version : '>= 0.64.0')
55

66
pkg = import('pkgconfig')
77
python = find_program('python3')

subprojects/packagefiles/libjpeg-turbo/simd/meson.build

+8-48
Original file line numberDiff line numberDiff line change
@@ -36,56 +36,16 @@ simd_src_i386 = [
3636
have_simd = false
3737
simd = []
3838

39-
simd_opt = get_option('simd')
40-
if simd_opt.disabled()
41-
subdir_done()
42-
endif
43-
4439
if host_cpu in ['x86', 'x86_64']
45-
nasm = find_program('nasm', required: simd_opt)
46-
if not nasm.found()
47-
subdir_done()
48-
endif
49-
50-
x64 = host_cpu == 'x86_64'
51-
dir = x64 ? 'x86_64' : 'i386'
52-
53-
args = ['-I@CURRENT_SOURCE_DIR@' / 'nasm', '-I@CURRENT_SOURCE_DIR@' / dir]
54-
55-
suf = x64 ? '64' : '32'
56-
if host_system == 'windows'
57-
args += ['-DWIN' + suf, '-f', 'win' + suf]
58-
elif host_system == 'darwin'
59-
args += ['-DMACHO', '-f', 'macho' + suf]
60-
else
61-
args += ['-DELF', '-f', 'elf' + suf]
62-
endif
63-
64-
if get_option('debug')
65-
args += '-g'
40+
have_simd = add_languages('nasm', required: get_option('simd'), native: false)
41+
if have_simd
42+
add_project_arguments('-DPIC', language: 'nasm')
43+
x64 = host_cpu == 'x86_64'
44+
dir = x64 ? 'x86_64' : 'i386'
45+
simd_src = x64 ? simd_src_x86_64 : simd_src_i386
46+
simd = static_library('simd', dir / 'jsimd.c',
47+
simd_src, include_directories: [incdir, 'nasm', dir])
6648
endif
67-
68-
if x64
69-
args += '-D__x86_64__'
70-
endif
71-
72-
if host_system != 'windows'
73-
args += '-DPIC'
74-
endif
75-
76-
args += ['-MD', '-MQ', '@OUTPUT@', '-MF', '@DEPFILE@', '-o', '@OUTPUT@', '@INPUT@']
77-
78-
gen = generator(nasm,
79-
arguments: args,
80-
depfile: '@[email protected]',
81-
output: '@[email protected]',
82-
)
83-
84-
simd_src = gen.process(x64 ? simd_src_x86_64 : simd_src_i386)
85-
86-
have_simd = true
87-
simd = static_library('simd', dir / 'jsimd.c',
88-
simd_src, include_directories: incdir)
8949
elif simd_opt.enabled()
9050
error('SIMD enabled, but CPU family not supported')
9151
endif

0 commit comments

Comments
 (0)