From da13077dd7c1f545e760447fd9b451d29a24d74d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 14 Aug 2015 00:05:15 -0400 Subject: [PATCH] app-editors/curses-hexedit: look up ncurses details via pkg-config --- .../curses-hexedit-0.9.7.ebuild | 10 +++--- ...ses-hexedit-0.9.7-ncurses-pkg-config.patch | 34 +++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 app-editors/curses-hexedit/files/curses-hexedit-0.9.7-ncurses-pkg-config.patch 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) -- 2.26.2