summaryrefslogtreecommitdiff
path: root/subprojects/packagefiles
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2024-04-09 11:24:01 -0400
committerAndrew Opalach <andrew@akon.city> 2024-04-09 11:24:01 -0400
commit02f3d3565602146bbbfce85b2719246f24036cb9 (patch)
treec6588ffe297b777e36260effa4fa42b958ca6ba3 /subprojects/packagefiles
parentbbf3314165182e402ff25acccddc004a87f81ef0 (diff)
downloadcamu-02f3d3565602146bbbfce85b2719246f24036cb9.tar.gz
camu-02f3d3565602146bbbfce85b2719246f24036cb9.tar.bz2
camu-02f3d3565602146bbbfce85b2719246f24036cb9.zip
Massive restructure and many changes
- The server-side list concept is still a wip Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'subprojects/packagefiles')
-rw-r--r--subprojects/packagefiles/ffmpeg/meson.build10
-rw-r--r--subprojects/packagefiles/libplacebo/no_dlltool.diff47
-rw-r--r--subprojects/packagefiles/libplacebo/stretch.diff15
3 files changed, 68 insertions, 4 deletions
diff --git a/subprojects/packagefiles/ffmpeg/meson.build b/subprojects/packagefiles/ffmpeg/meson.build
index 6700f5d..f47d35e 100644
--- a/subprojects/packagefiles/ffmpeg/meson.build
+++ b/subprojects/packagefiles/ffmpeg/meson.build
@@ -5,6 +5,7 @@ compiler = meson.get_compiler('c')
cpu = target_machine.cpu_family()
is_64bit = (cpu == 'x86_64' or cpu == 'aarch64')
is_debug = get_option('buildtype').startswith('debug')
+is_minsize = get_option('buildtype') == 'minsize'
is_windows = host_machine.system() == 'windows'
is_msvc = compiler.get_id() == 'msvc' or compiler.get_id() == 'clang-cl'
is_mingw = is_windows and not is_msvc
@@ -12,7 +13,7 @@ is_mingw = is_windows and not is_msvc
extra_options = []
if not is_debug
- extra_options += ['--disable-debug']
+ extra_options += ['--disable-debug', '--enable-small']
endif
extra_options += ['--cc=' + compiler.cmd_array()[0]]
@@ -32,7 +33,8 @@ endif
#'--malloc-prefix=al_',
decoders = 'flac,mp3,mp3float,aac,opus,alac,mjpeg,jpeg2000,h264,hevc,vp9'
-#decoders += ',pcm_f32be,pcm_f32le,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_dvd,apng,mpegvideo,mpeg2video'
+decoders += ',pcm_f32be,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_f32le,pcm_s24be,pcm_s24le,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar'
+#decoders += ',pcm_dvd,mpegvideo,mpeg2video'
#decoders += ',ass,srt'
demuxers = 'flac,mp3,aac,wav,image2,mjpeg,image2pipe,image_jpeg_pipe,matroska,mov'
@@ -44,7 +46,7 @@ parsers = 'mjpeg,jpeg2000'
#extra_options += ['--enable-zlib', '--enable-libsoxr']
extra_options += ['--enable-zlib']
-decoders += ',png'
+decoders += ',png,apng'
demuxers += ',image_png_pipe'
parsers += ',png'
@@ -107,4 +109,4 @@ avformat = proj.dependency('avformat')
avcodec = proj.dependency('avcodec')
swresample = proj.dependency('swresample')
swscale = proj.dependency('swscale')
-av_inc_dep = declare_dependency(include_directories: include_directories('.', 'build/'))
+ffmpeg_inc_dep = declare_dependency(include_directories: include_directories('.', 'build/'))
diff --git a/subprojects/packagefiles/libplacebo/no_dlltool.diff b/subprojects/packagefiles/libplacebo/no_dlltool.diff
new file mode 100644
index 0000000..e5c017c
--- /dev/null
+++ b/subprojects/packagefiles/libplacebo/no_dlltool.diff
@@ -0,0 +1,47 @@
+diff --git a/src/meson.build b/src/meson.build
+index 5958254..ee33055 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -18,24 +18,24 @@ link_args = []
+ link_depends = []
+
+ # Looks like meson in certain configuration returns ' ' instead of empty string
+-mingw32 = cc.get_define('__MINGW32__').strip()
+-if host_machine.system() == 'windows' and mingw32 != '' and host_machine.cpu() in ['aarch64', 'arm', 'x86_64']
+- # MinGW-w64 math functions are significantly slower than the UCRT ones.
+- # In particular powf is over 7 times slower than UCRT counterpart.
+- # MinGW-w64 explicitly excludes some math functions from their ucrtbase def
+- # file and replaces with own versions. To workaround the issue, generate the
+- # import library and link it with UCRT versions of math functions.
+- dlltool = find_program('llvm-dlltool', 'dlltool')
+- ucrt_math = custom_target('ucrt_math.lib',
+- output : ['ucrt_math.lib'],
+- input : 'ucrt_math.def',
+- command : [dlltool, '-d', '@INPUT@', '-l', '@OUTPUT@'])
+- link_args += ucrt_math.full_path()
+- link_depends += ucrt_math
+- # MinGW-w64 inlines functions like powf, rewriting them to pow. We want to use
+- # the powf specialization from UCRT, so disable inlining.
+- add_project_arguments(['-D__CRT__NO_INLINE'], language: ['c', 'cpp'])
+-endif
++#mingw32 = cc.get_define('__MINGW32__').strip()
++#if host_machine.system() == 'windows' and mingw32 != '' and host_machine.cpu() in ['aarch64', 'arm', 'x86_64']
++# # MinGW-w64 math functions are significantly slower than the UCRT ones.
++# # In particular powf is over 7 times slower than UCRT counterpart.
++# # MinGW-w64 explicitly excludes some math functions from their ucrtbase def
++# # file and replaces with own versions. To workaround the issue, generate the
++# # import library and link it with UCRT versions of math functions.
++# dlltool = find_program('llvm-dlltool', 'dlltool')
++# ucrt_math = custom_target('ucrt_math.lib',
++# output : ['ucrt_math.lib'],
++# input : 'ucrt_math.def',
++# command : [dlltool, '-d', '@INPUT@', '-l', '@OUTPUT@'])
++# link_args += ucrt_math.full_path()
++# link_depends += ucrt_math
++# # MinGW-w64 inlines functions like powf, rewriting them to pow. We want to use
++# # the powf specialization from UCRT, so disable inlining.
++# add_project_arguments(['-D__CRT__NO_INLINE'], language: ['c', 'cpp'])
++#endif
+
+ # Work around missing atomics on some (obscure) platforms
+ atomic_test = '''
diff --git a/subprojects/packagefiles/libplacebo/stretch.diff b/subprojects/packagefiles/libplacebo/stretch.diff
new file mode 100644
index 0000000..40544bc
--- /dev/null
+++ b/subprojects/packagefiles/libplacebo/stretch.diff
@@ -0,0 +1,15 @@
+diff --git a/src/renderer.c b/src/renderer.c
+index a052bc5..639fbfd 100644
+--- a/src/renderer.c
++++ b/src/renderer.c
+@@ -1845,8 +1845,8 @@ static bool pass_read_image(struct pass_state *pass)
+ .rect = {
+ off_x,
+ off_y,
+- off_x + pl_rect_w(ref->img.rect),
+- off_y + pl_rect_h(ref->img.rect),
++ off_x + pl_rect_w(ref->img.rect) / stretch_x,
++ off_y + pl_rect_h(ref->img.rect) / stretch_y,
+ },
+ };
+