summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkfg2019-10-03 12:57:14 +0200
committerkfg2019-10-03 12:57:14 +0200
commit37c58d48d974c0d82b44bf6f58c15ed9c4c7b22b (patch)
treee88547cca902f1cf7c79ff8ef0aea4166149e69d
parentf648dc2df33b06396a2b4861ce5b3112d183f058 (diff)
downloadaur-37c58d48d974c0d82b44bf6f58c15ed9c4c7b22b.tar.gz
upgpkg: mingw-w64-enca 1.19-3
rebuilt for librecode soname bump
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD20
-rw-r--r--enca-bad-file-descriptor.patch35
3 files changed, 57 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 06939ead506..0d97fee342d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,10 @@
# Generated by mksrcinfo v8
-# Fri Apr 14 09:51:57 UTC 2017
+# Thu Oct 3 10:57:07 UTC 2019
pkgbase = mingw-w64-enca
pkgdesc = Charset analyser and converter (mingw-w64)
pkgver = 1.19
- pkgrel = 2
- url = http://cihar.com/software/enca/
+ pkgrel = 3
+ url = https://cihar.com/software/enca/
arch = any
license = GPL
makedepends = mingw-w64-gcc
@@ -15,14 +15,16 @@ pkgbase = mingw-w64-enca
options = !buildflags
options = staticlibs
options = !makeflags
- source = http://dl.cihar.com/enca/enca-1.19.tar.xz
+ source = https://dl.cihar.com/enca/enca-1.19.tar.xz
+ source = enca-bad-file-descriptor.patch
source = configure.patch
source = tools.patch
source = autogen.patch
- md5sums = a7a0c152658e012db701a48ae8b79525
- md5sums = ae3503817acea6331b3d443636704c7b
- md5sums = e62da0e6fd31affa1f3e15171dbc95c6
- md5sums = 4c55e12e639524c584c436bfc93e4b11
+ sha256sums = 3a487eca40b41021e2e4b7a6440b97d822e6532db5464471f572ecf77295e8b8
+ sha256sums = 270c7c0abaea5f3d10173b58849200d4106675d3127a0b9b8ce1fc3dcf775acb
+ sha256sums = 4092b2cfb4125419d7e93513b8a02a3d7c9dcc7423329d9b704f029f89dda084
+ sha256sums = 721918fd8ee4fc426c6cf279e99fc95e21fff86d4ec7125aa2b8bcf931e3aa6b
+ sha256sums = 7e6c95b6b62c02b0ed50df9b1fb0c730ee0bd7108d04cd0f40d55035cb781b40
pkgname = mingw-w64-enca
diff --git a/PKGBUILD b/PKGBUILD
index e415cd1a2e5..80ec460bc96 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,37 @@
-# $Id$
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Filip Dvorak <fila@pruda.com>
pkgname=mingw-w64-enca
pkgver=1.19
-pkgrel=2
+pkgrel=3
pkgdesc="Charset analyser and converter (mingw-w64)"
arch=('any')
-url="http://cihar.com/software/enca/"
+url="https://cihar.com/software/enca/"
options=('!strip' '!buildflags' 'staticlibs' '!makeflags')
license=('GPL')
depends=('mingw-w64-crt' 'mingw-w64-recode')
makedepends=('mingw-w64-gcc' 'wine')
-source=("http://dl.cihar.com/enca/enca-${pkgver}.tar.xz"
+source=("https://dl.cihar.com/enca/enca-${pkgver}.tar.xz"
+ 'enca-bad-file-descriptor.patch'
'configure.patch'
'tools.patch'
'autogen.patch')
-md5sums=('a7a0c152658e012db701a48ae8b79525'
- 'ae3503817acea6331b3d443636704c7b'
- 'e62da0e6fd31affa1f3e15171dbc95c6'
- '4c55e12e639524c584c436bfc93e4b11')
+sha256sums=('3a487eca40b41021e2e4b7a6440b97d822e6532db5464471f572ecf77295e8b8'
+ '270c7c0abaea5f3d10173b58849200d4106675d3127a0b9b8ce1fc3dcf775acb'
+ '4092b2cfb4125419d7e93513b8a02a3d7c9dcc7423329d9b704f029f89dda084'
+ '721918fd8ee4fc426c6cf279e99fc95e21fff86d4ec7125aa2b8bcf931e3aa6b'
+ '7e6c95b6b62c02b0ed50df9b1fb0c730ee0bd7108d04cd0f40d55035cb781b40')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "${srcdir}/enca-${pkgver}"
+ patch -p1 -i "${srcdir}/enca-bad-file-descriptor.patch" # https://github.com/nijel/enca/issues/28
+
patch -Np1 -i "${srcdir}/configure.patch"
patch -Np1 -i "${srcdir}/tools.patch"
patch -Np1 -i "${srcdir}/autogen.patch"
+
./autogen.sh
make distclean
}
diff --git a/enca-bad-file-descriptor.patch b/enca-bad-file-descriptor.patch
new file mode 100644
index 00000000000..2f6ad911bed
--- /dev/null
+++ b/enca-bad-file-descriptor.patch
@@ -0,0 +1,35 @@
+--- a/src/convert_recode.c
++++ b/src/convert_recode.c
+@@ -101,7 +101,8 @@ convert_recode(File *file,
+ return ERR_IOFAIL;
+ file->buffer->pos = 0;
+
+- if ((tempfile = file_temporary(file->buffer, 1)) == NULL
++ /* We do not unlink tempfile, because we want to reopen it later */
++ if ((tempfile = file_temporary(file->buffer, 0)) == NULL
+ || file_seek(file, 0, SEEK_SET) != 0) {
+ file_free(tempfile);
+ return ERR_IOFAIL;
+@@ -112,9 +113,20 @@ convert_recode(File *file,
+ task->fail_level = enca_recode_fail_level;
+ task->abort_level = RECODE_SYSTEM_ERROR;
+ task->input.name = NULL;
+- task->input.file = file->stream;
+ task->output.name = NULL;
+- task->output.file = tempfile->stream;
++ /* recode_perform_task closes given streams, so we need to duplicate them */
++ task->input.file = fopen(file->name, "rb");
++ if (task->input.file == NULL) {
++ fprintf(stderr, "failed to reopen `%s'\n", file->name);
++ file_free(tempfile);
++ return ERR_IOFAIL;
++ }
++ task->output.file = fopen(tempfile->name, "wb");
++ if (task->input.file == NULL) {
++ fprintf(stderr, "failed to reopen `%s'\n", tempfile->name);
++ file_free(tempfile);
++ return ERR_IOFAIL;
++ }
+
+ /* Now run conversion original -> temporary file. */
+ success = recode_perform_task(task);