1 |
commit: e26072b07efb4a0acaa0a322cb4c239a95b6ab22 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Apr 18 15:14:09 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> |
5 |
CommitDate: Sun Apr 18 15:14:39 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e26072b0 |
7 |
|
8 |
sys-libs/safeclib: now it work |
9 |
|
10 |
TODO: fix the manpage issue |
11 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
12 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
13 |
|
14 |
sys-libs/safeclib/files/gh96.patch | 11 +++++ |
15 |
sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild | 57 +++++++++++++---------- |
16 |
2 files changed, 43 insertions(+), 25 deletions(-) |
17 |
|
18 |
diff --git a/sys-libs/safeclib/files/gh96.patch b/sys-libs/safeclib/files/gh96.patch |
19 |
new file mode 100644 |
20 |
index 000000000..83ac48f9c |
21 |
--- /dev/null |
22 |
+++ b/sys-libs/safeclib/files/gh96.patch |
23 |
@@ -0,0 +1,11 @@ |
24 |
+--- a/src/safeclib_private.h |
25 |
++++ b/src/safeclib_private.h |
26 |
+@@ -52,6 +52,8 @@ |
27 |
+ /* Needed since the switch to time64_t */ |
28 |
+ #if defined CONFIG_COMPAT_32BIT_TIME && defined _LINUX_TIME64_H && defined __VDSO_TIME32_H |
29 |
+ #define time_t old_time32_t |
30 |
++#elif defined _LINUX_TIME64_H && !defined __VDSO_TIME32_H |
31 |
++#define time_t time64_t |
32 |
+ #endif |
33 |
+ |
34 |
+ #define RCNEGATE(x) (-(x)) |
35 |
|
36 |
diff --git a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild |
37 |
index fd2ff8584..a1f95c690 100644 |
38 |
--- a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild |
39 |
+++ b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild |
40 |
@@ -3,7 +3,8 @@ |
41 |
|
42 |
EAPI=7 |
43 |
|
44 |
-inherit autotools linux-mod |
45 |
+MODULE_OPTIONAL_USE=modules |
46 |
+inherit autotools linux-info linux-mod |
47 |
|
48 |
MY_REV="986f6d34e49637d68cb41221307231f0ea79ca4d" |
49 |
|
50 |
@@ -16,30 +17,42 @@ SLOT="0" |
51 |
KEYWORDS="~amd64" |
52 |
IUSE="+constraint-handler doc +extensions modules norm-compat +nullslack test unsafe valgrind" |
53 |
RESTRICT="!test? ( test )" |
54 |
- |
55 |
+PATCHES=( "${FILESDIR}/gh96.patch" ) |
56 |
BDEPEND=" |
57 |
doc? ( app-doc/doxygen[dot] ) |
58 |
valgrind? ( dev-util/valgrind ) |
59 |
" |
60 |
|
61 |
S="${WORKDIR}/${PN}-${MY_REV}" |
62 |
-MODULE_NAMES="slkm(misc:${S}-module:${S}-module)" |
63 |
+MODULE_NAMES="slkm(misc:${S}:${S})" |
64 |
BUILD_TARGETS="all" |
65 |
-BUILD_PARAMS="-f Makefile.kernel V=1" |
66 |
+BUILD_PARAMS="-f Makefile.kernel" |
67 |
+ |
68 |
+pkg_setup() { |
69 |
+ if use modules ; then |
70 |
+ CONFIG_CHECK="COMPAT_32BIT_TIME" |
71 |
+ ERROR_COMPAT_32BIT_TIME="module require COMPAT_32BIT_TIME to build" |
72 |
+ fi |
73 |
+ linux-mod_pkg_setup |
74 |
+} |
75 |
|
76 |
src_prepare() { |
77 |
default |
78 |
eautoreconf |
79 |
|
80 |
- if use modules ; then |
81 |
- #duplicate the working folder |
82 |
- #one for the library and one for the module |
83 |
- cd "${WORKDIR}" || die |
84 |
- cp -r "${S}" "${S}-module" || die |
85 |
- fi |
86 |
+ #duplicate the working folder |
87 |
+ #one for the library and one for the module |
88 |
+ cd "${WORKDIR}" || die |
89 |
+ cp -r "${S}" "${S}-lib" || die |
90 |
} |
91 |
|
92 |
src_configure() { |
93 |
+ if use modules ; then |
94 |
+ set_kvobj ko |
95 |
+ econf "${myconf[@]}" --disable-wchar |
96 |
+ fi |
97 |
+ |
98 |
+ cd "${S}-lib" || die |
99 |
#forcing wchar because of https://github.com/rurban/safeclib/issues/95 |
100 |
local myconf=( |
101 |
--disable-static |
102 |
@@ -54,38 +67,32 @@ src_configure() { |
103 |
$(use_enable unsafe) |
104 |
$(use_enable valgrind) |
105 |
) |
106 |
- |
107 |
econf "${myconf[@]}" --enable-wchar |
108 |
- |
109 |
- if use modules ; then |
110 |
- cd "${S}-module" || die |
111 |
- econf "${myconf[@]}" --disable-wchar |
112 |
- fi |
113 |
} |
114 |
|
115 |
src_compile() { |
116 |
- default |
117 |
- |
118 |
if use modules ; then |
119 |
- cd "${S}-module" || die |
120 |
- export src="${S}-module" |
121 |
linux-mod_src_compile |
122 |
fi |
123 |
+ |
124 |
+ cd "${S}-lib" || die |
125 |
+ default |
126 |
} |
127 |
|
128 |
src_install() { |
129 |
+ if use modules ; then |
130 |
+ linux-mod_src_install |
131 |
+ fi |
132 |
+ |
133 |
+ cd "${S}-lib" || die |
134 |
# wcsstr towupper towlower manpages collide with sys-apps/man-pages |
135 |
# what to do? |
136 |
default |
137 |
einstalldocs |
138 |
use doc && dodoc -r doc/. |
139 |
- |
140 |
- if use modules ; then |
141 |
- cd "${S}-module" || die |
142 |
- linux-mod_src_install |
143 |
- fi |
144 |
} |
145 |
|
146 |
src_test() { |
147 |
+ cd "${S}-lib" || die |
148 |
emake check |
149 |
} |