You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.5 KiB
62 lines
1.5 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
4 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI="8"
|
||
4 years ago
|
|
||
|
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 )"
|
||
3 years ago
|
DEPEND="${RDEPEND}"
|
||
4 years ago
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}-gcc10.patch
|
||
3 years ago
|
"${FILESDIR}"/${P}-ar.patch
|
||
4 years ago
|
)
|
||
|
|
||
|
pkg_setup() {
|
||
|
# Required for mult/umult64.c to be usable
|
||
|
append-flags -fomit-frame-pointer
|
||
|
}
|
||
|
|
||
3 years ago
|
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
|
||
|
}
|
||
|
|
||
4 years ago
|
src_compile() {
|
||
|
emake \
|
||
|
CC=$(tc-getCC) \
|
||
3 years ago
|
AR=$(tc-getAR) \
|
||
|
RANLIB=$(tc-getRANLIB) \
|
||
4 years ago
|
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
|
||
|
}
|