contrib/dia/Pkgfile

51 lines
1.3 KiB
Plaintext
Raw Normal View History

2006-11-20 07:26:53 +10:00
# Description: GTK+ Diagramming Creation Software.
2020-12-05 18:26:06 +11:00
# URL: https://wiki.gnome.org/action/show/Apps/Dia
2023-03-05 23:00:32 -05:00
# Maintainer: unmaintained
# Depends on: docbook-xsl gtk libart_lgpl xorg-libxdamage
# Optional: python
2006-11-14 09:01:22 +10:00
name=dia
2015-03-03 13:56:45 +11:00
version=0.97.3
release=3
source=(https://download.gnome.org/sources/$name/${version%.*}/$name-$version.tar.xz)
2006-11-14 09:01:22 +10:00
build() {
2011-12-30 03:40:42 +11:00
cd $name-$version
# pkgconf obviates the three patches we used to apply to configure.in
sed -e 's/freetype-config --libs/pkgconf --libs freetype2/' \
-e 's/freetype-config --cflags/pkgconf --cflags freetype2/' \
-i configure
# avoid filling /usr/share/locale with unwanted translations
sed -e 's/all-local$//; s/all-local //;' \
-e '/^SUBDIRS/s/ po / /' \
-i Makefile.in
PKGMK_DIA="--prefix=/usr
--mandir=/usr/share/man
--with-cairo
--without-hardbooks
--disable-gnome
--disable-nls"
if prt-get isinst python; then
PKGMK_DIA+=" --with-python"
for file in $(grep -lrE "/usr/bin/env python$" .); do
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' "$file"
done
sed -e 's/python python2\.1/python2 python2.1/' \
-i configure
else
PKGMK_DIA+=" --without-python"
fi
./configure $PKGMK_DIA
2006-11-14 09:01:22 +10:00
2008-03-17 02:03:00 +11:00
make
make DESTDIR=$PKG install
[[ "$PKGMK_DIA" =~ --with-python ]] && /usr/bin/python2 -mcompileall $PKG
2011-12-30 03:40:42 +11:00
rm -rf $PKG/usr/share/doc
rm -rf $PKG/usr/share/man/fr
2006-11-14 09:01:22 +10:00
}