summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gentoo.org>2024-07-17 12:07:00 -0500
committerBen Kohler <bkohler@gentoo.org>2024-07-17 12:07:46 -0500
commitbb7020062ff46921ea42b2bae4dca18992ba4849 (patch)
tree468c22112324a67cd5855275c4edd6d1cbae12a0 /media-gfx
parentx11-wm/spectrwm: add missing libXt dep (diff)
downloadgentoo-bb7020062ff46921ea42b2bae4dca18992ba4849.tar.gz
gentoo-bb7020062ff46921ea42b2bae4dca18992ba4849.tar.bz2
gentoo-bb7020062ff46921ea42b2bae4dca18992ba4849.zip
media-gfx/xv: add 5.2.0
Closes: https://bugs.gentoo.org/936218 Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/xv/Manifest1
-rw-r--r--media-gfx/xv/files/xv-5.2.0-osx-bsd.patch51
-rw-r--r--media-gfx/xv/xv-5.2.0.ebuild53
3 files changed, 105 insertions, 0 deletions
diff --git a/media-gfx/xv/Manifest b/media-gfx/xv/Manifest
index 0dba1fc6c996..2b0fc9216a39 100644
--- a/media-gfx/xv/Manifest
+++ b/media-gfx/xv/Manifest
@@ -1,3 +1,4 @@
DIST xv-3.10a-jumbo-patches-20070520.tar.gz 1363802 BLAKE2B 1a9f77b950dfa817aa861d9b2b6898d6e378b4a61a57c746a8822793a8e11e54165faf859e073ef99c9fbea5aa0c4c8caa4608ef03f553003b779a4bf59c3ab6 SHA512 e2ac5a3b4d743bf142c162b00815dd9d8dcaf345d0649016b2c6441fe2329879471b19453808e677c1a0b8eeb3468295dba160b1f30eacb2a7a9d8524ce03e75
DIST xv-3.10a.png.bz2 3082 BLAKE2B 05f56053fc0a77bba155db306ae181f5404bced3b2c22a33b3a0a0750b84461ffec98934d3dbabd764fbb6ec95ce2851f4cf3959682a315fe6e6653cbaaa5ae4 SHA512 41e81c34e74a034292c2a8f525d1452614a2b42e980a1a2c93e3fcf990db528853d633496815e5fb2c897a780a2da171af590f436e2c7ef181eea00eb6922e9b
DIST xv-3.10a.tar.gz 2259124 BLAKE2B 42cea578a879c819be8f42ffb1d247643904d8b462a4d6faa208185e49566798605c89006cbc190725fa6356b87da3375cf04d2ba86b559419cf8f7471c867e5 SHA512 5b8c5890503e2796638921cabae8967e458c73e332acea8561b1025ed13c771bc44c0e309b4592852e33726eeaa9784f933d1312073b0ba2e0b8c0cedabcaa3f
+DIST xv-5.2.0.tar.gz 4785784 BLAKE2B 46dc637cbbeabfe1c034c34e73040de6efebbf5f423fe429028ebfeefd2fce5af0fdaff1c52db4807b8eb88de89dae6b7f0e2c8a3522a3d9b103d5777783a52d SHA512 0af7ff6db152be849c27be9fba116513595deeca9e3eb42ec6fd74a4756d0c525b55a40de49aa37dd5d2ea4a29e6d644c8c4c709f0e1ec0a98cbc0ae7221b110
diff --git a/media-gfx/xv/files/xv-5.2.0-osx-bsd.patch b/media-gfx/xv/files/xv-5.2.0-osx-bsd.patch
new file mode 100644
index 000000000000..27059386446d
--- /dev/null
+++ b/media-gfx/xv/files/xv-5.2.0-osx-bsd.patch
@@ -0,0 +1,51 @@
+diff '--color=auto' -ur a/src/vdcomp.c b/src/vdcomp.c
+--- a/src/vdcomp.c 2024-07-17 09:37:04.957769272 -0500
++++ b/src/vdcomp.c 2024-07-17 09:44:30.582594953 -0500
+@@ -130,6 +130,8 @@
+
+ # if defined(hp300) || defined(hp800) || defined(NeXT)
+ # include <sys/malloc.h> /* it's in "sys" on HPs and NeXT */
++# elif defined(__APPLE__)
++# include <malloc/malloc.h>
+ # else
+ # include <malloc.h> /* FIXME: should explicitly list systems that NEED this, not everyone that doesn't */
+ # endif
+diff '--color=auto' -ur a/src/xv.h b/src/xv.h
+--- a/src/xv.h 2024-07-17 09:37:04.957769272 -0500
++++ b/src/xv.h 2024-07-17 09:41:42.912041683 -0500
+@@ -183,7 +183,7 @@
+
+ #ifndef VMS
+ # include <errno.h>
+-# ifndef __NetBSD__
++# if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__APPLE__)
+ # if !(defined(__GLIBC__) && __GLIBC__ >= 2) && !defined(__OpenBSD__)
+ extern int errno; /* SHOULD be in errno.h, but often isn't */
+ # ifndef XV_HAVE_SYSERRLISTDECL
+@@ -199,7 +199,7 @@
+ # ifdef VMS
+ # define ERRSTR(x) strerror(x, vaxc$errno)
+ # else
+-# if defined(__BEOS__) || defined(__linux__) /* or all modern/glibc systems? */
++# if defined(__BEOS__) || defined(__linux__) || defined(__APPLE__) /* or all modern/glibc systems? */
+ # define ERRSTR(x) strerror(x)
+ # else
+ # define ERRSTR(x) sys_errlist[x]
+@@ -236,6 +236,8 @@
+ #ifdef NEED_MALLOC_H
+ # if defined(hp300) || defined(hp800) || defined(NeXT)
+ # include <sys/malloc.h> /* it's in "sys" on HPs and NeXT */
++# elif defined(__APPLE__)
++# include <malloc/malloc.h>
+ # else
+ # include <malloc.h>
+ # endif
+@@ -399,7 +401,7 @@
+ * them later. */
+ #ifndef VMS /* VMS hates multi-line definitions */
+ # if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) || \
+- defined(__bsdi__)
++ defined(__FreeBSD__) || defined(__bsdi__) || defined(__APPLE__)
+ # ifndef USE_MKSTEMP
+ # define USE_MKSTEMP /* use 'mkstemp()' instead of 'mktemp()' */
+ # endif /* >> SECURITY ISSUE << */
diff --git a/media-gfx/xv/xv-5.2.0.ebuild b/media-gfx/xv/xv-5.2.0.ebuild
new file mode 100644
index 000000000000..80ce9689509c
--- /dev/null
+++ b/media-gfx/xv/xv-5.2.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake desktop
+
+JUMBOV=20070520
+DESCRIPTION="Interactive image manipulation program supporting a wide variety of formats"
+HOMEPAGE="http://www.trilon.com/xv/index.html http://www.sonic.net/~roelofs/greg_xv.html"
+SRC_URI="https://github.com/jasper-software/xv/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ mirror://gentoo/xv-3.10a.png.bz2"
+
+LICENSE="xv"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="jpeg tiff png webp"
+
+DEPEND="
+ x11-libs/libXt
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ tiff? ( media-libs/tiff:= )
+ png? (
+ >=media-libs/libpng-1.2:=
+ sys-libs/zlib
+ )
+ webp? ( media-libs/libwebp:= )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/xv-5.2.0-osx-bsd.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+ -DXV_ENABLE_JPEG=$(usex jpeg)
+ -DXV_ENABLE_JP2K=OFF
+ -DXV_ENABLE_PNG=$(usex png)
+ -DXV_ENABLE_TIFF=$(usex tiff)
+ -DXV_ENABLE_WEBP=$(usex webp)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ newicon "${WORKDIR}"/xv-3.10a.png ${PN}.png
+ make_desktop_entry xv "" "" "Graphics;Viewer"
+}