Files
termux-packages/packages/graphviz/build.sh
termux-pacman-bot 14161632a2 chore(main/graphviz): Fix libtool warnings about linking with static library
This replaces previous workaround in 1b126e9572100f9c2f92903c26c51bf7ef56aac8
commit because it produces the following warning.

Warning: Linking the shared library libcgraph.la against the
static library NDK/lib/clang/18/lib/linux/libclang_rt.builtins-aarch64-android.a is not portable!

The warning is explained here https://stackoverflow.com/a/8352756
2024-11-10 18:06:03 +00:00

59 lines
1.8 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://www.graphviz.org/
TERMUX_PKG_DESCRIPTION="Rich set of graph drawing tools"
TERMUX_PKG_LICENSE="EPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="12.2.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://gitlab.com/graphviz/graphviz/-/archive/$TERMUX_PKG_VERSION/graphviz-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=0063e501fa4642b55f4daf82820b2778bfb7dafa651a862ae5c9810efb8e2311
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="fontconfig, freetype, gdk-pixbuf, glib, harfbuzz, libandroid-glob, libc++, libcairo, libexpat, libgd, libgts, libltdl, librsvg, libwebp, pango, zlib"
TERMUX_PKG_BREAKS="graphviz-dev"
TERMUX_PKG_REPLACES="graphviz-dev"
TERMUX_PKG_BUILD_DEPENDS="libtool"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--enable-guile=no
--enable-java=no
--enable-lua=no
--enable-ocaml=no
--enable-perl=no
--enable-php=no
--enable-python=no
--enable-r=no
--enable-ruby=no
--enable-sharp=no
--enable-swig=no
--enable-tcl=no
--with-ann=no
--with-expatlibdir=$TERMUX_PREFIX/lib
--with-ltdl-include=$TERMUX_PREFIX/include
--with-ltdl-lib=$TERMUX_PREFIX/lib
--with-pangocairo=yes
--with-pic
--with-poppler=no
--with-x=no
"
TERMUX_PKG_FORCE_CMAKE=false
TERMUX_PKG_RM_AFTER_INSTALL="bin/*-config share/man/man1/*-config.1"
termux_step_pre_configure() {
./autogen.sh NOCONFIG
export HOSTCC="gcc"
# ERROR: ./lib/graphviz/libgvplugin_neato_layout.so contains undefined symbols: __extendsftf2
local _libgcc_file="$($CC -print-libgcc-file-name)"
local _libgcc_path="$(dirname $_libgcc_file)"
local _libgcc_name="$(basename $_libgcc_file)"
LDFLAGS+=" -L$_libgcc_path -l:$_libgcc_name"
LDFLAGS+=" -lm -landroid-glob"
LDFLAGS+=" -Wl,-rpath=$TERMUX_PREFIX/lib/graphviz"
}
termux_step_create_debscripts() {
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
echo "dot -c" >> postinst
echo "exit 0" >> postinst
chmod 0755 postinst
}