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

bump(main/libx265): 4.0 #22492

Merged
merged 2 commits into from
Dec 13, 2024
Merged
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
2 changes: 1 addition & 1 deletion packages/ffmpeg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
# Please align version with `ffplay` package.
TERMUX_PKG_VERSION="6.1.2"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://www.ffmpeg.org/releases/ffmpeg-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=3b624649725ecdc565c903ca6643d41f33bd49239922e45c9b1442c63dca4e38
TERMUX_PKG_DEPENDS="fontconfig, freetype, fribidi, game-music-emu, harfbuzz, libaom, libandroid-glob, libass, libbluray, libbz2, libdav1d, libgnutls, libiconv, liblzma, libmp3lame, libopencore-amr, libopenmpt, libopus, librav1e, libsoxr, libsrt, libssh, libtheora, libv4l, libvidstab, libvmaf, libvo-amrwbenc, libvorbis, libvpx, libwebp, libx264, libx265, libxml2, libzimg, littlecms, ocl-icd, rubberband, svt-av1, xvidcore, zlib"
Expand Down
1 change: 1 addition & 0 deletions packages/libheif/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="LGPL-3.0, MIT"
TERMUX_PKG_LICENSE_FILE="COPYING"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.19.5"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/strukturag/libheif/releases/download/v${TERMUX_PKG_VERSION}/libheif-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=d3cf0a76076115a070f9bc87cf5259b333a1f05806500045338798486d0afbaf
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
48 changes: 5 additions & 43 deletions packages/libx265/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,24 @@ TERMUX_PKG_HOMEPAGE=http://x265.org/
TERMUX_PKG_DESCRIPTION="H.265/HEVC video stream encoder library"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
_COMMIT=38cf1c379b5af08856bb2fdd65f65a1f99384886
_COMMIT_DATE=20230222
TERMUX_PKG_VERSION=3.5-p${_COMMIT_DATE}
#TERMUX_PKG_SRCURL=https://bitbucket.org/multicoreware/x265_git/downloads/x265_$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SRCURL=git+https://bitbucket.org/multicoreware/x265_git
TERMUX_PKG_SHA256=5a8c54fb41b449538c160d3b48f439fa1c079b77f1c165c7b6967f5cb480ffd7
TERMUX_PKG_GIT_BRANCH=master
TERMUX_PKG_VERSION="4.1"
TERMUX_PKG_SRCURL=https://bitbucket.org/multicoreware/x265_git/downloads/x265_${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=a31699c6a89806b74b0151e5e6a7df65de4b49050482fe5ebf8a4379d7af8f29
TERMUX_PKG_DEPENDS="libandroid-posix-semaphore, libc++"
TERMUX_PKG_BREAKS="libx265-dev"
TERMUX_PKG_REPLACES="libx265-dev"

termux_step_post_get_source() {
git fetch --unshallow
git checkout $_COMMIT

local pdate="p$(git log -1 --format=%cs | sed 's/-//g')"
if [[ "$TERMUX_PKG_VERSION" != *"${pdate}" ]]; then
echo -n "ERROR: The version string \"$TERMUX_PKG_VERSION\" is"
echo -n " different from what is expected to be; should end"
echo " with \"${pdate}\"."
return 1
fi

local s=$(find . -type f ! -path '*/.git/*' -print0 | xargs -0 sha256sum | LC_ALL=C sort | sha256sum)
if [[ "${s}" != "${TERMUX_PKG_SHA256} "* ]]; then
termux_error_exit "Checksum mismatch for source files."
fi

termux_step_pre_configure() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVERSION=207
local _SOVERSION=215

local v=$(sed -En 's/^.*set\(X265_BUILD ([0-9]+).*$/\1/p' \
source/CMakeLists.txt)
if [ "${v}" != "${_SOVERSION}" ]; then
termux_error_exit "SOVERSION guard check failed."
fi

if [ -d .git ]; then
local _libx265_base_version="3.5"
local _libx265_base_commit="f0c1022b6be121a753ff02853fbe33da71988656"
if [ "${TERMUX_PKG_VERSION%-*}" != "${_libx265_base_version}" ]; then
termux_error_exit "Base version mismatch; expected to be ${_libx265_base_version}."
fi
cat > x265Version.txt <<-EOF
repositorychangeset: $(git log --pretty=format:%h -n 1)
releasetagdistance: $(git rev-list ${_libx265_base_commit}.. --count --first-parent)
releasetag: ${_libx265_base_version}
EOF

# To install shared lib
rm -rf .git
fi
}

