diff options
author | Sam James <sam@gentoo.org> | 2023-10-09 01:17:12 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-10-09 01:22:32 +0100 |
commit | f6b523ddcfbcd6c076cb75beec35241c144ca25c (patch) | |
tree | 39398b29161d43a80eee2942f32840b3737c904e /dev-libs | |
parent | dev-util/mk-configure: new package, add 0.38.2 (diff) | |
download | gentoo-f6b523ddcfbcd6c076cb75beec35241c144ca25c.tar.gz gentoo-f6b523ddcfbcd6c076cb75beec35241c144ca25c.tar.bz2 gentoo-f6b523ddcfbcd6c076cb75beec35241c144ca25c.zip |
dev-libs/libmaa: add 1.4.7
Closes: https://bugs.gentoo.org/745834
Closes: https://bugs.gentoo.org/873994
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/libmaa/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/libmaa/files/libmaa-1.4.7-makefile-respect-flags.patch | 21 | ||||
-rw-r--r-- | dev-libs/libmaa/libmaa-1.4.7.ebuild | 92 |
3 files changed, 114 insertions, 0 deletions
diff --git a/dev-libs/libmaa/Manifest b/dev-libs/libmaa/Manifest index ed68e07bb5e6..79d8e83da802 100644 --- a/dev-libs/libmaa/Manifest +++ b/dev-libs/libmaa/Manifest @@ -1 +1,2 @@ DIST libmaa-1.3.2.tar.gz 287198 BLAKE2B 62432f7f21e353c68a0e9b8f843a5a5acafba5c0cc8e745b07596d7dcaaf9adf723342474b95895fbe1cf003d87d856892ea52196808937b4befdc50ce6d0155 SHA512 dde91e8bf1c08515ff4662282d16a03b18a1dfb16eb7b95be980ba398ed1e65d8cd88e58d454e03a03f48a5ecca8bf23b4ebaf475a98630a9178318c12a1b176 +DIST libmaa-1.4.7.tar.gz 173728 BLAKE2B 1201fedf56a92b150f04eedebd3aaf11a63e057b2cc67a3c5402c6a76c7aa5e2c40d7298138f9b510f6c94bc3a67835586ad97b53adf04dd837f404e43dea620 SHA512 6aa0ec6de92d9512152116a2698f5e7d3166631832968d2b7942b8564a4d61ef6eaf304d863e682758636e55a0c5d26fde49db028b18c160abb2286683e8478b diff --git a/dev-libs/libmaa/files/libmaa-1.4.7-makefile-respect-flags.patch b/dev-libs/libmaa/files/libmaa-1.4.7-makefile-respect-flags.patch new file mode 100644 index 000000000000..67ee4d846c6a --- /dev/null +++ b/dev-libs/libmaa/files/libmaa-1.4.7-makefile-respect-flags.patch @@ -0,0 +1,21 @@ +Per mk-configure(7), Makefiles should use CFLAGS0 and CPPFLAGS0 for their +own flags. This allows setting CFLAGS and CPPFLAGS ourselves during the build +without clobbering important settings/definitions like MAA_MAJOR. +--- a/maa/Makefile ++++ b/maa/Makefile +@@ -22,11 +22,11 @@ arg.o arg.os: ${.OBJDIR}/arggram.c arg.c + ${.OBJDIR}/arggram.c: arggram.txt + awk -f ${SRCDIR_maa}/arggram2c < ${SRCDIR_maa}/arggram.txt > $@ + +-CFLAGS += -DMAA_MAJOR=${MAA_MAJOR} +-CFLAGS += -DMAA_MINOR=${MAA_MINOR} +-CFLAGS += -DMAA_TEENY=${MAA_TEENY} ++CFLAGS0 += -DMAA_MAJOR=${MAA_MAJOR} ++CFLAGS0 += -DMAA_MINOR=${MAA_MINOR} ++CFLAGS0 += -DMAA_TEENY=${MAA_TEENY} + +-CPPFLAGS += -I. -I${.OBJDIR} ++CPPFLAGS0 += -I. -I${.OBJDIR} + + #MAN = maa.1 + diff --git a/dev-libs/libmaa/libmaa-1.4.7.ebuild b/dev-libs/libmaa/libmaa-1.4.7.ebuild new file mode 100644 index 000000000000..b0222209b7b2 --- /dev/null +++ b/dev-libs/libmaa/libmaa-1.4.7.ebuild @@ -0,0 +1,92 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multiprocessing toolchain-funcs + +DESCRIPTION="Library with low-level data structures which are helpful for writing compilers" +HOMEPAGE="http://www.dict.org/" +SRC_URI="mirror://sourceforge/dict/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/4" +KEYWORDS="~amd64" + +BDEPEND="dev-util/mk-configure" + +PATCHES=( + "${FILESDIR}"/${PN}-1.4.7-makefile-respect-flags.patch +) + +src_configure() { + local jobs="$(makeopts_jobs)" + unset MAKEOPTS + + export MAKEOPTS="-j${jobs}" + export MAKE=bmake + + MAKEARGS=( + AR="$(tc-getAR)" + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + NM="$(tc-getNM)" + OBJCOPY="$(tc-getOBJCOPY)" + OBJDUMP="$(tc-getOBJDUMP)" + RANLIB="$(tc-getRANLIB)" + STRIP="$(tc-getSTRIP)" + #SIZE="$(tc-getSIZE)" + + # Don't use LD, use the compiler driver instead + LDCOMPILER=yes + + CFLAGS="${CFLAGS}" + CXXFLAGS="${CXXFLAGS}" + LDFLAGS="${LDFLAGS}" + + # Our toolchain already handles these + MKPIE=no + USE_SSP=no + USE_RELRO=no + USE_FORT=no + + # No -Werror + WARNERR=no + + INSTALL="${INSTALL:-${BROOT}/usr/bin/install}" + + # Don't calcify compiler settings in installed files + MKCOMPILERSETTINGS=yes + + PREFIX="${EPREFIX}/usr" + DOCDIR="${EPREFIX}/usr/share/doc/${PF}" + INFODIR="${EPREFIX}/usr/share/info" + LIBDIR="${EPREFIX}/usr/$(get_libdir)" + MANDIR="${EPREFIX}/usr/share/man" + + MKFILESDIR="${BROOT}/usr/share/mk-configure/mk" + BUILTINSDIR="${BROOT}/usr/share/mk-configure/builtins" + FEATURESDIR="${BROOT}/usr/share/mk-configure/feature" + ) + + mkcmake "${MAKEARGS[@]}" -j1 configure || die +} + +src_compile() { + mkcmake "${MAKEARGS[@]}" all || die +} + +src_test() { + mkcmake "${MAKEARGS[@]}" test || die +} + +src_install() { + mkcmake "${MAKEARGS[@]}" DESTDIR="${ED}" install + + rm "${ED}"/usr/share/doc/${PF}/LICENSE || die + + dodoc doc/libmaa.600dpi.ps + + # don't want static or libtool archives, #401935 + find "${D}" \( -name '*.a' -o -name '*.la' \) -delete || die +} |