summaryrefslogtreecommitdiff
blob: 29f293bfb829821851dc87daff5da61df7c71424 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-tex/circuit_macros/circuit_macros-7.9.1.ebuild,v 1.1 2014/06/09 23:52:27 calchan Exp $

EAPI=5

inherit texlive-common

DESCRIPTION="M4 Macros for Electric circuit diagrams in TeX or LaTeX"
HOMEPAGE="https://ece.uwaterloo.ca/~aplevich/Circuit_macros/"
SRC_URI="https://ece.uwaterloo.ca/~aplevich/Circuit_macros/Circuit_macros.tar.gz -> circuit_macros-${PV}.tar.gz"

LICENSE="LPPL-1.3c"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples +script"

DEPEND=""
RDEPEND="|| ( app-text/texlive[graphics] app-text/texlive[pstricks] )
	media-gfx/dpic
	sys-devel/m4
	script? ( app-text/texlive[graphics]
		dev-texlive/texlive-latexextra )"

S="${WORKDIR}/Circuit_macros${PV}"

src_compile() {
	:
}

src_install() {
	insinto /usr/share/${PN}
	doins *.m4
	insinto /usr/share/texmf-site/tex/latex/${PN}
	doins boxdims.sty
	dodoc README CHANGES Makefile doc/CMman.pdf
	rm -f doc/CMman.pdf
	use doc && dodoc -r doc
	use examples && dodoc -r examples
	use script && dobin "${FILESDIR}/cm2pdf"
	docompress -x \
		/usr/share/doc/${PF}/Makefile \
		/usr/share/doc/${PF}/doc \
		/usr/share/doc/${PF}/examples
}

pkg_postinst() {
	etexmf-update
	use script && einfo "cm2pdf was installed to automatically create PDFs. Run cm2pdf --help for usage help."
}

pkg_postrm() {
	etexmf-update
}