From 7217e0773b8a6632cac56b31c82f960dcedc464b Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Thu, 18 Feb 2021 13:20:57 +0300 Subject: app-misc/stag: Fix building Package-Manager: Portage-3.0.14, Repoman-3.0.2 --- app-misc/stag/files/stag-1.0.0-ncurses.patch | 11 ----------- app-misc/stag/files/stag-9999-ncurses.patch | 11 ----------- app-misc/stag/stag-1.0.0.ebuild | 25 +++++++++++++++++++------ app-misc/stag/stag-9999.ebuild | 25 +++++++++++++++++++------ 4 files changed, 38 insertions(+), 34 deletions(-) delete mode 100644 app-misc/stag/files/stag-1.0.0-ncurses.patch delete mode 100644 app-misc/stag/files/stag-9999-ncurses.patch (limited to 'app-misc') diff --git a/app-misc/stag/files/stag-1.0.0-ncurses.patch b/app-misc/stag/files/stag-1.0.0-ncurses.patch deleted file mode 100644 index 2830134..0000000 --- a/app-misc/stag/files/stag-1.0.0-ncurses.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile 2020-10-02 20:44:39.606575295 -0700 -+++ b/Makefile 2020-10-02 20:45:28.695961593 -0700 -@@ -1,7 +1,7 @@ - CC ?= gcc - CFLAGS=-Wall -Werror -Wextra -std=c99 -pedantic -Wno-unused-parameter - # D_BSD_SOURCE for strsep --LIBS=-lncurses -lm -D_DEFAULT_SOURCE -+LIBS=-lncurses -ltinfo -lm -D_DEFAULT_SOURCE - PREFIX ?= /usr/local - - .PHONY: install uninstall clean diff --git a/app-misc/stag/files/stag-9999-ncurses.patch b/app-misc/stag/files/stag-9999-ncurses.patch deleted file mode 100644 index 2830134..0000000 --- a/app-misc/stag/files/stag-9999-ncurses.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile 2020-10-02 20:44:39.606575295 -0700 -+++ b/Makefile 2020-10-02 20:45:28.695961593 -0700 -@@ -1,7 +1,7 @@ - CC ?= gcc - CFLAGS=-Wall -Werror -Wextra -std=c99 -pedantic -Wno-unused-parameter - # D_BSD_SOURCE for strsep --LIBS=-lncurses -lm -D_DEFAULT_SOURCE -+LIBS=-lncurses -ltinfo -lm -D_DEFAULT_SOURCE - PREFIX ?= /usr/local - - .PHONY: install uninstall clean diff --git a/app-misc/stag/stag-1.0.0.ebuild b/app-misc/stag/stag-1.0.0.ebuild index fdb6a21..1a58fba 100644 --- a/app-misc/stag/stag-1.0.0.ebuild +++ b/app-misc/stag/stag-1.0.0.ebuild @@ -4,11 +4,13 @@ EAPI=7 if [[ ${PV} == *9999 ]]; then - inherit git-r3 + SCM="git-r3" EGIT_REPO_URI="https://github.com/seenaburns/stag.git" fi -DESCRIPTION="Streaming bar graphs. For stats and stuff." +inherit toolchain-funcs ${SCM} + +DESCRIPTION="Streaming bar graphs for stats and stuff" HOMEPAGE="https://github.com/seenaburns/stag" if [[ ${PV} == *9999 ]]; then @@ -27,10 +29,21 @@ DEPEND="sys-libs/ncurses" RDEPEND="${DEPEND}" BDEPEND="" -PATCHES=( - "${FILESDIR}/${P}-ncurses.patch" -) +src_prepare() { + sed -e 's/^CFLAGS=/CFLAGS+=/' \ + -e 's/-lncurses/-lncurses -ltinfo/' \ + -i Makefile || die + + default +} + +src_compile() { + emake \ + CC="$(tc-getCC)" +} src_install() { - emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install + emake install \ + DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" } diff --git a/app-misc/stag/stag-9999.ebuild b/app-misc/stag/stag-9999.ebuild index fdb6a21..1a58fba 100644 --- a/app-misc/stag/stag-9999.ebuild +++ b/app-misc/stag/stag-9999.ebuild @@ -4,11 +4,13 @@ EAPI=7 if [[ ${PV} == *9999 ]]; then - inherit git-r3 + SCM="git-r3" EGIT_REPO_URI="https://github.com/seenaburns/stag.git" fi -DESCRIPTION="Streaming bar graphs. For stats and stuff." +inherit toolchain-funcs ${SCM} + +DESCRIPTION="Streaming bar graphs for stats and stuff" HOMEPAGE="https://github.com/seenaburns/stag" if [[ ${PV} == *9999 ]]; then @@ -27,10 +29,21 @@ DEPEND="sys-libs/ncurses" RDEPEND="${DEPEND}" BDEPEND="" -PATCHES=( - "${FILESDIR}/${P}-ncurses.patch" -) +src_prepare() { + sed -e 's/^CFLAGS=/CFLAGS+=/' \ + -e 's/-lncurses/-lncurses -ltinfo/' \ + -i Makefile || die + + default +} + +src_compile() { + emake \ + CC="$(tc-getCC)" +} src_install() { - emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install + emake install \ + DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" } -- cgit 1.4.1