mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-23 23:33:45 +02:00
Add Theora as a dependency in libretro builds
This commit is contained in:
parent
a0219e7c79
commit
23bc6625f1
8 changed files with 167 additions and 3 deletions
|
@ -278,6 +278,14 @@ if is_libretro
|
|||
'zlib': 'disabled',
|
||||
}
|
||||
global_dependencies += subproject('freetype', default_options: freetype_options).get_variable('freetype_dep')
|
||||
|
||||
theora_options = {
|
||||
'cflags': global_args,
|
||||
'cppflags': global_args,
|
||||
'default_library': 'static',
|
||||
'b_staticpic': use_pic,
|
||||
}
|
||||
global_dependencies += subproject('theora', default_options: theora_options).get_variable('theoradec')
|
||||
else
|
||||
physfs = dependency('physfs', version: '>=2.1', static: build_static)
|
||||
openal = dependency('openal', static: build_static, method: 'pkg-config')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Prevents FLAC's build system from trying to look for Ogg externally since Meson already handles that.
|
||||
# Prevents FLAC from trying to look for Ogg externally since Meson already handles that.
|
||||
|
||||
--- a/src/libFLAC/include/private/ogg_decoder_aspect.h
|
||||
+++ b/src/libFLAC/include/private/ogg_decoder_aspect.h
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
project('opengl-registry', 'c', meson_version: '>=1.3.0')
|
||||
opengl_registry = declare_dependency(include_directories: 'api', dependencies: [subproject('egl-registry').get_variable('egl_registry')])
|
||||
opengl_registry = declare_dependency(include_directories: 'api', dependencies: subproject('egl-registry').get_variable('egl_registry'))
|
||||
|
|
121
subprojects/packagefiles/theora-deps.patch
Normal file
121
subprojects/packagefiles/theora-deps.patch
Normal file
|
@ -0,0 +1,121 @@
|
|||
# Prevents Theora from trying to look for Ogg externally since Meson already handles that.
|
||||
|
||||
--- a/include/theora/codec.h
|
||||
+++ b/include/theora/codec.h
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
#if !defined(OGG_THEORA_CODEC_HEADER)
|
||||
# define OGG_THEORA_CODEC_HEADER (1)
|
||||
-# include <ogg/ogg.h>
|
||||
+# include "../../../ogg/include/ogg/ogg.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
--- a/include/theora/theora.h
|
||||
+++ b/include/theora/theora.h
|
||||
@@ -24,7 +24,7 @@ extern "C"
|
||||
|
||||
#include <stddef.h> /* for size_t */
|
||||
|
||||
-#include <ogg/ogg.h>
|
||||
+#include "../../../ogg/include/ogg/ogg.h"
|
||||
|
||||
/** \file
|
||||
* The libtheora pre-1.0 legacy C API.
|
||||
--- a/include/theora/theoradec.h
|
||||
+++ b/include/theora/theoradec.h
|
||||
@@ -20,7 +20,7 @@
|
||||
#if !defined(OGG_THEORA_THEORADEC_HEADER)
|
||||
# define OGG_THEORA_THEORADEC_HEADER (1)
|
||||
# include <stddef.h>
|
||||
-# include <ogg/ogg.h>
|
||||
+# include "../../../ogg/include/ogg/ogg.h"
|
||||
# include "codec.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
--- a/include/theora/theoraenc.h
|
||||
+++ b/include/theora/theoraenc.h
|
||||
@@ -20,7 +20,7 @@
|
||||
#if !defined(OGG_THEORA_THEORAENC_HEADER)
|
||||
# define OGG_THEORA_THEORAENC_HEADER (1)
|
||||
# include <stddef.h>
|
||||
-# include <ogg/ogg.h>
|
||||
+# include "../../../ogg/include/ogg/ogg.h"
|
||||
# include "codec.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
--- a/lib/apiwrapper.h
|
||||
+++ b/lib/apiwrapper.h
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#if !defined(_apiwrapper_H)
|
||||
# define _apiwrapper_H (1)
|
||||
-# include <ogg/ogg.h>
|
||||
+# include "../../ogg/include/ogg/ogg.h"
|
||||
# include <theora/theora.h>
|
||||
# include "theora/theoradec.h"
|
||||
# include "theora/theoraenc.h"
|
||||
--- a/lib/decode.c
|
||||
+++ b/lib/decode.c
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include "../../ogg/include/ogg/ogg.h"
|
||||
#include "decint.h"
|
||||
#if defined(OC_DUMP_IMAGES)
|
||||
# include <stdio.h>
|
||||
--- a/lib/dequant.c
|
||||
+++ b/lib/dequant.c
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include "../../ogg/include/ogg/ogg.h"
|
||||
#include "dequant.h"
|
||||
#include "decint.h"
|
||||
|
||||
--- a/lib/huffdec.c
|
||||
+++ b/lib/huffdec.c
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include "../../ogg/include/ogg/ogg.h"
|
||||
#include "huffdec.h"
|
||||
#include "decint.h"
|
||||
|
||||
--- a/lib/huffenc.c
|
||||
+++ b/lib/huffenc.c
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include "../../ogg/include/ogg/ogg.h"
|
||||
#include "huffenc.h"
|
||||
|
||||
|
||||
--- a/lib/mathops.h
|
||||
+++ b/lib/mathops.h
|
||||
@@ -1,6 +1,6 @@
|
||||
#if !defined(_mathops_H)
|
||||
# define _mathops_H (1)
|
||||
-# include <ogg/ogg.h>
|
||||
+# include "../../ogg/include/ogg/ogg.h"
|
||||
|
||||
# if __GNUC_PREREQ(3,4)
|
||||
# include <limits.h>
|
||||
--- a/lib/quant.c
|
||||
+++ b/lib/quant.c
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include "../../ogg/include/ogg/ogg.h"
|
||||
#include "quant.h"
|
||||
#include "decint.h"
|
||||
|
27
subprojects/packagefiles/theora/meson.build
Normal file
27
subprojects/packagefiles/theora/meson.build
Normal file
|
@ -0,0 +1,27 @@
|
|||
project('theora', 'c', meson_version: '>=1.3.0')
|
||||
|
||||
theoradec = declare_dependency(
|
||||
include_directories: 'include',
|
||||
link_with: library(
|
||||
'theoradec',
|
||||
c_args: get_option('cflags'),
|
||||
include_directories: 'include',
|
||||
sources: [
|
||||
'lib/apiwrapper.c',
|
||||
'lib/bitpack.c',
|
||||
'lib/decapiwrapper.c',
|
||||
'lib/decinfo.c',
|
||||
'lib/decode.c',
|
||||
'lib/dequant.c',
|
||||
'lib/fragment.c',
|
||||
'lib/huffdec.c',
|
||||
'lib/idct.c',
|
||||
'lib/info.c',
|
||||
'lib/internal.c',
|
||||
'lib/quant.c',
|
||||
'lib/state.c',
|
||||
],
|
||||
pic: get_option('b_staticpic'),
|
||||
gnu_symbol_visibility: 'hidden',
|
||||
),
|
||||
)
|
2
subprojects/packagefiles/theora/meson_options.txt
Normal file
2
subprojects/packagefiles/theora/meson_options.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
option('cflags', type: 'array', value: [])
|
||||
option('cppflags', type: 'array', value: [])
|
|
@ -1,4 +1,4 @@
|
|||
# Prevents Vorbis's build system from trying to look for Ogg externally since Meson already handles that.
|
||||
# Prevents Vorbis from trying to look for Ogg externally since Meson already handles that.
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
|
|
6
subprojects/theora.wrap
Normal file
6
subprojects/theora.wrap
Normal file
|
@ -0,0 +1,6 @@
|
|||
[wrap-git]
|
||||
url = https://github.com/xiph/theora
|
||||
revision = v1.2.0
|
||||
depth = 1
|
||||
patch_directory = theora
|
||||
diff_files = theora-deps.patch
|
Loading…
Add table
Reference in a new issue