dev-libs/protothreads: respect CC

Closes: https://bugs.gentoo.org/784938
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri 2021-04-26 01:46:20 +02:00
parent 98b1862e41
commit c123aa26f5
No known key found for this signature in database
GPG Key ID: 75DFA720D0EF7660
2 changed files with 15 additions and 10 deletions

View File

@ -0,0 +1,8 @@
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CFLAGS=-O -Wuninitialized -Werror
+CFLAGS+=-Wuninitialized
all: example-codelock example-buffer example-small

View File

@ -1,9 +1,11 @@
# Copyright 1999-2020 Gentoo Authors # Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI="7" EAPI="7"
DESCRIPTION="Protothreads - Lightweight, Stackless Threads in C" inherit toolchain-funcs
DESCRIPTION="Lightweight, Stackless Threads in C"
HOMEPAGE="https://web.archive.org/web/20190923093100/http://dunkels.com/adam/pt/" HOMEPAGE="https://web.archive.org/web/20190923093100/http://dunkels.com/adam/pt/"
SRC_URI=" SRC_URI="
https://web.archive.org/web/20190518175329/http://dunkels.com/adam/download/pt-${PV}.tar.gz -> ${P}.tar https://web.archive.org/web/20190518175329/http://dunkels.com/adam/download/pt-${PV}.tar.gz -> ${P}.tar
@ -16,7 +18,7 @@ KEYWORDS="~amd64"
IUSE="doc examples" IUSE="doc examples"
BDEPEND="doc? ( app-doc/doxygen )" BDEPEND="doc? ( app-doc/doxygen )"
PATCHES=( "${FILESDIR}/respect-cflags.patch" )
S="${WORKDIR}/pt-${PV}" S="${WORKDIR}/pt-${PV}"
src_unpack() { src_unpack() {
@ -24,13 +26,8 @@ src_unpack() {
cp "${DISTDIR}/graham-pt.h" "${S}" cp "${DISTDIR}/graham-pt.h" "${S}"
} }
src_prepare() {
sed -i 's/-Werror//g' Makefile
sed -i 's/-O//g' Makefile
default
}
src_compile() { src_compile() {
export CC=$(tc-getCC)
default default
use doc && cd doc && emake use doc && cd doc && emake
} }
@ -44,7 +41,7 @@ src_install() {
dodoc README dodoc README
docinto html docinto html
dodoc -r doc/html/. dodoc -r doc/html/.
docompress -x "/usr/share/doc/${P}/html"
fi fi
if use examples ; then if use examples ; then
insinto "/usr/share/${P}/examples" insinto "/usr/share/${P}/examples"