From f69da7bec2baa59a69cfb0dbbe3069b2becb2ced Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Wed, 25 May 2016 00:13:26 +0000 Subject: [PATCH] added community/agave --- community/agave/PKGBUILD | 63 +++++ .../agave/agave-0.4.7-mdv-fix-str-fmt.patch | 12 + community/agave/compat-round.patch | 227 ++++++++++++++++++ community/agave/drop-libgnome.patch | 66 +++++ community/agave/schemebox.patch | 11 + 5 files changed, 379 insertions(+) create mode 100644 community/agave/PKGBUILD create mode 100644 community/agave/agave-0.4.7-mdv-fix-str-fmt.patch create mode 100644 community/agave/compat-round.patch create mode 100644 community/agave/drop-libgnome.patch create mode 100644 community/agave/schemebox.patch diff --git a/community/agave/PKGBUILD b/community/agave/PKGBUILD new file mode 100644 index 000000000..c6e39afdb --- /dev/null +++ b/community/agave/PKGBUILD @@ -0,0 +1,63 @@ +# $Id$ +# Maintainer: Balló György +# Contributor: Angel 'angvp' Velasquez +# Contributor: Roman Kyrylych +# Contributor: William Rea + +# ALARM: Kevin Mihelich +# - compat-round.patch from debian to fix aarch64 FTBFS + +pkgname=agave +pkgver=0.4.7 +pkgrel=8 +pkgdesc="Colorscheme designer tool for GNOME" +arch=('i686' 'x86_64') +url="http://home.gna.org/colorscheme/" +license=('GPL') +depends=('libglademm' 'gconfmm') +makedepends=('gnome-doc-utils' 'intltool' 'boost' 'cppunit') +source=("http://download.gna.org/colorscheme/releases/$pkgname-$pkgver.tar.bz2" + agave-0.4.7-mdv-fix-str-fmt.patch + schemebox.patch + drop-libgnome.patch + compat-round.patch) +md5sums=('93097881f28dcae1eca2800a763f77c3' + 'd96ddfe751d8fd4d13a443b94fafb0b6' + 'c41adfd52ecbf837f4338e67693640fc' + '7419d23329f847dcde12baa467b52135' + '27637dbf3351a9e9fa77b50e775d2212') + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + + # Build fix from Fedora + patch -Np1 -i "$srcdir/agave-0.4.7-mdv-fix-str-fmt.patch" + + # Another build fix + patch -Np1 -i "$srcdir/schemebox.patch" + + # Remove deprecated libgnome dependency + patch -Np1 -i "$srcdir/drop-libgnome.patch" + + # Build fix from Debian + patch -Np1 -i "$srcdir/compat-round.patch" +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + CXXFLAGS+=' -std=c++11' + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-scrollkeeper --disable-gnome --disable-schemas-install \ + --with-gconf-schema-file-dir=/usr/share/gconf/schemas + make +} + +check() { + cd "$srcdir/$pkgname-$pkgver" + make check +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/community/agave/agave-0.4.7-mdv-fix-str-fmt.patch b/community/agave/agave-0.4.7-mdv-fix-str-fmt.patch new file mode 100644 index 000000000..7487a0c4d --- /dev/null +++ b/community/agave/agave-0.4.7-mdv-fix-str-fmt.patch @@ -0,0 +1,12 @@ +diff -p -up agave-0.4.7/src/dialogs/gcs-about-window.cc.strfmt agave-0.4.7/src/dialogs/gcs-about-window.cc +--- agave-0.4.7/src/dialogs/gcs-about-window.cc.strfmt 2009-11-25 15:00:03.000000000 +0100 ++++ agave-0.4.7/src/dialogs/gcs-about-window.cc 2009-11-25 15:31:43.000000000 +0100 +@@ -105,7 +105,7 @@ namespace gcs + catch (const Glib::Error& e) + { + Glib::ustring message = "Couldn't load Agave logo image from theme. " + e.what(); +- g_warning(message.c_str()); ++ g_warning("%s", message.c_str()); + } + } + } diff --git a/community/agave/compat-round.patch b/community/agave/compat-round.patch new file mode 100644 index 000000000..ca2b84dda --- /dev/null +++ b/community/agave/compat-round.patch @@ -0,0 +1,227 @@ +Description: Patched compat-round.cc to be more portable on systems with GNU libc +Author: Torsten Werner +Date: Thu, 5 Oct 2006 23:52:57 +0200 +Index: agave-0.4.5/src/core/compat-round.cc +=================================================================== +--- agave-0.4.5.orig/src/core/compat-round.cc 2006-10-01 03:25:58.000000000 +0530 ++++ agave-0.4.5/src/core/compat-round.cc 2008-02-15 19:34:10.000000000 +0530 +@@ -34,206 +34,9 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +-#include +- +-/* Symbolic constants to classify floating point numbers. */ +-#define COMPAT_FP_INFINITE 0x01 +-#define COMPAT_FP_NAN 0x02 +-#define COMPAT_FP_NORMAL 0x04 +-#define COMPAT_FP_SUBNORMAL 0x08 +-#define COMPAT_FP_ZERO 0x10 +- +-#ifdef Linux +-#include +-#elif defined(__FreeBSD__) +-#include +-#endif +-#define compat_fpclassify(x) \ +- ((sizeof (x) == sizeof (float)) ? compat___fpclassifyf(x) \ +- : (sizeof (x) == sizeof (double)) ? compat___fpclassifyd(x) \ +- : compat___fpclassifyl(x)) +- +-union compat_IEEEf2bits { +- float f; +- struct { +-#if _BYTE_ORDER == _LITTLE_ENDIAN +- unsigned int man :23; +- unsigned int exp :8; +- unsigned int sign :1; +-#else /* _BIG_ENDIAN */ +- unsigned int sign :1; +- unsigned int exp :8; +- unsigned int man :23; +-#endif +- } bits; +-}; +- +-union compat_IEEEd2bits { +- double d; +- struct { +-#if _BYTE_ORDER == _LITTLE_ENDIAN +- unsigned int manl :32; +- unsigned int manh :20; +- unsigned int exp :11; +- unsigned int sign :1; +-#else /* _BIG_ENDIAN */ +- unsigned int sign :1; +- unsigned int exp :11; +- unsigned int manh :20; +- unsigned int manl :32; +-#endif +- } bits; +-}; +- +-#ifdef __alpha__ +-union compat_IEEEl2bits { +- long double e; +- struct { +- unsigned int manl :32; +- unsigned int manh :20; +- unsigned int exp :11; +- unsigned int sign :1; +- } bits; +-}; +-#define compat_mask_nbit_l(u) ((void)0) +-#elif __amd64__ +-union compat_IEEEl2bits { +- long double e; +- struct { +- unsigned int manl :32; +- unsigned int manh :32; +- unsigned int exp :15; +- unsigned int sign :1; +- unsigned int junkl :16; +- unsigned int junkh :32; +- } bits; +-}; +-#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff) +-#elif __arm__ +-union compat_IEEEl2bits { +- long double e; +- struct { +- unsigned int manl :32; +- unsigned int manh :32; +- unsigned int exp :15; +- unsigned int sign :1; +- unsigned int junk :16; +- } bits; +-}; +-#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff) +-#elif __i386__ +-union compat_IEEEl2bits { +- long double e; +- struct { +- unsigned int manl :32; +- unsigned int manh :32; +- unsigned int exp :15; +- unsigned int sign :1; +- unsigned int junk :16; +- } bits; +-}; +-#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff) +-#elif __ia64__ +-union compat_IEEEl2bits { +- long double e; +- struct { +-#if _BYTE_ORDER == _LITTLE_ENDIAN +- unsigned int manl :32; +- unsigned int manh :32; +- unsigned int exp :15; +- unsigned int sign :1; +- unsigned long junk :48; +-#else /* _BIG_ENDIAN */ +- unsigned long junk :48; +- unsigned int sign :1; +- unsigned int exp :15; +- unsigned int manh :32; +- unsigned int manl :32; +-#endif +- } bits; +-}; +-#define compat_mask_nbit_l(u) ((u).bits.manh &= 0x7fffffff) +-#elif __powerpc__ +-union compat_IEEEl2bits { +- long double e; +- struct { +- unsigned int sign :1; +- unsigned int exp :15; +- unsigned long long manh :48; +- unsigned long long manl :64; +- } bits; +-}; +-#define compat_mask_nbit_l(u) ((void)0) +-#elif __sparc64__ +-union compat_IEEEl2bits { +- long double e; +- struct { +- unsigned int sign :1; +- unsigned int exp :15; +- unsigned long manh :48; +- unsigned long manl :64; +- } bits; +-}; +-#define compat_mask_nbit_l(u) ((void)0) +-#endif +- +- static int +-compat___fpclassifyf(float f) +-{ +- union compat_IEEEf2bits u; +- +- u.f = f; +- if (u.bits.exp == 0) { +- if (u.bits.man == 0) +- return (COMPAT_FP_ZERO); +- return (COMPAT_FP_SUBNORMAL); +- } +- if (u.bits.exp == 255) { +- if (u.bits.man == 0) +- return (COMPAT_FP_INFINITE); +- return (COMPAT_FP_NAN); +- } +- return (COMPAT_FP_NORMAL); +-} ++/* modified by Torsten Werner for GNU libc */ + +- static int +-compat___fpclassifyd(double d) +-{ +- union compat_IEEEd2bits u; +- +- u.d = d; +- if (u.bits.exp == 0) { +- if ((u.bits.manl | u.bits.manh) == 0) +- return (COMPAT_FP_ZERO); +- return (COMPAT_FP_SUBNORMAL); +- } +- if (u.bits.exp == 2047) { +- if ((u.bits.manl | u.bits.manh) == 0) +- return (COMPAT_FP_INFINITE); +- return (COMPAT_FP_NAN); +- } +- return (COMPAT_FP_NORMAL); +-} +- +- static int +-compat___fpclassifyl(long double e) +-{ +- union compat_IEEEl2bits u; +- +- u.e = e; +- if (u.bits.exp == 0) { +- if ((u.bits.manl | u.bits.manh) == 0) +- return (COMPAT_FP_ZERO); +- return (COMPAT_FP_SUBNORMAL); +- } +- compat_mask_nbit_l(u); /* Mask normalization bit if applicable. */ +- if (u.bits.exp == 32767) { +- if ((u.bits.manl | u.bits.manh) == 0) +- return (COMPAT_FP_INFINITE); +- return (COMPAT_FP_NAN); +- } +- return (COMPAT_FP_NORMAL); +-} ++#include + + double + compat_round(double x) +@@ -241,8 +44,8 @@ + double t; + int i; + +- i = compat_fpclassify(x); +- if (i == COMPAT_FP_INFINITE || i == COMPAT_FP_NAN) ++ i = fpclassify(x); ++ if (i == FP_INFINITE || i == FP_NAN) + return (x); + + if (x >= 0.0) { diff --git a/community/agave/drop-libgnome.patch b/community/agave/drop-libgnome.patch new file mode 100644 index 000000000..5dd704e34 --- /dev/null +++ b/community/agave/drop-libgnome.patch @@ -0,0 +1,66 @@ +diff -Naur agave-0.4.4.orig/src/dialogs/gcs-about-window.cc agave-0.4.4/src/dialogs/gcs-about-window.cc +--- agave-0.4.4.orig/src/dialogs/gcs-about-window.cc 2007-11-02 04:16:16.000000000 +0100 ++++ agave-0.4.4/src/dialogs/gcs-about-window.cc 2012-03-20 22:01:55.835021376 +0100 +@@ -26,9 +26,6 @@ + #include // for strlen() + + #include +-#ifdef HAVE_GNOME +-#include +-#endif // HAVE_GNOME + + #include + +@@ -46,11 +43,8 @@ + { + set_name(PACKAGE_NAME); + +-#ifdef HAVE_GNOME +- set_url_hook(sigc::mem_fun(*this, &AboutWindow::on_link_clicked)); + set_website(PACKAGE_WEBSITE); + set_website_label(_("Project Website")); +-#endif // HAVE_GNOME + + Glib::ustring version(PACKAGE_VERSION); + set_version(version); +@@ -112,15 +106,6 @@ + + + void +- AboutWindow::on_link_clicked(Gtk::AboutDialog& dialog, +- const Glib::ustring& link) +- { +-#ifdef HAVE_GNOME +- gnome_url_show(link.c_str(), 0); +-#endif // HAVE_GNOME +- } +- +- void + AboutWindow::on_response(int response_id) + { + if (response_id == Gtk::RESPONSE_DELETE_EVENT || +diff -Naur agave-0.4.4.orig/src/gcs-mainwindow-actions.cc agave-0.4.4/src/gcs-mainwindow-actions.cc +--- agave-0.4.4.orig/src/gcs-mainwindow-actions.cc 2007-11-02 04:01:16.000000000 +0100 ++++ agave-0.4.4/src/gcs-mainwindow-actions.cc 2012-03-20 22:01:10.637760066 +0100 +@@ -25,7 +25,6 @@ + + #include + #include +-#include + #include + #include + #include +@@ -251,9 +250,10 @@ + /* Help Menu Actions */ + void MainWindow::on_action_help_contents(void) + { +- gnome_help_display("agave.xml", +- NULL /* link id */, +- NULL /* GError */); ++ gtk_show_uri (NULL, ++ "ghelp:agave", ++ gtk_get_current_event_time (), ++ NULL); + } + + diff --git a/community/agave/schemebox.patch b/community/agave/schemebox.patch new file mode 100644 index 000000000..c00a867de --- /dev/null +++ b/community/agave/schemebox.patch @@ -0,0 +1,11 @@ +--- agave-0.4.7/src/widgets/gcs-schemebox.cc 2008-02-25 21:07:02.000000000 -0600 ++++ agave-0.4.7/src/widgets/gcs-schemebox.cc.new 2010-05-24 00:28:51.000000000 -0500 +@@ -45,7 +45,7 @@ namespace gcs + + SchemeBox::SchemeBox(Scheme schm) + { +- SchemeBox::SchemeBox(); ++ SchemeBox(); + set_scheme(schm); + } +