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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Oct 8 16:45:18 2011 UTC (3 years, 2 months ago) by phajdan.jr
Branch: MAIN
Changes since 1.2: +2 -2 lines
x86 stable wrt bug #385981

(Portage version: 2.1.10.11/cvs/Linux i686)

1 # Copyright 1999-2011 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-r1.ebuild,v 1.2 2011/09/14 15:13:19 ssuominen Exp $
4
5 EAPI=2
6 inherit eutils toolchain-funcs
7
8 FLAGS_VER=2.9
9 ANTHEMS_VER=1.3
10 HYMNS_VER=1.4
11 FACTBOOK_VER=2008
12 DESCRIPTION="a X client for generating images of the Earth and manipulating the CIA World data bank"
13 HOMEPAGE="http://frmas.free.fr/li_1.htm#_Xrmap_"
14 SRC_URI="ftp://ftp.ac-grenoble.fr/ge/geosciences/${PN}/${P}.tar.bz2
15 ftp://ftp.ac-grenoble.fr/ge/geosciences/${PN}/data/factbook_html_${FACTBOOK_VER}.tar.bz2
16 ftp://ftp.ac-grenoble.fr/ge/geosciences/${PN}/data/anthems-${ANTHEMS_VER}.tar.bz2
17 ftp://ftp.ac-grenoble.fr/ge/geosciences/${PN}/data/flags-${FLAGS_VER}-xpm_150.tar.bz2
18 ftp://ftp.ac-grenoble.fr/ge/geosciences/${PN}/data/hymns-${HYMNS_VER}.tar.bz2
19 ftp://ftp.ac-grenoble.fr/ge/geosciences/${PN}/data/earthdata_low_res.tar.bz2
20 ftp://ftp.ac-grenoble.fr/ge/geosciences/CIA_WDB2.jpd.gz"
21
22 LICENSE="GPL-2"
23 SLOT="0"
24 KEYWORDS="~amd64 ~ppc x86"
25 IUSE=""
26
27 CDEPEND="x11-libs/libX11
28 x11-libs/libXpm
29 virtual/jpeg
30 >=media-libs/libpng-1.4
31 sys-libs/zlib"
32 RDEPEND="${CDEPEND}
33 x11-misc/xdg-utils
34 app-text/gv
35 || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )
36 sys-apps/less
37 media-sound/timidity++"
38 DEPEND="${CDEPEND}
39 x11-proto/xproto
40 >=sys-apps/sed-4"
41
42 pkg_setup() {
43 tc-export CC
44 }
45
46 src_prepare() {
47 epatch "${FILESDIR}"/${P}-Makefile.kit.patch \
48 "${FILESDIR}"/${P}-as-needed.patch \
49 "${FILESDIR}"/${P}-parallel-make.patch \
50 "${FILESDIR}"/${P}-libpng15.patch
51
52 sed -e 's,^\(X11DIR=\).*,\1/usr/,g' \
53 -e 's,^\(EDITOR=\).*,\1less,g' \
54 -e 's,^\(SHAREDIR=\).*,\1/usr/share/xrmap,g' \
55 -e 's,^\(CCOPTIONS=\)-O6 -g,\1${CFLAGS},g' \
56 -e 's,^\(LDOPTIONS=\)-O6 -g,\1${LDFLAGS},g' \
57 -e 's,gcc,$(CC),' \
58 Makefile.noimake > Makefile || die
59 sed -i 's,^\(#define DEFAULT_JPD_FILE \"/usr/share/\),\1x,g' \
60 tools/jpd2else/jpd2else.c || die
61 sed -i -e 's,^\(#define RCFILE \)SHAREDIR\",\1\"/etc/xrmap,g' \
62 -e 's,^\(#define SHAREDIR \"/usr/share/\),\1x,g' xrmap.h || die
63 # bug #323065
64 sed -i "/^image.o/s/image.o:/& numdefs.h/" Makefile || die
65 # Respect CFLAGS, LDFLAGS, CC
66 sed -i -e 's,cc,$(CC) $(CFLAGS) $(LDFLAGS),' tools/Makefile || die
67 sed -i -e 's,gcc,$(CC) $(CFLAGS) $(LDFLAGS),' \
68 tools/jpd2else/Makefile tools/cbd2else/Makefile \
69 earthview/Makefile editkit/Makefile.kit || die
70 # Fix implicit decl of strlen
71 sed -i -e '3 i #include <string.h>' tools/preproc.c || die
72 # Fix array subscript below bounds (Eliminates unnecessary cast to char)
73 sed -i -e '2495 s/(char)//' xrmap.c || die
74 # Fix datadir for earthview
75 sed -i -e 's,^DATADIR=.*$,DATADIR=/usr/share/xrmap/earthdata,' earthview/Makefile || die
76 }
77
78 src_compile() {
79 emake HTML_VIEWER="xdg-open" || die
80 emake -C tools || die
81 emake -C tools/jpd2else || die
82 emake -C tools/cbd2else || die
83 }
84
85 src_install() {
86 dobin xrmap tools/preproc tools/jpd2else/jpd2else tools/cbd2else/cbd2else \
87 earthview/earthview || die
88 dodir /etc/xrmap || die
89 insinto /etc/xrmap
90 doins Xrmaprc || die
91 dodoc CHANGES README TODO tools/cbd2else/README.cbd tools/jpd2else/README.jpd tools/rez2else/README.rez || die
92 newman xrmap.man xrmap.1 || die "newman failed"
93 mv "${WORKDIR}"/hymns-${HYMNS_VER} hymns || die
94 mv "${WORKDIR}"/anthems-${ANTHEMS_VER} anthems || die
95 dodir /usr/share/${PN}/ || die
96 insinto /usr/share/${PN}
97 doins -r i18n hymns anthems Locations pixmaps \
98 "${WORKDIR}"/{factbook,flags,earthdata,CIA_WDB2.jpd} || die
99 }

  ViewVC Help
Powered by ViewVC 1.1.20