summaryrefslogtreecommitdiff
path: root/community/dia
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/dia
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/dia')
-rw-r--r--community/dia/PKGBUILD44
-rw-r--r--community/dia/dia-overflow-fix.patch28
-rw-r--r--community/dia/dia.install13
3 files changed, 85 insertions, 0 deletions
diff --git a/community/dia/PKGBUILD b/community/dia/PKGBUILD
new file mode 100644
index 000000000..89c7f852e
--- /dev/null
+++ b/community/dia/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 32607 2010-11-15 15:15:59Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer:
+# Contributor: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: Gregor Ibic <gregor.ibic@intelicom.si>
+
+pkgname=dia
+pkgver=0.97.1
+pkgrel=3
+pkgdesc="A GTK+ based diagram creation program"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://live.gnome.org/Dia"
+install=dia.install
+depends=('libxslt' 'desktop-file-utils' 'libart-lgpl' 'gtk2')
+makedepends=('intltool' 'python2' 'docbook-xsl')
+optdepends=('python2')
+options=('!libtool')
+source=("ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.97/${pkgname}-${pkgver}.tar.bz2"
+ "dia-overflow-fix.patch")
+md5sums=('57e44bb9f387559a0506b52a134deaf0'
+ '8fd9a2ad35b5a6fd8c758d7c73dbfe66')
+md5sums=('57e44bb9f387559a0506b52a134deaf0'
+ '8fd9a2ad35b5a6fd8c758d7c73dbfe66')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ export PYTHON=/usr/bin/python2
+ sed -i 's#python2\.1#python2 python2.1#' configure
+ patch -p1 <$srcdir/dia-overflow-fix.patch
+
+ ./configure --prefix=/usr \
+ --enable-db2html \
+ --with-cairo \
+ --with-python \
+ --disable-gnome
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/community/dia/dia-overflow-fix.patch b/community/dia/dia-overflow-fix.patch
new file mode 100644
index 000000000..a6e64f3c6
--- /dev/null
+++ b/community/dia/dia-overflow-fix.patch
@@ -0,0 +1,28 @@
+diff -wbBur dia-0.97.1/plug-ins/xfig/xfig-export.c dia-0.97.1.my/plug-ins/xfig/xfig-export.c
+--- dia-0.97.1/plug-ins/xfig/xfig-export.c 2009-11-07 17:28:34.000000000 +0300
++++ dia-0.97.1.my/plug-ins/xfig/xfig-export.c 2010-11-15 17:44:05.640896280 +0300
+@@ -417,6 +417,9 @@
+ if (text[i] > 127) {
+ newlen += 3;
+ }
++ if (text[i] == '\\') {
++ newlen += 1;
++ }
+ }
+ returntext = g_malloc(sizeof(char)*(newlen+1));
+ j = 0;
+@@ -1085,10 +1088,10 @@
+ figtext = figText(renderer, (unsigned char *) text);
+ /* xfig texts are specials */
+ fprintf(renderer->file, "4 %d %d %d 0 %d %s 0.0 6 0.0 0.0 %d %d %s\\001\n",
+- figAlignment(renderer, alignment),
+- figColor(renderer, color),
+- figDepth(renderer),
+- figFont(renderer),
++ (int)figAlignment(renderer, alignment),
++ (int)figColor(renderer, color),
++ (int)figDepth(renderer),
++ (int)figFont(renderer),
+ xfig_dtostr(d_buf, figFontSize(renderer)),
+ (int)figCoord(renderer, pos->x),
+ (int)figCoord(renderer, pos->y),
diff --git a/community/dia/dia.install b/community/dia/dia.install
new file mode 100644
index 000000000..499f00ea1
--- /dev/null
+++ b/community/dia/dia.install
@@ -0,0 +1,13 @@
+post_install() {
+ which update-desktop-database >/dev/null && update-desktop-database -q
+ which update-mime-database >/dev/null && update-mime-database usr/share/mime > /dev/null
+ which gtk-update-icon-cache >/dev/null && gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}