# Description: GTK+ Diagramming Creation Software. # URL: https://wiki.gnome.org/action/show/Apps/Dia # Maintainer: Petar Petrov, slackalaxy at gmail dot com # Depends on: brotli graphite2 gtk libart_lgpl libxml210 libxslt python xorg-libxdamage name=dia version=0.97.3 release=3 source=(https://download.gnome.org/sources/$name/${version%.*}/$name-$version.tar.xz # https://gitweb.gentoo.org/repo/gentoo.git/tree/app-office/dia/files dia-0.97.2-underlinking.patch dia-0.97.0-gnome-doc.patch) build() { cd $name-$version export PKG_CONFIG_PATH="/usr/lib/libxml210/pkgconfig:$PKG_CONFIG_PATH" export CPPFLAGS="-I/usr/include/libxml210/" export LDFLAGS="-L/usr/lib/libxml210 $LDFLAGS" # https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/dia for file in `find -type f -name '*.py'`; do sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' "$file" done sed -i 's#python2\.1#python2 python2.1#' configure export PYTHON=/usr/bin/python2 patch -Np1 -i $SRC/dia-0.97.2-underlinking.patch patch -Np1 -i $SRC/dia-0.97.0-gnome-doc.patch CPPFLAGS="-I/usr/include/libxml210/" \ LDFLAGS="-L/usr/lib/libxml210 $LDFLAGS" \ CFLAGS="$CFLAGS -Wl,-rpath,/usr/lib/libxml210" \ CXXFLAGS="$CXXFLAGS -Wl,-rpath,/usr/lib/libxml210" \ ./configure \ --prefix=/usr \ --mandir=/usr/share/man \ --with-cairo \ --with-python \ --without-hardbooks \ --without-freetype \ --disable-gnome \ --disable-nls CPPFLAGS="-I/usr/include/libxml210/" \ LDFLAGS="-L/usr/lib/libxml210 $LDFLAGS" \ CFLAGS="$CFLAGS -Wl,-rpath,/usr/lib/libxml210" \ CXXFLAGS="$CXXFLAGS -Wl,-rpath,/usr/lib/libxml210" \ make make DESTDIR=$PKG install /usr/bin/python -mcompileall $PKG rm -r \ $PKG/usr/share/locale \ $PKG/usr/share/doc \ $PKG/usr/share/man }