diff options
Diffstat (limited to 'dev-tex')
-rw-r--r-- | dev-tex/circuit_macros/ChangeLog | 8 | ||||
-rw-r--r-- | dev-tex/circuit_macros/Manifest | 6 | ||||
-rw-r--r-- | dev-tex/circuit_macros/circuit_macros-7.7-r1.ebuild | 54 | ||||
-rwxr-xr-x | dev-tex/circuit_macros/files/cm2pdf | 72 | ||||
-rw-r--r-- | dev-tex/circuit_macros/metadata.xml | 2 |
5 files changed, 138 insertions, 4 deletions
diff --git a/dev-tex/circuit_macros/ChangeLog b/dev-tex/circuit_macros/ChangeLog index 0fe88aaa30ef..1a55c62773c1 100644 --- a/dev-tex/circuit_macros/ChangeLog +++ b/dev-tex/circuit_macros/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-tex/circuit_macros # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-tex/circuit_macros/ChangeLog,v 1.3 2013/10/29 14:58:48 calchan Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-tex/circuit_macros/ChangeLog,v 1.4 2013/11/04 19:33:20 calchan Exp $ + +*circuit_macros-7.7-r1 (04 Nov 2013) + + 04 Nov 2013; Denis Dupeyron <calchan@gentoo.org> + +circuit_macros-7.7-r1.ebuild, +files/cm2pdf, metadata.xml: + Change CM2pdf into cm2pdf. Add variable font size and a --help option. *circuit_macros-7.7 (29 Oct 2013) diff --git a/dev-tex/circuit_macros/Manifest b/dev-tex/circuit_macros/Manifest index 3097c58d19cf..30e0542525a5 100644 --- a/dev-tex/circuit_macros/Manifest +++ b/dev-tex/circuit_macros/Manifest @@ -1,9 +1,11 @@ AUX CM2pdf 532 SHA256 c996a454fbdfbe9b34381bc2b30d811e4d18f3432a94bfdb1b06ffc118bc41f6 SHA512 336d2f45755566cf2695792acce22bf3f307ad2417574216f71f78fec37c46d2c1200a88d431bc8c4256bd7769027570cbd5a9f46401ec752ab3de955c41c3cc WHIRLPOOL f7f61333637226c803356e71d0d7ffa9ba6812f66cb115bcc31d6bf9560ef1198fbc1675e08bc3ac185f823ba9709beb53d7f79b60f5c23eb4c239bd25ebb64a +AUX cm2pdf 1476 SHA256 1baa6c18eaffdd13f8e93dc07c62a97c47a39e308c0d070dbb37c14025a11c19 SHA512 37db7d2a66bace8666b89169be96b1ecf27f5f6d0f46c16a2f42be75490c4d0b4b89e27631b7e4e8684bbc07176f219ff8cb16987e47d5cb1b0c6cc0973b15f1 WHIRLPOOL 2feb584f7894feaf0669c410b93f4483e12f231c8e78a3ee296e7d8c2154d08bf0c4e95bf5ee3df980c07faf16c8017996216d1fdc6e5e1507b9cce8a0fc4669 DIST circuit_macros-7.5.zip 1315731 SHA256 d28af00b94f0b4b6685a8dd551d5eb5ce7ce38f24b2b35174e5b61eb87d5eb66 SHA512 6bb4acbea144f42814fd11044b0b39b4c7abe25364cb3a4ba9aec411f8b60ac238d14ba547bf2fb31b3d1fbab0e0e1222899c3f679b80de930996be2bc2e9db8 WHIRLPOOL dcae336deb3de3a4ef875dfbf68c8a0e28f16389a574a9c4c9c4057b8c3a1a87350ec847c65fa265e773f311d47af0633e19909869c9ac2a4d7946a5c408eb94 DIST circuit_macros-7.6.zip 1321099 SHA256 6d3aa22a927d8f8fb0f409190021b2d4e9f123a5409571c5312c5b249912a7d2 SHA512 f1fcf2afd39e7b56521a7b378b89a3074cc73118c4acf4175176732ea2089590c1bfdd09f4601bc9eacbc9166f536506e9884d3cf888602f61a7004b70bd8f0f WHIRLPOOL b90243b34b174dc2280444d2093c8c26273391cdb94201768d777526ccae2863f5c8cb589c8c307de59c4c69b636702e6aa8dc90dd96f90c6f653a04e59fe988 DIST circuit_macros-7.7.zip 1335480 SHA256 c62c416b01c1de2b5969dfa9bb96a2b375e7e32c3a90b2376d04ae9d2dde3568 SHA512 2434a36dc03196af7d7ccca81e0e84926a51a626d89f6889fef9358cc6dd1c2237251a0f8f060a8e95b8a6e42a51166592436c3c749525fec35370d94e6786ae WHIRLPOOL 18b6a39a6ec0be1a5c5605f98fa42acce9ed66203e331bd394420dc492d3c8a4080f3cf90188219c3e07efc6712074de2b3ad59791f669e33e944e55b7567bde EBUILD circuit_macros-7.5.ebuild 1347 SHA256 343444bb96a0d858fe1bf24bca3b7421b4145c4e7e41fa7f333eb81e88c1b344 SHA512 a86f5001e649e4612e5000d497d89db403b9ae33ae811a954863e7cb760ab8f16a00c425cad39b91ad03c13007f27cab6f61e42e2589167cb066fce9b29dd52e WHIRLPOOL 5169f348295ae30063ca9d3c24ed1df03aba86de41e0ec434472a1ea6ba448d41cccaec9399ccc95f57a629230e3dab443c493b37648e916ee008154d89c3c7e EBUILD circuit_macros-7.6.ebuild 1349 SHA256 7909e4ebbd9a8af5ef443361b0bd479e5e60b223291cd567b771629a2fb59818 SHA512 4e86a16da009ed4f7f10db880f5569086e5accb66eea658d616c4d61b437f090af220bae20963ef64b94ba48f5a806f5aacacbb277b244649334c4046eb7292f WHIRLPOOL 499b4c03dc3b777d5118a981cd42fb7af60d27020a1a3ee6df5ac858621ed140fdf4854a46842fc74c7a3c21c05150ccc1644e1aa4c1c0d3b1bb7a59418a4513 +EBUILD circuit_macros-7.7-r1.ebuild 1387 SHA256 d474ba87a3859cdeef441aad9eea5bc535362262794105b76edfebf9c60cfced SHA512 237ec56c1f92c3edc40fb169d9e1ef4f256e6120965376199cc4ddc6c8c8c0f1768c10b62c39b4212acc6f1898488c39d2ba3e29b96f3cabf6e25c60d56d76fc WHIRLPOOL ce3a84f57a3a678ee866971194887e3c160493e559e27a9c86cd036061cb285e9ad47b06e5f3a0822a4776ecc91f9c4b03f4b7be911b79be4aa6cef73e6b2cd3 EBUILD circuit_macros-7.7.ebuild 1349 SHA256 b8e02c2ed6dcb78bb6d647526545d7f2330e6154d4b849826de7d094a1d8d39f SHA512 e428fc46886d665c9928de3060e3935f662538a6e7a5a54ec81b507b069b4f7b383d1793c71964315fa9e08be56f050a555b8c6ff1937fa604bdaefa651439b5 WHIRLPOOL 4847e9092a9a6b0bbb19551fb2abd92be3a663d30f5e8fff6b8b8c5297db6303c69d9e90177314d91083281ade9cb751f2d6562fe4e4b6f18f642e02cb988792 -MISC ChangeLog 645 SHA256 151cd4e90ed760d129b73773fdb7dc300c18eb4367265991dda9d243753dbfba SHA512 0a0fbdbdcc07512edf8125c668dcf133b2b1ce1090a991dc6a952092125436495c37cd24cfecbb45af615b2b7dcaa8a394606c1ea75915f61ab8af84723390c5 WHIRLPOOL 1ea3f614929268e700791c58aeef6ce8d117b53a0f81e34089d6c2caa5b4cecceaec87980ab64034108b17d31b199779a633b575b634c0eaf4eb45391c68d514 -MISC metadata.xml 657 SHA256 34d2576808176577c25b125dad3db078f9f7112154028639cc602b58135903b6 SHA512 95fc882684b9dfad285d8ef76a9d683345d6471c77ac495d983b81de34e102522449b2efaafcc269a136500e982e51ee55b3ef171c858f4711fb4f49c7c3a007 WHIRLPOOL 5427fe543e9a701ed3d7bdf21e15e517cae2ec05e552dc69c2e80bf6635d897ac7343e8dbf302c5caa6011c6346a757f7a73614dd09c86c4dd67d56302a8e9b9 +MISC ChangeLog 870 SHA256 dceae8284461753393922e49d4d8ba39f314fe1a461730d4d3b071a0186546c1 SHA512 83959caa3ec21e6f5c2b05a920906b0638c5099cdd2c880a886594d4f4df5558146511fba886a32ba7e065c75c38c0f973da5b095d1ef427c1c87183c357a3af WHIRLPOOL 5130a1fa522fd74e5847d12a05fc97c3e9cc5b480f0f6b80ba3f8e8be5142810beb87ef474c007c052d5bf76c2726496e9ef86b6464b8e32acf2b2d206a576ea +MISC metadata.xml 657 SHA256 de3d64982083fcddcf887f6f89b46505c77abe4e2933df8c17e646daceef7836 SHA512 d549f39d36348fa8792e8bc1eadeb4da19540bd949f1a725bd5bb29bf2f901a7c1ed17de52f5de4f46f9fa0a27b91cd69cdf93f7a887284f9491ebc5dbe11b5f WHIRLPOOL 824f4c9135e2754425bf8012be8379ced4027b1785b1f546d62b88fbc04f324de0240e5c399146edb9f65d9d615f8a120691a7b523ab7dc0f7e8630455d22d91 diff --git a/dev-tex/circuit_macros/circuit_macros-7.7-r1.ebuild b/dev-tex/circuit_macros/circuit_macros-7.7-r1.ebuild new file mode 100644 index 000000000000..c49863e073f8 --- /dev/null +++ b/dev-tex/circuit_macros/circuit_macros-7.7-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2013 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.7-r1.ebuild,v 1.1 2013/11/04 19:33:20 calchan Exp $ + +EAPI=5 + +inherit unpacker texlive-common + +DESCRIPTION="M4 Macros for Electric circuit diagrams in TeX or LaTeX" +HOMEPAGE="https://ece.uwaterloo.ca/~aplevich/Circuit_macros/" +SRC_URI="http://mirrors.ctan.org/graphics/circuit_macros.zip -> circuit_macros-${PV}.zip" + +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}/${PN}" + +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 +} diff --git a/dev-tex/circuit_macros/files/cm2pdf b/dev-tex/circuit_macros/files/cm2pdf new file mode 100755 index 000000000000..893c59fe97b6 --- /dev/null +++ b/dev-tex/circuit_macros/files/cm2pdf @@ -0,0 +1,72 @@ +#! /bin/bash + +m4file="" +fontsize=10 + +usage() { + echo "Usage:" + echo "${0##*/} --help" + echo "${0##*/} [options] path/to/file.m4" + echo + echo "--help" + echo " Show this help message." + echo + echo "-f, --fontsize" + echo " Set size of base font, in points." + echo " Supported font sizes are 8, 9, 10, 11, 12, 14, 17 and 20." + exit +} + +if [[ "$#" == 0 ]]; then usage; fi + +while [[ "$#" != 0 ]]; do + case "${1}" in + -h|--help) + usage;; + -f|--fontsize) + case "${2}" in + 8) + fontsize=8;; + 9) + fontsize=9;; + 10) + fontsize=10;; + 11) + fontsize=11;; + 12) + fontsize=12;; + 14) + fontsize=14;; + 17) + fontsize=17;; + 20) + fontsize=20;; + *) + echo "Unsupported font size: ${2}" + exit;; + esac + shift; shift;; + *.m4) + m4file="${1}" + shift;; + *) + echo "Unknown option: ${1}" + exit + esac +done + +if [[ "${m4file}" == "" ]]; then + echo "No m4 input file" + exit +fi + +tempdir=$(mktemp -d) +cp -f "${m4file}" "${tempdir}/source.m4" +pushd "${tempdir}" > /dev/null + +m4 -I /usr/share/circuit_macros pgf.m4 source.m4 | dpic -g > source.tex +pdflatex "\documentclass[preview=true]{standalone}\usepackage{tikz,boxdims}\usepackage[${fontsize}pt]{extsizes}\begin{document}\input source.tex\end{document}" + +popd > /dev/null +cp "${tempdir}/standalone.pdf" "${m4file%.m4}.pdf" +rm -rf "${tempdir}" diff --git a/dev-tex/circuit_macros/metadata.xml b/dev-tex/circuit_macros/metadata.xml index 2bb86304fa57..239ba2086e69 100644 --- a/dev-tex/circuit_macros/metadata.xml +++ b/dev-tex/circuit_macros/metadata.xml @@ -12,7 +12,7 @@ examples of other types of diagrams. </longdescription> <use> - <flag name="script">Install CM2pdf to automatically create a correctly + <flag name="script">Install cm2pdf to automatically create a correctly sized PDF from a circuit_macro m4 source </flag> </use> |