/[gentoo-x86]/media-gfx/xli/xli-1.17.0-r1.ebuild
Gentoo

Contents of /media-gfx/xli/xli-1.17.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Mon Mar 21 20:22:00 2005 UTC (15 years, 4 months ago) by gmsoft
Branch: MAIN
Changes since 1.11: +2 -2 lines
Stable on hppa.
(Portage version: 2.0.51.19)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/xli/xli-1.17.0-r1.ebuild,v 1.11 2005/03/18 23:39:25 cryos Exp $
4
5 inherit alternatives
6
7 SNAPSHOT="2005-02-27"
8 DESCRIPTION="X Load Image: view images or load them to root window"
9 HOMEPAGE="http://pantransit.reptiles.org/prog/"
10 SRC_URI="http://pantransit.reptiles.org/prog/xli/xli-${SNAPSHOT}.tar.gz"
11
12 LICENSE="X11"
13 SLOT="0"
14 KEYWORDS="alpha amd64 hppa ia64 ppc ~ppc-macos sparc x86 ppc-macos ~mips"
15 IUSE=""
16
17 DEPEND="virtual/x11
18 >=sys-libs/zlib-1.1.4
19 >=media-libs/libpng-1.0.5
20 >=media-libs/jpeg-6b-r2
21 app-arch/bzip2"
22
23 S=${WORKDIR}/${PN}-${SNAPSHOT}
24
25 src_unpack() {
26 unpack ${A}
27
28 cd ${S}
29
30 if use ppc-macos ; then
31 for f in $(grep zopen * | cut -d':' -f1 | uniq); do
32 sed -i "s:zopen:xli_zopen:g" $f
33 done
34 fi
35
36 sed -i Imakefile \
37 -e "/^DEFINES =/s/$/ -DHAVE_GUNZIP -DHAVE_BUNZIP2 /" \
38 -e "/CCOPTIONS =/s/=.*/=/"
39
40 # This is a hack to avoid a parse error on /usr/include/string.h
41 # when _BSD_SOURCE is defined. This may be a bug in that header.
42 sed -i png.c \
43 -e "/^#include \"xli.h\"/i#undef _BSD_SOURCE"
44
45 # This hack will allow xli to compile using gcc-3.3
46 sed -i rlelib.c \
47 -e "s/#include <varargs.h>//"
48
49 }
50
51 src_compile() {
52 xmkmf || die "xmkmf failed."
53
54 emake CDEBUGFLAGS="${CFLAGS}" || die
55 }
56
57
58 src_install() {
59 into /usr
60 dobin xli xlito
61 dodoc README README.xloadimage ABOUTGAMMA TODO chkgamma.jpg
62 newman xli.man xli.1
63 newman xliguide.man xliguide.1
64 newman xlito.man xlito.1
65 #dosym /usr/bin/xli /usr/bin/xview
66 #dosym /usr/bin/xli /usr/bin/xsetbg
67
68 insinto /etc/X11/app-defaults
69 newins ${FILESDIR}/Xli.ad Xli || die
70 fperms a+r /etc/X11/app-defaults/Xli
71 }
72
73 update_alternatives() {
74 alternatives_makesym /usr/bin/xview \
75 /usr/bin/{xloadimage,xli}
76 alternatives_makesym /usr/bin/xsetbg \
77 /usr/bin/{xloadimage,xli}
78 alternatives_makesym /usr/share/man/man1/xview.1.gz \
79 /usr/share/man/man1/{xloadimage,xli}.1.gz
80 alternatives_makesym /usr/share/man/man1/xsetbg.1.gz \
81 /usr/share/man/man1/{xloadimage,xli}.1.gz
82 }
83
84 pkg_postinst() {
85 use ppc-macos || update_alternatives
86 }
87
88 pkg_postrm() {
89 use ppc-macos || update_alternatives
90 }

  ViewVC Help
Powered by ViewVC 1.1.20