libtsduck: Bump to 3.32.2983

This commit is contained in:
Tee KOBAYASHI 2022-11-20 20:40:58 +09:00 committed by xtkoba
parent 27a68375d5
commit 1d9f407a2c
11 changed files with 97 additions and 77 deletions

View File

@ -1,18 +1,5 @@
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -164,9 +164,9 @@
# Enforce English locale by default in all commands for predictible output.
-export LANGUAGE = en_US.UTF-8
-export LC_ALL = en_US.UTF-8
-export LANG = en_US.UTF-8
+export LANGUAGE = C.UTF-8
+export LC_ALL = C.UTF-8
+export LANG = C.UTF-8
# Operating system, architecture, host name.
@@ -212,12 +212,12 @@
$(if $(LINUXBREW),$(if $(HOMEBREW_PREFIX),,$(error LINUXBREW is defined but not HOMEBREW_PREFIX)))
ALTDEVROOT := $(if $(HOMEBREW_PREFIX),$(HOMEBREW_PREFIX),$(if $(wildcard /opt/homebrew/bin),/opt/homebrew,/usr/local))
@ -37,11 +24,11 @@
ifneq ($(USE_LLVM),)
CXXFLAGS_WARNINGS += -Weverything -Wno-c++98-compat-pedantic
ifneq ($(MACOS),)
@@ -468,7 +468,7 @@
@@ -474,7 +474,7 @@
# External libraries
-LDLIBS += -lstdc++ -lpthread $(if $(MACOS),,-lrt) -lm
-LDLIBS += -lstdc++ -lpthread $(if $(MACOS),,-lrt -latomic) -lm
+LDLIBS += -lm
# Global compilation flags.

View File

@ -0,0 +1,24 @@
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -164,9 +164,9 @@
# Enforce English locale by default in all commands for predictible output.
-export LANGUAGE = en_US.UTF-8
-export LC_ALL = en_US.UTF-8
-export LANG = en_US.UTF-8
+export LANGUAGE = C.UTF-8
+export LC_ALL = C.UTF-8
+export LANG = C.UTF-8
# Operating system, architecture, host name.
@@ -264,7 +264,7 @@
else ifneq ($(DEBUG),)
BINDIR = $(ROOTDIR)/bin/debug-$(MAIN_ARCH)$(if $(HOSTNAME),-$(HOSTNAME),)$(BINDIR_SUFFIX)
else
- BINDIR = $(ROOTDIR)/bin/release-$(MAIN_ARCH)$(if $(HOSTNAME),-$(HOSTNAME),)$(BINDIR_SUFFIX)
+ BINDIR = $(ROOTDIR)/bin/release
endif
OBJDIR = $(BINDIR)/objs-$(notdir $(CURDIR))

View File

