From 19b5640ed6b099aadf9610e018f66de26cd4cc66 Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Fri, 7 Jan 2022 07:19:12 +0900 Subject: [PATCH] new package: asymptote --- packages/asymptote/build.sh | 33 ++++++++++++++++++++++++++ packages/asymptote/configure.patch | 38 ++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 packages/asymptote/build.sh create mode 100644 packages/asymptote/configure.patch diff --git a/packages/asymptote/build.sh b/packages/asymptote/build.sh new file mode 100644 index 000000000..d269d4f6c --- /dev/null +++ b/packages/asymptote/build.sh @@ -0,0 +1,33 @@ +TERMUX_PKG_HOMEPAGE=https://asymptote.sourceforge.io/ +TERMUX_PKG_DESCRIPTION="A powerful descriptive vector graphics language for technical drawing" +TERMUX_PKG_LICENSE="GPL-3.0" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION=(2.74) +TERMUX_PKG_VERSION+=(0.9.9.8) +TERMUX_PKG_SRCURL=(https://downloads.sourceforge.net/asymptote/asymptote-${TERMUX_PKG_VERSION}.src.tgz + https://github.com/g-truc/glm/archive/${TERMUX_PKG_VERSION[1]}.tar.gz) +TERMUX_PKG_SHA256=(d48e8a5a9029af01da1f845e73c03e78b60c805ab9e974005bcfbeaefaebb3ba + 7d508ab72cb5d43227a3711420f06ff99b0a0cb63ee2f93631b162bfe1fe9592) +TERMUX_PKG_DEPENDS="libc++, libtirpc, ncurses, readline, zlib" +TERMUX_PKG_BUILD_IN_SRC=true +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +--disable-gc +" + +termux_step_post_get_source() { + mv glm-${TERMUX_PKG_VERSION[1]} glm +} + +termux_step_pre_configure() { + touch GL/glu.h + + local glm_inc=$TERMUX_PKG_BUILDDIR/_glm/include + mkdir -p $glm_inc + cp -r glm/glm $glm_inc/ + CPPFLAGS+=" -I${glm_inc}" +} + +termux_step_make_install() { + install -Dm700 -t $TERMUX_PREFIX/bin asy + cp -rT base $TERMUX_PREFIX/share/asymptote +} diff --git a/packages/asymptote/configure.patch b/packages/asymptote/configure.patch new file mode 100644 index 000000000..c4a0a912f --- /dev/null +++ b/packages/asymptote/configure.patch @@ -0,0 +1,38 @@ +--- a/configure ++++ b/configure +@@ -5911,7 +5911,7 @@ + if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 + else +- test "$cross_compiling" = yes && ++ false && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 + if test -r "$GCFILE.tar.gz"; then + eval "$as_ac_File=yes" +@@ -5947,7 +5947,7 @@ + case _$ac_cv_use_gc in + _|_system|_*[\\/]*) + if test "x$ac_cv_use_gc" = "xsystem" ; then +- INCL="-I. -I$prefix/include/gc -I/usr/include/gc" ++ INCL="-I. -I$prefix/include/gc" + LIBS=$LIBS"-L$prefix/lib " + else + INCL="-I$ac_cv_use_gc/include/gc" +@@ -6062,7 +6062,7 @@ + fi + + +-INCL=$INCL" -I/usr/include/tirpc" ++INCL=$INCL" -I$prefix/include/tirpc" + + if test "$OSTYPE" = "msdos"; then + CPPFLAGS=$CPPFLAGS" -D__MSDOS__ -I/usr/include/w32api -I/usr/include -DCALLBACK=__stdcall $INCL" +@@ -10239,7 +10239,7 @@ + fi + + +-if test "x$GCDIR" != "x" ; then ++if false; then + as_ac_File=`$as_echo "ac_cv_file_$GCDIR.tar.gz" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GCDIR.tar.gz" >&5 + $as_echo_n "checking for $GCDIR.tar.gz... " >&6; }