From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6EF1D158091 for ; Sat, 7 May 2022 07:25:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 61792E07DB; Sat, 7 May 2022 07:25:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 44B29E07DB for ; Sat, 7 May 2022 07:25:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2D16D3414F3 for ; Sat, 7 May 2022 07:25:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BBDA3445 for ; Sat, 7 May 2022 07:25:07 +0000 (UTC) From: "Alessandro Barbieri" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alessandro Barbieri" Message-ID: <1651908170.1ff3993d8f1a6f32f498c9077232f0da87b0a7ae.Alessandro-Barbieri@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/octaveforge.eclass X-VCS-Directories: eclass/ X-VCS-Committer: Alessandro-Barbieri X-VCS-Committer-Name: Alessandro Barbieri X-VCS-Revision: 1ff3993d8f1a6f32f498c9077232f0da87b0a7ae X-VCS-Branch: dev Date: Sat, 7 May 2022 07:25:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5f36845f-7ee9-4e8a-a63b-5d9080afd632 X-Archives-Hash: fd33acd5522e02360fb4606aa0f19234 commit: 1ff3993d8f1a6f32f498c9077232f0da87b0a7ae Author: Alessandro Barbieri gmail com> AuthorDate: Sat May 7 07:22:50 2022 +0000 Commit: Alessandro Barbieri gmail com> CommitDate: Sat May 7 07:22:50 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1ff3993d octaveforge.eclass: inline configure, eautoreconf Signed-off-by: Alessandro Barbieri gmail.com> eclass/octaveforge.eclass | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/eclass/octaveforge.eclass b/eclass/octaveforge.eclass index d02072fd5..67eb8aece 100644 --- a/eclass/octaveforge.eclass +++ b/eclass/octaveforge.eclass @@ -41,10 +41,7 @@ OCT_PKGDIR="${OCT_ROOT}/packages" # full path to octave binary OCT_BIN="$(type -p octave)" -SRC_URI=" - mirror://sourceforge/octave/${P}.tar.gz - ${REPO_URI}/packages/package_configure.in -> octaveforge_configure -" +SRC_URI="mirror://sourceforge/octave/${P}.tar.gz" SLOT="0" # @FUNCTION: octaveforge_src_unpack @@ -60,16 +57,17 @@ octaveforge_src_unpack() { # @FUNCTION: octaveforge_src_prepare # @DESCRIPTION: -# function to add octaveforge specific makefile and configure and run autogen.sh if available +# function to add octaveforge specific makefile and configure and reconfigure if possible octaveforge_src_prepare() { - cp "${DISTDIR}/octaveforge_configure" "${S}/configure" || die + _generate_configure - chmod 0755 "${S}/configure" || die - if [[ -e "${S}/src/autogen.sh" ]]; then - pushd "${S}/src" || die + pushd "${S}/src" || die + if [[ -e "${S}/src/configure.ac" ]]; then + eautoreconf + elif [[ -e "${S}/src/autogen.sh" ]]; then ./autogen.sh || die 'failed to run autogen.sh' - popd || die fi + popd || die if [[ -e "${S}/src/Makefile" ]]; then sed -i 's/ -s / /g' "${S}/src/Makefile" || die 'sed failed.' fi @@ -215,3 +213,15 @@ octaveforge_pkg_postrm() { octavecommand() { "${OCT_BIN}" -H -q --no-site-file --no-gui --eval "$1" } + +_generate_configure() { + cat << EOF > configure || die +#! /bin/sh -f + +if [ -e src/configure ]; then + cd src + ./configure $* +fi +EOF + chmod 0755 "configure" || die +}