leptonica: Rebuild against giflib-5.1.0
This commit is contained in:
@@ -4,25 +4,28 @@ _realname=leptonica
|
||||
_mingw_suff=mingw-w64-${CARCH}
|
||||
pkgname="${_mingw_suff}-${_realname}"
|
||||
pkgver=1.70
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Leptonica library (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://www.leptonica.org"
|
||||
license=("Leptonica")
|
||||
makedepends=("${_mingw_suff}-gcc" "${_mingw_suff}-pkg-config")
|
||||
depends=(${_mingw_suff}-gcc-libs
|
||||
${_mingw_suff}-libjpeg-turbo
|
||||
${_mingw_suff}-libtiff
|
||||
${_mingw_suff}-libpng
|
||||
${_mingw_suff}-giflib
|
||||
${_mingw_suff}-libwebp
|
||||
${_mingw_suff}-zlib)
|
||||
${_mingw_suff}-libjpeg-turbo
|
||||
${_mingw_suff}-libtiff
|
||||
${_mingw_suff}-libpng
|
||||
${_mingw_suff}-giflib
|
||||
${_mingw_suff}-libwebp
|
||||
${_mingw_suff}-zlib)
|
||||
options=('!libtool' 'strip')
|
||||
source=("http://www.leptonica.org/source/${_realname}-${pkgver}.tar.gz")
|
||||
md5sums=('5ac2a31cf5b4f0e8f5a853a5266c42ef')
|
||||
source=("http://www.leptonica.org/source/${_realname}-${pkgver}.tar.gz"
|
||||
giflib.patch)
|
||||
md5sums=('5ac2a31cf5b4f0e8f5a853a5266c42ef'
|
||||
'b1c61c331f58ac5dc3dce595cfe9246a')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/${_realname}-$pkgver"
|
||||
patch -p1 -i ${srcdir}/giflib.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
110
mingw-w64-leptonica/giflib.patch
Normal file
110
mingw-w64-leptonica/giflib.patch
Normal file
@@ -0,0 +1,110 @@
|
||||
--- leptonica-1.70/src/gifio.c.orig 2013-11-24 01:57:40.000000000 +0400
|
||||
+++ leptonica-1.70/src/gifio.c 2014-05-28 08:25:21.995400000 +0400
|
||||
@@ -121,12 +121,12 @@
|
||||
|
||||
/* Read all the data, but use only the first image found */
|
||||
if (DGifSlurp(gif) != GIF_OK) {
|
||||
- DGifCloseFile(gif);
|
||||
+ DGifCloseFile(gif, NULL);
|
||||
return (PIX *)ERROR_PTR("failed to read GIF data", procName, NULL);
|
||||
}
|
||||
|
||||
if (gif->SavedImages == NULL) {
|
||||
- DGifCloseFile(gif);
|
||||
+ DGifCloseFile(gif, NULL);
|
||||
return (PIX *)ERROR_PTR("no images found in GIF", procName, NULL);
|
||||
}
|
||||
|
||||
@@ -134,12 +134,12 @@
|
||||
w = si.ImageDesc.Width;
|
||||
h = si.ImageDesc.Height;
|
||||
if (w <= 0 || h <= 0) {
|
||||
- DGifCloseFile(gif);
|
||||
+ DGifCloseFile(gif, NULL);
|
||||
return (PIX *)ERROR_PTR("invalid image dimensions", procName, NULL);
|
||||
}
|
||||
|
||||
if (si.RasterBits == NULL) {
|
||||
- DGifCloseFile(gif);
|
||||
+ DGifCloseFile(gif, NULL);
|
||||
return (PIX *)ERROR_PTR("no raster data in GIF", procName, NULL);
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
gif_cmap = gif->SColorMap;
|
||||
} else {
|
||||
/* don't know where to take cmap from */
|
||||
- DGifCloseFile(gif);
|
||||
+ DGifCloseFile(gif, NULL);
|
||||
return (PIX *)ERROR_PTR("color map is missing", procName, NULL);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
}
|
||||
|
||||
if ((pixd = pixCreate(w, h, d)) == NULL) {
|
||||
- DGifCloseFile(gif);
|
||||
+ DGifCloseFile(gif, NULL);
|
||||
pixcmapDestroy(&cmap);
|
||||
return (PIX *)ERROR_PTR("failed to allocate pixd", procName, NULL);
|
||||
}
|
||||
@@ -207,7 +207,7 @@
|
||||
pixTransferAllData(pixd, &pixdi, 0, 0);
|
||||
}
|
||||
|
||||
- DGifCloseFile(gif);
|
||||
+ DGifCloseFile(gif, NULL);
|
||||
return pixd;
|
||||
}
|
||||
|
||||
@@ -356,14 +356,14 @@
|
||||
!= GIF_OK) {
|
||||
pixDestroy(&pixd);
|
||||
GifFreeMapObject(gif_cmap);
|
||||
- EGifCloseFile(gif);
|
||||
+ EGifCloseFile(gif, NULL);
|
||||
return ERROR_INT("failed to write screen description", procName, 1);
|
||||
}
|
||||
GifFreeMapObject(gif_cmap); /* not needed after this point */
|
||||
|
||||
if (EGifPutImageDesc(gif, 0, 0, w, h, FALSE, NULL) != GIF_OK) {
|
||||
pixDestroy(&pixd);
|
||||
- EGifCloseFile(gif);
|
||||
+ EGifCloseFile(gif, NULL);
|
||||
return ERROR_INT("failed to image screen description", procName, 1);
|
||||
}
|
||||
|
||||
@@ -371,13 +371,13 @@
|
||||
wpl = pixGetWpl(pixd);
|
||||
if (d != 1 && d != 2 && d != 4 && d != 8) {
|
||||
pixDestroy(&pixd);
|
||||
- EGifCloseFile(gif);
|
||||
+ EGifCloseFile(gif, NULL);
|
||||
return ERROR_INT("image depth is not in {1, 2, 4, 8}", procName, 1);
|
||||
}
|
||||
|
||||
if ((gif_line = (GifByteType *)CALLOC(sizeof(GifByteType), w)) == NULL) {
|
||||
pixDestroy(&pixd);
|
||||
- EGifCloseFile(gif);
|
||||
+ EGifCloseFile(gif, NULL);
|
||||
return ERROR_INT("mem alloc fail for data line", procName, 1);
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@
|
||||
if (EGifPutLine(gif, gif_line, w) != GIF_OK) {
|
||||
FREE(gif_line);
|
||||
pixDestroy(&pixd);
|
||||
- EGifCloseFile(gif);
|
||||
+ EGifCloseFile(gif, NULL);
|
||||
return ERROR_INT("failed to write data line into GIF", procName, 1);
|
||||
}
|
||||
}
|
||||
@@ -422,7 +422,7 @@
|
||||
|
||||
FREE(gif_line);
|
||||
pixDestroy(&pixd);
|
||||
- EGifCloseFile(gif);
|
||||
+ EGifCloseFile(gif, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user