Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/hstr/, app-shells/hstr/files/
Date: Tue, 10 Mar 2020 15:45:50
Message-Id: 1583855117.748250033d52ef9a8ea16d1b7914a2b3086c4a5f.monsieurp@gentoo
1 commit: 748250033d52ef9a8ea16d1b7914a2b3086c4a5f
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 10 15:43:30 2020 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 10 15:45:17 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74825003
7
8 app-shells/hstr: version bump.
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
12
13 app-shells/hstr/Manifest | 1 +
14 .../files/hstr-2.1-fix-ncurses-configure.patch | 81 ++++++++++++++++++++++
15 app-shells/hstr/hstr-2.1.ebuild | 33 +++++++++
16 3 files changed, 115 insertions(+)
17
18 diff --git a/app-shells/hstr/Manifest b/app-shells/hstr/Manifest
19 index b14972debef..602b85af6a4 100644
20 --- a/app-shells/hstr/Manifest
21 +++ b/app-shells/hstr/Manifest
22 @@ -1 +1,2 @@
23 DIST hstr-2.0.tar.gz 1242802 BLAKE2B 24f1a870e6aa12b6544a38601c6bc654e01aa1a185c4f7735559aa3220ed8d9fb840e298526b9e4a177000f2ec5c08caee5da97e13783e4114bde5276ee1e85e SHA512 50d5e8e61aa853dab0093f4225d3329e98bc59609d8d59abf832cd4cb616d78a2fa091d1ad8d16f3543276c4ead95a419f33a13a96f423bf93dc648da32740b7
24 +DIST hstr-2.1.tar.gz 1244067 BLAKE2B aa37f26a5ba8ee465a03212cc80e55b9581e59cbb535f17fda8e59bed062f0b0065d456d8566927c089595b92270b83235f0bf73f26ac88704bd933c1926cd5b SHA512 ea217ac2b6dcb7e283f83d15524b47f88c5c8cfb82e5728537750a2ec8526f03304503a5bb67970d893e10057aba087aa86a67548aa361c892b6ee3e81903122
25
26 diff --git a/app-shells/hstr/files/hstr-2.1-fix-ncurses-configure.patch b/app-shells/hstr/files/hstr-2.1-fix-ncurses-configure.patch
27 new file mode 100644
28 index 00000000000..215fd5cedfc
29 --- /dev/null
30 +++ b/app-shells/hstr/files/hstr-2.1-fix-ncurses-configure.patch
31 @@ -0,0 +1,81 @@
32 +diff --git a/configure.ac b/configure.ac
33 +index 1676ec8..73c8be5 100644
34 +--- a/configure.ac
35 ++++ b/configure.ac
36 +@@ -47,39 +47,33 @@ then
37 + fi
38 +
39 + # PKG_CHECK_MODULES macro is NOT used to avoid confusing syntax errors in case that pkg-config is NOT installed
40 +-AC_CHECK_LIB(ncursesw, killwchar, [],
41 +-[
42 +- AC_CHECK_LIB(ncurses, killwchar, [],
43 +- [
44 +- AC_SUBST([NCURSESW_CFLAGS])
45 +- AC_SUBST([NCURSESW_LIBS])
46 +- if pkg-config --exists ncursesw
47 +- then
48 +- AC_MSG_NOTICE([Module ncursesw found])
49 +- NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
50 +- NCURSESW_LIBS=`pkg-config --libs ncursesw`
51 +- else
52 +- if pkg-config --exists ncurses
53 +- then
54 +- AC_MSG_NOTICE([Module ncurses found])
55 +- NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
56 +- NCURSESW_LIBS=`pkg-config --libs ncurses`
57 +- else
58 +- AS_CASE([$host_os],
59 +- [darwin*],
60 +- [
61 +- AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
62 +- AC_CHECK_HEADER(curses.h)
63 +- ],
64 +- [
65 +- AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
66 +- AC_CHECK_HEADER(ncursesw/curses.h)
67 +- ]
68 +- )
69 +- fi
70 +- fi
71 +- ]) # FAIL of ncurses
72 +-]) # FAIL of ncursesw
73 ++AC_SUBST([NCURSESW_CFLAGS])
74 ++AC_SUBST([NCURSESW_LIBS])
75 ++if pkg-config --exists ncursesw
76 ++then
77 ++ AC_MSG_NOTICE([Module ncursesw found])
78 ++ NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
79 ++ NCURSESW_LIBS=`pkg-config --libs ncursesw`
80 ++else
81 ++ if pkg-config --exists ncurses
82 ++ then
83 ++ AC_MSG_NOTICE([Module ncurses found])
84 ++ NCURSESW_CFLAGS=`pkg-config --cflags ncursesw`
85 ++ NCURSESW_LIBS=`pkg-config --libs ncurses`
86 ++ else
87 ++ AS_CASE([$host_os],
88 ++ [darwin*],
89 ++ [
90 ++ AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
91 ++ AC_CHECK_HEADER(curses.h)
92 ++ ],
93 ++ [
94 ++ AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
95 ++ AC_CHECK_HEADER(ncursesw/curses.h)
96 ++ ]
97 ++ )
98 ++ fi
99 ++fi
100 +
101 +
102 + # Checks for libraries.
103 +diff --git a/src/Makefile.am b/src/Makefile.am
104 +index 7640d21..17a82b7 100644
105 +--- a/src/Makefile.am
106 ++++ b/src/Makefile.am
107 +@@ -37,4 +37,4 @@ hstr_SOURCES = \
108 + install-exec-hook:
109 + ln $(DESTDIR)$(bindir)/hstr$(EXEEXT) $(DESTDIR)$(bindir)/hh$(EXEEXT)
110 +
111 +-hstr_LDADD = $(NCURSES_LIBS)
112 ++hstr_LDADD = $(NCURSESW_LIBS)
113
114 diff --git a/app-shells/hstr/hstr-2.1.ebuild b/app-shells/hstr/hstr-2.1.ebuild
115 new file mode 100644
116 index 00000000000..f9bffba4e61
117 --- /dev/null
118 +++ b/app-shells/hstr/hstr-2.1.ebuild
119 @@ -0,0 +1,33 @@
120 +# Copyright 1999-2020 Gentoo Authors
121 +# Distributed under the terms of the GNU General Public License v2
122 +
123 +EAPI=6
124 +
125 +inherit autotools
126 +
127 +DESCRIPTION="Shell history suggest box"
128 +HOMEPAGE="https://github.com/dvorka/hstr http://www.mindforger.com"
129 +SRC_URI="https://github.com/dvorka/hstr/archive/${PV}.tar.gz -> ${P}.tar.gz"
130 +
131 +SLOT="0"
132 +LICENSE="Apache-2.0"
133 +KEYWORDS="~amd64 ~x86"
134 +
135 +RDEPEND="
136 + sys-libs/ncurses:0=[unicode]"
137 +
138 +DEPEND="
139 + ${RDEPEND}
140 + virtual/pkgconfig"
141 +
142 +DOCS=( CONFIGURATION.md README.md )
143 +
144 +PATCHES=( ${FILESDIR}/${P}-fix-ncurses-configure.patch )
145 +
146 +src_prepare() {
147 + default
148 + sed \
149 + -e 's:-O2::g' \
150 + -i src/Makefile.am || die
151 + eautoreconf
152 +}