Diff xloadimage-4.1-r14 with a xloadimage-4.1-r15

/usr/portage/media-gfx/xloadimage/xloadimage-4.1-r15.ebuild 2023-10-09 14:52:31.652368405 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5

  
5 6
inherit autotools flag-o-matic toolchain-funcs
6 7

  
7
DESCRIPTION="utility to view many different types of images under X11"
8
HOMEPAGE="https://tracker.debian.org/pkg/xloadimage"
9
SRC_URI="ftp://ftp.x.org/R5contrib/${P/-/.}.tar.gz
10
	mirror://gentoo/${P}-gentoo-r1.diff.bz2"
8
DESCRIPTION="Utility to view many different types of images under X11"
9
HOMEPAGE="https://sioseis.ucsd.edu/xloadimage.html https://tracker.debian.org/pkg/xloadimage"
10
SRC_URI="
11
	ftp://ftp.x.org/R5contrib/${P/-/.}.tar.gz
12
	mirror://gentoo/${P}-gentoo-r1.diff.bz2
13
	https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-fix-build-for-clang16.patch.xz
14
"
15
S="${WORKDIR}"/${P/-/.}
11 16

  
12 17
LICENSE="MIT"
13 18
SLOT="0"
......
17 22
RDEPEND="x11-libs/libX11
18 23
	tiff? ( media-libs/tiff:= )
19 24
	png? ( media-libs/libpng:= )
20
	jpeg? ( media-libs/libjpeg-turbo:= )"
21
DEPEND="${RDEPEND}
25
	jpeg? ( media-libs/libjpeg-turbo:= )
22 26
	!media-gfx/xli"
27
DEPEND="${RDEPEND}"
23 28

  
24
S=${WORKDIR}/${P/-/.}
25

  
26
src_prepare() {
27
	eapply "${WORKDIR}"/${P}-gentoo-r1.diff
28
	eapply "${FILESDIR}"/${P}-zio-shell-meta-char.diff
29
	eapply "${FILESDIR}"/${P}-endif.patch
30

  
29
PATCHES=(
30
	"${WORKDIR}"/${P}-gentoo-r1.diff
31
	"${FILESDIR}"/${P}-zio-shell-meta-char.diff
32
	"${FILESDIR}"/${P}-endif.patch
31 33
	# Do not define errno extern, but rather include errno.h
32 34
	# <azarah@gentoo.org> (1 Jan 2003)
33
	eapply "${FILESDIR}"/${P}-include-errno_h.patch
35
	"${FILESDIR}"/${P}-include-errno_h.patch
36
	"${FILESDIR}"/xloadimage-gentoo.patch
37
	"${FILESDIR}"/${P}-unaligned-access.patch
38
	"${FILESDIR}"/${P}-ldflags_and_exit.patch
39
	"${FILESDIR}"/${P}-libpng15.patch
40
	"${WORKDIR}"/${P}-fix-build-for-clang16.patch
41
	# One of the previous patches screws up a bracket...
42
	"${FILESDIR}"/${P}-bracket.patch
43
)
34 44

  
35
	eapply "${FILESDIR}"/xloadimage-gentoo.patch
45
src_prepare() {
46
	default
36 47

  
37 48
	sed -i -e "s:OPT_FLAGS=:OPT_FLAGS=$CFLAGS:" Make.conf || die
38 49
	sed -i -e "s:^#include <varargs.h>:#include <stdarg.h>:" rlelib.c || die
39

  
40
	# On FreeBSD systems malloc.h is a false header asking for fixes.
41
	# On MacOSX it would require malloc/malloc.h
42
	# On other systems it's simply unneeded
43
	sed -i -e 's,<malloc.h>,<stdlib.h>,' vicar.c || die
44

  
45
	eapply "${FILESDIR}"/${P}-unaligned-access.patch
46
	eapply "${FILESDIR}"/${P}-ldflags_and_exit.patch
47

  
50
	# qa-sed sees no-op on the next sed on non-gentoo-prefix systems,
51
	# but that is alright
48 52
	sed -i -e "/^DEFS = /s:/etc:${EPREFIX}/etc:" Makefile.in || die
49

  
50
	eapply "${FILESDIR}"/${P}-libpng15.patch
51 53
	sed -i \
52 54
		-e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \
53 55
		png.c || die
54 56

  
55
	# One of the previous patches screws up a bracket...
56
	eapply "${FILESDIR}"/${P}-bracket.patch
57

  
58
	default
59

  
60
	chmod +x configure || die
61 57
	eautoreconf
62 58
}
63 59

  
Thank you!