libcaca: Update to 0.99.beta20

This commit is contained in:
Tee KOBAYASHI 2022-04-21 17:11:43 +09:00 committed by xtkoba
parent 7a20dc2b0c
commit 11b8c1f168

View File

@ -1,11 +1,11 @@
TERMUX_PKG_HOMEPAGE=http://caca.zoy.org/wiki/libcaca
TERMUX_PKG_DESCRIPTION="Graphics library that outputs text instead of pixels"
TERMUX_PKG_LICENSE="WTFPL"
TERMUX_PKG_LICENSE="WTFPL, GPL-2.0, ISC, LGPL-2.1"
TERMUX_PKG_LICENSE_FILE="COPYING, COPYING.GPL, COPYING.ISC, COPYING.LGPL"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.99.beta19
TERMUX_PKG_REVISION=9
TERMUX_PKG_SRCURL=http://caca.zoy.org/raw-attachment/wiki/libcaca/libcaca-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=128b467c4ed03264c187405172a4e83049342cc8cc2f655f53a2d0ee9d3772f4
TERMUX_PKG_VERSION=0.99.beta20
TERMUX_PKG_SRCURL=https://github.com/cacalabs/libcaca/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=3edb8763a8f888ed4d4b85b3a056e81c840d5d27f79bdebc0b991688b23084f2
TERMUX_PKG_DEPENDS="imlib2, libc++, ncurses, zlib"
TERMUX_PKG_BREAKS="libcaca-dev"
TERMUX_PKG_REPLACES="libcaca-dev"
@ -16,6 +16,26 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-ruby
--enable-imlib2
"
TERMUX_PKG_HOSTBUILD=true
termux_step_host_build() {
local AUTOCONF_BUILD_SH=$TERMUX_SCRIPTDIR/packages/autoconf/build.sh
local AUTOCONF_SRCURL=$(bash -c ". $AUTOCONF_BUILD_SH; echo \$TERMUX_PKG_SRCURL")
local AUTOCONF_SHA256=$(bash -c ". $AUTOCONF_BUILD_SH; echo \$TERMUX_PKG_SHA256")
local AUTOCONF_TARFILE=$TERMUX_PKG_CACHEDIR/$(basename $AUTOCONF_SRCURL)
termux_download $AUTOCONF_SRCURL $AUTOCONF_TARFILE $AUTOCONF_SHA256
mkdir -p autoconf
cd autoconf
tar xf $AUTOCONF_TARFILE --strip-components=1
./configure --prefix=$TERMUX_PKG_HOSTBUILD_DIR/_prefix
make -j $TERMUX_MAKE_PROCESSES
make install
}
termux_step_pre_configure() {
export PATH=$TERMUX_PKG_HOSTBUILD_DIR/_prefix/bin:$PATH
autoreconf -fi
}
termux_step_post_configure() {
if [ $TERMUX_ARCH = x86_64 ]; then
@ -23,3 +43,13 @@ termux_step_post_configure() {
perl -p -i -e 's/#define HAVE_FLDLN2 1//' $TERMUX_PKG_BUILDDIR/config.h
fi
}
termux_step_post_massage() {
cd ${TERMUX_PKG_MASSAGEDIR}/${TERMUX_PREFIX}/lib || exit 1
if [ ! -e "./libcaca.so.0" ]; then
ln -sf libcaca.so libcaca.so.0
fi
if [ ! -e "./libcaca++.so.0" ]; then
ln -sf libcaca++.so libcaca++.so.0
fi
}