mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 03:51:33 +00:00
build script: add samplerate target
This commit is contained in:
parent
aa2344dff2
commit
2e64033100
3 changed files with 26 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -42,6 +42,7 @@
|
|||
/deps/pcre/lib/libpcreposix.a
|
||||
/deps/png/bin/png-fix-itxt
|
||||
/deps/png/bin/pngfix
|
||||
/deps/samplerate/bin/
|
||||
/deps/sndfile/bin/
|
||||
/deps/sndfile/include/sndfile.hh
|
||||
/deps/sndfile/lib/cmake/
|
||||
|
|
14
build.py
14
build.py
|
@ -1181,6 +1181,19 @@ class PngTarget(ConfigureMakeStaticDependencyTarget):
|
|||
Target.update_prefix_shell_script(builder.prefix_path + '/bin/libpng16-config')
|
||||
|
||||
|
||||
class SamplerateTarget(ConfigureMakeStaticDependencyTarget):
|
||||
def __init__(self, name='samplerate'):
|
||||
super().__init__(name)
|
||||
|
||||
def prepare_source(self, builder: 'Builder'):
|
||||
builder.download_source(
|
||||
'http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz',
|
||||
'0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1')
|
||||
|
||||
def detect(self, builder: 'Builder') -> bool:
|
||||
return os.path.exists(builder.source_path + 'samplerate.pc.in')
|
||||
|
||||
|
||||
class SndFileTarget(CMakeStaticDependencyTarget):
|
||||
def __init__(self, name='sndfile'):
|
||||
super().__init__(name)
|
||||
|
@ -1549,6 +1562,7 @@ class Builder(object):
|
|||
PcreTarget(),
|
||||
PkgConfigTarget(),
|
||||
PngTarget(),
|
||||
SamplerateTarget(),
|
||||
SndFileTarget(),
|
||||
VorbisTarget(),
|
||||
VpxTarget(),
|
||||
|
|
11
patch/samplerate.patch
Normal file
11
patch/samplerate.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/examples/audio_out.c
|
||||
+++ b/examples/audio_out.c
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
#if (defined (__MACH__) && defined (__APPLE__)) /* MacOSX */
|
||||
|
||||
-#include <Carbon.h>
|
||||
+#include <Carbon/Carbon.h>
|
||||
#include <CoreAudio/AudioHardware.h>
|
||||
|
||||
#define MACOSX_MAGIC MAKE_MAGIC ('M', 'a', 'c', ' ', 'O', 'S', ' ', 'X')
|
Loading…
Reference in a new issue