/[gentoo-x86]/x11-misc/xrmap/xrmap-2.33.ebuild
Gentoo

Contents of /x11-misc/xrmap/xrmap-2.33.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Jun 23 12:24:47 2010 UTC (4 years, 1 month ago) by hwoarang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +3 -2 lines
Fix makefile to allow parallel compilation. Fixes bug #323065
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/x11-misc/xrmap/xrmap-2.33.ebuild,v 1.3 2010/06/11 18:36:55 ssuominen Exp $
4
5 EAPI=2
6 inherit eutils
7
8 DESCRIPTION="a X client for generating images of the Earth and manipulating the CIA World data bank"
9 HOMEPAGE="http://frmas.free.fr/li_1.htm#_Xrmap_"
10 FULL_DIST="2.10"
11 SRC_URI="ftp://ftp.ac-grenoble.fr/ge/geosciences/${PN}/${PN}-${FULL_DIST}.tgz
12 ftp://ftp.ac-grenoble.fr/ge/geosciences/${PN}/${P}.tar.bz2
13 ftp://ftp.ac-grenoble.fr/ge/geosciences/CIA_WDB2.jpd.gz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~x86 ~amd64 ~ppc"
18 IUSE="zlib"
19
20 RDEPEND="x11-libs/libX11
21 x11-libs/libXpm"
22 DEPEND="${RDEPEND}
23 x11-misc/imake
24 x11-proto/xproto
25 || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )
26 app-text/gv
27 sys-apps/less
28 >=sys-apps/sed-4
29 zlib? ( sys-libs/zlib )"
30
31 src_unpack() {
32 unpack ${A}
33 rm -rf "${S}"
34 mv "${WORKDIR}"/${PN}-${FULL_DIST} "${S}"
35 unpack ${A}
36 }
37
38 src_prepare() {
39 epatch "${FILESDIR}"/${P}-Makefile.kit.patch \
40 "${FILESDIR}"/${P}-as-needed.patch
41 cd "${S}"/editkit && xmkmf || die
42 }
43
44 src_compile() {
45 use zlib || sed -i 's/-DZLIB\|-lz//g' Makefile.noimake || die
46
47 sed -e 's,^\(X11DIR=\).*,\1/usr/,g' \
48 -e 's,^\(EDITOR=\).*,\1less,g' \
49 -e 's,^\(SHAREDIR=\).*,\1/usr/share/xrmap,g' \
50 -e 's,^\(CCOPTIONS=\)-O6 -g,\1${CFLAGS},g' Makefile.noimake > Makefile || die
51
52 sed -i -e 's,^\(#define RCFILE \)SHAREDIR\",\1\"/etc/xrmap,g' \
53 -e 's,^\(#define SHAREDIR \"/usr/share/\),\1x,g' xrmap.h || die
54 # bug #323065
55 sed -i "/^image.o/s/image.o:/& numdefs.h/" Makefile || die
56 emake || die
57 cd tools
58 emake || die
59 cd jpd2else
60 sed -i 's,^\(#define DEFAULT_JPD_FILE \"/usr/share/\),\1x,g' jpd2else.c || die
61 emake || die
62 cd ../cbd2else
63 emake || die
64 }
65
66 src_install() {
67 dobin xrmap tools/preproc tools/jpd2else/jpd2else tools/cbd2else/cbd2else || die
68 dodir /usr/share/${PN}/ || die
69 dodir /etc/xrmap || die
70 cp -r {i18n,Locations,factbook,anthems,flags,hymns,pixmaps} "${D}"/usr/share/${PN}/ || die
71 cp Xrmaprc "${D}"/etc/xrmap || die
72 cp "${WORKDIR}"/CIA_WDB2.jpd "${D}"/usr/share/${PN}/ || die
73 dodoc CHANGES README TODO WARNING tools/cbd2else/README.cbd tools/jpd2else/README.jpd tools/rez2else/README.rez || die
74
75 cd "${S}"
76 newman xrmap.man xrmap.1 || die "newman failed"
77 }

  ViewVC Help
Powered by ViewVC 1.1.20