summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2020-04-04 18:25:38 +0200
committerJoonas Niilola <juippis@gentoo.org>2020-04-05 10:17:55 +0300
commit1b96cea8f4a077237e5dbe479ac375bad9d777e4 (patch)
treed603d3a4631fd21569db6cb856a7444551a4df57 /dev-libs/bglibs/bglibs-2.04-r2.ebuild
parentdev-util/rt-tests: Fix musl build (diff)
downloadgentoo-1b96cea8f4a077237e5dbe479ac375bad9d777e4.tar.gz
gentoo-1b96cea8f4a077237e5dbe479ac375bad9d777e4.tar.bz2
gentoo-1b96cea8f4a077237e5dbe479ac375bad9d777e4.zip
dev-libs/bglibs: properly align buffers on stack
Closes: https://bugs.gentoo.org/700190 Signed-off-by: Rolf Eike Beer <eike@sf-mail.de> Closes: https://github.com/gentoo/gentoo/pull/15226 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/bglibs/bglibs-2.04-r2.ebuild')
-rw-r--r--dev-libs/bglibs/bglibs-2.04-r2.ebuild75
1 files changed, 75 insertions, 0 deletions
diff --git a/dev-libs/bglibs/bglibs-2.04-r2.ebuild b/dev-libs/bglibs/bglibs-2.04-r2.ebuild
new file mode 100644
index 000000000000..01bff0a74aa6
--- /dev/null
+++ b/dev-libs/bglibs/bglibs-2.04-r2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Bruce Guenter's Libraries Collection"
+HOMEPAGE="https://untroubled.org/bglibs/"
+SRC_URI="https://untroubled.org/bglibs/archive/${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0/2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND=""
+BDEPEND="sys-devel/libtool
+ doc? (
+ app-doc/doxygen
+ dev-texlive/texlive-latexrecommended
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ virtual/latex-base
+ )
+"
+
+PATCHES=( "${FILESDIR}"/bglibs-2.04-stack-buffers.patch )
+
+src_prepare() {
+ default
+ # disable tests as we want them manually
+ sed -i '/^all:/s|selftests||' Makefile || die
+ sed -i '/selftests/d' TARGETS || die
+}
+
+src_configure() {
+ echo "${ED}/usr/bin" > conf-bin || die
+ echo "${ED}/usr/$(get_libdir)/bglibs" > conf-lib || die
+ echo "${ED}/usr/include" > conf-include || die
+ echo "${ED}/usr/share/man" > conf-man || die
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
+}
+
+src_compile() {
+ default
+ if use doc; then
+ emake -C doc/latex pdf
+ fi
+}
+
+src_test() {
+ einfo "Running selftests"
+ emake selftests
+}
+
+src_install() {
+ default
+
+ # Install .so into LDPATH
+ mv "${ED}"/usr/$(get_libdir)/bglibs/libbg.so.2.0.0 "${ED}"/usr/$(get_libdir)/ || die
+ dosym libbg.so.2.0.0 /usr/$(get_libdir)/libbg.so.2
+ dosym libbg.so.2.0.0 /usr/$(get_libdir)/libbg.so
+ dosym ../libbg.so.2.0.0 /usr/$(get_libdir)/bglibs/libbg.so.2.0.0
+
+ rm "${ED}"/usr/$(get_libdir)/bglibs/libbg.la || die
+
+ dodoc ANNOUNCEMENT NEWS README ChangeLog TODO VERSION
+ dodoc -r doc/html/
+ if use doc; then
+ dodoc doc/latex/refman.pdf
+ fi
+}