mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 00:19:27 +00:00
Ports: Add TiMidity++
Also add it as a dependency for the `SDL_mixer` and `SDL2_mixer` ports. Eawpats GUS patches are installed as part of the port, because without patches TiMidity++ is not able to generate any sound. The license for these is "fameware", credit to Andrew Suffield: https://lists.debian.org/debian-legal/2002/09/msg00137.html
This commit is contained in:
parent
8ab410a536
commit
808e0c9b17
|
@ -238,6 +238,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
|
|||
| [`termcap`](termcap/) | GNU termcap | 1.3.1 | https://www.gnu.org/software/termutils/ |
|
||||
| [`thesilversearcher`](thesilversearcher/) | The Silver Searcher: A fast code-searching tool | 2.2.0 | https://github.com/ggreer/the_silver_searcher |
|
||||
| [`tig`](tig/) | Tig: text-mode interface for Git | 2.5.5 | https://jonas.github.io/tig/ |
|
||||
| [`timidity`](timidity/) | TiMidity++ | 2.15.0 | http://timidity.sourceforge.net |
|
||||
| [`tinycc`](tinycc/) | Tiny C Compiler (TinyCC) | dev | https://github.com/TinyCC/tinycc |
|
||||
| [`tinyscheme`](tinyscheme/) | TinyScheme Interpreter | 1.42 | https://sourceforge.net/projects/tinyscheme/ |
|
||||
| [`tr`](tr/) | tr (OpenBSD) | 6.7 | https://github.com/ibara/libpuffy |
|
||||
|
|
|
@ -4,7 +4,7 @@ version='2.6.2'
|
|||
useconfigure='true'
|
||||
files="https://github.com/libsdl-org/SDL_mixer/releases/download/release-${version}/SDL2_mixer-${version}.tar.gz SDL2_mixer-${version}.tar.gz 8cdea810366decba3c33d32b8071bccd1c309b2499a54946d92b48e6922aa371"
|
||||
auth_type='sha256'
|
||||
depends=("libmodplug" "libmpg123" "libvorbis" "SDL2")
|
||||
depends=("libmodplug" "libmpg123" "libvorbis" "SDL2" "timidity")
|
||||
|
||||
configure() {
|
||||
export LIBS="-L${SERENITY_INSTALL_ROOT}/usr/local/lib"
|
||||
|
|
|
@ -7,7 +7,7 @@ use_fresh_config_sub=true
|
|||
config_sub_paths=("build-scripts/config.sub")
|
||||
files="https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-${version}.tar.gz SDL_mixer-${version}.tar.gz 1644308279a975799049e4826af2cfc787cad2abb11aa14562e402521f86992a"
|
||||
auth_type=sha256
|
||||
depends=("libmikmod" "libvorbis" "sdl12-compat")
|
||||
depends=("libmikmod" "libvorbis" "sdl12-compat" "timidity")
|
||||
|
||||
# Explicitly point to the config binaries installed by our ports. Otherwise, it will
|
||||
# only work if by chance your host machine has those binaries in $PATH.
|
||||
|
|
30
Ports/timidity/package.sh
Executable file
30
Ports/timidity/package.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port='timidity'
|
||||
useconfigure='true'
|
||||
version='2.15.0'
|
||||
files="https://netcologne.dl.sourceforge.net/project/timidity/TiMidity%2B%2B/TiMidity%2B%2B-${version}/TiMidity%2B%2B-${version}.tar.xz timidity-${version}.tar.xz 9eaf4fadb0e19eb8e35cd4ac16142d604c589e43d0e8798237333697e6381d39
|
||||
https://www.quaddicted.com/files/idgames/sounds/eawpats.zip eawpats.zip.no_extract 19087fa4a40e25ec39a09cffcc9f775fc22d88bc971a7a9831e075cdae2ee1e3"
|
||||
auth_type='sha256'
|
||||
workdir="TiMidity++-${version}"
|
||||
use_fresh_config_sub='true'
|
||||
config_sub_paths=('autoconf/config.sub')
|
||||
depends=()
|
||||
configopts=(
|
||||
'lib_cv___va_copy=no'
|
||||
'lib_cv_va_copy=no'
|
||||
'lib_cv_va_val_copy=no'
|
||||
)
|
||||
|
||||
post_install() {
|
||||
# Unpack Eawpats
|
||||
eaw_pats_dir='/usr/local/share/eawpats'
|
||||
eaw_pats_host_dir="${SERENITY_INSTALL_ROOT}${eaw_pats_dir}"
|
||||
mkdir -p "${eaw_pats_host_dir}"
|
||||
run unzip -qo -d "${eaw_pats_host_dir}" '../eawpats.zip.no_extract'
|
||||
|
||||
# Set up timidity.cfg
|
||||
timidity_cfg_path="${SERENITY_INSTALL_ROOT}/etc/timidity.cfg"
|
||||
mkdir -p "$(dirname ${timidity_cfg_path})"
|
||||
cp "${eaw_pats_host_dir}/timidity.cfg" "${timidity_cfg_path}"
|
||||
sed -i "s#^dir .*#dir ${eaw_pats_dir}#g" "${timidity_cfg_path}"
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jelle Raaijmakers <jelle@gmta.nl>
|
||||
Date: Thu, 1 Sep 2022 13:47:34 +0200
|
||||
Subject: [PATCH] Calculate Newton coefficients on the fly
|
||||
|
||||
Since we are cross-compiling, we do not get a binary we can run on the
|
||||
host that is able to generate `newton_table.c`, so fall back to the old
|
||||
way of generating the table.
|
||||
---
|
||||
timidity/Makefile.in | 2 --
|
||||
timidity/resample.c | 5 +----
|
||||
2 files changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/timidity/Makefile.in b/timidity/Makefile.in
|
||||
index e4ee43c..a93105e 100644
|
||||
--- a/timidity/Makefile.in
|
||||
+++ b/timidity/Makefile.in
|
||||
@@ -1956,8 +1956,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||
version.$(OBJEXT): version.c ../configure
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(CFLAGS) -c $(srcdir)/version.c
|
||||
|
||||
-resample.c: newton_table.c
|
||||
-
|
||||
@VCPP_TRUE@newton_table.c: calcnewt$(EXEEXT)
|
||||
@VCPP_TRUE@ ./calcnewt $@
|
||||
|
||||
diff --git a/timidity/resample.c b/timidity/resample.c
|
||||
index cd6b8e6..a878526 100644
|
||||
--- a/timidity/resample.c
|
||||
+++ b/timidity/resample.c
|
||||
@@ -46,7 +46,6 @@
|
||||
|
||||
/* for start/end of samples */
|
||||
static float newt_coeffs[58][58] = {
|
||||
-#include "newton_table.c"
|
||||
};
|
||||
|
||||
int sample_bounds_min, sample_bounds_max; /* min/max bounds for sample data */
|
||||
@@ -468,7 +467,6 @@ void free_gauss_table(void)
|
||||
gauss_table[0] = NULL;
|
||||
}
|
||||
|
||||
-#if 0 /* NOT USED */
|
||||
/* the was calculated statically in newton_table.c */
|
||||
static void initialize_newton_coeffs(void)
|
||||
{
|
||||
@@ -499,12 +497,11 @@ static void initialize_newton_coeffs(void)
|
||||
for (j = 0, sign = pow(-1, i); j <= i; j++, sign *= -1)
|
||||
newt_coeffs[i][j] *= sign;
|
||||
}
|
||||
-#endif /* NOT USED */
|
||||
|
||||
/* initialize the coefficients of the current resampling algorithm */
|
||||
void initialize_resampler_coeffs(void)
|
||||
{
|
||||
- /* initialize_newton_coeffs(); */
|
||||
+ initialize_newton_coeffs();
|
||||
initialize_gauss_table(gauss_n);
|
||||
/* we don't have to initialize newton table any more */
|
||||
|
10
Ports/timidity/patches/ReadMe.md
Normal file
10
Ports/timidity/patches/ReadMe.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Patches for timidity on SerenityOS
|
||||
|
||||
## `0001-Calculate-Newton-coefficients-on-the-fly.patch`
|
||||
|
||||
Calculate Newton coefficients on the fly
|
||||
|
||||
Since we are cross-compiling, we do not get a binary we can run on the
|
||||
host that is able to generate `newton_table.c`, so fall back to the old
|
||||
way of generating the table.
|
||||
|
Loading…
Reference in a new issue