]> Pileus Git - ~andy/sunrise/blob - sci-electronics/gerbmerge/gerbmerge-1.8.ebuild
app-editors/yzis: Fix qt deps, EAPI bump
[~andy/sunrise] / sci-electronics / gerbmerge / gerbmerge-1.8.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=3
6 PYTHON_DEPEND="2"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="3.*"
9
10 inherit distutils eutils
11
12 DESCRIPTION="A program for combining (panelizing) Gerber/Excellon files"
13 HOMEPAGE="http://ruggedcircuits.com/gerbmerge/"
14 SRC_URI="http://ruggedcircuits.com/gerbmerge/${P}.tar.gz"
15
16 LICENSE="GPL-3"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="doc examples"
20
21 DEPEND="dev-python/simpleparse"
22 RDEPEND="${DEPEND}"
23
24 src_prepare() {
25         # This package has a very, very messy distutils situation. This patch rips
26         # out most of setup.py and replaces it with something simpler.
27         epatch "${FILESDIR}/${P}-fix-setup.patch"
28
29         # This adds a "main" function to the toplevel module in the gerbmerge Python
30         # package, which allows the function to be called from a launcher script
31         # (otherwise it would expect to be invoked directly while having been
32         # installed in site-packages).
33         epatch "${FILESDIR}/${P}-fix-main.patch"
34
35         # Throw a very simple launcher script into the mix.
36         cp "${FILESDIR}/${P}-launcher.py" "${S}/misc/gerbmerge" || die
37
38         distutils_src_prepare
39 }
40
41 src_install() {
42         distutils_src_install
43         if use doc; then
44                 dohtml -A cfg -A def doc/* || die "Failed to install documentation"
45         fi
46         if use examples; then
47                 docinto testdata
48                 dodoc testdata/* || die "Failed to install examples"
49         fi
50 }