aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-23 21:20:48 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-23 21:20:48 +0000
commita41050e33306c122c97ffddaa3807cf1412ce3b1 (patch)
tree3c899f3bf3ee0d8218365dd417a0452a7569aff0
parentd6bf8e6ceffe191bda5bb535d5f9f9d118f3daea (diff)
downloadaports-a41050e33306c122c97ffddaa3807cf1412ce3b1.tar.bz2
aports-a41050e33306c122c97ffddaa3807cf1412ce3b1.tar.xz
testing/dia: new aport
a GTK+ based diagram creation program http://live.gnome.org/Dia
-rw-r--r--testing/dia/APKBUILD48
-rw-r--r--testing/dia/isfinite.patch120
-rw-r--r--testing/dia/isinf.patch16
3 files changed, 184 insertions, 0 deletions
diff --git a/testing/dia/APKBUILD b/testing/dia/APKBUILD
new file mode 100644
index 0000000000..1cea1fd02d
--- /dev/null
+++ b/testing/dia/APKBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=dia
+pkgver=0.97.2
+pkgrel=0
+pkgdesc="a GTK+ based diagram creation program"
+url="http://live.gnome.org/Dia"
+arch="all"
+license="GPL2"
+depends=
+depends_dev=
+makedepends="gtk+-dev libxml2-dev"
+install=""
+subpackages="$pkgname-doc $pkgname-lang"
+source="http://ftp.gnome.org/pub/gnome/sources/dia/${pkgver%.*}/dia-$pkgver.tar.xz
+ isinf.patch
+ isfinite.patch"
+
+_builddir="$srcdir"/dia-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/dia/*.la || return 1
+}
+
+md5sums="1e1180a513fb567709b09bc19f12105e dia-0.97.2.tar.xz
+cbbc32d417297b855353f86b484b369b isinf.patch
+c5429dd3b25211811e343bc761d7af4c isfinite.patch"
diff --git a/testing/dia/isfinite.patch b/testing/dia/isfinite.patch
new file mode 100644
index 0000000000..796d4fda8c
--- /dev/null
+++ b/testing/dia/isfinite.patch
@@ -0,0 +1,120 @@
+diff --git a/lib/arrows.c b/lib/arrows.c
+index 4371946..389ef58 100644
+--- a/lib/arrows.c
++++ b/lib/arrows.c
+@@ -18,7 +18,7 @@
+
+ #include <config.h>
+
+-#define _BSD_SOURCE 1 /* to get finite */
++#define _GNU_SOURCE 1 /* to get isfinite */
+ #include <math.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -29,11 +28,7 @@
+
+ #ifdef G_OS_WIN32
+ #include <float.h>
+-#define finite(d) _finite(d)
+-#endif
+-
+-#ifdef __EMX__
+-#define finite(d) isfinite(d)
++#define isfinite(d) _finite(d)
+ #endif
+
+ #include "arrows.h"
+@@ -421,7 +416,7 @@ draw_one_exactly(DiaRenderer *renderer, Point *to, Point *from,
+ else {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+- if (!finite(vl.x)) {
++ if (!isfinite(vl.x)) {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+ point_get_perp(&vt,&vl);
+@@ -498,7 +493,7 @@ draw_one_or_none(DiaRenderer *renderer, Point *to, Point *from,
+ else {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+- if (!finite(vl.x)) {
++ if (!isfinite(vl.x)) {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+ point_get_perp(&vt,&vl);
+@@ -610,7 +605,7 @@ draw_fill_ellipse(DiaRenderer *renderer, Point *to, Point *from,
+ else {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+- if (!finite(vl.x)) {
++ if (!isfinite(vl.x)) {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+ point_get_perp(&vt,&vl);
+@@ -672,7 +667,7 @@ draw_empty_ellipse(DiaRenderer *renderer, Point *to, Point *from,
+ else {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+- if (!finite(vl.x)) {
++ if (!isfinite(vl.x)) {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+
+@@ -718,7 +713,7 @@ calculate_box (Point *poly, const Point *to, const Point *from,
+ else {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+- if (!finite(vl.x)) {
++ if (!isfinite(vl.x)) {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+ point_get_perp(&vt,&vl);
+@@ -832,7 +827,7 @@ draw_fill_dot(DiaRenderer *renderer, Point *to, Point *from,
+ else {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+- if (!finite(vl.x)) {
++ if (!isfinite(vl.x)) {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+ point_get_perp(&vt,&vl);
+@@ -908,7 +903,7 @@ draw_integral(DiaRenderer *renderer, Point *to, Point *from,
+ else {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+- if (!finite(vl.x)) {
++ if (!isfinite(vl.x)) {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+ point_get_perp(&vt,&vl);
+@@ -946,7 +941,7 @@ calculate_slashed (Point *poly, const Point *to, const Point *from,
+ else {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+- if (!finite(vl.x)) {
++ if (!isfinite(vl.x)) {
+ vl.x = 1.0; vl.y = 0.0;
+ }
+ point_get_perp(&vt,&vl);
+diff --git a/lib/boundingbox.c b/lib/boundingbox.c
+index 6d2749f..c589334 100644
+--- a/lib/boundingbox.c
++++ b/lib/boundingbox.c
+@@ -21,7 +21,7 @@
+
+ #include <config.h>
+
+-#define _BSD_SOURCE 1
++#define _GNU_SOURCE 1 /* to get isfinite */
+ #include <math.h>
+ #include <string.h> /* memcmp() */
+
+@@ -510,7 +509,7 @@ polybezier_bbox(const BezPoint *pts, int numpoints,
+ real overshoot;
+ Point vovs,pto;
+
+- if (finite(alpha))
++ if (isfinite(alpha))
+ overshoot = extra->middle_trans / sin(alpha/2.0);
+ else /* prependicular? */
+ overshoot = extra->middle_trans;
diff --git a/testing/dia/isinf.patch b/testing/dia/isinf.patch
new file mode 100644
index 0000000000..4cd4adbc86
--- /dev/null
+++ b/testing/dia/isinf.patch
@@ -0,0 +1,16 @@
+--- ./configure.orig
++++ ./configure
+@@ -17436,11 +17436,11 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char isinf ();
++#include <math.h>
+ int
+ main ()
+ {
+-return isinf ();
++return isinf (0.0);
+ ;
+ return 0;
+ }