Mercurial > vanilla
changeset 364:ea6c40075e00
graphics/graphviz: initial import, closes #1269
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 30 Mar 2019 09:47:42 +0100 |
parents | acf210415c64 |
children | 3ebf891ff2db |
files | graphics/graphviz/graphviz.sh |
diffstat | 1 files changed, 168 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphics/graphviz/graphviz.sh Sat Mar 30 09:47:42 2019 +0100 @@ -0,0 +1,168 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=graphviz +PKGVERSION=2.40.1 +PKGREVISION=1 +PKGLICENSE="CUSTOM" +PKGSUMMARY="graph drawing programs" +PKGDOWNLOAD="http://files.malikania.fr/distfiles/$PKGNAME-$PKGVERSION.tar.gz" +PKGDEPENDS="dev/libtool" +PKGOPTIONS="FONTCONFIG FREETYPE GD GTK PANGO WEBP X XML" + +: ${CHOST:=$(uname -m)-linux-musl} +: ${CBUILD:=$(uname -m)-linux-musl} +: ${CC:=gcc} +: ${CFLAGS:=-O2} +: ${CXX:=g++} +: ${CXXFLAGS:=-O2} +: ${LDFLAGS:=} +: ${LIBS:=} +: ${FONTCONFIG:=yes} +: ${FREETYPE:=yes} +: ${GD:=yes} +: ${GTK:=yes} +: ${PANGO:=yes} +: ${WEBP:=no} +: ${X:=yes} +: ${XML:=yes} + +if [ "$FONTCONFIG" = "yes" ]; then + PKGDEPENDS="fonts/fontconfig $PKGDEPENDS" + with_fontconfig="--with-fontconfig" +else + with_fontconfig="--without-fontconfig" +fi + +if [ "$FREETYPE" = "yes" ]; then + PKGDEPENDS="fonts/freetype $PKGDEPENDS" + with_freetype="--with-freetype2" +else + with_freetype="--without-freetype2" +fi + +if [ "$GD" = "yes" ]; then + PKGDEPENDS="graphics/libgd $PKGDEPENDS" + with_gd="--with-libgd" +else + with_gd="--without-libgd" +fi + +if [ "$GTK" = "yes" ]; then + PKGDEPENDS="graphics/gtk $PKGDEPENDS" + with_gtk="--with-gdk --with-gtk --with-gdk-pixbuf" +else + with_gtk="--without-gdk --without-gtk --without-gdk-pixbuf" +fi + +if [ "$PANGO" = "yes" ]; then + PKGDEPENDS="fonts/pango $PKGDEPENDS" + with_pango="--with-pangocairo" +else + with_pango="--without-pangocairo" +fi + +if [ "$WEBP" = "yes" ]; then + PKGDEPENDS="graphics/webp $PKGDEPENDS" + with_webp="--with-webp" +else + with_webp="--without-webp" +fi + +if [ "$X" = "yes" ]; then + PKGDEPENDS="x11/libx11 $PKGDEPENDS" + PKGDEPENDS="x11/libxaw $PKGDEPENDS" + PKGDEPENDS="x11/libxmu $PKGDEPENDS" + PKGDEPENDS="x11/libxpm $PKGDEPENDS" + PKGDEPENDS="x11/libxt $PKGDEPENDS" + with_x="--with-x" +else + with_x="--without-x" +fi + +if [ "$XML" = "yes" ]; then + PKGDEPENDS="lib/expat $PKGDEPENDS" + with_expat="--with-expat" +else + with_expat="--without-expat" +fi + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar xvaf $PKGNAME-$PKGVERSION.tar.gz + pushd $PKGNAME-$PKGVERSION + + # TODO: enable features as they become available. + CC="$CC" \ + CFLAGS="$CFLAGS" \ + CXX="$CXX" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + LIBS="$LIBS" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --disable-ltdl-install \ + --without-included-ltdl \ + --without-qt \ + --without-devil \ + --without-poppler \ + --without-rsvg \ + --without-ghostscript \ + --without-visio \ + --without-lasi \ + --without-glitz \ + --without-gtkgl \ + --without-gtkglext \ + --without-gts \ + --without-ann \ + --without-glade \ + --without-ming \ + --without-qt\ + --without-quartz \ + --without-gdiplus \ + --without-glut \ + --without-smyrna \ + --without-ortho \ + --without-digcola \ + --without-ipsepcola \ + --with-sfdp \ + $with_fontconfig \ + $with_freetype \ + $with_gd \ + $with_gtk \ + $with_pango \ + $with_webp \ + $with_x \ + $with_xml + make + make install DESTDIR=$DESTDIR + rm -f $DESTDIR/usr/lib/graphviz/*.la + rm -f $DESTDIR/usr/lib/graphviz/perl/*.la + rm -f $DESTDIR/usr/lib/libcdt.la + rm -f $DESTDIR/usr/lib/libcgraph.la + rm -f $DESTDIR/usr/lib/libgvc.la + rm -f $DESTDIR/usr/lib/libgvpr.la + rm -f $DESTDIR/usr/lib/liblab_gamut.la + rm -f $DESTDIR/usr/lib/libpathplan.la + rm -f $DESTDIR/usr/lib/libxdot.la + + popd + rm -rf $PKGNAME-$PKGVERSION +}