/[gentoo-x86]/media-gfx/xloadimage/xloadimage-4.1-r5.ebuild
Gentoo

Contents of /media-gfx/xloadimage/xloadimage-4.1-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Sep 4 11:14:38 2009 UTC (10 years, 10 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Stop using internal ecompress function.
(Portage version: 2.2_rc40/cvs/Linux x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/xloadimage/xloadimage-4.1-r5.ebuild,v 1.2 2008/01/15 18:37:57 grobian Exp $
4
5 inherit alternatives eutils toolchain-funcs
6
7 MY_P="${P/-/.}"
8 S=${WORKDIR}/${MY_P}
9 DESCRIPTION="utility to view many different types of images under X11"
10 HOMEPAGE="http://world.std.com/~jimf/xloadimage.html"
11 SRC_URI="ftp://ftp.x.org/R5contrib/${MY_P}.tar.gz
12 mirror://gentoo/${P}-gentoo.diff.bz2"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
17 IUSE="tiff jpeg png"
18
19 RDEPEND="x11-libs/libX11
20 tiff? ( media-libs/tiff )
21 png? ( media-libs/libpng )
22 jpeg? ( media-libs/jpeg )"
23 DEPEND="${RDEPEND}
24 >=sys-apps/sed-4.0.5"
25
26 src_unpack() {
27 unpack ${A}
28 cd "${S}"
29 epatch "${WORKDIR}"/${P}-gentoo.diff
30 epatch "${FILESDIR}"/${P}-zio-shell-meta-char.diff
31 epatch "${FILESDIR}"/${P}-endif.patch
32
33 # Do not define errno extern, but rather include errno.h
34 # <azarah@gentoo.org> (1 Jan 2003)
35 epatch "${FILESDIR}"/${P}-include-errno_h.patch
36
37 epatch "${FILESDIR}"/xloadimage-gentoo.patch
38
39 sed -i "s:OPT_FLAGS=:OPT_FLAGS=$CFLAGS:" Make.conf
40 sed -i "s:^#include <varargs.h>:#include <stdarg.h>:" "${S}"/rlelib.c
41
42 # On FreeBSD systems malloc.h is a false header asking for fixes.
43 # On MacOSX it would require malloc/malloc.h
44 # On other systems it's simply unneeded
45 sed -i -e 's,<malloc.h>,<stdlib.h>,' vicar.c
46
47 epatch "${FILESDIR}"/${P}-unaligned-access.patch
48
49 chmod +x "${S}"/configure
50 }
51
52 src_compile() {
53 tc-export CC
54 econf || die "econf failed."
55 emake || die "emake failed."
56 }
57
58 src_install() {
59 dobin xloadimage uufilter
60
61 insinto /etc/X11
62 doins xloadimagerc
63
64 newman xloadimage.man xloadimage.1
65 newman uufilter.man uufilter.1
66
67 dodoc README
68 }
69
70 update_alternatives() {
71 local mansuffix=$(ecompress --suffix)
72
73 alternatives_makesym /usr/bin/xview \
74 /usr/bin/{xloadimage,xli}
75 alternatives_makesym /usr/bin/xsetbg \
76 /usr/bin/{xloadimage,xli}
77 alternatives_makesym /usr/share/man/man1/xview.1${mansuffix} \
78 /usr/share/man/man1/{xloadimage,xli}.1${mansuffix}
79 alternatives_makesym /usr/share/man/man1/xsetbg.1${mansuffix} \
80 /usr/share/man/man1/{xloadimage,xli}.1${mansuffix}
81 }
82
83 pkg_postinst() {
84 update_alternatives
85 }
86
87 pkg_postrm() {
88 update_alternatives
89 }

  ViewVC Help
Powered by ViewVC 1.1.20