sci-mathematics/genius: Fixed build with sys-libs/ncurses[tinfo]
authorLars Wendler <polynomial-c@gentoo.org>
Thu, 18 Jul 2019 15:13:56 +0000 (17:13 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Thu, 18 Jul 2019 15:14:10 +0000 (17:14 +0200)
Closes: https://bugs.gentoo.org/675670
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
sci-mathematics/genius/files/genius-1.0.23-tinfo.patch [new file with mode: 0644]
sci-mathematics/genius/files/genius-1.0.24-no_scrollkeeper.patch [new file with mode: 0644]
sci-mathematics/genius/genius-1.0.23.ebuild

diff --git a/sci-mathematics/genius/files/genius-1.0.23-tinfo.patch b/sci-mathematics/genius/files/genius-1.0.23-tinfo.patch
new file mode 100644 (file)
index 0000000..e3250f0
--- /dev/null
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/675670
+
+--- genius-1.0.23/configure.ac
++++ genius-1.0.23/configure.ac
+@@ -15,6 +15,8 @@
+ AC_PROG_INTLTOOL([0.21])
++PKG_PROG_PKG_CONFIG
++
+ dnl ================= Requirements ================================================
+ VTE_REQUIRED=0.26.0
+@@ -64,8 +66,8 @@
+ dnl Check for termcap
+ AC_CHECK_LIB(termcap, tgetent,[TERMCAP_LIB="-ltermcap"],
+-           [AC_CHECK_LIB(ncurses, tgetent,
+-                           [TERMCAP_LIB="-lncurses"
++           [PKG_CHECK_MODULES(NCURSES, ncurses,
++                           [TERMCAP_LIB="$NCURSES_LIBS"
+                             AC_DEFINE(USE_NCURSES,[1], [Use ncurses library])
+                             AC_CHECK_HEADER(ncurses/curses.h, [
+                                           AC_DEFINE(INC_NCURSES,[1],[ncurses include])])], [
diff --git a/sci-mathematics/genius/files/genius-1.0.24-no_scrollkeeper.patch b/sci-mathematics/genius/files/genius-1.0.24-no_scrollkeeper.patch
new file mode 100644 (file)
index 0000000..dc69ba7
--- /dev/null
@@ -0,0 +1,29 @@
+--- genius-1.0.24/configure.ac
++++ genius-1.0.24/configure.ac
+@@ -247,16 +247,16 @@
+ fi
+ #dnl scrollkeeper checks 
+-#AC_ARG_ENABLE([scrollkeeper],
+-#     [AC_HELP_STRING([--disable-scrollkeeper],
+-#             [do not make updates to the scrollkeeper database])],,
+-#             enable_scrollkeeper=yes)
+-#AM_CONDITIONAL([ENABLE_SK],[test "$enable_scrollkeeper" = "yes"])
+-#
+-#AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
+-#if test x$SCROLLKEEPER_CONFIG = xno; then
+-#  AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package)
+-#fi
++dnl AC_ARG_ENABLE([scrollkeeper],
++dnl   [AC_HELP_STRING([--disable-scrollkeeper],
++dnl           [do not make updates to the scrollkeeper database])],,
++dnl           enable_scrollkeeper=yes)
++dnl AM_CONDITIONAL([ENABLE_SK],[test "$enable_scrollkeeper" = "yes"])
++dnl 
++dnl AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
++dnl if test x$SCROLLKEEPER_CONFIG = xno; then
++dnl   AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package)
++dnl fi
+ dnl mime checks
+ AC_ARG_ENABLE(update-mimedb,
index aadd433bff97d5d5ec1aa5b3c974836990dff957..f13471ac30102c9201b17a3fb72b621d3ad0d24a 100644 (file)
@@ -4,7 +4,7 @@
 EAPI=6
 GNOME2_LA_PUNT="yes"
 
-inherit gnome2
+inherit autotools gnome2
 
 DESCRIPTION="Genius Mathematics Tool and the GEL Language"
 HOMEPAGE="https://www.jirka.org/genius.html"
@@ -30,11 +30,22 @@ RDEPEND="
 DEPEND="${RDEPEND}
        dev-util/gtk-update-icon-cache
        dev-util/intltool
-       virtual/yacc
+       sys-devel/autoconf-archive
        sys-devel/flex
-" # eautoreconf needs autoconf-archive
+       virtual/yacc
+" # eautoreconf needs sys-devel/autoconf-archive
 # dev-util/gtk-update-icon-cache because configure checks for it for some reason and never calls it with DESTDIR set..
 
+PATCHES=(
+       "${FILESDIR}/${PN}-1.0.23-tinfo.patch"
+       "${FILESDIR}/${PN}-1.0.24-no_scrollkeeper.patch"
+)
+
+src_prepare() {
+       gnome2_src_prepare
+       eautoreconf
+}
+
 src_configure() {
        # Unrecognized --disable-scrollkeeper warning comes from gnome2.eclass adding it based on grep, but upstream has them commented out in .ac with "#" instead of "dnl"
        gnome2_src_configure \