1 |
commit: e04596531f1f4eed078d0f65694f28e01bfc660c |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 24 23:25:27 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 24 23:25:27 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0459653 |
7 |
|
8 |
net-misc/ntpsec: improve python |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
...psec-1.0.0-r1.ebuild => ntpsec-1.0.0-r2.ebuild} | 52 +++++++++++++++------- |
13 |
1 file changed, 37 insertions(+), 15 deletions(-) |
14 |
|
15 |
diff --git a/net-misc/ntpsec/ntpsec-1.0.0-r1.ebuild b/net-misc/ntpsec/ntpsec-1.0.0-r2.ebuild |
16 |
similarity index 72% |
17 |
rename from net-misc/ntpsec/ntpsec-1.0.0-r1.ebuild |
18 |
rename to net-misc/ntpsec/ntpsec-1.0.0-r2.ebuild |
19 |
index 91a7ea1e911..46136f2fa0e 100644 |
20 |
--- a/net-misc/ntpsec/ntpsec-1.0.0-r1.ebuild |
21 |
+++ b/net-misc/ntpsec/ntpsec-1.0.0-r2.ebuild |
22 |
@@ -3,10 +3,10 @@ |
23 |
|
24 |
EAPI=6 |
25 |
|
26 |
-PYTHON_COMPAT=( python3_{4,5,6} ) |
27 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) |
28 |
PYTHON_REQ_USE='threads(+)' |
29 |
|
30 |
-inherit flag-o-matic python-any-r1 waf-utils systemd user |
31 |
+inherit flag-o-matic python-r1 waf-utils systemd user |
32 |
|
33 |
if [[ ${PV} == *9999* ]]; then |
34 |
inherit git-r3 |
35 |
@@ -39,7 +39,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
36 |
CDEPEND="${PYTHON_DEPS} |
37 |
${BDEPEND} |
38 |
sys-libs/libcap |
39 |
- dev-python/psutil |
40 |
+ dev-python/psutil[${PYTHON_USEDEP}] |
41 |
libressl? ( dev-libs/libressl:0= ) |
42 |
!libressl? ( dev-libs/openssl:0= ) |
43 |
seccomp? ( sys-libs/libseccomp ) |
44 |
@@ -58,11 +58,15 @@ DEPEND="${CDEPEND} |
45 |
" |
46 |
|
47 |
pkg_setup() { |
48 |
- python-any-r1_pkg_setup |
49 |
enewgroup ntp 123 |
50 |
enewuser ntp 123 -1 /dev/null ntp |
51 |
} |
52 |
|
53 |
+src_prepare() { |
54 |
+ default |
55 |
+ python_copy_sources |
56 |
+} |
57 |
+ |
58 |
src_configure() { |
59 |
is-flagq -flto* && filter-flags -flto* -fuse-linker-plugin |
60 |
|
61 |
@@ -80,20 +84,38 @@ src_configure() { |
62 |
# Remove autostripping of binaries |
63 |
sed -i -e '/Strip binaries/d' wscript |
64 |
|
65 |
- waf-utils_src_configure --nopyc --nopyo --refclock="${CLOCKSTRING}" \ |
66 |
- $(use doc && echo "--enable-doc") \ |
67 |
- $(use early && echo "--enable-early-droproot") \ |
68 |
- $(use gdb && echo "--enable-debug-gdb") \ |
69 |
- $(use nist && echo "--enable-lockclock") \ |
70 |
- $(use samba && echo "--enable-mssntp") \ |
71 |
- $(use seccomp && echo "--enable-seccomp") \ |
72 |
- $(use smear && echo "--enable-leap-smear") \ |
73 |
- $(use tests && echo "--alltests") \ |
74 |
- $(use_enable debug debug) |
75 |
+ local myconf=( |
76 |
+ --nopyc |
77 |
+ --nopyo |
78 |
+ --refclock="${CLOCKSTRING}" |
79 |
+ $(use doc && echo "--enable-doc") |
80 |
+ $(use early && echo "--enable-early-droproot") |
81 |
+ $(use gdb && echo "--enable-debug-gdb") |
82 |
+ $(use nist && echo "--enable-lockclock") |
83 |
+ $(use samba && echo "--enable-mssntp") |
84 |
+ $(use seccomp && echo "--enable-seccomp") |
85 |
+ $(use smear && echo "--enable-leap-smear") |
86 |
+ $(use tests && echo "--alltests") |
87 |
+ $(use_enable debug debug) ) |
88 |
+ |
89 |
+ python_configure() { |
90 |
+ waf-utils_src_configure "${myconf[@]}" |
91 |
+ } |
92 |
+ python_foreach_impl run_in_build_dir python_configure |
93 |
+} |
94 |
+ |
95 |
+src_compile() { |
96 |
+ python_compile() { |
97 |
+ waf-utils_src_compile |
98 |
+ } |
99 |
+ python_foreach_impl run_in_build_dir python_compile |
100 |
} |
101 |
|
102 |
src_install() { |
103 |
- waf-utils_src_install |
104 |
+ python_install() { |
105 |
+ waf-utils_src_install |
106 |
+ } |
107 |
+ python_foreach_impl run_in_build_dir python_install |
108 |
|
109 |
# Install heat generating scripts |
110 |
use heat && dosbin "${S}/contrib/ntpheat"{,usb} |