* [gentoo-commits] repo/proj/guru:master commit in: sys-libs/safeclib/
@ 2021-04-14 9:08 Andrew Ammerlaan
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Ammerlaan @ 2021-04-14 9:08 UTC (permalink / raw
To: gentoo-commits
commit: 763368d89cca30926be9a69d0fe02ffd10847af6
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Apr 13 23:56:06 2021 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Apr 13 23:56:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=763368d8
sys-libs/safeclib: use the right makefile
USE=modules still fail for me
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
index 7a5fe84fd..f3ba40fda 100644
--- a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
+++ b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
@@ -17,12 +17,14 @@ KEYWORDS="~amd64"
IUSE="+constraint-handler +extensions modules norm-compat +nullslack test unsafe valgrind"
RESTRICT="!test? ( test )"
BDEPEND="
+ app-doc/doxygen[dot]
valgrind? ( dev-util/valgrind )
"
S="${WORKDIR}/${PN}-${MY_REV}"
-MODULE_NAMES="slkm(misc:${S}-module:${S}-module/src)"
+MODULE_NAMES="slkm(misc:${S}-module:${S}-module)"
BUILD_TARGETS="all"
+BUILD_PARAMS="-f Makefile.kernel"
src_prepare() {
eautoreconf
@@ -62,11 +64,13 @@ src_compile() {
if use modules ; then
cd "${S}-module" || die
- linux-mod_src_compile || die
+ linux-mod_src_compile
fi
}
src_install() {
+ # wcsstr towupper towlower manpages collide with sys-apps/man-pages
+ # what to do?
default
einstalldocs
rm -r doc/man || die
@@ -74,7 +78,7 @@ src_install() {
if use modules ; then
cd "${S}-module" || die
- linux-mod_src_install || die
+ linux-mod_src_install
fi
}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: sys-libs/safeclib/
@ 2021-04-14 9:08 Andrew Ammerlaan
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Ammerlaan @ 2021-04-14 9:08 UTC (permalink / raw
To: gentoo-commits
commit: 35d7a9e2c55e5b3e8167f462694a920bf40ae95d
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Apr 13 22:10:48 2021 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Apr 13 22:11:14 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=35d7a9e2
sys-libs/safeclib: new package
USE=modules fail for now, help needed
at investigating what's happening there
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
sys-libs/safeclib/Manifest | 1 +
sys-libs/safeclib/metadata.xml | 53 +++++++++++++++
sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild | 83 +++++++++++++++++++++++
3 files changed, 137 insertions(+)
diff --git a/sys-libs/safeclib/Manifest b/sys-libs/safeclib/Manifest
new file mode 100644
index 000000000..88caccb0e
--- /dev/null
+++ b/sys-libs/safeclib/Manifest
@@ -0,0 +1 @@
+DIST safeclib-3.6.0_p20210407.tar.gz 2281868 BLAKE2B 1690f4ac7504cdd37cd353cd0ddab8d9807a583113a5893fd0633c69b7434c3eecf361ae501570819bb8d75a057c0c861f6c594429162558c73330bcd2c04df5 SHA512 2e21a06b4a423ea7a7782b101ba9f0e8a60efaaec49314360014ebae02d0a02a4275ccecc618560b08dc357b9fbb4c5b220db70012728dbb3815635e8dad16c8
diff --git a/sys-libs/safeclib/metadata.xml b/sys-libs/safeclib/metadata.xml
new file mode 100644
index 000000000..6a39c8966
--- /dev/null
+++ b/sys-libs/safeclib/metadata.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription>
+This library implements the secure C11 Annex K functions on top of most libc implementations, which are missing from them.
+
+The ISO TR24731 Bounds Checking Interface documents indicate that the key motivation for the new specification is to help mitigate the ever increasing security attacks, specifically the buffer overrun.
+
+The rationale document says "Buffer overrun attacks continue to be a security problem. Roughly 10% of vulnerability reports cataloged by CERT from 01/01/2005 to 07/01/2005 involved buffer overflows. Preventing buffer overruns is the primary, but not the only, motivation for this technical report."
+
+The rationale document continues "that these only mitigate, that is lessen, security problems. When used properly, these functions decrease the danger buffer overrun attacks. Source code may remain vulnerable due to other bugs and security issues. The highest level of security is achieved by building in layers of security utilizing multiple strategies."
+
+The rationale document lists the following key points for TR24731:
+
+Guard against overflowing a buffer
+Do not produce unterminated strings
+Do not unexpectedly truncate strings
+Provide a library useful to existing code
+Preserve the null terminated string datatype
+Only require local edits to programs
+Library based solution
+Support compile-time checking
+Make failures obvious
+Zero buffers, null strings
+Runtime-constraint handler mechanism
+Support re-entrant code
+Consistent naming scheme
+Have a uniform pattern for the function parameters and return type
+Deference to existing technology
+and the following can be added...
+
+provide a library of functions with like behavior
+provide a library of functions that promote and increase code safety and security
+provide a library of functions that are efficient
+The C11 Standard adopted many of these points, and added some secure _s variants in the Annex K. The Microsoft Windows/MINGW secure API did the same, but deviated in some functions from the standard. Besides Windows (with its msvcrt, ucrt, reactos msvcrt and wine msvcrt variants) only the unused stlport, Android's Bionic, Huawei securec and Embarcadero implemented this C11 secure Annex K API so far. They are still missing from glibc, musl, FreeBSD, darwin and DragonFly libc, OpenBSD libc, newlib, dietlibc, uClibc, minilibc.
+ </longdescription>
+ <maintainer type="person">
+ <email>lssndrbarbieri@gmail.com</email>
+ <name>Alessandro Barbieri</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/rurban/safeclib/issues</bugs-to>
+ <remote-id type="github">rurban/safeclib</remote-id>
+ </upstream>
+ <use>
+ <flag name="constraint-handler">enable C11 invoke_safe_{str,mem}_constraint_handler for less performance, bigger size and more flexibility</flag>
+ <flag name="extensions">enable additional functions not defined in the C11 specification</flag>
+ <flag name="norm-compat">Enable NFKC and NFKD modes for wcsnorm</flag>
+ <flag name="nullslack">enable to null out the remaining part of a string if it is not completely used</flag>
+ <flag name="unsafe">Include unsafe std C11 functions: tmpnam_s</flag>
+ <flag name="valgrind">enable Valgrind on the unit tests</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
new file mode 100644
index 000000000..7a5fe84fd
--- /dev/null
+++ b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools linux-mod
+
+MY_REV="986f6d34e49637d68cb41221307231f0ea79ca4d"
+
+DESCRIPTION="safec libc extension with all C11 Annex K functions"
+HOMEPAGE="https://github.com/rurban/safeclib"
+SRC_URI="https://github.com/rurban/safeclib/archive/${MY_REV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+constraint-handler +extensions modules norm-compat +nullslack test unsafe valgrind"
+RESTRICT="!test? ( test )"
+BDEPEND="
+ valgrind? ( dev-util/valgrind )
+"
+S="${WORKDIR}/${PN}-${MY_REV}"
+
+MODULE_NAMES="slkm(misc:${S}-module:${S}-module/src)"
+BUILD_TARGETS="all"
+
+src_prepare() {
+ eautoreconf
+ default
+
+ 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
+}
+
+src_configure() {
+ #forcing wchar because of https://github.com/rurban/safeclib/issues/95
+ local myconf=(
+ --disable-static
+ --disable-valgrind-sgcheck
+ --enable-shared
+ $(use_enable constraint-handler)
+ $(use_enable extensions)
+ $(use_enable norm-compat)
+ $(use_enable nullslack)
+ $(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
+ linux-mod_src_compile || die
+ fi
+}
+
+src_install() {
+ default
+ einstalldocs
+ rm -r doc/man || die
+ dodoc -r doc/.
+
+ if use modules ; then
+ cd "${S}-module" || die
+ linux-mod_src_install || die
+ fi
+}
+
+src_test() {
+ emake check
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: sys-libs/safeclib/
@ 2021-04-15 12:51 Andrew Ammerlaan
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Ammerlaan @ 2021-04-15 12:51 UTC (permalink / raw
To: gentoo-commits
commit: 7c59528284fe8f76dfaf4795ff729427e0ccac84
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu Apr 15 00:50:12 2021 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Thu Apr 15 00:51:37 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7c595282
sys-libs/safeclib: various changes
verbose make
Removes Werror
Adds doc IUSE
Move default (patches) above eautoreconf
Remove rm -r doc/man
Add use doc && dodoc -r doc/.
thanks @telans
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
index f3ba40fda..fd2ff8584 100644
--- a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
+++ b/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
@@ -14,21 +14,22 @@ SRC_URI="https://github.com/rurban/safeclib/archive/${MY_REV}.tar.gz -> ${P}.tar
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
-IUSE="+constraint-handler +extensions modules norm-compat +nullslack test unsafe valgrind"
+IUSE="+constraint-handler doc +extensions modules norm-compat +nullslack test unsafe valgrind"
RESTRICT="!test? ( test )"
+
BDEPEND="
- app-doc/doxygen[dot]
+ doc? ( app-doc/doxygen[dot] )
valgrind? ( dev-util/valgrind )
"
-S="${WORKDIR}/${PN}-${MY_REV}"
+S="${WORKDIR}/${PN}-${MY_REV}"
MODULE_NAMES="slkm(misc:${S}-module:${S}-module)"
BUILD_TARGETS="all"
-BUILD_PARAMS="-f Makefile.kernel"
+BUILD_PARAMS="-f Makefile.kernel V=1"
src_prepare() {
- eautoreconf
default
+ eautoreconf
if use modules ; then
#duplicate the working folder
@@ -44,13 +45,16 @@ src_configure() {
--disable-static
--disable-valgrind-sgcheck
--enable-shared
+ --disable-Werror
$(use_enable constraint-handler)
+ $(use_enable doc)
$(use_enable extensions)
$(use_enable norm-compat)
$(use_enable nullslack)
$(use_enable unsafe)
$(use_enable valgrind)
)
+
econf "${myconf[@]}" --enable-wchar
if use modules ; then
@@ -64,6 +68,7 @@ src_compile() {
if use modules ; then
cd "${S}-module" || die
+ export src="${S}-module"
linux-mod_src_compile
fi
}
@@ -73,8 +78,7 @@ src_install() {
# what to do?
default
einstalldocs
- rm -r doc/man || die
- dodoc -r doc/.
+ use doc && dodoc -r doc/.
if use modules ; then
cd "${S}-module" || die
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: sys-libs/safeclib/
@ 2021-04-19 8:04 Andrew Ammerlaan
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Ammerlaan @ 2021-04-19 8:04 UTC (permalink / raw
To: gentoo-commits
commit: 375e2f3880633610c02b74cfb0660cd5dfdcaa18
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun Apr 18 20:40:44 2021 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sun Apr 18 20:41:26 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=375e2f38
sys-libs/safeclib: remove offending manpages
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
...b-3.6.0_p20210407.ebuild => safeclib-3.6.0_p20210407-r1.ebuild} | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild b/sys-libs/safeclib/safeclib-3.6.0_p20210407-r1.ebuild
similarity index 93%
rename from sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
rename to sys-libs/safeclib/safeclib-3.6.0_p20210407-r1.ebuild
index a1f95c690..cd745c50c 100644
--- a/sys-libs/safeclib/safeclib-3.6.0_p20210407.ebuild
+++ b/sys-libs/safeclib/safeclib-3.6.0_p20210407-r1.ebuild
@@ -85,11 +85,14 @@ 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/.
+
+ # wcsstr towupper towlower manpages collide with sys-apps/man-pages
+ rm "${ED}/usr/share/man/man3/towlower.3" || die
+ rm "${ED}/usr/share/man/man3/towupper.3" || die
+ rm "${ED}/usr/share/man/man3/wcsstr.3" || die
}
src_test() {
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: sys-libs/safeclib/
@ 2021-04-27 23:24 Theo Anderson
0 siblings, 0 replies; 7+ messages in thread
From: Theo Anderson @ 2021-04-27 23:24 UTC (permalink / raw
To: gentoo-commits
commit: 84be9f527d18a0859fb3dc666a2216aff034f84f
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Apr 27 15:59:39 2021 +0000
Commit: Theo Anderson <telans <AT> posteo <DOT> de>
CommitDate: Tue Apr 27 16:00:27 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=84be9f52
sys-libs/safeclib: export vartexfonts
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
sys-libs/safeclib/safeclib-3.6.0_p20210407-r2.ebuild | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys-libs/safeclib/safeclib-3.6.0_p20210407-r2.ebuild b/sys-libs/safeclib/safeclib-3.6.0_p20210407-r2.ebuild
index a28188381..1488ce394 100644
--- a/sys-libs/safeclib/safeclib-3.6.0_p20210407-r2.ebuild
+++ b/sys-libs/safeclib/safeclib-3.6.0_p20210407-r2.ebuild
@@ -47,6 +47,8 @@ src_prepare() {
}
src_configure() {
+ export VARTEXFONTS="${T}/fonts"
+
if use modules ; then
set_kvobj ko
econf "${myconf[@]}" --disable-wchar
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: sys-libs/safeclib/
@ 2021-05-02 9:27 Theo Anderson
0 siblings, 0 replies; 7+ messages in thread
From: Theo Anderson @ 2021-05-02 9:27 UTC (permalink / raw
To: gentoo-commits
commit: a7105e6e1674a5bc5f46fdfbcae4f834f508300b
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun May 2 02:25:52 2021 +0000
Commit: Theo Anderson <telans <AT> posteo <DOT> de>
CommitDate: Sun May 2 02:27:51 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a7105e6e
sys-libs/safeclib: do not install manpages in doc
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
.../safeclib/safeclib-3.6.0_p20210407-r3.ebuild | 108 +++++++++++++++++++++
1 file changed, 108 insertions(+)
diff --git a/sys-libs/safeclib/safeclib-3.6.0_p20210407-r3.ebuild b/sys-libs/safeclib/safeclib-3.6.0_p20210407-r3.ebuild
new file mode 100644
index 000000000..38bbdb9d0
--- /dev/null
+++ b/sys-libs/safeclib/safeclib-3.6.0_p20210407-r3.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MODULE_OPTIONAL_USE=modules
+inherit autotools linux-info linux-mod
+
+MY_REV="986f6d34e49637d68cb41221307231f0ea79ca4d"
+
+DESCRIPTION="safec libc extension with all C11 Annex K functions"
+HOMEPAGE="https://github.com/rurban/safeclib"
+SRC_URI="https://github.com/rurban/safeclib/archive/${MY_REV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+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}:${S})"
+BUILD_TARGETS="all"
+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
+
+ #duplicate the working folder
+ #one for the library and one for the module
+ cd "${WORKDIR}" || die
+ cp -r "${S}" "${S}-lib" || die
+}
+
+src_configure() {
+ export VARTEXFONTS="${T}/fonts"
+
+ 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
+ --disable-valgrind-sgcheck
+ --enable-shared
+ --disable-Werror
+ $(use_enable constraint-handler)
+ $(use_enable doc)
+ $(use_enable extensions)
+ $(use_enable norm-compat)
+ $(use_enable nullslack)
+ $(use_enable unsafe)
+ $(use_enable valgrind)
+ )
+ econf "${myconf[@]}" --enable-wchar
+}
+
+src_compile() {
+ if use modules ; then
+ 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
+ default
+ einstalldocs
+
+ if use doc ; then
+ rm -rf doc/man || die
+ dodoc -r doc/.
+ docompress -x "/usr/share/doc/${PF}/html"
+
+ # wcsstr towupper towlower manpages collide with sys-apps/man-pages
+ rm "${ED}/usr/share/man/man3/towlower.3" || die
+ rm "${ED}/usr/share/man/man3/towupper.3" || die
+ rm "${ED}/usr/share/man/man3/wcsstr.3" || die
+ fi
+}
+
+src_test() {
+ cd "${S}-lib" || die
+ emake check
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: sys-libs/safeclib/
@ 2022-03-07 15:15 Ronny Gutbrod
0 siblings, 0 replies; 7+ messages in thread
From: Ronny Gutbrod @ 2022-03-07 15:15 UTC (permalink / raw
To: gentoo-commits
commit: 2492d2b670ec0806f7dac7455d4e89b2e6d53bc7
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu Feb 3 18:57:14 2022 +0000
Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de>
CommitDate: Sat Mar 5 01:34:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2492d2b6
sys-libs/safeclib: add 3.7.1
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
sys-libs/safeclib/Manifest | 1 +
sys-libs/safeclib/metadata.xml | 1 +
sys-libs/safeclib/safeclib-3.7.1.ebuild | 108 ++++++++++++++++++++++++++++++++
3 files changed, 110 insertions(+)
diff --git a/sys-libs/safeclib/Manifest b/sys-libs/safeclib/Manifest
index 88caccb0e..6dbb2767a 100644
--- a/sys-libs/safeclib/Manifest
+++ b/sys-libs/safeclib/Manifest
@@ -1 +1,2 @@
DIST safeclib-3.6.0_p20210407.tar.gz 2281868 BLAKE2B 1690f4ac7504cdd37cd353cd0ddab8d9807a583113a5893fd0633c69b7434c3eecf361ae501570819bb8d75a057c0c861f6c594429162558c73330bcd2c04df5 SHA512 2e21a06b4a423ea7a7782b101ba9f0e8a60efaaec49314360014ebae02d0a02a4275ccecc618560b08dc357b9fbb4c5b220db70012728dbb3815635e8dad16c8
+DIST safeclib-3.7.1.tar.xz 539072 BLAKE2B 55e828f2c195325a9a3648f57d1e60a6657289ff03ebe626d5884f41014d747591fd2240286d4060ffc58c368e68464bed49eb34a5d78cdd1e204861ca8425cc SHA512 bf43e3a94855b7b12df6a3c88a534c40297df40259e4930dc1b98117b381c5bfaa2e4f17748e731bb6065c02d47ba98d50e336d60cf60e62d4fa0a6b45de53c1
diff --git a/sys-libs/safeclib/metadata.xml b/sys-libs/safeclib/metadata.xml
index 846350706..d434a3c62 100644
--- a/sys-libs/safeclib/metadata.xml
+++ b/sys-libs/safeclib/metadata.xml
@@ -49,5 +49,6 @@ The C11 Standard adopted many of these points, and added some secure _s variants
<flag name="nullslack">enable to null out the remaining part of a string if it is not completely used</flag>
<flag name="unsafe">Include unsafe std C11 functions: tmpnam_s</flag>
<flag name="valgrind">enable Valgrind on the unit tests</flag>
+ <flag name="wchar">enable multibyte and wchar support</flag>
</use>
</pkgmetadata>
diff --git a/sys-libs/safeclib/safeclib-3.7.1.ebuild b/sys-libs/safeclib/safeclib-3.7.1.ebuild
new file mode 100644
index 000000000..4d0a501f7
--- /dev/null
+++ b/sys-libs/safeclib/safeclib-3.7.1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MODULE_OPTIONAL_USE=modules
+
+inherit autotools linux-info linux-mod
+
+DESCRIPTION="safec libc extension with all C11 Annex K functions"
+HOMEPAGE="https://github.com/rurban/safeclib"
+SRC_URI="https://github.com/rurban/safeclib/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+constraint-handler doc +extensions modules norm-compat +nullslack test unsafe valgrind +wchar"
+
+RESTRICT="!test? ( test )"
+BDEPEND="
+ doc? ( app-doc/doxygen[dot] )
+ valgrind? ( dev-util/valgrind )
+"
+
+MODULE_NAMES="slkm(misc:${S}:${S})"
+BUILD_TARGETS="all"
+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
+
+ # duplicate the working folder
+ # one for the library and one for the module
+ cd "${WORKDIR}" || die
+ cp -r "${S}" "${S}-lib" || die
+}
+
+src_configure() {
+ export VARTEXFONTS="${T}/fonts"
+
+ local myconf=(
+ --disable-static
+ --disable-valgrind-sgcheck
+ --disable-Werror
+ --enable-shared
+ $(use_enable constraint-handler)
+ $(use_enable doc)
+ $(use_enable extensions)
+ $(use_enable norm-compat)
+ $(use_enable nullslack)
+ $(use_enable unsafe)
+ $(use_enable valgrind)
+ $(use_enable wchar)
+ )
+
+ if use modules ; then
+ set_kvobj ko
+ econf "${myconf[@]}" --disable-wchar
+ fi
+
+ cd "${S}-lib" || die
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ if use modules ; then
+ 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
+ default
+ einstalldocs
+
+ if use doc ; then
+ rm -rf doc/man || die
+ dodoc -r doc/.
+ docompress -x "/usr/share/doc/${PF}/html"
+
+ # wcsstr towupper towlower manpages collide with sys-apps/man-pages
+ rm "${ED}/usr/share/man/man3/towlower.3" || die
+ rm "${ED}/usr/share/man/man3/towupper.3" || die
+ rm "${ED}/usr/share/man/man3/wcsstr.3" || die
+ fi
+}
+
+src_test() {
+ cd "${S}-lib" || die
+ emake check
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-07 15:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 15:15 [gentoo-commits] repo/proj/guru:master commit in: sys-libs/safeclib/ Ronny Gutbrod
-- strict thread matches above, loose matches on Subject: below --
2021-05-02 9:27 Theo Anderson
2021-04-27 23:24 Theo Anderson
2021-04-19 8:04 Andrew Ammerlaan
2021-04-15 12:51 Andrew Ammerlaan
2021-04-14 9:08 Andrew Ammerlaan
2021-04-14 9:08 Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox