0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-13 14:09:19 +00:00
termux-packages/x11-packages/sdl-image/build.sh
Twaik Yont ff3d4e985c
chore(x11/sdl-image): force disable auto updates [no ci]
Current version of the package is kept for compatbility with old programs. No updates are needed.
This is needed to avoid auto-updater script warnings.
2023-10-20 15:33:45 +03:00

38 lines
1.3 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://www.libsdl.org/projects/SDL_image/
TERMUX_PKG_DESCRIPTION="A simple library to load images of various formats as SDL surfaces"
TERMUX_PKG_LICENSE="ZLIB"
TERMUX_PKG_MAINTAINER="@termux"
_COMMIT=9a5bd2d522c8e0f5a92ba7c8c1bac123228611d0
_COMMIT_DATE=20230130
TERMUX_PKG_VERSION=1.2.12-p${_COMMIT_DATE}
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=git+https://github.com/libsdl-org/SDL_image
TERMUX_PKG_SHA256=9b1cbb2fa68632242d49841a9341af1b432e4f8129d3c91b90420b486f5dd158
TERMUX_PKG_AUTO_UPDATE=false
TERMUX_PKG_GIT_BRANCH=SDL-1.2
TERMUX_PKG_DEPENDS="libjpeg-turbo, libpng, libtiff, libwebp, sdl"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-jpg-shared
--disable-png-shared
--disable-tif-shared
--disable-webp-shared
"
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
}