1 |
commit: 7042abcbbdc55281a5334cbeddb922b22d1acab6 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 7 03:30:14 2020 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 7 03:40:44 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7042abcb |
7 |
|
8 |
profiles/base: fix libxcrypt USE mask date, add split-usr to mask |
9 |
|
10 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
11 |
Signed-off-by: Patrick McLean <patrick.mclean <AT> sony.com> |
12 |
|
13 |
profiles/base/package.use.mask | 4 +- |
14 |
sys-libs/libxcrypt/libxcrypt-4.4.12-r1.ebuild | 165 ++++++++++++++++++++++++++ |
15 |
2 files changed, 167 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask |
18 |
index 63e97021e23..4dbdb7a19e5 100644 |
19 |
--- a/profiles/base/package.use.mask |
20 |
+++ b/profiles/base/package.use.mask |
21 |
@@ -104,9 +104,9 @@ sci-visualization/veusz fits |
22 |
# eMovix is being removed. |
23 |
kde-apps/k3b emovix |
24 |
|
25 |
-# Patrick McLean <chutzpah@g.o> (2910-11-07) |
26 |
+# Patrick McLean <chutzpah@g.o> (2019-11-07) |
27 |
# Collides with sys-libc/glibc[crypt] |
28 |
-sys-libs/libxcrypt system |
29 |
+sys-libs/libxcrypt split-usr system |
30 |
|
31 |
# Michał Górny <mgorny@g.o> (2019-10-05) |
32 |
# net-libs/openslp is being removed. |
33 |
|
34 |
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.12-r1.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.12-r1.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000000..45264f51d4a |
37 |
--- /dev/null |
38 |
+++ b/sys-libs/libxcrypt/libxcrypt-4.4.12-r1.ebuild |
39 |
@@ -0,0 +1,165 @@ |
40 |
+# Copyright 1999-2020 Gentoo Authors |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI=7 |
44 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
45 |
+inherit autotools multibuild python-any-r1 usr-ldscript multilib-minimal |
46 |
+ |
47 |
+DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others " |
48 |
+SRC_URI="https://github.com/besser82/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
49 |
+HOMEPAGE="https://github.com/besser82/libxcrypt" |
50 |
+ |
51 |
+LICENSE="LGPL-2.1+ public-domain BSD BSD-2" |
52 |
+SLOT="0/1" |
53 |
+KEYWORDS="~amd64 ~x86" |
54 |
+IUSE="+compat split-usr +static-libs system test" |
55 |
+ |
56 |
+DEPEND="system? ( |
57 |
+ elibc_glibc? ( sys-libs/glibc[-crypt(+)] ) |
58 |
+ !sys-libs/musl |
59 |
+ )" |
60 |
+RDEPEND="${DEPEND}" |
61 |
+BDEPEND="sys-apps/findutils |
62 |
+ test? ( |
63 |
+ ${PYTHON_DEPS} |
64 |
+ $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') |
65 |
+ )" |
66 |
+ |
67 |
+RESTRICT="!test? ( test )" |
68 |
+ |
69 |
+REQUIRED_USE="split-usr? ( system )" |
70 |
+ |
71 |
+PATCHES=( |
72 |
+ "${FILESDIR}/libxcrypt-4.4.12-pythonver.patch" |
73 |
+ "${FILESDIR}/libxcrypt-4.4.12-multibuild.patch" |
74 |
+) |
75 |
+ |
76 |
+pkg_setup() { |
77 |
+ MULTIBUILD_VARIANTS=( |
78 |
+ $(usex compat 'xcrypt_compat' '') |
79 |
+ xcrypt_nocompat |
80 |
+ ) |
81 |
+ |
82 |
+ use test && python-any-r1_pkg_setup |
83 |
+} |
84 |
+ |
85 |
+src_prepare() { |
86 |
+ default |
87 |
+ eautoreconf |
88 |
+} |
89 |
+ |
90 |
+src_configure() { |
91 |
+ multibuild_foreach_variant multilib-minimal_src_configure |
92 |
+} |
93 |
+ |
94 |
+get_xclibdir() { |
95 |
+ printf -- "%s/%s/%s\n" \ |
96 |
+ "$(usex split-usr '' '/usr')" \ |
97 |
+ "$(get_libdir)" \ |
98 |
+ "$(usex system '' 'xcrypt')" |
99 |
+} |
100 |
+ |
101 |
+multilib_src_configure() { |
102 |
+ local -a myconf=( |
103 |
+ --libdir=$(get_xclibdir) |
104 |
+ --with-pkgconfigdir=/usr/$(get_libdir)/pkgconfig |
105 |
+ --includedir="${EPREFIX}/usr/include/$(usex system '' 'xcrypt')" |
106 |
+ ) |
107 |
+ |
108 |
+ case "${MULTIBUILD_ID}" in |
109 |
+ xcrypt_compat-*) |
110 |
+ myconf+=( |
111 |
+ --disable-static |
112 |
+ --disable-xcrypt-compat-files |
113 |
+ --enable-obsolete-api=yes |
114 |
+ ) |
115 |
+ ;; |
116 |
+ xcrypt_nocompat-*) |
117 |
+ myconf+=( |
118 |
+ --enable-obsolete-api=no |
119 |
+ $(use_enable static-libs static) |
120 |
+ ) |
121 |
+ ;; |
122 |
+ *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";; |
123 |
+ esac |
124 |
+ |
125 |
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" |
126 |
+} |
127 |
+ |
128 |
+src_compile() { |
129 |
+ multibuild_foreach_variant multilib-minimal_src_compile |
130 |
+} |
131 |
+ |
132 |
+multilib_src_test() { |
133 |
+ emake check |
134 |
+} |
135 |
+ |
136 |
+src_test() { |
137 |
+ multibuild_foreach_variant multilib-minimal_src_test |
138 |
+} |
139 |
+ |
140 |
+src_install() { |
141 |
+ multibuild_foreach_variant multilib-minimal_src_install |
142 |
+ |
143 |
+ ( |
144 |
+ shopt -s failglob || die "failglob failed" |
145 |
+ |
146 |
+ # make sure out man pages don't collide with glibc or man-pages |
147 |
+ for manpage in "${ED}"/usr/share/man/man3/crypt{,_r}.?*; do |
148 |
+ mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \ |
149 |
+ || die "mv failed" |
150 |
+ done |
151 |
+ ) || die "failglob error" |
152 |
+ |
153 |
+ # remove useless stuff from installation |
154 |
+ find "${D}"/usr/share/doc/${PF} -type l -delete || die |
155 |
+ find "${D}" -name '*.la' -delete || die |
156 |
+} |
157 |
+ |
158 |
+multilib_src_install() { |
159 |
+ emake DESTDIR="${D}" install |
160 |
+ |
161 |
+ # don't install the libcrypt.so symlink for the "compat" version |
162 |
+ case "${MULTIBUILD_ID}" in |
163 |
+ xcrypt_compat-*) |
164 |
+ rm "${D}"$(get_xclibdir)/libcrypt$(get_libname) \ |
165 |
+ || die "failed to remove extra compat libraries" |
166 |
+ ;; |
167 |
+ xcrypt_nocompat-*) |
168 |
+ if use static-libs; then |
169 |
+ ( |
170 |
+ # .a files are installed to /$(get_libdir) by default |
171 |
+ # move static libraries to /usr prefix or portage will abort |
172 |
+ shopt -s nullglob || die "failglob failed" |
173 |
+ static_libs=( "${ED}"/$(get_xclibdir)/*.a ) |
174 |
+ |
175 |
+ if [[ -n ${static_libs[*]} ]]; then |
176 |
+ dodir "/usr/$(get_xclibdir)" |
177 |
+ mv "${static_libs[@]}" "${D}/usr/$(get_xclibdir)" \ |
178 |
+ || die "moving static libs failed" |
179 |
+ fi |
180 |
+ ) |
181 |
+ fi |
182 |
+ |
183 |
+ if use split-usr && use system; then |
184 |
+ ( |
185 |
+ # now try to find libraries and make sure to generate |
186 |
+ # ldscripts for them |
187 |
+ shopt -s failglob || die "failglob failed" |
188 |
+ |
189 |
+ for lib_file in "${ED}"$(get_xclibdir)/*$(get_libname); do |
190 |
+ libname="$(basename "${lib_file}")" |
191 |
+ |
192 |
+ cp -L "${lib_file}" \ |
193 |
+ "${ED}/usr/$(get_xclibdir)/${libname}" \ |
194 |
+ || die "copying ${libname} failed" |
195 |
+ |
196 |
+ gen_usr_ldscript ${libname} |
197 |
+ dosym ${libname} /usr/$(get_xclibdir)/${libname}.2 |
198 |
+ done |
199 |
+ ) |
200 |
+ fi |
201 |
+ ;; |
202 |
+ *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";; |
203 |
+ esac |
204 |
+} |