new package: tizonia
This commit is contained in:
parent
124931d400
commit
e6b22271eb
65
packages/tizonia/build.sh
Normal file
65
packages/tizonia/build.sh
Normal file
@ -0,0 +1,65 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/tizonia/
|
||||
TERMUX_PKG_DESCRIPTION="A command-line streaming music client/server for Linux"
|
||||
TERMUX_PKG_LICENSE="LGPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.22.0
|
||||
TERMUX_PKG_SRCURL=https://github.com/tizonia/tizonia-openmax-il/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=0750cae23ed600fb4b4699a392f43a5e03dcd0870383d64da4b8c28ea94a82f8
|
||||
TERMUX_PKG_DEPENDS="boost, dbus, libandroid-wordexp, libcurl, libflac, liblog4c, libmad, libmediainfo, libmp3lame, liboggz, libopus, libsndfile, libsqlite, libuuid, libvpx, mpg123, opusfile, pulseaudio, python, taglib"
|
||||
TERMUX_PKG_BUILD_DEPENDS="libev"
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
termux_step_host_build() {
|
||||
_PREFIX_FOR_BUILD=$TERMUX_PKG_HOSTBUILD_DIR/prefix
|
||||
mkdir -p $_PREFIX_FOR_BUILD
|
||||
local srcdir="$TERMUX_PKG_SRCDIR"/3rdparty/dbus-cplusplus
|
||||
autoreconf -fi "$srcdir"
|
||||
"$srcdir"/configure --prefix=$_PREFIX_FOR_BUILD
|
||||
make -j $TERMUX_MAKE_PROCESSES
|
||||
make install
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
install -Dm700 $TERMUX_PKG_BUILDER_DIR/exe_wrapper $_PREFIX_FOR_BUILD/bin/
|
||||
PATH=$_PREFIX_FOR_BUILD/bin:$PATH
|
||||
|
||||
export BOOST_ROOT=$TERMUX_PREFIX
|
||||
LDFLAGS+=" -landroid-wordexp"
|
||||
|
||||
_NEED_DUMMY_LIBPTHREAD_A=
|
||||
_LIBPTHREAD_A=$TERMUX_PREFIX/lib/libpthread.a
|
||||
if [ ! -e $_LIBPTHREAD_A ]; then
|
||||
_NEED_DUMMY_LIBPTHREAD_A=true
|
||||
echo '!<arch>' > $_LIBPTHREAD_A
|
||||
fi
|
||||
_NEED_DUMMY_LIBRT_A=
|
||||
_LIBRT_A=$TERMUX_PREFIX/lib/librt.a
|
||||
if [ ! -e $_LIBRT_A ]; then
|
||||
_NEED_DUMMY_LIBRT_A=true
|
||||
echo '!<arch>' > $_LIBRT_A
|
||||
fi
|
||||
}
|
||||
|
||||
termux_step_configure_meson() {
|
||||
termux_setup_meson
|
||||
sed -i 's/^\(\[binaries\]\)$/\1\nexe_wrapper = '\'exe_wrapper\''/g' \
|
||||
$TERMUX_MESON_CROSSFILE
|
||||
CC=gcc CXX=g++ CFLAGS= CXXFLAGS= CPPFLAGS= LDFLAGS= $TERMUX_MESON \
|
||||
$TERMUX_PKG_SRCDIR \
|
||||
$TERMUX_PKG_BUILDDIR \
|
||||
--cross-file $TERMUX_MESON_CROSSFILE \
|
||||
--prefix $TERMUX_PREFIX \
|
||||
--libdir lib \
|
||||
--buildtype minsize \
|
||||
--strip \
|
||||
$TERMUX_PKG_EXTRA_CONFIGURE_ARGS
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
if [ $_NEED_DUMMY_LIBPTHREAD_A ]; then
|
||||
rm -f $_LIBPTHREAD_A
|
||||
fi
|
||||
if [ $_NEED_DUMMY_LIBRT_A ]; then
|
||||
rm -f $_LIBRT_A
|
||||
fi
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
--- a/cast/libtizcastclient/src/tizcastclient_c.cc
|
||||
+++ b/cast/libtizcastclient/src/tizcastclient_c.cc
|
||||
@@ -31,6 +31,10 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+#define pthread_yield() (0)
|
||||
+#endif
|
||||
+
|
||||
#include "tizcastclient_c.h"
|
||||
#include "tizcastclient.hh"
|
||||
#include "tizplatform.h"
|
@ -0,0 +1,14 @@
|
||||
--- a/clients/chromecast/libtizchromecast/src/tizchromecast.cpp
|
||||
+++ b/clients/chromecast/libtizchromecast/src/tizchromecast.cpp
|
||||
@@ -105,9 +105,9 @@
|
||||
typedef boost::function< void (std::string, float) > handler_fn1;
|
||||
typedef boost::function< void (std::string, int) > handler_fn2;
|
||||
handler_fn1 cast_status_handler (
|
||||
- boost::bind (&tizchromecast::new_cast_status, this, _1, _2));
|
||||
+ boost::bind (&tizchromecast::new_cast_status, this, boost::placeholders::_1, boost::placeholders::_2));
|
||||
handler_fn2 media_status_handler (
|
||||
- boost::bind (&tizchromecast::new_media_status, this, _1, _2));
|
||||
+ boost::bind (&tizchromecast::new_media_status, this, boost::placeholders::_1, boost::placeholders::_2));
|
||||
try_catch_wrapper (py_cc_proxy.attr ("activate") (
|
||||
bp::make_function (cast_status_handler),
|
||||
bp::make_function (media_status_handler)));
|
11
packages/tizonia/exe_wrapper
Normal file
11
packages/tizonia/exe_wrapper
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cmd_orig="$1"
|
||||
shift
|
||||
if [ "$(basename "$cmd_orig")" == "tizonia-dbusxx-xml2cpp" ]; then
|
||||
exec tizonia-dbusxx-xml2cpp "$@"
|
||||
elif [ "$(head -c 4 "$cmd_orig")" == "$(echo -ne "\0177ELF")" ]; then
|
||||
exit 0
|
||||
else
|
||||
exec "$cmd_orig" "$@"
|
||||
fi
|
14
packages/tizonia/libtizplatform-src-tizrc.c.patch
Normal file
14
packages/tizonia/libtizplatform-src-tizrc.c.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/libtizplatform/src/tizrc.c
|
||||
+++ b/libtizplatform/src/tizrc.c
|
||||
@@ -605,9 +605,9 @@
|
||||
/* Try /etc/xdg */
|
||||
if (found)
|
||||
{
|
||||
- TIZ_LOG (TIZ_PRIORITY_TRACE, "Trying /etc/xdg");
|
||||
+ TIZ_LOG (TIZ_PRIORITY_TRACE, "Trying @TERMUX_PREFIX@/etc/xdg");
|
||||
snprintf (rcfile, FILE_PATH_MAX,
|
||||
- "/etc/xdg/tizonia/tizonia.conf");
|
||||
+ "@TERMUX_PREFIX@/etc/xdg/tizonia/tizonia.conf");
|
||||
found = try_open_file (rcfile);
|
||||
}
|
||||
|
11
packages/tizonia/meson.build.patch
Normal file
11
packages/tizonia/meson.build.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
rt_dep = cc.find_library('rt', required: true)
|
||||
pthread_dep = dependency('threads', required: true)
|
||||
-uuid_dep = dependency('uuid', required: true, version: '>=2.19.0')
|
||||
+uuid_dep = dependency('uuid', required: true)
|
||||
|
||||
# clients and cast do not actually require all of them, see if this can be optimised further
|
||||
if enable_clients
|
11
packages/tizonia/player-src-tizgraphmgr.cpp.patch
Normal file
11
packages/tizonia/player-src-tizgraphmgr.cpp.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/player/src/tizgraphmgr.cpp
|
||||
+++ b/player/src/tizgraphmgr.cpp
|
||||
@@ -333,7 +333,7 @@
|
||||
boost::bind (&tiz::graphmgr::mgr::pause, this),
|
||||
boost::bind (&tiz::graphmgr::mgr::stop, this),
|
||||
boost::bind (&tiz::graphmgr::mgr::quit, this),
|
||||
- boost::bind (&tiz::graphmgr::mgr::volume, this, _1));
|
||||
+ boost::bind (&tiz::graphmgr::mgr::volume, this, boost::placeholders::_1));
|
||||
|
||||
control::mpris_mediaplayer2_props_t props (
|
||||
graphmgr_caps.can_quit_, graphmgr_caps.can_raise_,
|
13
packages/tizonia/player-src-tizplayapp.cpp.patch
Normal file
13
packages/tizonia/player-src-tizplayapp.cpp.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/player/src/tizplayapp.cpp
|
||||
+++ b/player/src/tizplayapp.cpp
|
||||
@@ -564,8 +564,8 @@
|
||||
if (!bf::exists (home_conf_file))
|
||||
{
|
||||
// Canonical locations of tizonia.conf
|
||||
- const std::string etc_conf_file ("/etc/tizonia/tizonia.conf"); // OLD location
|
||||
- const std::string etc_xdg_conf_file ("/etc/xdg/tizonia/tizonia.conf"); // NEW location
|
||||
+ const std::string etc_conf_file ("@TERMUX_PREFIX@/etc/tizonia/tizonia.conf"); // OLD location
|
||||
+ const std::string etc_xdg_conf_file ("@TERMUX_PREFIX@/etc/xdg/tizonia/tizonia.conf"); // NEW location
|
||||
|
||||
// STEP 1: Create $HOME/.config/tizonia, if it doesn't exist
|
||||
if (!bf::exists (home_conf_dir))
|
11
packages/tizonia/player-src-tizprogramopts.cpp.patch
Normal file
11
packages/tizonia/player-src-tizprogramopts.cpp.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/player/src/tizprogramopts.cpp
|
||||
+++ b/player/src/tizprogramopts.cpp
|
||||
@@ -647,7 +647,7 @@
|
||||
" - Snap package: $HOME/snap/tizonia/current/.config/tizonia/tizonia.conf\n");
|
||||
printf (
|
||||
"\nExample configuration files may also be found at \n"
|
||||
- " - /etc/xdg/tizonia/tizonia.conf or \n"
|
||||
+ " - @TERMUX_PREFIX@/etc/xdg/tizonia/tizonia.conf or \n"
|
||||
" - /snap/tizonia/current/etc/xdg/tizonia/tizonia.conf.\n");
|
||||
|
||||
//
|
10
packages/tizonia/plugins-http_renderer-src-httprsrv.c.patch
Normal file
10
packages/tizonia/plugins-http_renderer-src-httprsrv.c.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/plugins/http_renderer/src/httprsrv.c
|
||||
+++ b/plugins/http_renderer/src/httprsrv.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
+#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
33
packages/tizonia/plugins-meson.build.patch
Normal file
33
packages/tizonia/plugins-meson.build.patch
Normal file
@ -0,0 +1,33 @@
|
||||
--- a/plugins/meson.build
|
||||
+++ b/plugins/meson.build
|
||||
@@ -70,10 +70,6 @@
|
||||
subdir('pcm_renderer_pa')
|
||||
endif
|
||||
|
||||
-if enabled_plugins.contains('vorbis_decoder')
|
||||
- subdir('vorbis_decoder')
|
||||
-endif
|
||||
-
|
||||
if enabled_plugins.contains('vp8_decoder')
|
||||
subdir('vp8_decoder')
|
||||
endif
|
||||
@@ -81,19 +77,3 @@
|
||||
if enabled_plugins.contains('webm_demuxer')
|
||||
subdir('webm_demuxer')
|
||||
endif
|
||||
-
|
||||
-if enabled_plugins.contains('yuv_renderer')
|
||||
- subdir('yuv_renderer')
|
||||
-endif
|
||||
-
|
||||
-if enable_libspotify
|
||||
- subdir('spotify_source')
|
||||
-endif
|
||||
-
|
||||
-if enable_alsa
|
||||
- subdir('pcm_renderer_alsa')
|
||||
-endif
|
||||
-
|
||||
-if enable_aac
|
||||
- subdir('aac_decoder')
|
||||
-endif
|
13
packages/tizonia/rm-libtizrmproxy-src-tizrmproxy_c.cc.patch
Normal file
13
packages/tizonia/rm-libtizrmproxy-src-tizrmproxy_c.cc.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/rm/libtizrmproxy/src/tizrmproxy_c.cc
|
||||
+++ b/rm/libtizrmproxy/src/tizrmproxy_c.cc
|
||||
@@ -31,6 +31,10 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+#define pthread_yield() (0)
|
||||
+#endif
|
||||
+
|
||||
#include "tizrmproxy_c.h"
|
||||
#include "tizrmproxy.hh"
|
||||
#include "tizplatform.h"
|
Loading…
Reference in New Issue
Block a user