diff --git a/packages/libjxl/build.sh b/packages/libjxl/build.sh new file mode 100644 index 000000000..c40cadabc --- /dev/null +++ b/packages/libjxl/build.sh @@ -0,0 +1,12 @@ +TERMUX_PKG_HOMEPAGE=https://jpegxl.info/ +TERMUX_PKG_DESCRIPTION="JPEG XL image format reference implementation" +TERMUX_PKG_LICENSE="BSD 3-Clause" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION=0.5 +TERMUX_PKG_SRCURL=https://gitlab.com/wg1/jpeg-xl/-/archive/v${TERMUX_PKG_VERSION}/jpeg-xl-v${TERMUX_PKG_VERSION}.tar.bz2 +TERMUX_PKG_SHA256=43ae213b9ff28f672beb4f50dbee0834be2afe0015a62bf525d35ee2e7e89d6c +TERMUX_PKG_DEPENDS=brotli + +termux_step_post_get_source() { + ./deps.sh +} diff --git a/packages/libjxl/cmake_fixes.patch b/packages/libjxl/cmake_fixes.patch new file mode 100644 index 000000000..60d42292a --- /dev/null +++ b/packages/libjxl/cmake_fixes.patch @@ -0,0 +1,38 @@ +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index 1ff120c99..6e577ceb6 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -166,7 +166,7 @@ if(${JPEGXL_ENABLE_BENCHMARK}) + speed_stats.h + ../third_party/dirent.cc + ) +- target_link_libraries(benchmark_xl Threads::Threads) ++ target_link_libraries(benchmark_xl Threads::Threads -landroid-spawn) + target_compile_definitions(benchmark_xl + PRIVATE "-DJPEGXL_VERSION=\"${JPEGXL_VERSION}\"") + if(MINGW) +diff --git a/third_party/sjpeg/CMakeLists.txt b/third_party/sjpeg/CMakeLists.txt +index 5b0048265..ab385a117 100644 +--- a/third_party/sjpeg/CMakeLists.txt ++++ b/third_party/sjpeg/CMakeLists.txt +@@ -18,20 +18,8 @@ set(PROJECT_VERSION 0.1) + + ################################################################################ + # Android only. +-if(ANDROID) +- include_directories(${ANDROID_NDK}/sources/android/cpufeatures) +- add_library(cpufeatures STATIC +- ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c +- ) +- target_link_libraries(cpufeatures dl) +- set(SJPEG_DEP_LIBRARIES ${SJPEG_DEP_LIBRARIES} cpufeatures) +- set(SJPEG_DEP_INCLUDE_DIRS ${SJPEG_DEP_INCLUDE_DIRS} +- ${ANDROID_NDK}/sources/android/cpufeatures +- ) +-endif() + + ## Check for SIMD extensions. +-include(${CMAKE_CURRENT_LIST_DIR}/cmake/cpu.cmake) + + ################################################################################ + # sjpeg source files. diff --git a/packages/libjxl/libjxl-progs.subpackage.sh b/packages/libjxl/libjxl-progs.subpackage.sh new file mode 100644 index 000000000..8053fcd59 --- /dev/null +++ b/packages/libjxl/libjxl-progs.subpackage.sh @@ -0,0 +1,3 @@ +TERMUX_SUBPKG_DESCRIPTION="Programs for manipulating JPEG XL files" +TERMUX_SUBPKG_INCLUDE="bin/ share/man/man1/" +TERMUX_SUBPKG_DEPENDS="giflib, libjpeg-turbo, libpng, libwebp, libandroid-spawn"