termux_step_pre_configure() {
local _TERMUX_CLANG_TARGET=

# Not sure if this is necessary for on-device build
Expand Down
23 changes: 14 additions & 9 deletions packages/libx265/source-CMakeLists.txt.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index a407271b4..6ecfda3ee 100755
index 5c6dda9..972bca3 100755
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -44,7 +44,7 @@ else()
@@ -46,7 +46,7 @@ else()
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
endif()
set(X86_ALIASES x86 i386 i686 x86_64 amd64)
Expand All @@ -11,7 +11,7 @@ index a407271b4..6ecfda3ee 100755
set(ARM64_ALIASES arm64 arm64e aarch64)
list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
@@ -251,16 +251,12 @@ if(GCC)
@@ -272,13 +272,9 @@ if(GCC)
message(STATUS "cross compile arm")
set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
elseif(ARM)
Expand All @@ -26,9 +26,14 @@ index a407271b4..6ecfda3ee 100755
+ set(ARM_ARGS @TERMUX_CLANG_TARGET_ARM@ -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -fPIC)
+ add_definitions(-DHAVE_NEON)
endif()
if(ARM64 OR CROSS_COMPILE_ARM64)
- set(ARM_ARGS -fPIC -flax-vector-conversions)
+ set(ARM_ARGS @TERMUX_CLANG_TARGET_AARCH64@ -fPIC -flax-vector-conversions)
find_package(Neon)
if(CPU_HAS_NEON)
add_definitions(-DHAVE_NEON)
if(ARM64)
set(CPU_HAS_NEON 1)
@@ -398,7 +394,7 @@ int main() { return 0; }")
message(STATUS "Found SVE2")
add_definitions(-DHAVE_SVE2=1)
endif()
- set(ARM_ARGS -O3)
+ set(ARM_ARGS @TERMUX_CLANG_TARGET_AARCH64@)
# Do not allow implicit vector type conversions in Clang builds (this
# is already the default in GCC builds).
check_cxx_compiler_flag(-flax-vector-conversions=none CC_HAS_FLAX_VEC_CONV_NONE)
4 changes: 2 additions & 2 deletions packages/vlc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A popular libre and open source media player and multime
TERMUX_PKG_LICENSE="GPL-2.0, LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.0.21"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://download.videolan.org/pub/videolan/vlc/${TERMUX_PKG_VERSION}/vlc-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=24dbbe1d7dfaeea0994d5def0bbde200177347136dbfe573f5b6a4cee25afbb0
TERMUX_PKG_DEPENDS="chromaprint, dbus, ffmpeg, fluidsynth, fontconfig, freetype, fribidi, glib, gst-plugins-base, gstreamer, harfbuzz, liba52, libandroid-shmem, libandroid-spawn, libaom, libarchive, libass, libbluray, libc++, libcaca, libcairo, libcddb, libdav1d, libdvbpsi, libdvdnav, libdvdread, libebml, libflac, libgcrypt, libgnutls, libgpg-error, libiconv, libidn, libjpeg-turbo, liblua52, libmad, libmatroska, libmpeg2, libnfs, libogg, libopus, libpng, librsvg, libsecret, libsoxr, libssh2, libtheora, libtwolame, libvorbis, libvpx, libx11, libx264, libx265, libxcb, libxml2, mpg123, ncurses, opengl, pulseaudio, samba, taglib, zlib"
Expand Down Expand Up @@ -77,7 +77,7 @@ ac_cv_prog_LUAC=luac5.2
termux_step_pre_configure() {
autoreconf -fi

CFLAGS+=" -fcommon"
CFLAGS+=" -fcommon -Wno-unreachable-code-generic-assoc"
LDFLAGS+=" -landroid-shmem -landroid-spawn -lm"
LDFLAGS+=" -Wl,-rpath=$TERMUX_PREFIX/lib/vlc"

Expand Down
4 changes: 2 additions & 2 deletions x11-packages/vlc-qt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A popular libre and open source media player and multime
TERMUX_PKG_LICENSE="GPL-2.0, LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.0.21"
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://download.videolan.org/pub/videolan/vlc/${TERMUX_PKG_VERSION}/vlc-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=24dbbe1d7dfaeea0994d5def0bbde200177347136dbfe573f5b6a4cee25afbb0
TERMUX_PKG_DEPENDS="chromaprint, dbus, ffmpeg, fluidsynth, fontconfig, freetype, fribidi, glib, gst-plugins-base, gstreamer, harfbuzz, liba52, libandroid-shmem, libandroid-spawn, libaom, libarchive, libass, libbluray, libc++, libcaca, libcairo, libcddb, libdav1d, libdvbpsi, libdvdnav, libdvdread, libebml, libflac, libgcrypt, libgnutls, libgpg-error, libiconv, libidn, libjpeg-turbo, liblua52, libmad, libmatroska, libmpeg2, libnfs, libogg, libopus, libpng, librsvg, libsecret, libsoxr, libssh2, libtheora, libtwolame, libvorbis, libvpx, libx11, libx264, libx265, libxcb, libxml2, mpg123, ncurses, opengl, pulseaudio, qt5-qtbase, qt5-qtsvg, qt5-qtx11extras, samba, taglib, xcb-util-keysyms, zlib"
Expand Down Expand Up @@ -79,7 +79,7 @@ ac_cv_prog_LUAC=luac5.2
termux_step_pre_configure() {
autoreconf -fi

CFLAGS+=" -fcommon"
CFLAGS+=" -fcommon -Wno-deprecated-declarations -Wno-unreachable-code-generic-assoc"
LDFLAGS+=" -landroid-shmem -landroid-spawn -lm"
LDFLAGS+=" -Wl,-rpath=$TERMUX_PREFIX/lib/vlc"

Expand Down
Loading