1 |
commit: 84a47e6543c593e187987df9fc7dd5fa09be8b35 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 7 04:19:32 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 7 04:19:37 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84a47e65 |
7 |
|
8 |
app-admin/xstow: update EAPI 7 -> 8; fix build with GCC 12 and Clang |
9 |
|
10 |
Also dodir -> keepdir, hence revbump. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/729114 |
13 |
Closes: https://bugs.gentoo.org/840359 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
.../xstow/files/xstow-1.0.1-gcc12-clang.patch | 33 +++++++++++++ |
17 |
app-admin/xstow/xstow-1.0.2-r1.ebuild | 54 ++++++++++++++++++++++ |
18 |
2 files changed, 87 insertions(+) |
19 |
|
20 |
diff --git a/app-admin/xstow/files/xstow-1.0.1-gcc12-clang.patch b/app-admin/xstow/files/xstow-1.0.1-gcc12-clang.patch |
21 |
new file mode 100644 |
22 |
index 000000000000..982d6bc5cb12 |
23 |
--- /dev/null |
24 |
+++ b/app-admin/xstow/files/xstow-1.0.1-gcc12-clang.patch |
25 |
@@ -0,0 +1,33 @@ |
26 |
+https://svnweb.freebsd.org/ports/head/sysutils/xstow/files/patch-src__string_utils.h?revision=319588&view=co&pathrev=319588 |
27 |
+https://svnweb.freebsd.org/ports/head/sysutils/xstow/files/patch-src__leoini.h?revision=319588&view=co&pathrev=319588 |
28 |
+https://bugs.gentoo.org/840359 |
29 |
+https://bugs.gentoo.org/729114 |
30 |
+ |
31 |
+--- a/src/leoini.h |
32 |
++++ b/src/leoini.h |
33 |
+@@ -260,11 +260,9 @@ |
34 |
+ |
35 |
+ if( start == std::string::npos || |
36 |
+ end == std::string::npos ) |
37 |
+- s = ""; |
38 |
+- else |
39 |
+- s = s.substr( start+1, start-end -1 ); |
40 |
++ return s2x<A>(""); |
41 |
+ |
42 |
+- return s2x<A>(s); |
43 |
++ return s2x<A>(s.substr( start+1, start-end -1 )); |
44 |
+ } |
45 |
+ } // namespace Leo |
46 |
+ |
47 |
+--- a/src/string_utils.h |
48 |
++++ b/src/string_utils.h |
49 |
+@@ -28,6 +28,9 @@ |
50 |
+ # define STRSTREAM |
51 |
+ #endif |
52 |
+ |
53 |
++typedef std::vector<std::string> vec_string; |
54 |
++std::ostream& operator<<( std::ostream& out, const vec_string &v ); |
55 |
++ |
56 |
+ std::string toupper( std::string s ); |
57 |
+ std::string strip( const std::string& str, const std::string& what = " \t\n\0" ); |
58 |
+ bool is_int( const std::string &s ); |
59 |
|
60 |
diff --git a/app-admin/xstow/xstow-1.0.2-r1.ebuild b/app-admin/xstow/xstow-1.0.2-r1.ebuild |
61 |
new file mode 100644 |
62 |
index 000000000000..85b4c928574f |
63 |
--- /dev/null |
64 |
+++ b/app-admin/xstow/xstow-1.0.2-r1.ebuild |
65 |
@@ -0,0 +1,54 @@ |
66 |
+# Copyright 1999-2022 Gentoo Authors |
67 |
+# Distributed under the terms of the GNU General Public License v2 |
68 |
+ |
69 |
+EAPI=8 |
70 |
+ |
71 |
+inherit autotools |
72 |
+ |
73 |
+DESCRIPTION="Replacement for GNU stow with extensions" |
74 |
+HOMEPAGE="http://xstow.sourceforge.net/" |
75 |
+SRC_URI="mirror://sourceforge/xstow/${P}.tar.bz2" |
76 |
+ |
77 |
+LICENSE="GPL-2" |
78 |
+SLOT="0" |
79 |
+KEYWORDS="~amd64 ~ppc ~x86" |
80 |
+IUSE="ncurses" |
81 |
+ |
82 |
+DEPEND="ncurses? ( sys-libs/ncurses:0= )" |
83 |
+RDEPEND="${DEPEND}" |
84 |
+ |
85 |
+PATCHES=( |
86 |
+ "${FILESDIR}"/${PN}-1.0.1-ncurses.patch |
87 |
+ "${FILESDIR}"/${PN}-1.0.1-gcc12-clang.patch |
88 |
+) |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ default |
92 |
+ |
93 |
+ eautoreconf |
94 |
+} |
95 |
+ |
96 |
+src_configure() { |
97 |
+ econf $(use_with ncurses curses) |
98 |
+} |
99 |
+ |
100 |
+src_install() { |
101 |
+ emake DESTDIR="${D}" docdir="${EPREFIX}/usr/share/doc/${PF}/html" install |
102 |
+ dodoc AUTHORS ChangeLog NEWS README TODO |
103 |
+ |
104 |
+ # Create new STOWDIR |
105 |
+ keepdir /var/lib/xstow |
106 |
+ |
107 |
+ # Install env.d file to add STOWDIR to PATH and LDPATH |
108 |
+ doenvd "${FILESDIR}"/99xstow |
109 |
+} |
110 |
+ |
111 |
+pkg_postinst() { |
112 |
+ elog "We now recommend that you use /var/lib/xstow as your STOWDIR" |
113 |
+ elog "instead of /usr/local in order to avoid conflicts with the" |
114 |
+ elog "symlink from /usr/lib64 -> /usr/lib. See Bug 246264" |
115 |
+ elog "(regarding app-admin/stow, equally applicable to XStow) for" |
116 |
+ elog "more details on this change." |
117 |
+ elog "For your convenience, PATH has been updated to include" |
118 |
+ elog "/var/lib/bin." |
119 |
+} |