]> git.draconx.ca Git - gentoo-fixes.git/blob - sci-electronics/gerbv/gerbv-2.7.0.ebuild
Work around python-r1 eclass dropping python2.
[gentoo-fixes.git] / sci-electronics / gerbv / gerbv-2.7.0.ebuild
1 # Copyright © 2018 Nick Bowler
2 # License GPLv2+ GNU General Public License version 2 or any later version.
3 # This is free software: you are free to change and redistribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
5 #
6 # This is a modified version of the original ebuild from Gentoo GNU/Linux,
7 # including material covered by the following copyright and permission notice:
8 #
9 #   Copyright 1999-2017 Gentoo Foundation
10 #   Distributed under the terms of the GNU General Public License v2
11
12 EAPI="6"
13 inherit autotools eutils gnome2-utils xdg-utils
14
15 MY_P=${P/_rc/rc}
16
17 DESCRIPTION="A RS-274X (Gerber) and NC drill (Excellon) file viewer"
18 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
19 HOMEPAGE="http://gerbv.geda-project.org/"
20
21 IUSE="doc examples static-libs unit-mm"
22 SLOT="0"
23 LICENSE="GPL-2+"
24 KEYWORDS="~amd64 ~ppc ~x86"
25 RESTRICT="test"
26
27 RDEPEND="
28         x11-libs/gtk+:2
29         x11-libs/cairo"
30
31 DEPEND="${RDEPEND}
32         virtual/pkgconfig"
33
34 S=$WORKDIR/$MY_P
35
36 src_configure() {
37         econf \
38                 $(use_enable static-libs static) \
39                 $(use_enable unit-mm) \
40                 --disable-update-desktop-database
41 }
42
43 src_install () {
44         default
45
46         dodoc AUTHORS BUGS ChangeLog CONTRIBUTORS HACKING NEWS README* TODO
47
48         rm doc/Doxyfile.nopreprocessing
49         if use doc; then
50                 find doc -name "Makefile*" -exec rm -f '{}' \;
51                 dodoc -r doc/*
52         fi
53
54         if use examples; then
55                 find example -name "Makefile*" -exec rm -f '{}' \;
56                 dodoc -r example/*
57         fi
58
59         prune_libtool_files
60 }
61
62 pkg_postinst() {
63         xdg_desktop_database_update
64         gnome2_icon_cache_update
65 }
66
67 pkg_postrm() {
68         xdg_desktop_database_update
69         gnome2_icon_cache_update
70 }