mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 20:43:09 -04:00
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>
This commit is contained in:
11
sys-libs/safeclib/files/gh96.patch
Normal file
11
sys-libs/safeclib/files/gh96.patch
Normal file
@@ -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))
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
EAPI=7
|
EAPI=7
|
||||||
|
|
||||||
inherit autotools linux-mod
|
MODULE_OPTIONAL_USE=modules
|
||||||
|
inherit autotools linux-info linux-mod
|
||||||
|
|
||||||
MY_REV="986f6d34e49637d68cb41221307231f0ea79ca4d"
|
MY_REV="986f6d34e49637d68cb41221307231f0ea79ca4d"
|
||||||
|
|
||||||
@@ -16,30 +17,42 @@ SLOT="0"
|
|||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
IUSE="+constraint-handler doc +extensions modules norm-compat +nullslack test unsafe valgrind"
|
IUSE="+constraint-handler doc +extensions modules norm-compat +nullslack test unsafe valgrind"
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
|
PATCHES=( "${FILESDIR}/gh96.patch" )
|
||||||
BDEPEND="
|
BDEPEND="
|
||||||
doc? ( app-doc/doxygen[dot] )
|
doc? ( app-doc/doxygen[dot] )
|
||||||
valgrind? ( dev-util/valgrind )
|
valgrind? ( dev-util/valgrind )
|
||||||
"
|
"
|
||||||
|
|
||||||
S="${WORKDIR}/${PN}-${MY_REV}"
|
S="${WORKDIR}/${PN}-${MY_REV}"
|
||||||
MODULE_NAMES="slkm(misc:${S}-module:${S}-module)"
|
MODULE_NAMES="slkm(misc:${S}:${S})"
|
||||||
BUILD_TARGETS="all"
|
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() {
|
src_prepare() {
|
||||||
default
|
default
|
||||||
eautoreconf
|
eautoreconf
|
||||||
|
|
||||||
if use modules ; then
|
#duplicate the working folder
|
||||||
#duplicate the working folder
|
#one for the library and one for the module
|
||||||
#one for the library and one for the module
|
cd "${WORKDIR}" || die
|
||||||
cd "${WORKDIR}" || die
|
cp -r "${S}" "${S}-lib" || die
|
||||||
cp -r "${S}" "${S}-module" || die
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_configure() {
|
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
|
#forcing wchar because of https://github.com/rurban/safeclib/issues/95
|
||||||
local myconf=(
|
local myconf=(
|
||||||
--disable-static
|
--disable-static
|
||||||
@@ -54,38 +67,32 @@ src_configure() {
|
|||||||
$(use_enable unsafe)
|
$(use_enable unsafe)
|
||||||
$(use_enable valgrind)
|
$(use_enable valgrind)
|
||||||
)
|
)
|
||||||
|
|
||||||
econf "${myconf[@]}" --enable-wchar
|
econf "${myconf[@]}" --enable-wchar
|
||||||
|
|
||||||
if use modules ; then
|
|
||||||
cd "${S}-module" || die
|
|
||||||
econf "${myconf[@]}" --disable-wchar
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
default
|
|
||||||
|
|
||||||
if use modules ; then
|
if use modules ; then
|
||||||
cd "${S}-module" || die
|
|
||||||
export src="${S}-module"
|
|
||||||
linux-mod_src_compile
|
linux-mod_src_compile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd "${S}-lib" || die
|
||||||
|
default
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
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
|
# wcsstr towupper towlower manpages collide with sys-apps/man-pages
|
||||||
# what to do?
|
# what to do?
|
||||||
default
|
default
|
||||||
einstalldocs
|
einstalldocs
|
||||||
use doc && dodoc -r doc/.
|
use doc && dodoc -r doc/.
|
||||||
|
|
||||||
if use modules ; then
|
|
||||||
cd "${S}-module" || die
|
|
||||||
linux-mod_src_install
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_test() {
|
src_test() {
|
||||||
|
cd "${S}-lib" || die
|
||||||
emake check
|
emake check
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user