summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2019-11-28 23:00:48 +0100
committerPatrice Clement <monsieurp@gentoo.org>2019-11-28 23:01:02 +0100
commit50942d513fa2c878cd975a822cc3ca70b55e8b56 (patch)
tree60cc21fcc9967dc030fb388bb88a75b77019f5e0 /app-shells
parentdev-php/pecl-imagick: add PHP 7.4 support (diff)
downloadgentoo-50942d513fa2c878cd975a822cc3ca70b55e8b56.tar.gz
gentoo-50942d513fa2c878cd975a822cc3ca70b55e8b56.tar.bz2
gentoo-50942d513fa2c878cd975a822cc3ca70b55e8b56.zip
app-shells/hstr: fix ncurses configure.
Patch courtesy of Dan Goodliffe <gentoo@randomdan.homeip.net>. Closes: https://bugs.gentoo.org/690232 Package-Manager: Portage-2.3.79, Repoman-2.3.16 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/hstr/files/hstr-2.0-fix-ncurses-configure.patch81
-rw-r--r--app-shells/hstr/hstr-2.0.ebuild2
2 files changed, 83 insertions, 0 deletions
diff --git a/app-shells/hstr/files/hstr-2.0-fix-ncurses-configure.patch b/app-shells/hstr/files/hstr-2.0-fix-ncurses-configure.patch
new file mode 100644
index 00000000000..215fd5cedfc
--- /dev/null
+++ b/app-shells/hstr/files/hstr-2.0-fix-ncurses-configure.patch
@@ -0,0 +1,81 @@
+diff --git a/configure.ac b/configure.ac
+index 1676ec8..73c8be5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -47,39 +47,33 @@ then
+ fi
+
+ # PKG_CHECK_MODULES macro is NOT used to avoid confusing syntax errors in case that pkg-config is NOT installed
+-AC_CHECK_LIB(ncursesw, killwchar, [],
+-[
+- AC_CHECK_LIB(ncurses, killwchar, [],
+- [
+- AC_SUBST([NCURSESW_CFLAGS])
+- AC_SUBST([NCURSESW_LIBS])
+- if pkg-config --exists ncursesw
+- then
+- AC_MSG_NOTICE([Module ncursesw found])
+- NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
+- NCURSESW_LIBS=`pkg-config --libs ncursesw`
+- else
+- if pkg-config --exists ncurses
+- then
+- AC_MSG_NOTICE([Module ncurses found])
+- NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
+- NCURSESW_LIBS=`pkg-config --libs ncurses`
+- else
+- AS_CASE([$host_os],
+- [darwin*],
+- [
+- AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
+- AC_CHECK_HEADER(curses.h)
+- ],
+- [
+- AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
+- AC_CHECK_HEADER(ncursesw/curses.h)
+- ]
+- )
+- fi
+- fi
+- ]) # FAIL of ncurses
+-]) # FAIL of ncursesw
++AC_SUBST([NCURSESW_CFLAGS])
++AC_SUBST([NCURSESW_LIBS])
++if pkg-config --exists ncursesw
++then
++ AC_MSG_NOTICE([Module ncursesw found])
++ NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
++ NCURSESW_LIBS=`pkg-config --libs ncursesw`
++else
++ if pkg-config --exists ncurses
++ then
++ AC_MSG_NOTICE([Module ncurses found])
++ NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
++ NCURSESW_LIBS=`pkg-config --libs ncurses`
++ else
++ AS_CASE([$host_os],
++ [darwin*],
++ [
++ AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
++ AC_CHECK_HEADER(curses.h)
++ ],
++ [
++ AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
++ AC_CHECK_HEADER(ncursesw/curses.h)
++ ]
++ )
++ fi
++fi
+
+
+ # Checks for libraries.
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 7640d21..17a82b7 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -37,4 +37,4 @@ hstr_SOURCES = \
+ install-exec-hook:
+ ln $(DESTDIR)$(bindir)/hstr$(EXEEXT) $(DESTDIR)$(bindir)/hh$(EXEEXT)
+
+-hstr_LDADD = $(NCURSES_LIBS)
++hstr_LDADD = $(NCURSESW_LIBS)
diff --git a/app-shells/hstr/hstr-2.0.ebuild b/app-shells/hstr/hstr-2.0.ebuild
index 206760fd98b..b2332147a9b 100644
--- a/app-shells/hstr/hstr-2.0.ebuild
+++ b/app-shells/hstr/hstr-2.0.ebuild
@@ -22,6 +22,8 @@ DEPEND="
DOCS=( CONFIGURATION.md README.md )
+PATCHES=( ${FILESDIR}/${P}-fix-ncurses-configure.patch )
+
src_prepare() {
default
sed \