diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-text/chm2pdf |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-text/chm2pdf')
-rw-r--r-- | app-text/chm2pdf/Manifest | 6 | ||||
-rw-r--r-- | app-text/chm2pdf/chm2pdf-0.9.1-r2.ebuild | 39 | ||||
-rw-r--r-- | app-text/chm2pdf/files/tempdir.patch | 71 | ||||
-rw-r--r-- | app-text/chm2pdf/metadata.xml | 15 |
4 files changed, 131 insertions, 0 deletions
diff --git a/app-text/chm2pdf/Manifest b/app-text/chm2pdf/Manifest new file mode 100644 index 000000000000..a4c592be107e --- /dev/null +++ b/app-text/chm2pdf/Manifest @@ -0,0 +1,6 @@ +AUX tempdir.patch 3694 SHA256 c3a19bfb3fdc12c416b6ef1ecd8ac9e3f28e85be906a90328acaf90614080f3d SHA512 e7d29e71afad11c79d508c35c9060a39308c78e654f00808cb38b7e75ebf5f885bbd436f58e9900977c2e81d0f4a7f543daeab6bd2f9a919c4c3b74dba33c325 WHIRLPOOL 19daca55d78d94321c5b5a8e46d075133a473a4a95affc6e55f9fdf253fc596e514be49d5840d08911416330b85070a4bc80d60fe6749ac5055b540bc6f260eb +DIST chm2pdf-0.9.1.tar.gz 19955 SHA256 204293c264c94bd17f56925d21d20b9f69a96136836198ba1a5014fe128ec3b0 SHA512 1d1997b17750f371e60cc6bf9693a8e4316deadd63247700f6ebd1bf02340f2e0524766a6be846d0f6349416b8551609da63fbf60ecd62766cf0d9b4f0c886d3 WHIRLPOOL 15607e84628ea2395b0f55ce0e1c2ab8c41f087e348e453a39db101f21c7e32f533d1537ad79957cf02b4c91f8dc7bf1afa883bf083067f09bbfb0012a373943 +EBUILD chm2pdf-0.9.1-r2.ebuild 768 SHA256 6e6ad6f6b26fa65faef80c01ef1aa466dd6027bd7a2fa6a2780d440eb641a52d SHA512 e6015c7b5eed96714e2afac98132141f55067654cd65dfb510c4266a68fc69328fbaa28bc771cc8978ec45f512f50e3d4234e7be1c9f09932daec093ef35a7cf WHIRLPOOL a8af7147696e6171205e72eac7be239834c0ab33e538c1fe35f80bbf1ea47dc565e864db47ee5b1e44882be314229c804588de55418fa3c4497c35c547ba9184 +MISC ChangeLog 2896 SHA256 fe9064562fec4331c3d95379913398744521b1f40629e18e01e3ab53ad279d18 SHA512 08736da0ecf8b1d39788869423262e3486dc6831b5ef1b6971769e55487326d2f9de97c132b0f8cd88adb155e9429f04a23f1508b6b71168a2c374c52c1b16f5 WHIRLPOOL 7aa32f010a68de24ddfdb5899b8b0cb26f46d327dcc858c475959fb2ab5a961bb9e078ed4eaf7a6ee91a1abf75da1ce90e924e4b7cd2a37f34050677732e2191 +MISC ChangeLog-2015 2251 SHA256 8f87af4ba466889578ddf470bf3743036ac4f1ff50c272e7f03df6a137cda7c6 SHA512 e8bffe945ad56e64e64f68b282f8efa78cc43db561a87e5b95c967e4a6b89c438d6048b78b627c86737cfc565acbe95cb0c33fea7062f5e5e8ea58a418a0c66d WHIRLPOOL 89462a234ded7e3bb130b3addeb4250157193a7ccbca5ee71684324a979fc65160b09c24742803b8723ed277f06f15ca9d93cb010e301961865c639d3e27fdea +MISC metadata.xml 429 SHA256 291b1833888603a87ae9bd9c6cbd2c28665590edf385ec85c786d3eb665373b3 SHA512 1896223e19ba2d91b519bb3dfea24535bf42676a3d53a115c9f101babf8c80f03bee6f9f84081cdeab592c05e3c50d22a157f5a1d71afcba1bde963576f4f651 WHIRLPOOL e88acf501063498215771e15e90bd2e155b914d88050b6f66991bd9c4382bf68b35f042f8fd26039227d70f356ff6a47688dbd547e3dd9073f7055498a4fa44a diff --git a/app-text/chm2pdf/chm2pdf-0.9.1-r2.ebuild b/app-text/chm2pdf/chm2pdf-0.9.1-r2.ebuild new file mode 100644 index 000000000000..d4ace08fe54d --- /dev/null +++ b/app-text/chm2pdf/chm2pdf-0.9.1-r2.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit python-single-r1 + +DESCRIPTION="A script that converts a CHM file into a single PDF file" +HOMEPAGE="https://code.google.com/p/chm2pdf/" +SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="amd64 x86" +SLOT="0" +IUSE="" + +RDEPEND="dev-python/pychm[${PYTHON_USEDEP}] + app-text/htmldoc + >=dev-libs/chmlib-0.40-r1[examples] + ${PYTHON_DEPS}" + +REQUIRED_USE=${PYTHON_REQUIRED_USE} + +PATCHES=( "${FILESDIR}/tempdir.patch" ) + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_prepare(){ + python_fix_shebang . +} + +src_install() { + default + python_doscript ${PN} || die "failed to create executable" +} diff --git a/app-text/chm2pdf/files/tempdir.patch b/app-text/chm2pdf/files/tempdir.patch new file mode 100644 index 000000000000..6bb5fe55d00d --- /dev/null +++ b/app-text/chm2pdf/files/tempdir.patch @@ -0,0 +1,71 @@ +--- chm2pdf-0.9.1.orig/chm2pdf 2008-07-09 12:42:26.000000000 +0200 ++++ chm2pdf-0.9.1/chm2pdf 2009-02-25 20:58:53.000000000 +0100 +@@ -27,6 +27,8 @@ + import os, os.path + import re, glob + import getopt ++import tempfile ++import shutil + # from BeautifulSoup import BeautifulSoup + + global version +@@ -39,8 +41,8 @@ + global filename #the input filename + + version = '0.9.1' +-CHM2PDF_TEMP_WORK_DIR='/tmp/chm2pdf/work' +-CHM2PDF_TEMP_ORIG_DIR='/tmp/chm2pdf/orig' ++CHM2PDF_TEMP_WORK_DIR=tempfile.mkdtemp() ++CHM2PDF_TEMP_ORIG_DIR=tempfile.mkdtemp() + + + +@@ -299,16 +301,6 @@ + # ########################### File extraction and correction: START ############################ + # + if options['dontextract'] == '': +- +- try: +- os.mkdir(CHM2PDF_TEMP_WORK_DIR) +- except OSError: # The directory already exists. +- pass +- +- try: +- os.mkdir(CHM2PDF_TEMP_ORIG_DIR) +- except OSError: # The directory already exists. +- pass + + try: + os.mkdir(CHM2PDF_ORIG_DIR) +@@ -620,7 +612,7 @@ + print '\t--continuous\n\t\tSpecifies that the HTML sources are unstructured (plain web pages).\n\t\tNo page breaks are inserted between each file or URL in the output.' + print '\t--cookies \'name="value with space"; name=value\'\n\t\t' + print '\t--datadir directory\n\t\tSpecifies the location of the HTMLDOC data files, usually /usr/share/htmldoc or C:\Program Files\HTMLDOC ' +- print "\t--dontextract \n\t\tIf given, %s will not extract the HTML files from the given CHM file, but will use previously extracted copies from the temporary directory " %name + '(i.e. ' + CHM2PDF_TEMP_ORIG_DIR + ' and ' + CHM2PDF_TEMP_WORK_DIR + '). Usually you will use this option after you have used the \'--extract-only\' option to extract the files in order to correct them manually (in ' + CHM2PDF_TEMP_WORK_DIR + '). After the correction, a call with \'--dontextract\' will not overwrite your changes, but will use the corrected files instead.' ++# print "\t--dontextract \n\t\tIf given, %s will not extract the HTML files from the given CHM file, but will use previously extracted copies from the temporary directory " %name + '(i.e. ' + CHM2PDF_TEMP_ORIG_DIR + ' and ' + CHM2PDF_TEMP_WORK_DIR + '). Usually you will use this option after you have used the \'--extract-only\' option to extract the files in order to correct them manually (in ' + CHM2PDF_TEMP_WORK_DIR + '). After the correction, a call with \'--dontextract\' will not overwrite your changes, but will use the corrected files instead.' + print '\t--duplex\n\t\tSpecifies that the output should be formatted for double-sided printing.' + print '\t--effectduration {0.1..10.0}\n\t\tSpecifies the duration in seconds of PDF page transition effects.' + print '\t--embedfonts\n\t\tSpecifies that fonts should be embedded in PDF output.' +@@ -1084,13 +1076,6 @@ + print 'CHM file "' + filename + '" not found!' + return + +- #remove temporary files +- if options['dontextract'] == '': +- if options['verbose']=='--verbose' and options['verbositylevel']=='high': +- print 'Removing any previous temporary files...' +- os.system('rm -r '+CHM2PDF_ORIG_DIR+'/*') +- os.system('rm -r '+CHM2PDF_WORK_DIR+'/*') +- + cfile = chm.CHMFile() + cfile.LoadCHM(filename) + +@@ -1105,6 +1090,8 @@ + os.system('extract_chmLib ' + filename + ' ' + CHM2PDF_ORIG_DIR + '&> /dev/null') + + convert_to_pdf(cfile, filename, outputfilename, options) ++ shutil.rmtree(CHM2PDF_TEMP_WORK_DIR) ++ shutil.rmtree(CHM2PDF_TEMP_ORIG_DIR) + + + if __name__ == '__main__': diff --git a/app-text/chm2pdf/metadata.xml b/app-text/chm2pdf/metadata.xml new file mode 100644 index 000000000000..ad784932062a --- /dev/null +++ b/app-text/chm2pdf/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>hwoarang@gentoo.org</email> + <name>Markos Chandras</name> + </maintainer> + <maintainer type="person"> + <email>rhill@gentoo.org</email> + <name>Ryan Hill</name> + </maintainer> + <upstream> + <remote-id type="google-code">chm2pdf</remote-id> + </upstream> +</pkgmetadata> |