dev-libs/protothreads: EAPI 8

Closes: https://bugs.gentoo.org/785367
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-04-18 18:05:40 +02:00
parent 0c612788e8
commit 0fb4370d24
3 changed files with 31 additions and 9 deletions

View File

@@ -0,0 +1,16 @@
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
-CFLAGS+=-Wuninitialized
+CFLAGS+=-Wuninitialized -I. -fPIE
all: example-codelock example-buffer example-small
-example-codelock: example-codelock.c pt.h lc.h
+example-codelock: example-codelock.c
-example-buffer: example-buffer.c pt.h lc.h
+example-buffer: example-buffer.c
-example-small: example-small.c pt.h lc.h
+example-small: example-small.c

View File

@@ -1,7 +1,7 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
EAPI=8
inherit toolchain-funcs
@@ -11,6 +11,7 @@ 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/graham-pt.h
"
S="${WORKDIR}/pt-${PV}"
LICENSE="BSD"
SLOT="0"
@@ -18,18 +19,23 @@ KEYWORDS="~amd64"
IUSE="doc examples"
BDEPEND="doc? ( app-doc/doxygen )"
PATCHES=( "${FILESDIR}/respect-cflags.patch" )
S="${WORKDIR}/pt-${PV}"
PATCHES=(
"${FILESDIR}/${P}-respect-cflags.patch"
"${FILESDIR}/${P}-fix-clang-build.patch"
)
src_unpack() {
default
cp "${DISTDIR}/graham-pt.h" "${S}"
cp "${DISTDIR}/graham-pt.h" "${S}" || die
}
src_compile() {
export CC=$(tc-getCC)
default
use doc && cd doc && emake
tc-export CC
use examples && emake
if use doc ; then
pushd doc || die
emake
fi
}
src_install() {
@@ -46,7 +52,7 @@ src_install() {
if use examples ; then
insinto "/usr/share/${P}/examples"
doins *.c
exeinto "/usr/libexec/${P}"
exeinto "/usr/libexec/${PN}"
doexe example-buffer
doexe example-codelock
doexe example-small