diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2021-07-05 08:24:22 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2021-07-05 08:24:22 +0100 |
commit | 9731c2b3a814ecc2a11a89c3b5ce13a36121987b (patch) | |
tree | 4bbde34356eb380ec537d60726c64951daf0c7ac /dev-lang | |
parent | sys-devel/crossdev: stabilize 20210621 early everywhere (diff) | |
download | gentoo-9731c2b3a814ecc2a11a89c3b5ce13a36121987b.tar.gz gentoo-9731c2b3a814ecc2a11a89c3b5ce13a36121987b.tar.bz2 gentoo-9731c2b3a814ecc2a11a89c3b5ce13a36121987b.zip |
dev-lang/gforth: pass CFLAGS/LDFLAGS through
Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/723072
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/gforth/files/gforth-0.7.3-CFLAGS-LDFLAGS.patch | 27 | ||||
-rw-r--r-- | dev-lang/gforth/gforth-0.7.3-r2.ebuild | 66 |
2 files changed, 93 insertions, 0 deletions
diff --git a/dev-lang/gforth/files/gforth-0.7.3-CFLAGS-LDFLAGS.patch b/dev-lang/gforth/files/gforth-0.7.3-CFLAGS-LDFLAGS.patch new file mode 100644 index 000000000000..55041f435646 --- /dev/null +++ b/dev-lang/gforth/files/gforth-0.7.3-CFLAGS-LDFLAGS.patch @@ -0,0 +1,27 @@ +https://bugs.gentoo.org/723072 +--- a/libcc.fs ++++ b/libcc.fs +@@ -562,7 +562,10 @@ DEFER compile-wrapper-function ( -- ) + 0 c-source-file-id ! + [ libtool-command s" --silent --tag=CC --mode=compile " s+ + libtool-cc append s" -I " append +- s" includedir" getenv append ] sliteral ++ s" includedir" getenv append ++ s" CFLAGS" getenv append ++ s" LDFLAGS" getenv append ++ ] sliteral + s" -O -c " s+ lib-filename 2@ append s" .c -o " append + lib-filename 2@ append s" .lo" append ( c-addr u ) + \ 2dup type cr +@@ -571,7 +571,10 @@ DEFER compile-wrapper-function ( -- ) + \ 2dup type cr + 2dup system drop free throw $? abort" libtool compile failed" + [ libtool-command s" --silent --tag=CC --mode=link " s+ +- libtool-cc append libtool-flags append s" -module -rpath " s+ ] sliteral ++ libtool-cc append ++ s" CFLAGS" getenv append ++ s" LDFLAGS" getenv append ++ libtool-flags append s" -module -rpath " s+ ] sliteral + lib-filename 2@ dirname replace-rpath s+ s" " append + lib-filename 2@ append s" .lo -o " append + lib-filename 2@ append s" .la" append ( c-addr u ) diff --git a/dev-lang/gforth/gforth-0.7.3-r2.ebuild b/dev-lang/gforth/gforth-0.7.3-r2.ebuild new file mode 100644 index 000000000000..874e12892beb --- /dev/null +++ b/dev-lang/gforth/gforth-0.7.3-r2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit elisp-common + +DESCRIPTION="GNU Forth is a fast and portable implementation of the ANSI Forth language" +HOMEPAGE="https://www.gnu.org/software/gforth" +SRC_URI="mirror://gnu/gforth/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris" +IUSE="+check emacs" + +DEPEND="dev-libs/ffcall + emacs? ( >=app-editors/emacs-23.1:* )" +RDEPEND="${DEPEND}" + +SITEFILE="50${PN}-gentoo.el" + +PATCHES=( + "${FILESDIR}"/${PN}-0.7.0-make-elc.patch + "${FILESDIR}"/${PN}-0.7.3-rdynamic.patch + "${FILESDIR}"/${PN}-0.7.3-rdynamic-auto.patch + "${FILESDIR}"/${PN}-0.7.3-CFLAGS-LDFLAGS.patch +) + +src_prepare() { + default + + # We patches both configure and configure.ac. + # Avoid reruining aclocal. + touch aclocal.m4 configure || die +} + +src_configure() { + econf \ + $(use emacs || echo "--without-lispdir") \ + $(use_with check) +} + +src_compile() { + # Parallel make breaks here + emake -j1 +} + +src_install() { + default + + dodoc AUTHORS BUGS ChangeLog NEWS* README* ToDo doc/glossaries.doc doc/*.ps + + if use emacs; then + elisp-install ${PN} gforth.el gforth.elc + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |