summaryrefslogtreecommitdiff
path: root/dev-libs/libowfat/libowfat-0.32-r5.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /dev-libs/libowfat/libowfat-0.32-r5.ebuild
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'dev-libs/libowfat/libowfat-0.32-r5.ebuild')
-rw-r--r--dev-libs/libowfat/libowfat-0.32-r5.ebuild61
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-libs/libowfat/libowfat-0.32-r5.ebuild b/dev-libs/libowfat/libowfat-0.32-r5.ebuild
new file mode 100644
index 000000000000..c85792782f66
--- /dev/null
+++ b/dev-libs/libowfat/libowfat-0.32-r5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="reimplement libdjb - excellent libraries from Dan Bernstein"
+SRC_URI="https://www.fefe.de/${PN}/${P}.tar.xz"
+HOMEPAGE="https://www.fefe.de/libowfat/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~sparc ~x86"
+IUSE="diet"
+
+RDEPEND="diet? ( >=dev-libs/dietlibc-0.33_pre20090721 )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc10.patch
+ "${FILESDIR}"/${P}-ar.patch
+)
+
+pkg_setup() {
+ # Required for mult/umult64.c to be usable
+ append-flags -fomit-frame-pointer
+}
+
+src_prepare() {
+ default
+
+ # do not define "__pure__", this the gcc builtin (bug #806505)
+ sed 's#__pure__;#__attribute__((__pure__));#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
+ sed 's#__pure__$#__attrib__pure__#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
+ # remove unneeded definition of __deprecated__
+ sed '/^#define __deprecated__$/d' -i scan/scan_iso8601.c scan/scan_httpdate.c || die
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB) \
+ CFLAGS="-I. ${CFLAGS}" \
+ DIET="${EPREFIX}/usr/bin/diet -Os" \
+ prefix="${EPREFIX}/usr" \
+ INCLUDEDIR="${EPREFIX}/usr/include" \
+ $( use diet || echo 'DIET=' )
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ MAN3DIR="${EPREFIX}/usr/share/man/man3" \
+ INCLUDEDIR="${EPREFIX}/usr/include" \
+ install
+
+ mv "${ED}"/usr/share/man/man3/{buffer.3,owfat-buffer.3} || die
+}