Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-util/btyacc: EAPI7 revbump, improve ebuild #9692

Closed
wants to merge 1 commit into from

Conversation

mm1ke
Copy link
Contributor

@mm1ke mm1ke commented Aug 25, 2018

Hi,

This PR/Bug updates dev-util/btyacc for EAPI7.
Please review

--- btyacc-3.0-r2.ebuild        2017-03-19 10:57:12.737786293 +0100
+++ btyacc-3.0-r3.ebuild        2018-08-25 10:24:40.824881711 +0200
@@ -1,12 +1,11 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="2"
+EAPI=7
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
 MY_P=${P/./-}
-IUSE=""
 DESCRIPTION="Backtracking YACC - modified from Berkeley YACC"
 HOMEPAGE="http://www.siber.com/btyacc"
 SRC_URI="http://www.siber.com/btyacc/${MY_P}.tar.gz"
@@ -17,23 +16,30 @@
 
 S="${WORKDIR}"
 
+PATCHES=(
+       "${FILESDIR}/${P}-includes.patch"
+       "${FILESDIR}/${P}-makefile.patch"
+)
+DOCS=( README README.BYACC )
+
 src_prepare() {
-       cp -av Makefile{,.orig}
-       epatch "${FILESDIR}/${P}-includes.patch"
-       epatch "${FILESDIR}/${P}-makefile.patch"
+       cp -av Makefile{,.orig} || die
+       default
        # fix memory issue/glibc corruption
        sed -i -e "s|len + 13|len + 14|" main.c || die "Could not fix main.c"
        # Darwin doesn't do static binaries
-       [[ ${CHOST} == *-darwin* ]] && sed -i -e 's/-static//' Makefile
+       if [[ ${CHOST} == *-darwin* ]]; then
+               sed -i -e 's/-static//' Makefile || die
+       fi
 }
 
 src_compile() {
        tc-export CC
-       emake || die
+       emake CC=$(tc-getCC)
 }
 
 src_install() {
        dobin btyacc
-       dodoc README README.BYACC
+       einstalldocs
        newman manpage btyacc.1
 }

Closes: https://bugs.gentoo.org/664546

@gentoo-bot
Copy link

Pull Request assignment

Areas affected: ebuilds
Packages affected: dev-util/btyacc

dev-util/btyacc: patrick

At least one of the listed packages is maintained entirely by non-GitHub developers!

Bugs linked: 664546

In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

@gentoo-bot gentoo-bot added need assignment It was impossible to assign the PR correctly. Please assign it manually. bug linked Bug/Closes found in footer, and cross-linked with the PR. labels Aug 25, 2018

inherit toolchain-funcs

MY_P=${P/./-}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not use bashizm here


src_compile() {
tc-export CC
emake CC=$(tc-getCC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this alone should be probably enough

"${FILESDIR}/${P}-includes.patch"
"${FILESDIR}/${P}-makefile.patch"
)
DOCS=( README README.BYACC )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, just dodoc, do not increase complexity for nothing

Closes: https://bugs.gentoo.org/664546
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger@gmail.com>
@mm1ke
Copy link
Contributor Author

mm1ke commented Feb 8, 2019

ping, any chance we can merge this :)

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2019-02-08 20:59 UTC
Newest commit scanned: 50dcdaa
Status: ✅ good

No issues found

@mm1ke mm1ke deleted the btyacc-UzlIMgPU branch March 1, 2019 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug linked Bug/Closes found in footer, and cross-linked with the PR. need assignment It was impossible to assign the PR correctly. Please assign it manually.
Projects
None yet
4 participants