summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-08-14 00:05:15 -0400
committerMike Frysinger <vapier@gentoo.org>2015-08-14 00:05:36 -0400
commitda13077dd7c1f545e760447fd9b451d29a24d74d (patch)
tree0d2085f1a2dcb9c7f289ec8acc6fd7d654c4defe /app-editors/curses-hexedit
parentapp-portage/eclass-manpages: fix gensub warnings (diff)
downloadgentoo-da13077dd7c1f545e760447fd9b451d29a24d74d.tar.gz
gentoo-da13077dd7c1f545e760447fd9b451d29a24d74d.tar.bz2
gentoo-da13077dd7c1f545e760447fd9b451d29a24d74d.zip
app-editors/curses-hexedit: look up ncurses details via pkg-config
Diffstat (limited to 'app-editors/curses-hexedit')
-rw-r--r--app-editors/curses-hexedit/curses-hexedit-0.9.7.ebuild10
-rw-r--r--app-editors/curses-hexedit/files/curses-hexedit-0.9.7-ncurses-pkg-config.patch34
2 files changed, 40 insertions, 4 deletions
diff --git a/app-editors/curses-hexedit/curses-hexedit-0.9.7.ebuild b/app-editors/curses-hexedit/curses-hexedit-0.9.7.ebuild
index 0d5772286225..5627f0a24f5c 100644
--- a/app-editors/curses-hexedit/curses-hexedit-0.9.7.ebuild
+++ b/app-editors/curses-hexedit/curses-hexedit-0.9.7.ebuild
@@ -6,7 +6,7 @@
EAPI="5"
-inherit toolchain-funcs
+inherit toolchain-funcs eutils autotools
MY_P=${P/curses-}
DESCRIPTION="full screen curses hex editor (with insert/delete support)"
@@ -23,9 +23,11 @@ DEPEND="${RDEPEND}"
S=${WORKDIR}/${MY_P}
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ncurses-pkg-config.patch
+ eautoreconf
+}
+
src_configure() {
- # Package has an old configure script.
- CONFIG_SHELL="/bin/bash"
- tc-export CC
econf --program-prefix=curses-
}
diff --git a/app-editors/curses-hexedit/files/curses-hexedit-0.9.7-ncurses-pkg-config.patch b/app-editors/curses-hexedit/files/curses-hexedit-0.9.7-ncurses-pkg-config.patch
new file mode 100644
index 000000000000..94d6263589cf
--- /dev/null
+++ b/app-editors/curses-hexedit/files/curses-hexedit-0.9.7-ncurses-pkg-config.patch
@@ -0,0 +1,34 @@
+use pkg-config to locate ncurses rather than a library search
+
+--- a/configure.in
++++ b/configure.in
+@@ -19,14 +19,9 @@
+ AC_HEADER_STDC
+ AC_PROG_GCC_TRADITIONAL
+
+-AC_CHECK_HEADERS(ncurses.h)
+-if test "$ac_cv_header_ncurses_h" = "no"; then
+- AC_CHECK_HEADERS(curses.h)
+- if test "$ac_cv_header_curses_h" = "no"; then
+- echo "*** Cannot find Curses headers, probably not installed"
+- echo "*** Hexedit will not run without the curses library"
+- fi
+-fi
++PKG_CHECK_MODULES(NCURSES, ncurses)
++CFLAGS="$CFLAGS $NCURSES_CFLAGS -DHAVE_NCURSES_H=1"
++LIBS="$LIBS $NCURSES_LIBS"
+
+ AC_CHECK_HEADERS(fcntl.h getopt.h limits.h sys/ioctl.h unistd.h)
+ AC_HEADER_DIRENT
+@@ -96,11 +91,4 @@ else
+ fi
+ fi
+
+-AC_CHECK_LIB(ncurses, newwin, ,
+- AC_CHECK_LIB(curses, newwin), ,
+- echo "Hexedit requires the curses library"
+- echo "Ncurses is freely available: ftp://ftp.gnu.org/pub/gnu/"
+- exit 1)
+-
+-
+ AC_OUTPUT(Makefile docs/Makefile gnu/Makefile src/Makefile)