Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/pnglite/
Date: Thu, 25 Nov 2021 13:19:30
Message-Id: 1637846326.aed948e2740943d4bdcfcdb63467e6690885fb62.marecki@gentoo
1 commit: aed948e2740943d4bdcfcdb63467e6690885fb62
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 25 13:18:00 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 25 13:18:46 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aed948e2
7
8 media-libs/pnglite: update EAPI 5 -> 8
9
10 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
11
12 media-libs/pnglite/pnglite-0.1.17-r1.ebuild | 45 +++++++++++++++++++++++++++++
13 1 file changed, 45 insertions(+)
14
15 diff --git a/media-libs/pnglite/pnglite-0.1.17-r1.ebuild b/media-libs/pnglite/pnglite-0.1.17-r1.ebuild
16 new file mode 100644
17 index 000000000000..4b5669ea7d37
18 --- /dev/null
19 +++ b/media-libs/pnglite/pnglite-0.1.17-r1.ebuild
20 @@ -0,0 +1,45 @@
21 +# Copyright 1999-2021 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +inherit flag-o-matic toolchain-funcs
27 +
28 +DESCRIPTION="Small and simple library for loading and writing PNG images"
29 +HOMEPAGE="https://sourceforge.net/projects/pnglite/"
30 +SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${P}.zip"
31 +
32 +LICENSE="ZLIB"
33 +SLOT="0"
34 +KEYWORDS="~amd64 ~arm64 ~x86"
35 +
36 +RDEPEND="sys-libs/zlib"
37 +DEPEND="${RDEPEND}"
38 +BDEPEND="app-arch/unzip"
39 +
40 +PATCHES=(
41 + "${FILESDIR}"/${P}-include-stdio.patch
42 +)
43 +
44 +S=${WORKDIR}
45 +
46 +src_prepare() {
47 + default
48 + sed -ie "s:\"../zlib/zlib.h\":<zlib.h>:" pnglite.c || die
49 +}
50 +
51 +src_compile() {
52 + tc-export CC
53 + append-flags -fPIC
54 + emake ${PN}.o
55 + $(tc-getCC) ${LDFLAGS} -shared -Wl,-soname,lib${PN}.so.0 \
56 + -o lib${PN}.so.0 ${PN}.o -lz || die
57 +}
58 +
59 +src_install() {
60 + insinto /usr/include
61 + doins ${PN}.h
62 +
63 + dolib.so lib${PN}.so.0
64 + dosym lib${PN}.so.0 /usr/$(get_libdir)/lib${PN}.so
65 +}