[arch-commits] Commit in unoconv/repos/extra-any (3 files)

Jan Steffens heftig at archlinux.org
Sat Aug 25 14:45:44 UTC 2012


    Date: Saturday, August 25, 2012 @ 10:45:44
  Author: heftig
Revision: 165573

archrelease: copy trunk to extra-any

Added:
  unoconv/repos/extra-any/PKGBUILD
    (from rev 165572, unoconv/trunk/PKGBUILD)
Deleted:
  unoconv/repos/extra-any/PKGBUILD
  unoconv/repos/extra-any/python_ldpath_and_doc.patch

-----------------------------+
 PKGBUILD                    |   52 +++++-----
 python_ldpath_and_doc.patch |  203 ------------------------------------------
 2 files changed, 26 insertions(+), 229 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2012-08-25 14:44:56 UTC (rev 165572)
+++ PKGBUILD	2012-08-25 14:45:44 UTC (rev 165573)
@@ -1,26 +0,0 @@
-# Maintainer: Jan "heftig" Steffens <jan.steffens at gmail.com>
-# Contributor: max.bra <max.bra at alice dot it>
-# Contributor: SeeSchloss <seeschloss at seos.fr>
-
-pkgname=unoconv
-pkgver=0.4
-pkgrel=4
-pkgdesc="Libreoffice-based document converter"
-depends=('python2' 'java-runtime' 'libreoffice-common')
-makedepends=('asciidoc')
-arch=('any')
-license=('GPL2')
-url="http://dag.wieers.com/home-made/unoconv"
-source=($url/$pkgname-$pkgver.tar.bz2 python_ldpath_and_doc.patch)
-sha256sums=('29aad1d158989d7c9776a437495a3d67988dbcc0102aa96bcf8b2a9468455d2c'
-            '3805f487729c1e8c81fd0615a9799f58a5910070f5a2273cc118fa6242007611')
-
-build() {
-    cd "$srcdir/$pkgname-$pkgver"
-    patch -Np2 -i "$srcdir/python_ldpath_and_doc.patch"
-}
-
-package() {
-    cd "$srcdir/$pkgname-$pkgver"
-    make DESTDIR="$pkgdir" install
-}

