summaryrefslogtreecommitdiff
blob: 59e9d70df8eff39779014759aada0f618b262d91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-misc/xrmap/xrmap-2.10.ebuild,v 1.3 2004/06/24 22:43:55 agriffis Exp $ 

DESCRIPTION="The Xrmap program is a X client for generating images of the Earth and manipulating the CIA World data bank"
HOMEPAGE="http://frmas.free.fr/li_1.htm#_Xrmap_"
SRC_URI="ftp://ftp.ac-grenoble.fr/ge/geosciences/${PN}/${P}.tgz
		 ftp://ftp.ac-grenoble.fr/ge/geosciences/CIA_WDB2.jpd.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"
IUSE="zlib"
DEPEND="media-gfx/imagemagick
	app-text/gv
	sys-apps/less
	media-libs/xpm
	>=sys-apps/sed-4
	zlib? ( sys-libs/zlib )"

src_compile() {
	use zlib || sed -i 's/-DZLIB\|-lz//g' Makefile.noimake || die

	sed  -e 's,^\(X11DIR=\).*,\1/usr/,g' \
		 -e 's,^\(EDITOR=\).*,\1less,g'   \
		 -e 's,^\(SHAREDIR=\).*,\1/usr/share/xrmap,g' \
		 -e 's,^\(CCOPTIONS=\)-O6 -g,\1${CFLAGS},g' Makefile.noimake > Makefile || die

	sed -i -e 's,^\(#define RCFILE \)SHAREDIR\",\1\"/etc/xrmap,g'  \
		   -e 's,^\(#define SHAREDIR \"/usr/share/\),\1x,g' xrmap.h || die
	emake || die
	cd tools
	emake || die
	cd jpd2else
	sed -i 's,^\(#define DEFAULT_JPD_FILE \"/usr/share/\),\1x,g' jpd2else.c || die
	emake || die
	cd ../cbd2else
	emake || die
}

src_install() {
	dobin xrmap tools/preproc tools/jpd2else/jpd2else tools/cbd2else/cbd2else || die
	dodir /usr/share/${PN}/ || die
	dodir /etc/xrmap  || die
	cp -r {i18n,Locations,factbook,anthems,flags} ${D}/usr/share/${PN}/ || die
	cp Xrmaprc ${D}/etc/xrmap || die
	cp ${WORKDIR}/CIA_WDB2.jpd ${D}/usr/share/${PN}/ || die
	dodoc CHANGES COPYING README TODO WARNING tools/cbd2else/README.cbd tools/jpd2else/README.jpd tools/rez2else/README.rez || die
}