]> Pileus Git - ~andy/sunrise/blob - app-misc/gpligc/gpligc-1.9.ebuild
media-libs/oyranos: Moved to virtual/jpeg
[~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="media-libs/freeglut
21         media-libs/jpeg
22         virtual/glu
23         virtual/opengl"
24 RDEPEND="${DEPEND}
25         >=dev-lang/perl-5.6
26         dev-perl/perl-tk
27         sci-visualization/gnuplot"
28
29 # for historical reasons the original tarball has capital letters
30 # and so has the toplevel directory
31 S="${WORKDIR}/${MY_P}"
32
33 src_compile() {
34         emake -C openGLIGCexplorer CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" || die "Build failed"
35 }
36
37 src_install() {
38         # create openGLIGCexplorer data dirs
39         keepdir /usr/share/${PN}/data/map
40         keepdir /usr/share/${PN}/data/airspace
41         keepdir /usr/share/${PN}/data/dem
42         keepdir /usr/share/${PN}/data/waypoint
43
44         # paths to perl modules have to be set in scripts/modules
45         sed -i -e "s:PREFIX:/usr:g" openGLIGCexplorer/.ogierc || die "sed failed"
46         sed -i -e "s:zzLIBDIRzz:/usr/share/${PN}/:g" GPLIGC/GPLIGC.pl || die "sed failed"
47         sed -i -e "s:zzLIBDIRzz:/usr/share/${PN}/:g" GPLIGC/GPLIGCwaypoints.pm || die "sed failed"
48
49         # install binaries and scripts
50         dobin GPLIGC/{GPLIGC,gpsp2igc,gpsp2igcfile,gpsp2kml}.pl \
51                 openGLIGCexplorer/{openGLIGCexplorer,createworld,etopo2merger,optimizer} \
52                         || die "dobin failed"
53
54         # install perl modules and icons/pics and sample configuration
55         insinto /usr/share/${PN}
56         doins GPLIGC/{{GPLIGCfunctions,GPLIGCwaypoints}.pm,gpligc.xbm,icon.png,logo.jpg,logos.gif,logos.jpg} \
57                 openGLIGCexplorer/.ogierc || die "doins failed"
58
59         dodoc doc/{CHANGES,GPLIGC_Manual.pdf} || die "dodoc failed"
60
61         # some symlinks
62         dosym /usr/bin/GPLIGC.pl /usr/bin/GPLIGC || die "dosym failed"
63         dosym /usr/bin/openGLIGCexplorer /usr/bin/ogie || die "dosym failed"
64 }
65
66 pkg_postinst() {
67         einfo
68         einfo "Information about using and configuring GPLIGC and"
69         einfo "openGLIGCexplorer (ogie) can be found in the provided manual:"
70         einfo "/usr/share/doc/${P}/GPLIGC_Manual.pdf"
71         einfo "Users should copy ogie's example configuration file from"
72         einfo "/usr/share/${PN}/.openGLIGCexplorerrc to the own HOME directory"
73         einfo "and edit it according to their needs."
74         einfo
75 }