summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-09-23 18:05:37 +0000
committerViorel Munteanu <ceamac@gentoo.org>2023-12-25 12:00:02 +0200
commit80952b50674915d288f1a16db40f3be354550d2f (patch)
tree48f03c1fbc26b318ef6ceb2d2777300cd868592c /media-gfx/metapixel
parentnet-libs/webkit-gtk: Stabilize 2.42.4-r600 arm, #920667 (diff)
downloadgentoo-80952b50674915d288f1a16db40f3be354550d2f.tar.gz
gentoo-80952b50674915d288f1a16db40f3be354550d2f.tar.bz2
gentoo-80952b50674915d288f1a16db40f3be354550d2f.zip
media-gfx/metapixel: Fix call to undeclared function getpid
and update EAPI 6 -> 8 Closes: https://bugs.gentoo.org/896224 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/32963 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'media-gfx/metapixel')
-rw-r--r--media-gfx/metapixel/files/metapixel-1.0.2-clang16-build-fix.patch12
-rw-r--r--media-gfx/metapixel/metapixel-1.0.2-r2.ebuild44
2 files changed, 56 insertions, 0 deletions
diff --git a/media-gfx/metapixel/files/metapixel-1.0.2-clang16-build-fix.patch b/media-gfx/metapixel/files/metapixel-1.0.2-clang16-build-fix.patch
new file mode 100644
index 000000000000..0ddc05175484
--- /dev/null
+++ b/media-gfx/metapixel/files/metapixel-1.0.2-clang16-build-fix.patch
@@ -0,0 +1,12 @@
+Bug: https://bugs.gentoo.org/896224
+--- a/getopt.c
++++ b/getopt.c
+@@ -39,6 +39,8 @@
+ #endif
+
+ #include <stdio.h>
++#include <string.h>
++#include <unistd.h>
+
+ /* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. This code is part of the GNU C
diff --git a/media-gfx/metapixel/metapixel-1.0.2-r2.ebuild b/media-gfx/metapixel/metapixel-1.0.2-r2.ebuild
new file mode 100644
index 000000000000..97ea64edc098
--- /dev/null
+++ b/media-gfx/metapixel/metapixel-1.0.2-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit toolchain-funcs
+
+DESCRIPTION="a program for generating photomosaics"
+HOMEPAGE="https://www.complang.tuwien.ac.at/schani/metapixel/"
+SRC_URI="https://www.complang.tuwien.ac.at/schani/${PN}/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-lang/perl
+ >=media-libs/giflib-5:0=
+ >=media-libs/libpng-1.4:0=
+ media-libs/libjpeg-turbo:=
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libpng15.patch
+ "${FILESDIR}"/${P}-giflib5.patch
+ "${FILESDIR}"/${P}-clang16-build-fix.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i -e 's:/usr/X11R6:/usr:g' Makefile || die
+ sed -i -e 's:ar:$(AR):' rwimg/Makefile || die
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" CC="$(tc-getCC)" OPTIMIZE="${CFLAGS}" LDOPTS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}{,-prepare,-imagesize,-sizesort}
+ doman ${PN}.1
+ dodoc NEWS README
+}