Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: media-gfx/heatshrink/files/, media-gfx/heatshrink/
Date: Thu, 11 Aug 2022 13:45:15
Message-Id: 1659897343.aa2a03e20ed8ca53a75840fc390771bc9422f238.andrewammerlaan@gentoo
1 commit: aa2a03e20ed8ca53a75840fc390771bc9422f238
2 Author: Thibaud CANALE <thican <AT> thican <DOT> net>
3 AuthorDate: Sun Aug 7 18:35:43 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 7 18:35:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=aa2a03e2
7
8 media-gfx/heatshrink: new package, add 0.4.1
9
10 Signed-off-by: Thibaud CANALE <thican <AT> thican.net>
11
12 media-gfx/heatshrink/Manifest | 1 +
13 media-gfx/heatshrink/files/Makefile.patch | 23 ++++++++++++++++++++++
14 media-gfx/heatshrink/heatshrink-0.4.1.ebuild | 29 ++++++++++++++++++++++++++++
15 3 files changed, 53 insertions(+)
16
17 diff --git a/media-gfx/heatshrink/Manifest b/media-gfx/heatshrink/Manifest
18 new file mode 100644
19 index 000000000..b23793093
20 --- /dev/null
21 +++ b/media-gfx/heatshrink/Manifest
22 @@ -0,0 +1 @@
23 +DIST heatshrink-0.4.1.tar.gz 36945 BLAKE2B 526e3f88ddaec8116e5eef1a73a4450454ca808545dfe4a36069be8a0d771ca92c850c51f9b3c3e73f244454ba17d03da8fb0be4849728300c7eb8181e39651e SHA512 bb9610b963da0762b1ac21d0907f3801b525431abff495b66cadc244a2b2b334441de2b14442b722bfeb56cb4459fe4021eae0d0454f9e26a80e6efa11f079d2
24
25 diff --git a/media-gfx/heatshrink/files/Makefile.patch b/media-gfx/heatshrink/files/Makefile.patch
26 new file mode 100644
27 index 000000000..a858ec0c1
28 --- /dev/null
29 +++ b/media-gfx/heatshrink/files/Makefile.patch
30 @@ -0,0 +1,23 @@
31 +diff --git a/Makefile b/Makefile
32 +index d0c4dbe6..5cd8977a 100644
33 +--- a/Makefile
34 ++++ b/Makefile
35 +@@ -12,7 +12,8 @@ WARN += -Wmissing-declarations
36 + #THEFT_INC= -I${THEFT_PATH}/include/
37 + #LDFLAGS += -L${THEFT_PATH}/lib -ltheft
38 +
39 +-CFLAGS += -std=c99 -g ${WARN} ${THEFT_INC} ${OPTIMIZE}
40 ++MY_CFLAGS := -std=c99 ${WARN} ${THEFT_INC} ${OPTIMIZE} ${CFLAGS}
41 ++CFLAGS := ${MY_CFLAGS}
42 +
43 + all: heatshrink test_runners libraries
44 +
45 +@@ -66,8 +67,6 @@ RM ?= rm
46 +
47 + install: libraries heatshrink
48 + ${INSTALL} -c heatshrink ${PREFIX}/bin/
49 +- ${INSTALL} -c libheatshrink_static.a ${PREFIX}/lib/
50 +- ${INSTALL} -c libheatshrink_dynamic.a ${PREFIX}/lib/
51 + ${INSTALL} -c heatshrink_common.h ${PREFIX}/include/
52 + ${INSTALL} -c heatshrink_config.h ${PREFIX}/include/
53 + ${INSTALL} -c heatshrink_encoder.h ${PREFIX}/include/
54
55 diff --git a/media-gfx/heatshrink/heatshrink-0.4.1.ebuild b/media-gfx/heatshrink/heatshrink-0.4.1.ebuild
56 new file mode 100644
57 index 000000000..9c7bffdf4
58 --- /dev/null
59 +++ b/media-gfx/heatshrink/heatshrink-0.4.1.ebuild
60 @@ -0,0 +1,29 @@
61 +# Copyright 2022 Gentoo Authors
62 +# Distributed under the terms of the GNU General Public License v2
63 +
64 +EAPI=8
65 +
66 +DESCRIPTION="data compression library for embedded/real-time systems"
67 +HOMEPAGE="https://github.com/atomicobject/heatshrink"
68 +
69 +if [[ "${PV}" == "9999" ]]; then
70 + inherit git-r3
71 + EGIT_REPO_URI="https://github.com/atomicobject/${PN}.git"
72 +else
73 + inherit verify-sig
74 + SRC_URI="https://github.com/atomicobject/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
75 + KEYWORDS="~amd64 ~x86"
76 +fi
77 +
78 +LICENSE="ISC"
79 +SLOT="0"
80 +
81 +PATCHES=(
82 + "${FILESDIR}/Makefile.patch"
83 +)
84 +
85 +src_install() {
86 + local MY_ED="${ED}/usr"
87 + mkdir "${MY_ED%/}"{,/bin,/include} || die
88 + emake PREFIX="${MY_ED%/}/" install
89 +}