diff options
author | 2021-04-18 17:14:09 +0200 | |
---|---|---|
committer | 2021-04-18 17:14:39 +0200 | |
commit | e26072b07efb4a0acaa0a322cb4c239a95b6ab22 (patch) | |
tree | 6f918c2ba286097e736094e63052b2a6cb211d99 /sys-libs | |
parent | sys-fs/fscrypt: do not strip files (diff) | |
download | guru-e26072b07efb4a0acaa0a322cb4c239a95b6ab22.tar.gz guru-e26072b07efb4a0acaa0a322cb4c239a95b6ab22.tar.bz2 guru-e26072b07efb4a0acaa0a322cb4c239a95b6ab22.zip |
sys-libs/safeclib: now it work
TODO: fix the manpage issue
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/safeclib/files/gh96.patch | 11 | ||||
-rw-r--r-- | sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild | 57 |
2 files changed, 43 insertions, 25 deletions
diff --git a/sys-libs/safeclib/files/gh96.patch b/sys-libs/safeclib/files/gh96.patch new file mode 100644 index 0000000000..83ac48f9c2 --- /dev/null +++ b/sys-libs/safeclib/files/gh96.patch @@ -0,0 +1,11 @@ +--- a/src/safeclib_private.h ++++ b/src/safeclib_private.h +@@ -52,6 +52,8 @@ + /* Needed since the switch to time64_t */ + #if defined CONFIG_COMPAT_32BIT_TIME && defined _LINUX_TIME64_H && defined __VDSO_TIME32_H + #define time_t old_time32_t ++#elif defined _LINUX_TIME64_H && !defined __VDSO_TIME32_H ++#define time_t time64_t + #endif + + #define RCNEGATE(x) (-(x)) diff --git a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild index fd2ff8584a..a1f95c6905 100644 --- a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild +++ b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild @@ -3,7 +3,8 @@ EAPI=7 -inherit autotools linux-mod +MODULE_OPTIONAL_USE=modules +inherit autotools linux-info linux-mod MY_REV="986f6d34e49637d68cb41221307231f0ea79ca4d" @@ -16,30 +17,42 @@ SLOT="0" KEYWORDS="~amd64" IUSE="+constraint-handler doc +extensions modules norm-compat +nullslack test unsafe valgrind" RESTRICT="!test? ( test )" - +PATCHES=( "${FILESDIR}/gh96.patch" ) BDEPEND=" doc? ( app-doc/doxygen[dot] ) valgrind? ( dev-util/valgrind ) " S="${WORKDIR}/${PN}-${MY_REV}" -MODULE_NAMES="slkm(misc:${S}-module:${S}-module)" +MODULE_NAMES="slkm(misc:${S}:${S})" BUILD_TARGETS="all" -BUILD_PARAMS="-f Makefile.kernel V=1" +BUILD_PARAMS="-f Makefile.kernel" + +pkg_setup() { + if use modules ; then + CONFIG_CHECK="COMPAT_32BIT_TIME" + ERROR_COMPAT_32BIT_TIME="module require COMPAT_32BIT_TIME to build" + fi + linux-mod_pkg_setup +} src_prepare() { default eautoreconf - if use modules ; then - #duplicate the working folder - #one for the library and one for the module - cd "${WORKDIR}" || die - cp -r "${S}" "${S}-module" || die - fi + #duplicate the working folder + #one for the library and one for the module + cd "${WORKDIR}" || die + cp -r "${S}" "${S}-lib" || die } src_configure() { + if use modules ; then + set_kvobj ko + econf "${myconf[@]}" --disable-wchar + fi + + cd "${S}-lib" || die #forcing wchar because of https://github.com/rurban/safeclib/issues/95 local myconf=( --disable-static @@ -54,38 +67,32 @@ src_configure() { $(use_enable unsafe) $(use_enable valgrind) ) - econf "${myconf[@]}" --enable-wchar - - if use modules ; then - cd "${S}-module" || die - econf "${myconf[@]}" --disable-wchar - fi } src_compile() { - default - if use modules ; then - cd "${S}-module" || die - export src="${S}-module" linux-mod_src_compile fi + + cd "${S}-lib" || die + default } src_install() { + if use modules ; then + linux-mod_src_install + fi + + cd "${S}-lib" || die # wcsstr towupper towlower manpages collide with sys-apps/man-pages # what to do? default einstalldocs use doc && dodoc -r doc/. - - if use modules ; then - cd "${S}-module" || die - linux-mod_src_install - fi } src_test() { + cd "${S}-lib" || die emake check } |