]> Pileus Git - ~andy/sunrise/blob - app-misc/gpligc/gpligc-1.9.ebuild
becd149433ff9b64cc55721cc891c307e1c54dad
[~andy/sunrise] / app-misc / gpligc / gpligc-1.9.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=1
6
7 inherit eutils
8
9 MY_PN="GPLIGC"
10 MY_P="${MY_PN}-${PV}"
11 DESCRIPTION="provides IGC-file (GPS tracklog) evaluation and 3D visualisation"
12 HOMEPAGE="http://gpligc.sf.net/"
13 SRC_URI="http://pc12-c714.uibk.ac.at/GPLIGC/download/${MY_P}-src.tar.gz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE=""
19
20 DEPEND="
21         media-libs/freeglut
22         virtual/jpeg
23         virtual/glu
24         virtual/opengl"
25 RDEPEND="${DEPEND}
26         >=dev-lang/perl-5.6
27         dev-perl/perl-tk
28         sci-visualization/gnuplot"
29
30 # for historical reasons the original tarball has capital letters
31 # and so has the toplevel directory
32 S="${WORKDIR}/${MY_P}"
33
34 src_compile() {
35         emake -C openGLIGCexplorer CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" || die "Build failed"
36 }
37
38 src_install() {
39         # create openGLIGCexplorer data dirs
40         keepdir /usr/share/${PN}/data/map
41         keepdir /usr/share/${PN}/data/airspace
42         keepdir /usr/share/${PN}/data/dem
43         keepdir /usr/share/${PN}/data/waypoint
44
45         # paths to perl modules have to be set in scripts/modules
46         sed -i -e "s:PREFIX:/usr:g" openGLIGCexplorer/.ogierc || die "sed failed"
47         sed -i -e "s:zzLIBDIRzz:/usr/share/${PN}/:g" GPLIGC/GPLIGC.pl || die "sed failed"
48         sed -i -e "s:zzLIBDIRzz:/usr/share/${PN}/:g" GPLIGC/GPLIGCwaypoints.pm || die "sed failed"
49
50         # install binaries and scripts
51         dobin GPLIGC/{GPLIGC,gpsp2igc,gpsp2igcfile,gpsp2kml}.pl \
52                 openGLIGCexplorer/{openGLIGCexplorer,createworld,etopo2merger,optimizer} \
53                         || die "dobin failed"
54
55         # install perl modules and icons/pics and sample configuration
56         insinto /usr/share/${PN}
57         doins GPLIGC/{{GPLIGCfunctions,GPLIGCwaypoints}.pm,gpligc.xbm,icon.png,logo.jpg,logos.gif,logos.jpg} \
58                 openGLIGCexplorer/.ogierc || die "doins failed"
59
60         dodoc doc/{CHANGES,GPLIGC_Manual.pdf} || die "dodoc failed"
61
62         # some symlinks
63         dosym /usr/bin/GPLIGC.pl /usr/bin/GPLIGC || die "dosym failed"
64         dosym /usr/bin/openGLIGCexplorer /usr/bin/ogie || die "dosym failed"
65 }
66
67 pkg_postinst() {
68         einfo
69         einfo "Information about using and configuring GPLIGC and"
70         einfo "openGLIGCexplorer (ogie) can be found in the provided manual:"
71         einfo "/usr/share/doc/${P}/GPLIGC_Manual.pdf"
72         einfo "Users should copy ogie's example configuration file from"
73         einfo "/usr/share/${PN}/.openGLIGCexplorerrc to the own HOME directory"
74         einfo "and edit it according to their needs."
75         einfo
76 }