From 3cd90654731ff9221ad2b15cb9e3dc01969ace8f Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Tue, 5 May 2020 11:08:24 +0200 Subject: [PATCH] dev-libs/octetos-core: simplify ebuilds you can set the S variable to the location of the source files instead of symlinking the source files to the default value of S Also, there is no need to specify the default functions, they are implemented automatically if nothing is specified Using MYPV is very helpful as you now only have to change 1 line to version bump Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Andrew Ammerlaan --- .../octetos-core-1.2.2_beta.ebuild | 18 +++++---------- .../octetos-core-2.0.0_beta.ebuild | 22 ++++-------------- .../octetos-core-2.2.0_beta.ebuild | 23 ++++--------------- .../octetos-core-2.2.1_beta.ebuild | 23 ++++--------------- 4 files changed, 21 insertions(+), 65 deletions(-) diff --git a/dev-libs/octetos-core/octetos-core-1.2.2_beta.ebuild b/dev-libs/octetos-core/octetos-core-1.2.2_beta.ebuild index 6b9289ee4e..076a1c4ce0 100644 --- a/dev-libs/octetos-core/octetos-core-1.2.2_beta.ebuild +++ b/dev-libs/octetos-core/octetos-core-1.2.2_beta.ebuild @@ -5,9 +5,11 @@ EAPI=7 inherit autotools +MYPV="${PV/_beta/-br}" + DESCRIPTION="C/C++ library to mainly provide Semantic Versioned implementation" HOMEPAGE="https://github.com/azaeldevel/octetos-core" -SRC_URI="https://github.com/azaeldevel/octetos-core/archive/1.2.2-br.tar.gz" +SRC_URI="https://github.com/azaeldevel/${PN}/archive/${MYPV}.tar.gz" LICENSE="GPL-3" SLOT="0" @@ -24,17 +26,9 @@ BDEPEND=" dev-libs/libconfig " -src_unpack() { - default - ln -s octetos-core-1.2.2-br "${P}" -} +S="${WORKDIR}/${PN}-${MYPV}" -src_configure() { +src_prepare() { + default eautoreconf -fi } - -src_compile() { - if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then - emake || die "emake failed" - fi -} diff --git a/dev-libs/octetos-core/octetos-core-2.0.0_beta.ebuild b/dev-libs/octetos-core/octetos-core-2.0.0_beta.ebuild index 76c32d5f1b..c5422040e0 100644 --- a/dev-libs/octetos-core/octetos-core-2.0.0_beta.ebuild +++ b/dev-libs/octetos-core/octetos-core-2.0.0_beta.ebuild @@ -5,9 +5,11 @@ EAPI=7 inherit autotools +MYPV="${PV/_beta/-alpha.2}" + DESCRIPTION="C/C++ library to mainly provide Semantic Versioned implementation" HOMEPAGE="https://github.com/azaeldevel/octetos-core" -SRC_URI="https://github.com/azaeldevel/octetos-core/archive/2.0.0-alpha.2.tar.gz" +SRC_URI="https://github.com/azaeldevel/${PN}/archive/${MYPV}.tar.gz" LICENSE="GPL-3" SLOT="0" @@ -24,23 +26,9 @@ BDEPEND=" dev-libs/libconfig " -src_unpack() { - default - ln -s octetos-core-2.0.0-alpha.2 "${P}" -} +S="${WORKDIR}/${PN}-${MYPV}" src_prepare() { + default eautoreconf -fi - eapply_user -} - -src_configure() { - if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then - econf - fi -} -src_compile() { - if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then - emake || die "emake failed" - fi } diff --git a/dev-libs/octetos-core/octetos-core-2.2.0_beta.ebuild b/dev-libs/octetos-core/octetos-core-2.2.0_beta.ebuild index 380bac21ac..d4556b78fc 100644 --- a/dev-libs/octetos-core/octetos-core-2.2.0_beta.ebuild +++ b/dev-libs/octetos-core/octetos-core-2.2.0_beta.ebuild @@ -5,9 +5,11 @@ EAPI=7 inherit autotools +MYPV="${PV/_beta/-beta.3}" + DESCRIPTION="C/C++ library to mainly provide Semantic Versioned implementation" HOMEPAGE="https://github.com/azaeldevel/octetos-core" -SRC_URI="https://github.com/azaeldevel/octetos-core/archive/2.2.0-beta.3.tar.gz" +SRC_URI="https://github.com/azaeldevel/${PN}/archive/${MYPV}.tar.gz" LICENSE="GPL-3" SLOT="0" @@ -23,24 +25,9 @@ BDEPEND=" dev-libs/libconfig " -src_unpack() { - default - ln -s octetos-core-2.2.0-beta.3 "${P}" -} +S="${WORKDIR}/${PN}-${MYPV}" src_prepare() { + default eautoreconf -fi - eapply_user -} - -src_configure() { - if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then - econf - fi -} - -src_compile() { - if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then - emake || die "emake failed" - fi } diff --git a/dev-libs/octetos-core/octetos-core-2.2.1_beta.ebuild b/dev-libs/octetos-core/octetos-core-2.2.1_beta.ebuild index 77d1004dc1..aa7c1f668a 100644 --- a/dev-libs/octetos-core/octetos-core-2.2.1_beta.ebuild +++ b/dev-libs/octetos-core/octetos-core-2.2.1_beta.ebuild @@ -5,9 +5,11 @@ EAPI=7 inherit autotools +MYPV="${PV/_beta/-beta.1}" + DESCRIPTION="C/C++ library to mainly provide Semantic Versioned implementation" HOMEPAGE="https://github.com/azaeldevel/octetos-core" -SRC_URI="https://github.com/azaeldevel/octetos-core/archive/2.2.1-beta.1.tar.gz" +SRC_URI="https://github.com/azaeldevel/${PN}/archive/${MYPV}.tar.gz" LICENSE="GPL-3" SLOT="0" @@ -23,24 +25,9 @@ BDEPEND=" dev-libs/libconfig " -src_unpack() { - default - ln -s octetos-core-2.2.1-beta.1 "${P}" -} +S="${WORKDIR}/${PN}-${MYPV}" src_prepare() { + default eautoreconf -fi - eapply_user -} - -src_configure() { - if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then - econf - fi -} - -src_compile() { - if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then - emake || die "emake failed" - fi }