Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/pam_wrapper/
Date: Wed, 20 Oct 2021 04:01:22
Message-Id: 1634702440.ed283b6255f2113865198fec01820b79b73708e3.sam@gentoo
1 commit: ed283b6255f2113865198fec01820b79b73708e3
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 20 04:00:40 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 20 04:00:40 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed283b62
7
8 sys-libs/pam_wrapper: fix compile for multilib
9
10 We don't want to try build Python bindings for the multilib ABI (it's pointless,
11 it's only used for tests in other packages anyway).
12
13 Closes: https://bugs.gentoo.org/737468
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 ...1.1.3-r1.ebuild => pam_wrapper-1.1.3-r2.ebuild} | 46 ++++++++++++++++------
17 1 file changed, 34 insertions(+), 12 deletions(-)
18
19 diff --git a/sys-libs/pam_wrapper/pam_wrapper-1.1.3-r1.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.3-r2.ebuild
20 similarity index 52%
21 rename from sys-libs/pam_wrapper/pam_wrapper-1.1.3-r1.ebuild
22 rename to sys-libs/pam_wrapper/pam_wrapper-1.1.3-r2.ebuild
23 index a95f837c4bb..65144032259 100644
24 --- a/sys-libs/pam_wrapper/pam_wrapper-1.1.3-r1.ebuild
25 +++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.3-r2.ebuild
26 @@ -19,7 +19,6 @@ LICENSE="GPL-3"
27 SLOT="0"
28 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
29 IUSE="test"
30 -
31 RESTRICT="!test? ( test )"
32 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
33
34 @@ -27,7 +26,6 @@ RDEPEND="
35 ${PYTHON_DEPS}
36 sys-libs/pam:0=[${MULTILIB_USEDEP}]
37 "
38 -
39 DEPEND="
40 ${RDEPEND}
41 test? ( dev-util/cmocka[${MULTILIB_USEDEP}] )
42 @@ -35,26 +33,50 @@ DEPEND="
43
44 multilib_src_configure() {
45 configure_for_python() {
46 - local libpam="${EPREFIX}"
47 - multilib_is_native_abi || libpam+="/usr"
48 - libpam+="/$(get_libdir)/libpam.so.0"
49 + local libpam="${EPREFIX}/$(get_libdir)/libpam.so.0"
50
51 local mycmakeargs=(
52 -DPAM_LIBRARY="${libpam}"
53 - -DUNIT_TESTING=$(usex test)
54 - -DPYTHON2_LIBRARY="/dev/null" # Disabled
55 - -DPYTHON3_INCLUDE_DIR="$(python_get_includedir)"
56 - -DPYTHON3_SITELIB="$(python_get_sitedir)"
57 + -DUNIT_TESTING=OFF
58 )
59 +
60 cmake_src_configure
61 }
62 - python_foreach_impl configure_for_python
63 +
64 + if multilib_is_native_abi ; then
65 + # Build the Pythons for each version (but only for the native ABI)
66 + # bug #737468
67 + python_foreach_impl configure_for_python
68 + fi
69 +
70 + # Do the regular build now
71 + local libpam="${EPREFIX}"
72 + multilib_is_native_abi || libpam+="/usr"
73 + libpam+="/$(get_libdir)/libpam.so.0"
74 +
75 + local mycmakeargs=(
76 + -DPAM_LIBRARY="${libpam}"
77 + -DUNIT_TESTING=$(usex test)
78 + -DCMAKE_DISABLE_FIND_PACKAGE_Python{Libs,Interp,SiteLibs}=ON
79 + )
80 +
81 + cmake_src_configure
82 }
83
84 multilib_src_compile() {
85 - python_foreach_impl cmake_src_compile
86 + if multilib_is_native_abi ; then
87 + python_foreach_impl cmake_src_compile
88 + fi
89 +
90 + # Compile the "proper" version without Python last
91 + cmake_src_compile
92 }
93
94 multilib_src_install() {
95 - python_foreach_impl cmake_src_install
96 + if multilib_is_native_abi ; then
97 + python_foreach_impl cmake_src_install
98 + fi
99 +
100 + # Install the "proper" version without Python last
101 + cmake_src_install
102 }