summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorConnor Behan2015-06-08 15:55:35 -0400
committerConnor Behan2015-06-08 15:55:35 -0400
commitd4d96bbac6b9512da414fe8a624298dedbf9c91a (patch)
tree87fb80796cc65627ea201820ad94cf3e302c14fa
downloadaur-d4d96bbac6b9512da414fe8a624298dedbf9c91a.tar.gz
Initial import
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD51
-rw-r--r--ggrace2
-rw-r--r--gracegtk-mimetypes7
-rw-r--r--gracegtk.desktop9
-rw-r--r--gracegtk.install14
-rw-r--r--gracegtk.pngbin0 -> 360 bytes
-rw-r--r--window_close.patch10
8 files changed, 125 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..019f6683905
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = gracegtk
+ pkgdesc = A port of the Grace plotting tool to gtk2
+ pkgver = 0.9.2
+ pkgrel = 1
+ url = http://plasma-gate.weizmann.ac.il/Grace/
+ install = gracegtk.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = linuxdoc-tools
+ makedepends = gcc-fortran
+ depends = libjpeg
+ depends = fftw
+ depends = t1lib
+ depends = netcdf
+ depends = pdflib-lite
+ depends = gtk2
+ source = http://downloads.sourceforge.net/sourceforge/gracegtk/gracegtk-0.9.2_2014_08_25_08h44.tgz
+ source = window_close.patch
+ source = gracegtk.png
+ source = gracegtk.desktop
+ source = gracegtk-mimetypes
+ source = ggrace
+ md5sums = 4b63d4e98c21ad2c56257b5f2b1971b5
+ md5sums = 05b430f86615ab1aea79cee6ca204792
+ md5sums = ef085e503d30207035f5dfbef648ed36
+ md5sums = 8427067a73698b5425901866ca3195d0
+ md5sums = 3beba5237f56a2ff28b6cd878865b25c
+ md5sums = c22c24f810bf0e1f9b8ca8713be19e3e
+
+pkgname = gracegtk
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0cd38d220cc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Contributor: Connor Behan <connor.behan@gmail.com>
+
+pkgname=gracegtk
+pkgver=0.9.2
+pkgrel=1
+pkgdesc="A port of the Grace plotting tool to gtk2"
+arch=(i686 x86_64)
+url="http://plasma-gate.weizmann.ac.il/Grace/"
+depends=('libjpeg' 'fftw' 't1lib' 'netcdf' 'pdflib-lite' 'gtk2')
+makedepends=('linuxdoc-tools' 'gcc-fortran')
+license=('GPL')
+install=gracegtk.install
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}_2014_08_25_08h44.tgz window_close.patch $pkgname.png $pkgname.desktop $pkgname-mimetypes ggrace)
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ grep -rl "'H', TRUE" src | xargs sed -i -e "s/'H', TRUE/'H', FALSE/g"
+ grep -rl "'H' ,TRUE" src | xargs sed -i -e "s/'H' ,TRUE/'H', FALSE/g"
+ sed -i -e "s/.*right_justified.*//g" src/gg.c
+ sed -i -e "s/.*right_justified.*//g" src/gg_gtkutils.c
+ patch -p0 <../window_close.patch
+
+ # The maintainer took down the fixed configure script which is still needed
+ #cp "$srcdir"/configure_0.7.1_without_ac_fn_c_try_run ./configure
+ sed -i -e 's|ac_fn_c_try_run ()|dummy ()|' configure
+ sed -i -e 's|ac_fn_c_try_run|ac_fn_c_try_compile|g' configure
+ sed -i -e 's|SIZEOF_INT|sizeof(int)|g' src/*.c
+ sed -i -e 's|SIZEOF_FLOAT|sizeof(float)|g' src/*.c
+ sed -i -e 's|SIZEOF_DOUBLE|sizeof(double)|g' src/*.c
+ sed -i -e 's|SIZEOF_CHAR|sizeof(char)|g' src/*.c
+ sed -i -e 's|SIZEOF_VOID_P|sizeof(void *)|g' src/*.c grace_np/*.c
+ ./configure --prefix=/usr --with-f77=/usr/bin/gfortran
+ make
+}
+
+package() {
+ export TEXINPUTS=$TEXINPUTS:/usr/share/linuxdoc-tools
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ mkdir "$pkgdir"/usr/share
+ mv "$pkgdir"/usr/$pkgname "$pkgdir"/usr/share/
+ install -D -m755 "$srcdir/ggrace" "$pkgdir/usr/bin/ggrace"
+
+ # Desktop integration
+ install -D -m644 "$srcdir/$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
+ install -D -m644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
+ install -D -m644 "$srcdir/$pkgname-mimetypes" "$pkgdir/usr/share/mime/packages/$pkgname.xml"
+}
+
+md5sums=('4b63d4e98c21ad2c56257b5f2b1971b5' '05b430f86615ab1aea79cee6ca204792' 'ef085e503d30207035f5dfbef648ed36' '8427067a73698b5425901866ca3195d0' '3beba5237f56a2ff28b6cd878865b25c' 'c22c24f810bf0e1f9b8ca8713be19e3e')
diff --git a/ggrace b/ggrace
new file mode 100644
index 00000000000..b64cd2a1dbc
--- /dev/null
+++ b/ggrace
@@ -0,0 +1,2 @@
+#!/bin/bash
+GRACEGTK_HOME=/usr/share/gracegtk /usr/share/gracegtk/bin/ggrace "$@"
diff --git a/gracegtk-mimetypes b/gracegtk-mimetypes
new file mode 100644
index 00000000000..1018e3b36ed
--- /dev/null
+++ b/gracegtk-mimetypes
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="application/grace">
+ <comment>xmgrace format</comment>
+ <glob pattern="*.agr"/>
+ </mime-type>
+</mime-info>
diff --git a/gracegtk.desktop b/gracegtk.desktop
new file mode 100644
index 00000000000..ce7e4ae9fb3
--- /dev/null
+++ b/gracegtk.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Encoding=UTF-8
+Terminal=false
+Name=Grace-GTK
+Type=Application
+Icon=/usr/share/pixmaps/gracegtk.png
+Exec=/usr/bin/ggrace %f
+Comment=An application for 2D plotting
+Categories=Science;X-Plotting;
diff --git a/gracegtk.install b/gracegtk.install
new file mode 100644
index 00000000000..702c510609b
--- /dev/null
+++ b/gracegtk.install
@@ -0,0 +1,14 @@
+post_install() {
+ echo "update mime database..."
+ update-mime-database usr/share/mime > /dev/null
+ echo "update desktop mime database..."
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/gracegtk.png b/gracegtk.png
new file mode 100644
index 00000000000..77265a30af2
--- /dev/null
+++ b/gracegtk.png
Binary files differ
diff --git a/window_close.patch b/window_close.patch
new file mode 100644
index 00000000000..7225a56a321
--- /dev/null
+++ b/window_close.patch
@@ -0,0 +1,10 @@
+--- src/gg.c.orig 2013-07-23 23:44:44.000000000 -0700
++++ src/gg.c 2013-07-23 23:45:44.000000000 -0700
+@@ -528,6 +528,7 @@
+ /* Main window */
+ if (w_main_window != NULL) return;
+ w_main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
++ g_signal_connect (G_OBJECT (w_main_window), "destroy", G_CALLBACK (gtk_main_quit), NULL);
+ gtk_window_set_title (GTK_WINDOW (w_main_window), "GraceGTK");
+ gtk_container_set_border_width (GTK_CONTAINER (w_main_window), 2);
+ gtk_window_set_default_size (GTK_WINDOW (w_main_window), popup_width, popup_height);