Copied: unoconv/repos/extra-any/PKGBUILD (from rev 165572, unoconv/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2012-08-25 14:45:44 UTC (rev 165573)
@@ -0,0 +1,26 @@
+# $Id$
+# Maintainer: Jan "heftig" Steffens <jan.steffens at gmail.com>
+# Contributor: max.bra <max.bra at alice dot it>
+# Contributor: SeeSchloss <seeschloss at seos.fr>
+
+pkgname=unoconv
+pkgver=0.5
+pkgrel=1
+pkgdesc="Libreoffice-based document converter"
+depends=('python2' 'java-runtime' 'libreoffice-common')
+makedepends=('asciidoc')
+arch=('any')
+license=('GPL2')
+url="http://dag.wieers.com/home-made/unoconv"
+source=($pkgname-$pkgver.zip::https://github.com/dagwieers/unoconv/zipball/$pkgname-$pkgver)
+sha256sums=('5beef3cb723efff188ceba09c63c31ffaa010c154e1961874c7170bf304e3b08')
+
+build() {
+    cd dagwieers-$pkgname-???????
+    sed -i '1s/python$/&2/' unoconv
+}
+
+package() {
+    cd dagwieers-$pkgname-???????
+    make DESTDIR="$pkgdir" install
+}

Deleted: python_ldpath_and_doc.patch
===================================================================
--- python_ldpath_and_doc.patch	2012-08-25 14:44:56 UTC (rev 165572)
+++ python_ldpath_and_doc.patch	2012-08-25 14:45:44 UTC (rev 165573)
@@ -1,203 +0,0 @@
-diff -Naur src.ori//unoconv-0.4/unoconv src//unoconv-0.4/unoconv
---- src.ori//unoconv-0.4/unoconv	2010-10-20 11:56:26.000000000 +0200
-+++ src//unoconv-0.4/unoconv	2011-03-11 19:26:17.541798765 +0100
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2
- 
- ### This program is free software; you can redistribute it and/or modify
- ### it under the terms of the GNU General Public License as published by
-@@ -16,39 +16,32 @@
- 
- import getopt, sys, os, glob, time, socket, subprocess
- 
-+if os.path.exists('/usr/lib/openoffice.org3'):
-+    os.putenv('URE_BOOTSTRAP','vnd.sun.star.pathname:/usr/lib/openoffice.org3/program/fundamentalrc')
-+else:
-+    os.putenv('URE_BOOTSTRAP','vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc')
-+
- global convertor, oobin, oobinpath, oolibpath, ooproc
- 
- ### The first thing we ought to do is find a suitable OpenOffice installation
- ### with a compatible pyuno library that we can import.
- extrapaths = glob.glob('/usr/lib*/openoffice*/program') + \
-              glob.glob('/usr/lib*/openoffice*/basis*/program') + \
-+             glob.glob('/usr/lib*/libreoffice*/program/') + \
-              glob.glob('/usr/lib*/ooo*/program') + \
-              glob.glob('/usr/lib*/ooo*/basis*/program') + \
-+             glob.glob('/usr/lib*/libreoffice*/basis*/program/') + \
-              glob.glob('/usr/local/openoffice*/program') + \
-              glob.glob('/usr/local/openoffice*/basis*/program') + \
-              glob.glob('/usr/local/ooo*/program') + \
-              glob.glob('/usr/local/ooo*/basis*/program') + \
-              glob.glob('/opt/openoffice*/program') + \
-              glob.glob('/opt/openoffice*/basis*/program') + \
--             glob.glob('/Applications/OpenOffice.org.app/Contents/program') + \
--             glob.glob('/Applications/OpenOffice.org.app/Contents/basis-link/program') + \
--             glob.glob('/Applications/NeoOffice.app/Contents/program') + \
--             glob.glob('/Applications/NeoOffice.app/Contents/basis-link/program') + \
-              glob.glob('/usr/bin') + \
-              glob.glob('/usr/local/bin') + \
-              glob.glob('/opt/bin')
--
--if 'ProgramFiles' in os.environ.keys():
--    extrapaths += glob.glob(os.environ['ProgramFiles']+'\\OpenOffice.org*\\URE\\bin') + \
--                  glob.glob(os.environ['ProgramFiles']+'\\OpenOffice.org*\\program') + \
--                  glob.glob(os.environ['ProgramFiles']+'\\OpenOffice.org*\\Basis*\\program')
--
--if 'ProgramFiles(x86)' in os.environ.keys():
--    extrapaths += glob.glob(os.environ['ProgramFiles(x86)']+'\\OpenOffice.org*\\URE\\bin') + \
--                  glob.glob(os.environ['ProgramFiles(x86)']+'\\OpenOffice.org*\\program') + \
--                  glob.glob(os.environ['ProgramFiles(x86)']+'\\OpenOffice.org*\\Basis*\\program')
--
--binaries = ( 'soffice.bin', 'soffice', 'soffice.exe' )
-+ 
-+binaries = ( 'soffice.bin', 'soffice' )
- 
- try:
-     import uno, unohelper
-@@ -64,7 +57,10 @@
-             sys.path.append(oolibpath)
-             import uno, unohelper
-             ### Export an environment that OpenOffice is pleased to work with
--            os.environ['LD_LIBRARY_PATH'] = oolibpath + os.pathsep + os.environ['LD_LIBRARY_PATH']
-+            if 'LD_LIBRARY_PATH' in os.environ:
-+                os.environ['LD_LIBRARY_PATH'] = oolibpath + os.pathsep + os.environ['LD_LIBRARY_PATH']
-+            else:
-+                os.environ['LD_LIBRARY_PATH'] = oolibpath
-             break
-         except ImportError, e:
-             sys.path.remove(oolibpath)
-@@ -105,7 +101,7 @@
- __version__ = "$Revision$"
- # $Source$
- 
--VERSION = '0.4'
-+VERSION = '0.4svn'
- 
- doctypes = ('document', 'graphics', 'presentation', 'spreadsheet')
- 
-@@ -333,7 +329,7 @@
-         self.format = None
-         self.importfilter = ""
-         self.listener = False
--        self.outputpath = None
-+        self.output = None
-         self.pipe = None
-         self.port = '2002'
-         self.server = 'localhost'
-@@ -347,9 +343,9 @@
-         try:
-             opts, args = getopt.getopt (args, 'c:d:e:f:hi:Llo:p:s:t:T:v',
-                 ['connection=', 'doctype=', 'export', 'format=', 'help',
--                 'import', 'listener', 'outputpath=', 'pipe=', 'port=',
--                 'server=', 'timeout=', 'show', 'stdout', 'template',
--                 'verbose', 'version'] )
-+                 'import', 'listener', 'output=', 'outputpath', 'pipe=',
-+                 'port=', 'server=', 'timeout=', 'show', 'stdout',
-+                 'template', 'verbose', 'version'] )
-         except getopt.error, exc:
-             print 'unoconv: %s, try unoconv -h for a list of all the options' % str(exc)
-             sys.exit(255)
-@@ -382,8 +378,11 @@
-                 self.importfilter = arg
-             elif opt in ['-l', '--listener']:
-                 self.listener = True
--            elif opt in ['-o', '--outputpath']:
--                self.outputpath = arg
-+            elif opt in ['-o', '--output']:
-+                self.output = arg
-+            elif opt in ['--outputpath']:
-+                print >>sys.stderr, 'Warning: This option is deprecated by --output.' % arg
-+                self.output = arg
-             elif opt in ['--pipe']:
-                 self.pipe = arg
-             elif opt in ['-p', '--port']:
-@@ -474,7 +473,7 @@
-   -i, --import=string      set import filter option string
-                              eg. -i utf8
-   -l, --listener           start a listener to use by unoconv clients
--  -o, --outputpath=name    output directory
-+  -o, --output=name        output basename, filename or directory
-       --pipe=name          alternative method of connection using a pipe
-   -p, --port=port          specify the port (default: 2002)
-                              to be used by client or listener
-@@ -580,7 +579,7 @@
-     def convert(self, inputfn):
-         global exitcode
- 
--        doc = None
-+        document = None
-         outputfmt = self.getformat(inputfn)
- 
-         if op.verbose > 0:
-@@ -599,9 +598,9 @@
-             )
- 
-             inputurl = unohelper.absolutize(self.cwd, unohelper.systemPathToFileUrl(inputfn))
--            doc = self.desktop.loadComponentFromURL( inputurl , "_blank", 0, inputprops )
-+            document = self.desktop.loadComponentFromURL( inputurl , "_blank", 0, inputprops )
- 
--            if not doc:
-+            if not document:
-                 raise UnoException("File could not be loaded by OpenOffice", None)
- 
-             ### Import style template
-@@ -613,7 +612,7 @@
-                         PropertyValue( "OverwriteStyles", 0, True, 0),
-                     )
-                     templateurl = unohelper.absolutize(self.cwd, unohelper.systemPathToFileUrl(op.template))
--                    doc.StyleFamilies.loadStylesFromURL(templateurl, templateprops)
-+                    document.StyleFamilies.loadStylesFromURL(templateurl, templateprops)
-                 else:
-                     print >>sys.stderr, 'unoconv: template file `%s\' does not exist.' % op.template
-                     exitcode = 1
-@@ -624,15 +623,15 @@
- 
-             ### Update document links
-             try:
--                doc.updateLinks()
-+                document.updateLinks()
-             except AttributeError:
-                 # the document doesn't implement the XLinkUpdate interface
-                 pass
- 
-             ### Update document indexes
-             try:
--                doc.refresh()
--                indexes = doc.getDocumentIndexes()
-+                document.refresh()
-+                indexes = document.getDocumentIndexes()
-             except AttributeError:
-                 # the document doesn't implement the XRefreshable and/or
-                 # XDocumentIndexesSupplier interfaces
-@@ -656,18 +655,23 @@
- 
-             if not op.stdout:
-                 (outputfn, ext) = os.path.splitext(inputfn)
--                if not op.outputpath:
-+                if not op.output:
-                     outputfn = outputfn + os.extsep + outputfmt.extension
-+                elif os.path.isdir(op.output):
-+                    outputfn = os.path.join(op.output, os.path.basename(outputfn) + os.extsep + outputfmt.extension)
-+                elif len(op.filenames) > 1:
-+                    outputfn = op.output + os.extsep + outputfmt.extension
-                 else:
--                    outputfn = os.path.join(op.outputpath, os.path.basename(outputfn) + os.extsep + outputfmt.extension)
-+                    outputfn = op.output
-+
-                 outputurl = unohelper.absolutize( self.cwd, unohelper.systemPathToFileUrl(outputfn) )
--                doc.storeToURL(outputurl, tuple(outputprops) )
-+                document.storeToURL(outputurl, tuple(outputprops) )
-                 info(1, "Output file: %s" % outputfn)
-             else:
--                doc.storeToURL("private:stream", tuple(outputprops) )
-+                document.storeToURL("private:stream", tuple(outputprops) )
- 
--            doc.dispose()
--            doc.close(True)
-+            document.dispose()
-+            document.close(True)
- 
-         except SystemError, e:
-             error("unoconv: SystemError during conversion: %s" % e)




More information about the arch-commits mailing list