Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh wrap to support libmt32emu's 2.5.3 release #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/mt32emu/c_interface/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
foreach src_dest : mt32emu_c_header_map
configure_file(input : src_dest[0], output : src_dest[1], copy : true)
endforeach
9 changes: 9 additions & 0 deletions include/mt32emu/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
configure_file(input : mt32emu_config_h_in,
output : 'config.h',
configuration : conf_data)

foreach src_dest : mt32emu_header_map
configure_file(input : src_dest[0], output : src_dest[1], copy : true)
endforeach

subdir('c_interface')
33 changes: 33 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
project('mt32emu', 'cpp',
version : '2.5.3',
license : 'LGPL-2.1-or-later',
default_options : 'b_ndebug=if-release',
meson_version : '>=0.49.0')

mt32emu_versions = meson.project_version().split('.')
mt32emu_exports_type = 3

conf_data = configuration_data()
conf_data.set('libmt32emu_VERSION', meson.project_version())
conf_data.set('libmt32emu_VERSION_MAJOR', mt32emu_versions[0].to_int())
conf_data.set('libmt32emu_VERSION_MINOR', mt32emu_versions[1].to_int())
conf_data.set('libmt32emu_VERSION_PATCH', mt32emu_versions[2].to_int())
conf_data.set('libmt32emu_EXPORTS_TYPE', mt32emu_exports_type)

conf_data.set('libmt32emu_SHARED_DEFINITION', '#undef MT32EMU_SHARED')
conf_data.set('libmt32emu_WITH_VERSION_TAGGING', 0)
conf_data.set('libmt32emu_WITH_VERSION_TAGGING', 0)
conf_data.set('libmt32emu_RUNTIME_VERSION_CHECK', 0)

subdir('mt32emu/src') # all source files
subdir('include/mt32emu') # public interface

mt32emu_lib_includes = include_directories('include/mt32emu')
mt32emu_dep_includes = include_directories('include')

mt32emu_lib = library('mt32emu', mt32emu_sources,
include_directories : mt32emu_lib_includes,
cpp_args : ['-DMT32EMU_WITH_INTERNAL_RESAMPLER'])

mt32emu_dep = declare_dependency(include_directories : mt32emu_dep_includes,
link_with: mt32emu_lib)
64 changes: 64 additions & 0 deletions mt32emu/src/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
mt32emu_config_h_in = files('config.h.in')

common_headers = [
'mt32emu.h',
'globals.h',
'Enumerations.h',
'Types.h',
]
cpp_headers = [
'File.h',
'FileStream.h',
'MidiStreamParser.h',
'ROMInfo.h',
'SampleRateConverter.h',
'Synth.h',
]
c_headers = [
'c_interface.h',
'c_types.h',
'cpp_interface.h',
]

# These two maps exist only, so we can generate a new directory containing
# all the headers later on.
#
mt32emu_header_map = []
foreach header : common_headers + cpp_headers
mt32emu_header_map += [ [ files(header), header ] ]
endforeach
mt32emu_c_header_map = []
foreach header : c_headers
mt32emu_c_header_map += [ [ files('c_interface' / header), header ] ]
endforeach

mt32emu_sources = files(
'Analog.cpp',
'BReverbModel.cpp',
'File.cpp',
'FileStream.cpp',
'LA32FloatWaveGenerator.cpp',
'LA32Ramp.cpp',
'LA32WaveGenerator.cpp',
'MidiStreamParser.cpp',
'Part.cpp',
'Partial.cpp',
'PartialManager.cpp',
'Poly.cpp',
'ROMInfo.cpp',
'SampleRateConverter.cpp',
'Synth.cpp',
'Tables.cpp',
'TVA.cpp',
'TVF.cpp',
'TVP.cpp',
'VersionTagging.cpp',
'sha1/sha1.cpp',
'srchelper/srctools/src/FIRResampler.cpp',
'srchelper/srctools/src/SincResampler.cpp',
'srchelper/srctools/src/IIR2xResampler.cpp',
'srchelper/srctools/src/LinearResampler.cpp',
'srchelper/srctools/src/ResamplerModel.cpp',
'srchelper/InternalResampler.cpp',
'c_interface/c_interface.cpp',
)
9 changes: 9 additions & 0 deletions upstream.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[wrap-file]
directory = munt-libmt32emu_2_5_3

source_url = https://github.com/munt/munt/archive/libmt32emu_2_5_3.tar.gz
source_filename = libmt32emu_2_5_3.tar.gz
source_hash = 062d110bbdd7253d01ef291f57e89efc3ee35fd087587458381f054bac49a8f5

[provide]
mt32emu = mt32emu_dep