public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jeroen Roovers" <jer@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-embedded/sdcc/, dev-embedded/sdcc/files/
Date: Fri,  2 Nov 2018 14:33:59 +0000 (UTC)	[thread overview]
Message-ID: <1541169233.cb60b5c5b84a6eb770cee3e0c67ab23530ba5096.jer@gentoo> (raw)

commit:     cb60b5c5b84a6eb770cee3e0c67ab23530ba5096
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  2 14:33:22 2018 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Nov  2 14:33:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb60b5c5

dev-embedded/sdcc: Fix and run eautoreconf

Patch support/sdbinutils/config/override.m4 to not fix on autoconf 2.64
Run eautoreconf
Remove docs_compile() but instead check PV in src_install()
Do not compile documentation in live ebuild as getting lyx to behave is
more trouble than it's worth

Fixes: https://bugs.gentoo.org/670126
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../sdcc/files/sdcc-3.8.0-override-override.patch  | 30 +++++++++++++++++++
 dev-embedded/sdcc/sdcc-3.8.0.ebuild                | 35 ++++++++++------------
 dev-embedded/sdcc/sdcc-9999.ebuild                 | 35 ++++++++++------------
 3 files changed, 60 insertions(+), 40 deletions(-)

diff --git a/dev-embedded/sdcc/files/sdcc-3.8.0-override-override.patch b/dev-embedded/sdcc/files/sdcc-3.8.0-override-override.patch
new file mode 100644
index 00000000000..f6bb4b8b972
--- /dev/null
+++ b/dev-embedded/sdcc/files/sdcc-3.8.0-override-override.patch
@@ -0,0 +1,30 @@
+--- a/support/sdbinutils/config/override.m4
++++ b/support/sdbinutils/config/override.m4
+@@ -27,27 +27,6 @@
+ m4_copy_force([_AC_PREREQ], [AC_PREREQ])
+ 
+ 
+-dnl Ensure exactly this Autoconf version is used
+-m4_ifndef([_GCC_AUTOCONF_VERSION],
+-  [m4_define([_GCC_AUTOCONF_VERSION], [2.64])])
+-
+-dnl Test for the exact version when AC_INIT is expanded.
+-dnl This allows to update the tree in steps (for testing)
+-dnl by putting
+-dnl   m4_define([_GCC_AUTOCONF_VERSION], [X.Y])
+-dnl in configure.ac before AC_INIT,
+-dnl without rewriting this file.
+-dnl Or for updating the whole tree at once with the definition above.
+-AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK],
+-[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]),
+-  m4_defn([m4_PACKAGE_VERSION]), [],
+-  [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])])
+-])
+-m4_define([AC_INIT], m4_defn([AC_INIT])[
+-_GCC_AUTOCONF_VERSION_CHECK
+-])
+-
+-
+ dnl Ensure we do not use a buggy M4.
+ m4_if(m4_index([..wi.d.], [.d.]), [-1],
+   [m4_fatal(m4_do([m4 with buggy strstr detected.  Please install

diff --git a/dev-embedded/sdcc/sdcc-3.8.0.ebuild b/dev-embedded/sdcc/sdcc-3.8.0.ebuild
index 8db064b0f82..b2e7a0f0e7b 100644
--- a/dev-embedded/sdcc/sdcc-3.8.0.ebuild
+++ b/dev-embedded/sdcc/sdcc-3.8.0.ebuild
@@ -2,17 +2,17 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit toolchain-funcs
+inherit autotools toolchain-funcs
 
 if [[ ${PV} == "9999" ]] ; then
 	ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc"
 	inherit subversion
-	docs_compile() { return 0; }
 else
-	SRC_URI="mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2
-		doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 )"
+	SRC_URI="
+		mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2
+		doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 )
+	"
 	KEYWORDS="~amd64 ~x86"
-	docs_compile() { return 1; }
 fi
 
 DESCRIPTION="Small device C compiler (for various microprocessors)"
@@ -56,14 +56,9 @@ DEPEND="
 	${RDEPEND}
 	dev-util/gperf
 "
-if docs_compile ; then
-DEPEND+="
-	doc? (
-		>=app-office/lyx-1.3.4
-		dev-tex/latex2html
-	)
-"
-fi
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.8.0-override-override.patch
+)
 
 src_prepare() {
 	# Fix conflicting variable names between Gentoo and sdcc
@@ -83,16 +78,16 @@ src_prepare() {
 	[[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} +
 
 	default
+	eautoreconf
 }
 
 src_configure() {
 	# sdbinutils subdir doesn't pass down --docdir properly, so need to
 	# expand $(datarootdir) ourselves.
 	econf \
-		ac_cv_prog_STRIP=true \
-		ac_cv_prog_AS="$(tc-getAS)" \
 		ac_cv_prog_AR="$(tc-getAR)" \
-		$(docs_compile && use_enable doc || echo --disable-doc) \
+		ac_cv_prog_AS="$(tc-getAS)" \
+		ac_cv_prog_STRIP=true \
 		$(use_enable avr avr-port) \
 		$(use_enable boehm-gc libgc) \
 		$(use_enable device-lib) \
@@ -116,6 +111,7 @@ src_configure() {
 		$(use_enable ucsim) \
 		$(use_enable z180 z180-port) \
 		$(use_enable z80 z80-port) \
+		--disable-doc \
 		--docdir="${EPREFIX}/usr/share/doc/${PF}" \
 		--without-ccache
 }
@@ -125,10 +121,9 @@ src_install() {
 	dodoc doc/*.txt
 	find "${D}" -name .deps -exec rm -rf {} + || die
 
-	if use doc ; then
-		docs_compile || cd "${WORKDIR}"/doc
-		docinto html
-		doins -r *
+	if use doc && [[ ${PV} != "9999" ]]; then
+		cd "${WORKDIR}"/doc
+		dodoc -r *
 	fi
 
 	# a bunch of archives (*.a) are built & installed by gputils

diff --git a/dev-embedded/sdcc/sdcc-9999.ebuild b/dev-embedded/sdcc/sdcc-9999.ebuild
index 8db064b0f82..b2e7a0f0e7b 100644
--- a/dev-embedded/sdcc/sdcc-9999.ebuild
+++ b/dev-embedded/sdcc/sdcc-9999.ebuild
@@ -2,17 +2,17 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit toolchain-funcs
+inherit autotools toolchain-funcs
 
 if [[ ${PV} == "9999" ]] ; then
 	ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc"
 	inherit subversion
-	docs_compile() { return 0; }
 else
-	SRC_URI="mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2
-		doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 )"
+	SRC_URI="
+		mirror://sourceforge/sdcc/${PN}-src-${PV}.tar.bz2
+		doc? ( mirror://sourceforge/sdcc/${PN}-doc-${PV}.tar.bz2 )
+	"
 	KEYWORDS="~amd64 ~x86"
-	docs_compile() { return 1; }
 fi
 
 DESCRIPTION="Small device C compiler (for various microprocessors)"
@@ -56,14 +56,9 @@ DEPEND="
 	${RDEPEND}
 	dev-util/gperf
 "
-if docs_compile ; then
-DEPEND+="
-	doc? (
-		>=app-office/lyx-1.3.4
-		dev-tex/latex2html
-	)
-"
-fi
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.8.0-override-override.patch
+)
 
 src_prepare() {
 	# Fix conflicting variable names between Gentoo and sdcc
@@ -83,16 +78,16 @@ src_prepare() {
 	[[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} +
 
 	default
+	eautoreconf
 }
 
 src_configure() {
 	# sdbinutils subdir doesn't pass down --docdir properly, so need to
 	# expand $(datarootdir) ourselves.
 	econf \
-		ac_cv_prog_STRIP=true \
-		ac_cv_prog_AS="$(tc-getAS)" \
 		ac_cv_prog_AR="$(tc-getAR)" \
-		$(docs_compile && use_enable doc || echo --disable-doc) \
+		ac_cv_prog_AS="$(tc-getAS)" \
+		ac_cv_prog_STRIP=true \
 		$(use_enable avr avr-port) \
 		$(use_enable boehm-gc libgc) \
 		$(use_enable device-lib) \
@@ -116,6 +111,7 @@ src_configure() {
 		$(use_enable ucsim) \
 		$(use_enable z180 z180-port) \
 		$(use_enable z80 z80-port) \
+		--disable-doc \
 		--docdir="${EPREFIX}/usr/share/doc/${PF}" \
 		--without-ccache
 }
@@ -125,10 +121,9 @@ src_install() {
 	dodoc doc/*.txt
 	find "${D}" -name .deps -exec rm -rf {} + || die
 
-	if use doc ; then
-		docs_compile || cd "${WORKDIR}"/doc
-		docinto html
-		doins -r *
+	if use doc && [[ ${PV} != "9999" ]]; then
+		cd "${WORKDIR}"/doc
+		dodoc -r *
 	fi
 
 	# a bunch of archives (*.a) are built & installed by gputils


             reply	other threads:[~2018-11-02 14:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 14:33 Jeroen Roovers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-03  0:10 [gentoo-commits] repo/gentoo:master commit in: dev-embedded/sdcc/, dev-embedded/sdcc/files/ Andreas K. Hüttel
2023-08-20  9:33 Viorel Munteanu
2018-05-09 21:00 Mikle Kolyada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1541169233.cb60b5c5b84a6eb770cee3e0c67ab23530ba5096.jer@gentoo \
    --to=jer@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox