1 |
commit: 50942d513fa2c878cd975a822cc3ca70b55e8b56 |
2 |
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 28 22:00:48 2019 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 28 22:01:02 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50942d51 |
7 |
|
8 |
app-shells/hstr: fix ncurses configure. |
9 |
|
10 |
Patch courtesy of Dan Goodliffe <gentoo <AT> randomdan.homeip.net>. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/690232 |
13 |
Package-Manager: Portage-2.3.79, Repoman-2.3.16 |
14 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
15 |
|
16 |
.../files/hstr-2.0-fix-ncurses-configure.patch | 81 ++++++++++++++++++++++ |
17 |
app-shells/hstr/hstr-2.0.ebuild | 2 + |
18 |
2 files changed, 83 insertions(+) |
19 |
|
20 |
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 |
21 |
new file mode 100644 |
22 |
index 00000000000..215fd5cedfc |
23 |
--- /dev/null |
24 |
+++ b/app-shells/hstr/files/hstr-2.0-fix-ncurses-configure.patch |
25 |
@@ -0,0 +1,81 @@ |
26 |
+diff --git a/configure.ac b/configure.ac |
27 |
+index 1676ec8..73c8be5 100644 |
28 |
+--- a/configure.ac |
29 |
++++ b/configure.ac |
30 |
+@@ -47,39 +47,33 @@ then |
31 |
+ fi |
32 |
+ |
33 |
+ # PKG_CHECK_MODULES macro is NOT used to avoid confusing syntax errors in case that pkg-config is NOT installed |
34 |
+-AC_CHECK_LIB(ncursesw, killwchar, [], |
35 |
+-[ |
36 |
+- AC_CHECK_LIB(ncurses, killwchar, [], |
37 |
+- [ |
38 |
+- AC_SUBST([NCURSESW_CFLAGS]) |
39 |
+- AC_SUBST([NCURSESW_LIBS]) |
40 |
+- if pkg-config --exists ncursesw |
41 |
+- then |
42 |
+- AC_MSG_NOTICE([Module ncursesw found]) |
43 |
+- NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
44 |
+- NCURSESW_LIBS=`pkg-config --libs ncursesw` |
45 |
+- else |
46 |
+- if pkg-config --exists ncurses |
47 |
+- then |
48 |
+- AC_MSG_NOTICE([Module ncurses found]) |
49 |
+- NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
50 |
+- NCURSESW_LIBS=`pkg-config --libs ncurses` |
51 |
+- else |
52 |
+- AS_CASE([$host_os], |
53 |
+- [darwin*], |
54 |
+- [ |
55 |
+- AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])]) |
56 |
+- AC_CHECK_HEADER(curses.h) |
57 |
+- ], |
58 |
+- [ |
59 |
+- AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])]) |
60 |
+- AC_CHECK_HEADER(ncursesw/curses.h) |
61 |
+- ] |
62 |
+- ) |
63 |
+- fi |
64 |
+- fi |
65 |
+- ]) # FAIL of ncurses |
66 |
+-]) # FAIL of ncursesw |
67 |
++AC_SUBST([NCURSESW_CFLAGS]) |
68 |
++AC_SUBST([NCURSESW_LIBS]) |
69 |
++if pkg-config --exists ncursesw |
70 |
++then |
71 |
++ AC_MSG_NOTICE([Module ncursesw found]) |
72 |
++ NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
73 |
++ NCURSESW_LIBS=`pkg-config --libs ncursesw` |
74 |
++else |
75 |
++ if pkg-config --exists ncurses |
76 |
++ then |
77 |
++ AC_MSG_NOTICE([Module ncurses found]) |
78 |
++ NCURSESW_CFLAGS=`pkg-config --cflags ncursesw` |
79 |
++ NCURSESW_LIBS=`pkg-config --libs ncurses` |
80 |
++ else |
81 |
++ AS_CASE([$host_os], |
82 |
++ [darwin*], |
83 |
++ [ |
84 |
++ AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])]) |
85 |
++ AC_CHECK_HEADER(curses.h) |
86 |
++ ], |
87 |
++ [ |
88 |
++ AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])]) |
89 |
++ AC_CHECK_HEADER(ncursesw/curses.h) |
90 |
++ ] |
91 |
++ ) |
92 |
++ fi |
93 |
++fi |
94 |
+ |
95 |
+ |
96 |
+ # Checks for libraries. |
97 |
+diff --git a/src/Makefile.am b/src/Makefile.am |
98 |
+index 7640d21..17a82b7 100644 |
99 |
+--- a/src/Makefile.am |
100 |
++++ b/src/Makefile.am |
101 |
+@@ -37,4 +37,4 @@ hstr_SOURCES = \ |
102 |
+ install-exec-hook: |
103 |
+ ln $(DESTDIR)$(bindir)/hstr$(EXEEXT) $(DESTDIR)$(bindir)/hh$(EXEEXT) |
104 |
+ |
105 |
+-hstr_LDADD = $(NCURSES_LIBS) |
106 |
++hstr_LDADD = $(NCURSESW_LIBS) |
107 |
|
108 |
diff --git a/app-shells/hstr/hstr-2.0.ebuild b/app-shells/hstr/hstr-2.0.ebuild |
109 |
index 206760fd98b..b2332147a9b 100644 |
110 |
--- a/app-shells/hstr/hstr-2.0.ebuild |
111 |
+++ b/app-shells/hstr/hstr-2.0.ebuild |
112 |
@@ -22,6 +22,8 @@ DEPEND=" |
113 |
|
114 |
DOCS=( CONFIGURATION.md README.md ) |
115 |
|
116 |
+PATCHES=( ${FILESDIR}/${P}-fix-ncurses-configure.patch ) |
117 |
+ |
118 |
src_prepare() { |
119 |
default |
120 |
sed \ |