summaryrefslogblamecommitdiff
path: root/user/graphviz/APKBUILD
blob: aa9e3e90696094645a4c97907199bf9000c9901d (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                              
                                                    
              
                
             
        
                                      

                              
                                                                
             



                                                                

                                                                   

                                             

                                                                               
                                                                                         



                                  
         
                      











                                               
                                  
                                  
















                                                                      








                                                 


                                          
                                              
                                           
                                              




                                                              

 














                                                              











                                
                                                                                                                                                                    

                                                                                                                                                             
# Contributor: Sören Tempel <soeren/alpine@soeren-tempel.net>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: 
pkgname=graphviz
pkgver=2.44.0
pkgrel=0
pkgdesc="Graph visualization software"
url="http://www.graphviz.org/"
arch="all"
options="!check"  # Requires unpackaged Criterion test framework
license="EPL"
depends=""
depends_dev="zlib-dev libpng-dev libjpeg-turbo-dev expat-dev
	fontconfig-dev libsm-dev libxext-dev cairo-dev pango-dev
	librsvg-dev gmp-dev freetype-dev"
makedepends="$depends_dev flex swig m4 libtool guile-dev
	bison gtk+2.0-dev libltdl perl-dev python3-dev tcl tcl-dev"
install="$pkgname.pre-deinstall"
triggers="$pkgname.trigger=/usr/lib/graphviz"
subpackages="$pkgname-dev $pkgname-doc guile-$pkgname:guile
	$pkgname-gtk $pkgname-graphs perl-gv:_pl py3-gv:_py3 tcl-$pkgname:_tcl"
source="https://www2.graphviz.org/Packages/stable/portable_source/graphviz-$pkgver.tar.gz
	$pkgname.trigger
	0001-clone-nameclash.patch
	"

build() {
	LIBPOSTFIX=/ \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--without-included-ltdl \
		--disable-ltdl-install \
		--disable-silent-rules \
		--enable-ltdl \
		--with-x \
		--disable-static \
		--disable-dependency-tracking \
		--enable-java=no \
		--enable-tcl=yes \
		--without-mylibgd \
		--with-ipsepcola \
		--with-pangocairo \
		--with-gdk-pixbuf \
		--with-png \
		--with-jpeg \
		--with-rsvg

	if [ "$CARCH" = "x86_64" ]; then
		# the configure script thinks we have sincos. we dont.
		sed -i -e '/HAVE_SINCOS/d' config.h
	fi

	make
}

package() {
	make DESTDIR="$pkgdir" \
		pkgconfigdir=/usr/lib/pkgconfig \
		install

	mkdir -p "$pkgdir"/usr/share/doc
	mv "$pkgdir"/usr/share/graphviz/doc \
		"$pkgdir"/usr/share/doc/graphviz
}

_lang() {
	pkgdesc="$2 bindings for graphviz"
	depends="$3"
	mkdir -p "$subpkgdir"/usr/lib/graphviz
	mv "$pkgdir"/usr/lib/graphviz/$1* \
		"$subpkgdir"/usr/lib/graphviz/
	mv "$pkgdir"/usr/lib/$1* "$subpkgdir"/usr/lib/ || true
}

guile() {
	_lang guile Guile guile
}

gtk() {
	pkgdesc="Gtk extension for graphviz"
	mkdir -p "$subpkgdir"/usr/lib/graphviz
	mv "$pkgdir"/usr/lib/graphviz/libgvplugin_g?k* \
		"$pkgdir"/usr/lib/graphviz/libgvplugin_rsvg* \
		"$subpkgdir"/usr/lib/graphviz
}

graphs() {
	pkgdesc="Demo graphs for graphviz"
	mkdir -p "$subpkgdir"/usr/share/graphviz
	mv "$pkgdir"/usr/share/graphviz/graphs \
		"$subpkgdir"/usr/share/graphviz/
}

_pl() {
	_lang perl Perl
}

_py3() {
	_lang python3 "Python 3"
}

_tcl() {
	_lang tcl "Tcl/Tk"
}

sha512sums="9fd54a5c7b0d8cf3e1bf7e80409b57022182b6bfe3f57a06a219d6d29684962ac935fc76d1e7420ba88b1ffc2ab5b967cc4617e56f810818f99801d31981a752  graphviz-2.44.0.tar.gz
50947e6a11929f724759266f7716d52d10923eba6d59704ab39e4bdf18f8471d548c2b11ab051dd4b67cb82742aaf54d6358890d049d5b5982f3383b65f7ae8c  graphviz.trigger
aa4cbc341906a949a6bf78cadd96c437d6bcc90369941fe03519aa4447731ecbf6063a0dd0366d3e7aaadf22b69e4bcab3f8632a7da7a01f8e08a3be05c2bc5d  0001-clone-nameclash.patch"