1 |
commit: 49f7781f888de99eddd4ef1a2b1f6af5dd4b0ace |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 17 22:02:18 2019 +0000 |
4 |
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 17 22:04:04 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49f7781f |
7 |
|
8 |
media-gfx/xloadimage: EAPI bump |
9 |
|
10 |
Package-Manager: Portage-2.3.56, Repoman-2.3.12 |
11 |
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> |
12 |
|
13 |
.../xloadimage/files/xloadimage-4.1-libpng15.patch | 4 +- |
14 |
media-gfx/xloadimage/xloadimage-4.1-r12.ebuild | 96 ++++++++++++++++++++++ |
15 |
2 files changed, 98 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/media-gfx/xloadimage/files/xloadimage-4.1-libpng15.patch b/media-gfx/xloadimage/files/xloadimage-4.1-libpng15.patch |
18 |
index ffd05f62b33..da222d68c25 100644 |
19 |
--- a/media-gfx/xloadimage/files/xloadimage-4.1-libpng15.patch |
20 |
+++ b/media-gfx/xloadimage/files/xloadimage-4.1-libpng15.patch |
21 |
@@ -1,5 +1,5 @@ |
22 |
---- png.c |
23 |
-+++ png.c |
24 |
+--- a/png.c |
25 |
++++ b/png.c |
26 |
@@ -75,7 +75,7 @@ |
27 |
{ |
28 |
debug(" #error "); |
29 |
|
30 |
diff --git a/media-gfx/xloadimage/xloadimage-4.1-r12.ebuild b/media-gfx/xloadimage/xloadimage-4.1-r12.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..7e9f5a36e1e |
33 |
--- /dev/null |
34 |
+++ b/media-gfx/xloadimage/xloadimage-4.1-r12.ebuild |
35 |
@@ -0,0 +1,96 @@ |
36 |
+# Copyright 1999-2019 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=7 |
40 |
+inherit autotools flag-o-matic toolchain-funcs |
41 |
+ |
42 |
+DESCRIPTION="utility to view many different types of images under X11" |
43 |
+HOMEPAGE="https://tracker.debian.org/pkg/xloadimage" |
44 |
+SRC_URI="ftp://ftp.x.org/R5contrib/${P/-/.}.tar.gz |
45 |
+ mirror://gentoo/${P}-gentoo-r1.diff.bz2" |
46 |
+ |
47 |
+LICENSE="MIT" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
50 |
+IUSE="tiff jpeg png" |
51 |
+ |
52 |
+RDEPEND="x11-libs/libX11 |
53 |
+ tiff? ( media-libs/tiff:0= ) |
54 |
+ png? ( media-libs/libpng:0= ) |
55 |
+ jpeg? ( virtual/jpeg:0 )" |
56 |
+DEPEND="${RDEPEND} |
57 |
+ !media-gfx/xli" |
58 |
+ |
59 |
+S=${WORKDIR}/${P/-/.} |
60 |
+ |
61 |
+src_prepare() { |
62 |
+ eapply "${WORKDIR}"/${P}-gentoo-r1.diff |
63 |
+ eapply "${FILESDIR}"/${P}-zio-shell-meta-char.diff |
64 |
+ eapply "${FILESDIR}"/${P}-endif.patch |
65 |
+ |
66 |
+ # Do not define errno extern, but rather include errno.h |
67 |
+ # <azarah@g.o> (1 Jan 2003) |
68 |
+ eapply "${FILESDIR}"/${P}-include-errno_h.patch |
69 |
+ |
70 |
+ eapply "${FILESDIR}"/xloadimage-gentoo.patch |
71 |
+ |
72 |
+ sed -i -e "s:OPT_FLAGS=:OPT_FLAGS=$CFLAGS:" Make.conf || die |
73 |
+ sed -i -e "s:^#include <varargs.h>:#include <stdarg.h>:" rlelib.c || die |
74 |
+ |
75 |
+ # On FreeBSD systems malloc.h is a false header asking for fixes. |
76 |
+ # On MacOSX it would require malloc/malloc.h |
77 |
+ # On other systems it's simply unneeded |
78 |
+ sed -i -e 's,<malloc.h>,<stdlib.h>,' vicar.c || die |
79 |
+ |
80 |
+ eapply "${FILESDIR}"/${P}-unaligned-access.patch |
81 |
+ eapply "${FILESDIR}"/${P}-ldflags_and_exit.patch |
82 |
+ |
83 |
+ sed -i -e "/^DEFS = /s:/etc:${EPREFIX}/etc:" Makefile.in || die |
84 |
+ |
85 |
+ eapply "${FILESDIR}"/${P}-libpng15.patch |
86 |
+ sed -i \ |
87 |
+ -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \ |
88 |
+ png.c || die |
89 |
+ |
90 |
+ # One of the previous patches screws up a bracket... |
91 |
+ eapply "${FILESDIR}"/${P}-bracket.patch |
92 |
+ |
93 |
+ default |
94 |
+ |
95 |
+ chmod +x configure || die |
96 |
+ eautoreconf |
97 |
+} |
98 |
+ |
99 |
+src_configure() { |
100 |
+ # Set TIFFHeader to TIFFHeaderCommon wrt #319383 |
101 |
+ has_version '>=media-libs/tiff-4.0.0_pre' && \ |
102 |
+ append-flags -DTIFFHeader=TIFFHeaderCommon |
103 |
+ |
104 |
+ tc-export CC |
105 |
+ econf $(use_with jpeg) \ |
106 |
+ $(use_with png) \ |
107 |
+ $(use_with tiff) |
108 |
+} |
109 |
+ |
110 |
+src_compile() { |
111 |
+ emake SYSPATHFILE="${EPREFIX}"/etc/X11/Xloadimage |
112 |
+} |
113 |
+ |
114 |
+src_install() { |
115 |
+ dobin xloadimage uufilter |
116 |
+ |
117 |
+ dosym xloadimage /usr/bin/xsetbg |
118 |
+ dosym xloadimage /usr/bin/xview |
119 |
+ |
120 |
+ insinto /etc/X11 |
121 |
+ doins xloadimagerc |
122 |
+ |
123 |
+ newman xloadimage.man xloadimage.1 |
124 |
+ newman uufilter.man uufilter.1 |
125 |
+ |
126 |
+ echo ".so man1/xloadimage.1" > "${T}"/xsetbg.1 || die |
127 |
+ doman "${T}"/xsetbg.1 |
128 |
+ newman "${T}"/xsetbg.1 xview.1 |
129 |
+ |
130 |
+ dodoc README |
131 |
+} |