From 42cc9f068e29c896d6e9692053e35fc108650435 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Wed, 16 Jun 2021 01:26:38 +0200 Subject: app-misc/cpufetch: add 0.98 Signed-off-by: Alessandro Barbieri --- app-misc/cpufetch/Manifest | 1 + app-misc/cpufetch/cpufetch-0.98.ebuild | 28 ++++++++++++++++++++ .../cpufetch/files/cpufetch-0.98-makefile.patch | 30 ++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 app-misc/cpufetch/cpufetch-0.98.ebuild create mode 100644 app-misc/cpufetch/files/cpufetch-0.98-makefile.patch diff --git a/app-misc/cpufetch/Manifest b/app-misc/cpufetch/Manifest index 3f81ed860d..a10492fa8a 100644 --- a/app-misc/cpufetch/Manifest +++ b/app-misc/cpufetch/Manifest @@ -1 +1,2 @@ DIST cpufetch-0.94_p20210409.tar.gz 303151 BLAKE2B 0ad4d19e1cf07cf9692af4c81183ce7727eaf3638907e812b288070e325a9b8b2f39af611db5eb19a069935ac60238b234173ee20138d8744e919c7c53e68609 SHA512 2f914f37a84e8a43b80770ad4e1b4e7d3679a17a50330198e1d8bb0faff3485a0e667735b5bdf01317d99851530f01165fe80b789059b8668d42d595386e44fd +DIST cpufetch-0.98.tar.gz 304203 BLAKE2B 71376f29337ac981aba993a74259e555d34ae6df0f8a2e04e7659608f2bae18fa6af4c31349601b7347566fd3d4c2ffa7cbf1752bc2b16b6513747201d2a2835 SHA512 e862a0b6472d4942a58359b203037391747f74d991ea71e77a64369695f39e3d9ab8d60c5888703683ce5258426f5211f9e54863649ad796e08c083888d9b076 diff --git a/app-misc/cpufetch/cpufetch-0.98.ebuild b/app-misc/cpufetch/cpufetch-0.98.ebuild new file mode 100644 index 0000000000..f0785779e4 --- /dev/null +++ b/app-misc/cpufetch/cpufetch-0.98.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="Simplistic yet fancy CPU architecture fetching tool" +HOMEPAGE="https://github.com/Dr-Noob/cpufetch" +SRC_URI="https://github.com/Dr-Noob/cpufetch/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${PV}" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +PATCHES=( "${FILESDIR}/${P}-makefile.patch" ) + +src_prepare() { + default + export CC=$(tc-getCC) +} + +src_install() { + dobin "${PN}" + doman "${PN}.1" + newdoc README.md README + dodoc -r doc/. +} diff --git a/app-misc/cpufetch/files/cpufetch-0.98-makefile.patch b/app-misc/cpufetch/files/cpufetch-0.98-makefile.patch new file mode 100644 index 0000000000..16180c59e5 --- /dev/null +++ b/app-misc/cpufetch/files/cpufetch-0.98-makefile.patch @@ -0,0 +1,30 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,4 @@ +-CC ?= gcc +- +-CFLAGS+=-Wall -Wextra -pedantic -fstack-protector-all -pedantic -std=c99 ++CFLAGS+=-Wall -Wextra -pedantic -std=c99 + SANITY_FLAGS=-Wfloat-equal -Wshadow -Wpointer-arith + + PREFIX ?= /usr +@@ -35,17 +33,15 @@ + OUTPUT=cpufetch.exe + endif + +-all: CFLAGS += -O3 + all: $(OUTPUT) + +-debug: CFLAGS += -g -O0 + debug: $(OUTPUT) + +-static: CFLAGS += -static -O3 ++static: CFLAGS += -static + static: $(OUTPUT) + + $(OUTPUT): Makefile $(SOURCE) $(HEADERS) +- $(CC) $(CFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT) + + run: $(OUTPUT) + ./$(OUTPUT) -- cgit v1.2.3-65-gdbad