ragel: Bump to 7.0.4

This commit is contained in:
Tee KOBAYASHI 2022-10-25 07:57:35 +09:00 committed by xtkoba
parent 8db4060344
commit d55b9445a5
2 changed files with 74 additions and 5 deletions

View File

@ -1,9 +1,38 @@
TERMUX_PKG_HOMEPAGE=https://www.colm.net/open-source/ragel/
TERMUX_PKG_DESCRIPTION="Compiles finite state machines from regular languages into executable C, C++, Objective-C, or D code"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=6.10
TERMUX_PKG_REVISION=4
TERMUX_PKG_VERSION=7.0.4
TERMUX_PKG_SRCURL=https://www.colm.net/files/ragel/ragel-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f
TERMUX_PKG_DEPENDS="libc++"
TERMUX_PKG_SHA256=84b1493efe967e85070c69e78b04dc55edc5c5718f9d6b77929762cb2abed278
TERMUX_PKG_DEPENDS="colm, libc++"
TERMUX_PKG_BUILD_DEPENDS="colm-static"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-colm=$TERMUX_PREFIX
--disable-manual
"
termux_step_host_build() {
local COLM_BUILD_SH=$TERMUX_SCRIPTDIR/packages/colm/build.sh
local COLM_SRCURL=$(. $COLM_BUILD_SH; echo $TERMUX_PKG_SRCURL)
local COLM_SHA256=$(. $COLM_BUILD_SH; echo $TERMUX_PKG_SHA256)
local COLM_TARFILE=$TERMUX_PKG_CACHEDIR/$(basename $COLM_SRCURL)
termux_download $COLM_SRCURL $COLM_TARFILE $COLM_SHA256
tar xf $COLM_TARFILE --strip-components=1
rm -f src/config.h src/defs.h
ln -sf . src/colm
sed -i '/^SUBDIRS =/s/ test//' Makefile.in
./configure
make -j $TERMUX_MAKE_PROCESSES
}
termux_step_pre_configure() {
local colm_bin_dir=$TERMUX_PKG_HOSTBUILD_DIR/src
echo "Applying configure.diff"
sed "s|@COLM_BIN_DIR@|${colm_bin_dir}|g" \
$TERMUX_PKG_BUILDER_DIR/configure.diff | patch --silent -p1
local libgcc=$($CC -print-libgcc-file-name)
export LIBS="-L$(dirname ${libgcc}) -l:$(basename ${libgcc})"
}

View File

@ -0,0 +1,40 @@
--- a/configure
+++ b/configure
@@ -4860,8 +4860,8 @@
# Check whether --with-colm was given.
if test "${with_colm+set}" = set; then :
withval=$with_colm;
- COLM="$withval/bin/colm"
- COLM_WRAP="$withval/bin/colm-wrap"
+ COLM="@COLM_BIN_DIR@/colm"
+ COLM_WRAP="@COLM_BIN_DIR@/colm-wrap"
CPPFLAGS="-I$withval/include ${CPPFLAGS}"
CPPFLAGS="-I$withval/include/aapl ${CPPFLAGS}"
LDFLAGS="-L$withval/lib ${LDFLAGS}"
@@ -4878,8 +4878,6 @@
if eval \${$as_ac_File+:} false; then :
$as_echo_n "(cached) " >&6
else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$COLM"; then
eval "$as_ac_File=yes"
else
@@ -17380,8 +17378,6 @@
if eval \${$as_ac_File+:} false; then :
$as_echo_n "(cached) " >&6
else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$srcdir/DIST"; then
eval "$as_ac_File=yes"
else
@@ -18279,8 +18275,6 @@
if eval \${$as_ac_File+:} false; then :
$as_echo_n "(cached) " >&6
else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r ""$EXTERNAL_COLM/bin/colm""; then
eval "$as_ac_File=yes"
else