summaryrefslogtreecommitdiff
blob: c6d4bd34ba3fb30fb399a4e8726f8c69044893a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
PYTHON_COMPAT=( python3_{4,5,6,7} )
PYTHON_REQ_USE='threads(+)'

inherit gnome2-utils python-any-r1 waf-utils xdg-utils

DESCRIPTION="Application for the schematic capturing and simulation of electrical circuits"
HOMEPAGE="https://github.com/drahnr/oregano"
SRC_URI="https://github.com/drahnr/oregano/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"

S="${WORKDIR}/oregano-${PV}"

COMMON_DEP="dev-libs/glib:2
	dev-libs/libxml2:2
	x11-libs/goocanvas:2.0
	x11-libs/gtk+:3
	x11-libs/gtksourceview:3.0"

DEPEND="${COMMON_DEP}
	${PYTHON_DEPS}
	dev-util/glib-utils
	virtual/pkgconfig"

RDEPEND="${COMMON_DEP}
	|| ( gnome-base/dconf gnome-base/gconf )
	sci-electronics/electronics-menu"

pkg_setup() {
	if [[ ${MERGE_TYPE} != binary ]] ; then
		python-any-r1_pkg_setup
	fi
}

src_configure() { waf-utils_src_configure; }

src_install() {
	waf-utils_src_install --no-xdg --no-install-gschema
	docompress -x /usr/share/doc/${PF}/{dev-docs,sequence}
	dodoc -r docs/{dev-docs,sequence,user-docs}
	insinto /usr/share/glib-2.0/schemas
	doins data/settings/io.ahoi.oregano.gschema.xml
}

pkg_postinst() {
	gnome2_icon_cache_update
	gnome2_schemas_update
	xdg_desktop_database_update
	xdg_mimeinfo_database_update

	elog "Note: You'll need to emerge your prefered simulation backend"
	elog "such as sci-electronics/ngspice (preferred) or sci-electronics/gnucap"
	elog "for simulation to work."
	elog "As an alternative generate a netlist and use sci-electronics/spice"
	elog "from the command line for simulation."
}

pkg_postrm() {
	gnome2_icon_cache_update
	gnome2_schemas_update
	xdg_desktop_database_update
	xdg_mimeinfo_database_update
}