@ -2,10 +2,10 @@ TERMUX_PKG_HOMEPAGE=https://tsduck.io/
TERMUX_PKG_DESCRIPTION="An extensible toolkit for MPEG transport streams"
TERMUX_PKG_LICENSE="BSD 2-Clause"
TERMUX_PKG_MAINTAINER="@termux"
_VERSION=3.29-2651
_VERSION=3.32-2983
TERMUX_PKG_VERSION=${_VERSION//-/.}
TERMUX_PKG_SRCURL=https://github.com/tsduck/tsduck/archive/refs/tags/v${_VERSION}.tar.gz
TERMUX_PKG_SHA256=cab8f5838993aa1abd1a6a4c2ef7f2afba801da02a4001904f3f5ba5c5fe85a0
TERMUX_PKG_SHA256=2f0c35422a4f3e8876e9efa2683794336102fc225b826d5d3c4e033c4b666465
TERMUX_PKG_DEPENDS="libandroid-glob, libc++, libcurl, libedit"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="
@ -14,6 +14,8 @@ CROSS_TARGET=$TERMUX_ARCH
CROSS=1
NOTEST=1
NODEKTEC=1
NOHIDES=
NOVATEK=1
NOCURL=
NOPCSC=1
NOSRT=1
@ -23,6 +25,7 @@ NOTELETEXT=1
NOGITHUB=1
"
TERMUX_PKG_RM_AFTER_INSTALL="etc/security etc/udev"
TERMUX_PKG_HOSTBUILD=true
termux_step_post_get_source() {
# Needs to call `termux_step_configure_autotools` for `*-config` hack.
@ -30,7 +33,25 @@ termux_step_post_get_source() {
chmod u+x configure
}
termux_step_host_build() {
find $TERMUX_PKG_SRCDIR -mindepth 1 -maxdepth 1 -exec cp -a \{\} ./ \;
make -j $TERMUX_MAKE_PROCESSES \
NOTEST=1 \
NODEKTEC=1 \
NOHIDES=1 \
NOVATEK=1 \
NOCURL=1 \
NOPCSC=1 \
NOSRT=1 \
NORIST=1 \
NOEDITLINE=1 \
NOTELETEXT=1 \
NOGITHUB=1
}
termux_step_pre_configure() {
PATH=$TERMUX_PKG_HOSTBUILD_DIR/bin/release:$PATH
CXXFLAGS+=" -fno-strict-aliasing"
LDFLAGS+=" -landroid-glob"
}

View File

@ -1,22 +1,22 @@
--- a/src/libtsduck/Makefile
+++ b/src/libtsduck/Makefile
@@ -128,7 +128,7 @@
$(SHARED_LIBTSDUCK): $(OBJS)
@@ -141,7 +141,7 @@
@echo ' [DTAPI] $(if $(DTAPI_OBJECT),using $(DTAPI_OBJECT),no DTAPI available)'; \
echo ' [LD] $@'; \
- $(CXX) $(CXXFLAGS) $(SOFLAGS) $^ $(LIBTSDUCK_LDLIBS) $(LDLIBS_EXTRA) $(LDLIBS) -shared -o $@
+ $(CXX) $(CXXFLAGS) $(SOFLAGS) $(LDFLAGS) $^ $(LIBTSDUCK_LDLIBS) $(LDLIBS_EXTRA) $(LDLIBS) -shared -o $@
cd $(OBJDIR); \
- $(CXX) $(CXXFLAGS) $(SOFLAGS) $(notdir $(OBJS)) $(DTAPI_OBJECT) $(LIBTSDUCK_LDLIBS) $(LDLIBS_EXTRA) $(LDLIBS) -shared -o $@
+ $(CXX) $(CXXFLAGS) $(SOFLAGS) $(LDFLAGS) $(notdir $(OBJS)) $(DTAPI_OBJECT) $(LIBTSDUCK_LDLIBS) $(LDLIBS_EXTRA) $(LDLIBS) -shared -o $@
# The static library is build differently. There are four specific categories:
# tables, descriptors, charsets and plugins. These classes use self-registration
@@ -187,11 +187,8 @@
@@ -203,11 +203,8 @@
+@$(call F_RECURSE,config python java)
install-devel: $(STATIC_LIBTSDUCK) tsduck.h
install-devel: $(STATIC_LIBTSDUCK) $(TSDUCK_H)
- rm -rf $(SYSROOT)$(SYSPREFIX)/include/tsduck
install -d -m 755 $(SYSROOT)$(USRLIBDIR) $(SYSROOT)$(SYSPREFIX)/include/tsduck
install -m 644 $(STATIC_LIBTSDUCK) $(SYSROOT)$(USRLIBDIR)
install -m 644 $(addsuffix /*.h,$(PUBLIC_INCLUDES)) $(SYSROOT)$(SYSPREFIX)/include/tsduck
install -m 644 $(addsuffix /*.h,$(PUBLIC_INCLUDES)) $(TSDUCK_H) $(SYSROOT)$(SYSPREFIX)/include/tsduck
- $(if $(NOTELETEXT),rm -f $(SYSROOT)$(SYSPREFIX)/include/tsduck/tsTeletextDemux.h)
- $(if $(NOTELETEXT),rm -f $(SYSROOT)$(SYSPREFIX)/include/tsduck/tsTeletextPlugin.h)
$(if $(NOTELETEXT),$(SED) -i -e '/TeletextDemux/d' -e '/TeletextPlugin/d' $(SYSROOT)$(SYSPREFIX)/include/tsduck/tsduck.h)

View File

@ -1,11 +1,11 @@
--- a/src/libtsduck/base/system/tsForkPipe.cpp
+++ b/src/libtsduck/base/system/tsForkPipe.cpp
@@ -451,7 +451,7 @@
// Execute the command if there was no prior error.
if (message == nullptr) {
- ::execl("/bin/sh", "/bin/sh", "-c", command.toUTF8().c_str(), nullptr);
+ ::execl("@TERMUX_PREFIX@/bin/sh", "@TERMUX_PREFIX@/bin/sh", "-c", command.toUTF8().c_str(), nullptr);
// Should not return, so this is an error if we get there.
error = errno;
message = "exec error";
@@ -40,7 +40,7 @@
// Path to defaut basic shell on UNIX systems.
// Can be overridden on the command line, eg. make CXXFLAGS_EXTRA="-DTS_SHELL_PATH=/foo/bar/bin/sh"
#if !defined(TS_SHELL_PATH)
- #define TS_SHELL_PATH /bin/sh
+ #define TS_SHELL_PATH @TERMUX_PREFIX@/bin/sh
#endif
#if !defined(TS_SHELL_STRING)
#define TS_SHELL_STRING TS_STRINGIFY(TS_SHELL_PATH)

View File

@ -0,0 +1,11 @@
--- a/src/libtsduck/base/system/tsSysUtils.h
+++ b/src/libtsduck/base/system/tsSysUtils.h
@@ -144,6 +144,8 @@
#elif defined(TS_WINDOWS)
// Second parameter of ::DeviceIoControl().
typedef ::DWORD ioctl_request_t;
+ #elif defined(TS_ANDROID)
+ typedef int ioctl_request_t;
#else
// Extract the type of the second parameter of ::ioctl().
// It is "unsigned long" on most Linux systems but "int" on Alpine Linux.

View File

@ -1,25 +0,0 @@
--- a/src/libtsduck/base/system/tsThread.cpp
+++ b/src/libtsduck/base/system/tsThread.cpp
@@ -114,7 +114,7 @@
{
#if defined(TS_WINDOWS)
::SwitchToThread();
-#elif defined(TS_MAC) || defined(_GLIBCXX_USE_SCHED_YIELD)
+#elif defined(TS_MAC) || defined(_GLIBCXX_USE_SCHED_YIELD) || defined(__ANDROID__)
::sched_yield();
#else
::pthread_yield();
@@ -254,11 +254,13 @@
return false;
}
+#if !defined __ANDROID__ || __ANDROID_API__ >= 28
// Use explicit scheduling attributes, do not inherit them from the current thread.
if (::pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) != 0) {
::pthread_attr_destroy(&attr);
return false;
}
+#endif
// Create the thread
if (::pthread_create(&_pthread, &attr, Thread::ThreadProc, this) != 0) {

View File

@ -1,16 +0,0 @@
--- a/src/libtsduck/base/types/tsPlatform.h
+++ b/src/libtsduck/base/types/tsPlatform.h
@@ -1356,9 +1356,13 @@
#else
// Extract the type of the second parameter of ::ioctl().
// It is "unsigned long" on most Linux systems but "int" on Alpine Linux.
+#ifndef __ANDROID__
template<typename T>
T request_param_type(int (*ioctl_syscall)(int, T, ...));
typedef decltype(request_param_type(&::ioctl)) ioctl_request_t;
+#else
+ typedef int ioctl_request_t;
+#endif
#endif
}

View File

@ -0,0 +1,11 @@
--- a/src/libtsduck/config/Makefile
+++ b/src/libtsduck/config/Makefile
@@ -66,7 +66,7 @@
$(TABLES_DEST): $(TABLES_SRC) $(TABLES_SUBS) $(BINDIR)/tsxml
@echo ' [GEN] $(notdir $@)'; \
- $(BINDIR)/tsxml --merge $(TABLES_SRC) $(TABLES_SUBS) --sort _tables --sort _descriptors --uncomment -o $@
+ tsxml --merge $(TABLES_SRC) $(TABLES_SUBS) --sort _tables --sort _descriptors --uncomment -o $@
$(NAMES_DEST): $(NAMES_SRC) $(NAMES_SUBS)
@echo ' [GEN] $(notdir $@)'; \

View File

@ -0,0 +1,9 @@
--- a/src/libtsduck/config/tsduck.pc
+++ b/src/libtsduck/config/tsduck.pc
@@ -8,5 +8,5 @@
Requires: libpcsclite
Requires.private: libcurl, srt, librist, libedit, libusb-1.0
Libs: -L${libdir} -ltsduck
-Libs.private: -lpthread -lrt -latomic -ldl -lm -lstdc++
+Libs.private: -ldl -lm
Cflags: -I${prefix}/include/tsduck --std=c++11

View File

@ -1,9 +1,7 @@
--- a/src/tstools/Makefile
+++ b/src/tstools/Makefile
@@ -63,6 +63,5 @@
@@ -62,4 +62,3 @@
install -m 755 $(EXECS) $(SYSROOT)$(SYSPREFIX)/bin
install -m 644 tsduck-completion.bash $(SYSROOT)$(BASHCOMP_DIR)/$(if $(BASHCOMP_AUTO),_tsduck,tsduck)
$(if $(BASHCOMP_AUTO),for cmd in $(ALLTOOLS); do ln -sf _tsduck $(SYSROOT)$(BASHCOMP_DIR)/$$cmd; done)
- $(if $(NO_TSTOOLS),rm -rf $(addprefix $(SYSROOT)$(SYSPREFIX)/bin/,$(NO_TSTOOLS)))
install-devel:
@true