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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.19 - (show annotations) (download)
Sun Sep 27 16:22:08 2009 UTC (10 years, 9 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.18: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.2_rc42/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-r4.ebuild,v 1.18 2008/01/15 18:37:57 grobian Exp $
4
5 inherit alternatives eutils flag-o-matic 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 chmod +x "${S}"/configure
48 }
49
50 src_compile() {
51 tc-export CC
52 econf || die
53 emake || die
54 }
55
56 src_install() {
57 dobin xloadimage || die
58 dobin uufilter || die
59
60 insinto /etc/X11
61 doins xloadimagerc
62
63 newman xloadimage.man xloadimage.1
64 newman uufilter.man uufilter.1
65
66 dodoc README
67 }
68
69 update_alternatives() {
70 alternatives_makesym /usr/bin/xview \
71 /usr/bin/{xloadimage,xli}
72 alternatives_makesym /usr/bin/xsetbg \
73 /usr/bin/{xloadimage,xli}
74 alternatives_makesym /usr/share/man/man1/xview.1.gz \
75 /usr/share/man/man1/{xloadimage,xli}.1.gz
76 alternatives_makesym /usr/share/man/man1/xsetbg.1.gz \
77 /usr/share/man/man1/{xloadimage,xli}.1.gz
78 }
79
80 pkg_postinst() {
81 update_alternatives
82 }
83
84 pkg_postrm() {
85 update_alternatives
86 }

  ViewVC Help
Powered by ViewVC 1.1.20