summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Kuntze2019-02-11 20:37:41 +0100
committerNoel Kuntze2019-02-11 20:37:41 +0100
commit5ce5c02e832a1c0a928e47dcd165ebb328cfb5d0 (patch)
tree0a07c20e12c71f0c61b0006599b4d9a6648e63ac
parent0560ba4db214c010d48ff91d0bcb3c6f92fd6ebd (diff)
downloadaur-5ce5c02e832a1c0a928e47dcd165ebb328cfb5d0.tar.gz
Apply patch for issue 111
-rw-r--r--.SRCINFO6
-rw-r--r--0001-Fix-Issue-111-Write-log-file-to-user-writable-dir.patch27
-rw-r--r--PKGBUILD14
3 files changed, 42 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c1232ab3cb04..9c98cee48e2b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Wed Jan 23 18:30:35 UTC 2019
+# Mon Feb 11 19:37:06 UTC 2019
pkgbase = textext
pkgdesc = An inkscape extension which lets you add LaTeX equations to your drawings
pkgver = 0.9.1
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/textext/textext
arch = any
license = custom:BSD
@@ -14,7 +14,9 @@ pkgbase = textext
optdepends = pygtk
optdepends = imagemagick6
source = textext-0.9.1.tar.gz::https://github.com/textext/textext/releases/download/0.9.1/TexText-Linux-0.9.1.tar.gz
+ source = 0001-Fix-Issue-111-Write-log-file-to-user-writable-dir.patch
sha256sums = 5c48544b4c51547792909ba89fd27432b58bfb26d9d9c3131ab65ec809d8198b
+ sha256sums = 3fc97197fc55a7de3df3ec35955802156a9c9ead07f48fe821792c11f4dcfeab
pkgname = textext
diff --git a/0001-Fix-Issue-111-Write-log-file-to-user-writable-dir.patch b/0001-Fix-Issue-111-Write-log-file-to-user-writable-dir.patch
new file mode 100644
index 000000000000..42c56369afa3
--- /dev/null
+++ b/0001-Fix-Issue-111-Write-log-file-to-user-writable-dir.patch
@@ -0,0 +1,27 @@
+From 55c6847481487e0f2e7a44706b873608705d47bf Mon Sep 17 00:00:00 2001
+From: Alexander Blinne <alexander.blinne@uni-jena.de>
+Date: Mon, 4 Feb 2019 15:04:56 +0100
+Subject: [PATCH] Fix Issue 111: Write log file to user-writable dir
+
+---
+ extension/textext/__init__.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/extension/textext/__init__.py b/extension/textext/__init__.py
+index 5c26968..65739ae 100644
+--- a/extension/textext/__init__.py
++++ b/extension/textext/__init__.py
+@@ -62,7 +62,9 @@ EXIT_CODE_OK = 0
+ EXIT_CODE_EXPECTED_ERROR = 1
+ EXIT_CODE_UNEXPECTED_ERROR = 60
+
+-LOG_LOCATION = os.path.dirname(__file__) # todo: check destination is writeable
++LOG_LOCATION = os.path.join(defaults.inkscape_extensions_path, "textext")
++if not os.path.isdir(LOG_LOCATION):
++ os.makedirs(LOG_LOCATION)
+ LOG_FILENAME = os.path.join(LOG_LOCATION, "textext.log") # todo: check destination is writeable
+
+
+--
+2.20.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 6a4efc527576..f2c355f7ba95 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,16 +4,24 @@
pkgname=textext
_pkgname=TexText
pkgver=0.9.1
-pkgrel=2
+pkgrel=3
pkgdesc="An inkscape extension which lets you add LaTeX equations to your drawings"
arch=('any')
license=('custom:BSD')
url="https://github.com/textext/textext"
depends=('inkscape' 'texlive-core' 'python2')
optdepends=('pdf2svg' 'pygtk' 'imagemagick6')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/textext/textext/releases/download/$pkgver/${_pkgname}-Linux-$pkgver.tar.gz")
+source=("$pkgname-$pkgver.tar.gz::https://github.com/textext/textext/releases/download/$pkgver/${_pkgname}-Linux-$pkgver.tar.gz"
+ "0001-Fix-Issue-111-Write-log-file-to-user-writable-dir.patch")
-sha256sums=('5c48544b4c51547792909ba89fd27432b58bfb26d9d9c3131ab65ec809d8198b')
+sha256sums=('5c48544b4c51547792909ba89fd27432b58bfb26d9d9c3131ab65ec809d8198b'
+ '3fc97197fc55a7de3df3ec35955802156a9c9ead07f48fe821792c11f4dcfeab')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ dos2unix "$srcdir/$pkgname-$pkgver/extension/textext/__init__.pyg"
+ patch -l -p1 < "$srcdir/0001-Fix-Issue-111-Write-log-file-to-user-writable-dir.patch"
+}
package() {
install -d "$pkgdir"/usr/share/inkscape/extensions