sci-visualization/gwyddion: Use xdg eclass, fix cfitsio automagic
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Fri, 24 Jan 2020 03:48:37 +0000 (04:48 +0100)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Fri, 24 Jan 2020 03:49:57 +0000 (04:49 +0100)
Bug: https://bugs.gentoo.org/598682
Closes: https://bugs.gentoo.org/623314
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
sci-visualization/gwyddion/files/gwyddion-2.47-cfitsio.patch [new file with mode: 0644]
sci-visualization/gwyddion/gwyddion-2.47-r1.ebuild

diff --git a/sci-visualization/gwyddion/files/gwyddion-2.47-cfitsio.patch b/sci-visualization/gwyddion/files/gwyddion-2.47-cfitsio.patch
new file mode 100644 (file)
index 0000000..9380eaf
--- /dev/null
@@ -0,0 +1,19 @@
+diff -ruN gwyddion-2.47.orig/configure.ac gwyddion-2.47/configure.ac
+--- gwyddion-2.47.orig/configure.ac    2016-11-18 11:17:57.000000000 +0100
++++ gwyddion-2.47/configure.ac 2020-01-24 04:39:18.892183563 +0100
+@@ -632,11 +632,13 @@
+ #############################################################################
+ # CFITSIO
+ # Optional.  Used for FITS image import.
+-enable_cfitsio=yes
+-PKG_CHECK_MODULES(CFITSIO, [cfitsio],
++GWY_WITH([cfitsio],,[build with cfitsio support])
++if test "x$enable_cfitsio" != "xno"; then
++  PKG_CHECK_MODULES(CFITSIO, [cfitsio],
+                   [AC_DEFINE(HAVE_CFITSIO,1,
+                             [Define if we have the cfitsio package.])],
+                   [enable_cfitsio=no])
++fi
+ AM_CONDITIONAL([HAVE_CFITSIO],[test x$enable_cfitsio != xno])
+ #############################################################################
index 2ae4cecc209b287f8edccb31278fd0056277f006..d0ccf02961375e3c0bb1d67b931cc660875ffcd1 100644 (file)
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit fdo-mime gnome2-utils
+inherit autotools gnome2-utils xdg
 
 DESCRIPTION="Framework for Scanning Mode Microscopy data analysis"
 HOMEPAGE="http://gwyddion.net/"
@@ -34,6 +34,15 @@ DEPEND="${RDEPEND}
        doc? ( dev-util/gtk-doc )
 "
 
+PATCHES=(
+       "${FILESDIR}/${PN}-2.47-cfitsio.patch"
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
 src_configure() {
        econf \
                --disable-rpath \
@@ -41,7 +50,7 @@ src_configure() {
                $(use_enable doc gtk-doc) \
                $(use_enable nls) \
                --disable-pygwy \
-               $(use_enable fits cfitsio) \
+               $(use_with fits cfitsio) \
                $(use_with perl) \
                --without-python \
                $(use_with ruby) \
@@ -54,13 +63,9 @@ src_configure() {
 
 pkg_postinst() {
        use gnome && gnome2_gconf_install
-       fdo-mime_desktop_database_update
+       xdg_pkg_postinst
 }
 
 pkg_prerm() {
        use gnome && gnome2_gconf_uninstall
 }
-
-pkg_postrm() {
-       fdo-mime_desktop_database_update
-}