diff options
author | Ozan Türkyılmaz <ozan.turkyilmaz@gmail.com> | 2011-05-18 08:22:48 -0300 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-05-19 08:33:05 -0500 |
commit | 490559255d1d482287d604593e78ef9299e78775 (patch) | |
tree | 630fb8cfd311a03e9c4e856de97222f9bb09449e /misc | |
parent | 834e79ae023e37ca4386250a785c89622d97b89a (diff) |
misc/chm2pdf: Patched to fix problem with file name with spaces.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/chm2pdf/README | 5 | ||||
-rw-r--r-- | misc/chm2pdf/chm2pdf.SlackBuild | 7 | ||||
-rw-r--r-- | misc/chm2pdf/chm2pdf.info | 2 | ||||
-rw-r--r-- | misc/chm2pdf/patches/filename.patch | 41 | ||||
-rw-r--r-- | misc/chm2pdf/slack-desc | 8 |
5 files changed, 52 insertions, 11 deletions
diff --git a/misc/chm2pdf/README b/misc/chm2pdf/README index a933c611a6d2..47ef80e869bb 100644 --- a/misc/chm2pdf/README +++ b/misc/chm2pdf/README @@ -1,4 +1,3 @@ -chm2pdf is a simple Python script that converts CHM files into -PDF files. +chm2pdf is a simple Python script that converts CHM files into PDF files. -It requires chmlib-examples, pychm and htmldoc, all available at SlackBuilds.org. +This requires chmlib-examples, pychm and htmldoc. diff --git a/misc/chm2pdf/chm2pdf.SlackBuild b/misc/chm2pdf/chm2pdf.SlackBuild index 58f2513a89eb..a5911eb4f42a 100644 --- a/misc/chm2pdf/chm2pdf.SlackBuild +++ b/misc/chm2pdf/chm2pdf.SlackBuild @@ -27,15 +27,13 @@ PRGNAM=chm2pdf VERSION=${VERSION:-0.9.1} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -65,6 +63,9 @@ find . \ # Patch from Gentoo: http://bugs.gentoo.org/205208 cat $CWD/patches/tempdir.patch | patch -p1 +# patch to fix problem with file name with spaces +cat $CWD/patches/filename.patch | patch -p1 + python setup.py build python setup.py install --root $PKG diff --git a/misc/chm2pdf/chm2pdf.info b/misc/chm2pdf/chm2pdf.info index c6932a1b466c..203d98fa2fab 100644 --- a/misc/chm2pdf/chm2pdf.info +++ b/misc/chm2pdf/chm2pdf.info @@ -7,4 +7,4 @@ DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Ozan Türkyılmaz" EMAIL="ozan.turkyilmaz@gmail.com" -APPROVED="dsomero" +APPROVED="dsomero,Niels Horn" diff --git a/misc/chm2pdf/patches/filename.patch b/misc/chm2pdf/patches/filename.patch new file mode 100644 index 000000000000..145d5f3cb89e --- /dev/null +++ b/misc/chm2pdf/patches/filename.patch @@ -0,0 +1,41 @@ +--- a/chm2pdf 2011-01-16 10:52:29.000000000 +0100 ++++ b/chm2pdf 2011-01-16 12:41:26.541000035 +0100 +@@ -112,7 +112,7 @@ + takes the list of files inside the chm archive, with the correct urls of each one. + ''' + +- os.system('enum_chmLib '+filename+' > '+CHM2PDF_WORK_DIR+'/urlslist.txt') ++ os.system('enum_chmLib "'+filename+'" > "'+CHM2PDF_WORK_DIR+'/urlslist.txt"') + flist=open(CHM2PDF_WORK_DIR+'/urlslist.txt','rU') + urls_list=[] + for line in flist.readlines()[3:]: +@@ -378,7 +378,7 @@ + + if os.path.exists(page_filename) and (options['titlefile'] == '' or not options['titlefile'] in url): + htmlout_filename=CHM2PDF_WORK_DIR+'/temp'+'%(#)04d' %{"#":c}+'.html' +- htmlout_filename_list+=' '+ htmlout_filename ++ htmlout_filename_list+=' "'+ htmlout_filename + '"' + htmlout_filenames.append(htmlout_filename) + + if options['dontextract'] == '': +@@ -583,7 +583,7 @@ + + if options['verbose']=='--verbose' and options['verbositylevel']=='high': + print 'htmldoc' + htmldoc_opts + ' ' + htmlout_filename_list + " -f "+ outputfilename + " > /dev/null" +- exit_value=os.system ('htmldoc' + htmldoc_opts + ' ' + htmlout_filename_list + " -f "+ outputfilename + " > /dev/null") ++ exit_value=os.system ('htmldoc' + htmldoc_opts + ' ' + htmlout_filename_list + ' -f "'+ outputfilename + '" > /dev/null') + + if exit_value != 0: + print 'Something wrong happened when launching htmldoc.' +@@ -1085,9 +1085,9 @@ + print 'Will use the files in ' + CHM2PDF_ORIG_DIR + ' and ' + CHM2PDF_WORK_DIR + '.' + else: + if options['verbose'] == '--verbose' and options['verbositylevel'] == 'high': +- os.system('extract_chmLib ' + filename + ' ' + CHM2PDF_ORIG_DIR) ++ os.system('extract_chmLib "' + filename + '" "' + CHM2PDF_ORIG_DIR + '"') + else: +- os.system('extract_chmLib ' + filename + ' ' + CHM2PDF_ORIG_DIR + '&> /dev/null') ++ os.system('extract_chmLib "' + filename + '" "' + CHM2PDF_ORIG_DIR + '" &> /dev/null') + + convert_to_pdf(cfile, filename, outputfilename, options) + shutil.rmtree(CHM2PDF_TEMP_WORK_DIR) diff --git a/misc/chm2pdf/slack-desc b/misc/chm2pdf/slack-desc index 3546096a5127..f468d8782f11 100644 --- a/misc/chm2pdf/slack-desc +++ b/misc/chm2pdf/slack-desc @@ -5,11 +5,11 @@ # exactly 11 lines for the formatting to be correct. It's also customary to # leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| -chm2pdf: chm2pdf (CHM to PDF converter) -chm2pdf: + |-----handy-ruler------------------------------------------------------| +chm2pdf: chm2pdf (CHM to PDF converter) +chm2pdf: chm2pdf: chm2pdf is a simple Python script that converts CHM files into PDF -chm2pdf: files. +chm2pdf: files. chm2pdf: chm2pdf: Homepage: http://code.google.com/p/chm2pdf chm2pdf: |