From 722d477ea28452c5161be9cd6364d4b7c708f3dd Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sun, 16 Jun 2019 17:05:29 +0200 Subject: [PATCH] leptonica, remove files obseleted by next version (#3903) --- media-libs/leptonica/leptonica-1.74.4.recipe | 18 ++++-- ...ca-1.69.recipe => leptonica-1.78.0.recipe} | 58 ++++++++++--------- media-libs/leptonica/patches/giflib6.patch | 56 ------------------ .../leptonica/patches/leptonica-1.69.patch | 56 ------------------ 4 files changed, 43 insertions(+), 145 deletions(-) rename media-libs/leptonica/{leptonica-1.69.recipe => leptonica-1.78.0.recipe} (92%) delete mode 100644 media-libs/leptonica/patches/giflib6.patch delete mode 100644 media-libs/leptonica/patches/leptonica-1.69.patch diff --git a/media-libs/leptonica/leptonica-1.74.4.recipe b/media-libs/leptonica/leptonica-1.74.4.recipe index ea69f2963..431ff46f7 100644 --- a/media-libs/leptonica/leptonica-1.74.4.recipe +++ b/media-libs/leptonica/leptonica-1.74.4.recipe @@ -8,7 +8,7 @@ and image analysis operations. It's long list of features includes: HOMEPAGE="http://www.leptonica.org/" COPYRIGHT="2001-2012 Dan Bloomberg" LICENSE="BSD (2-clause)" -REVISION="1" +REVISION="2" SOURCE_URI="http://www.leptonica.org/source/leptonica-$portVersion.tar.gz" CHECKSUM_SHA256="29c35426a416bf454413c6fec24c24a0b633e26144a17e98351b6dffaa4a833b" PATCHES="leptonica-$portVersion.patchset" @@ -16,22 +16,26 @@ PATCHES="leptonica-$portVersion.patchset" ARCHITECTURES="x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86_gcc2 x86" +libVersion="5.0.1" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + PROVIDES=" leptonica$secondaryArchSuffix = $portVersion - lib:liblept$secondaryArchSuffix = 5.0.1 compat >= 5 + lib:liblept$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix lib:libgif$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:libpng16$secondaryArchSuffix + lib:libtiff$secondaryArchSuffix lib:libwebp$secondaryArchSuffix lib:libz$secondaryArchSuffix " PROVIDES_devel=" leptonica${secondaryArchSuffix}_devel = $portVersion - devel:liblept$secondaryArchSuffix = 5.0.1 compat >= 5 + devel:liblept$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" haiku$secondaryArchSuffix @@ -261,7 +265,8 @@ BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libgif$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix - devel:libpng16$secondaryArchSuffix + devel:libpng$secondaryArchSuffix + devel:libtiff$secondaryArchSuffix devel:libwebp$secondaryArchSuffix devel:libz$secondaryArchSuffix " @@ -288,8 +293,11 @@ INSTALL() { make install + # remove libtool file + rm $libDir/*.la + + prepareInstalledDevelLib liblept fixPkgconfig - prepareInstalledDevelLibs liblept packageEntries devel \ $developDir diff --git a/media-libs/leptonica/leptonica-1.69.recipe b/media-libs/leptonica/leptonica-1.78.0.recipe similarity index 92% rename from media-libs/leptonica/leptonica-1.69.recipe rename to media-libs/leptonica/leptonica-1.78.0.recipe index 0b7ef478b..2a603a760 100644 --- a/media-libs/leptonica/leptonica-1.69.recipe +++ b/media-libs/leptonica/leptonica-1.78.0.recipe @@ -1,44 +1,40 @@ SUMMARY="A C library for image processing and analysis operations" -DESCRIPTION=" -A powerful open source C library for efficient image processing \ +DESCRIPTION="A powerful open source C library for efficient image processing \ and image analysis operations. It's long list of features includes: * image transformations (scaling, rotation, etc.) * change scale and pixel depth * pixelwise masking, blending, and enhancement -* can open and save standard image formats -" -HOMEPAGE="http://code.google.com/p/leptonica" +* can open and save standard image formats" +HOMEPAGE="http://www.leptonica.org/" COPYRIGHT="2001-2012 Dan Bloomberg" LICENSE="BSD (2-clause)" -REVISION="2" -SOURCE_URI="http://www.leptonica.org/source/leptonica-1.69.tar.gz" -CHECKSUM_SHA256="3eb7669dcda7e417f399bb3698414ea523270797dfd36c59b08ef37a3fe0a72d" -PATCHES=" - giflib6.patch - leptonica-1.69.patch - " +REVISION="1" +SOURCE_URI="http://www.leptonica.org/source/leptonica-$portVersion.tar.gz" +CHECKSUM_SHA256="e2ed2e81e7a22ddf45d2c05f0bc8b9ae7450545d995bfe28517ba408d14a5a88" -ARCHITECTURES="x86 x86_64" -SECONDARY_ARCHITECTURES="!x86_gcc2 x86" +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +libVersion="5.0.3" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" leptonica$secondaryArchSuffix = $portVersion - lib:leptonica$secondaryArchSuffix = 3.0.0 - lib:liblept$secondaryArchSuffix = 3.0.0 + lib:liblept$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix lib:libgif$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix - lib:libpng$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libtiff$secondaryArchSuffix lib:libwebp$secondaryArchSuffix lib:libz$secondaryArchSuffix " PROVIDES_devel=" leptonica${secondaryArchSuffix}_devel = $portVersion - devel:leptonica$secondaryArchSuffix = 3.0.0 - devel:liblept$secondaryArchSuffix = 3.0.0 + devel:liblept$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" haiku$secondaryArchSuffix @@ -95,6 +91,7 @@ PROVIDES_tools=" cmd:convertsegfilestopdf$secondaryArchSuffix = $portVersion cmd:convertsegfilestops$secondaryArchSuffix = $portVersion cmd:converttogray$secondaryArchSuffix = $portVersion + cmd:converttopdf$secondaryArchSuffix = $portVersion cmd:converttops$secondaryArchSuffix = $portVersion cmd:convolve_reg$secondaryArchSuffix = $portVersion cmd:convolvetest$secondaryArchSuffix = $portVersion @@ -143,6 +140,7 @@ PROVIDES_tools=" cmd:hardlight_reg$secondaryArchSuffix = $portVersion cmd:heap_reg$secondaryArchSuffix = $portVersion cmd:histotest$secondaryArchSuffix = $portVersion + cmd:imagetops$secondaryArchSuffix = $portVersion cmd:inserttest$secondaryArchSuffix = $portVersion cmd:ioformats_reg$secondaryArchSuffix = $portVersion cmd:iotest$secondaryArchSuffix = $portVersion @@ -268,38 +266,42 @@ BUILD_REQUIRES=" devel:libgif$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:libpng$secondaryArchSuffix + devel:libtiff$secondaryArchSuffix devel:libwebp$secondaryArchSuffix devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:aclocal - cmd:ar$secondaryArchSuffix cmd:autoconf cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix cmd:libtoolize$secondaryArchSuffix cmd:make cmd:makeinfo + cmd:pkg_config$secondaryArchSuffix " BUILD() { - libtoolize --force --copy --install - aclocal - autoconf - automake -a - runConfigure ./configure + autoreconf -fi + # override CFLAGS to make gcc2 happy by not passing the -g option + CFLAGS=-O2 runConfigure ./configure make $jobArgs } INSTALL() { make install - prepareInstalledDevelLibs liblept + + # remove libtool file + rm $libDir/*.la + + prepareInstalledDevelLib liblept + fixPkgconfig packageEntries devel \ - $developDir + $developDir packageEntries tools \ - $binDir + $binDir } diff --git a/media-libs/leptonica/patches/giflib6.patch b/media-libs/leptonica/patches/giflib6.patch deleted file mode 100644 index a283e931d..000000000 --- a/media-libs/leptonica/patches/giflib6.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -wbBur leptonica-1.69/src/gifio.c leptonica-1.69/src/gifio.c ---- leptonica-1.69/src/gifio.c 2012-01-22 22:29:15.000000000 +0400 -+++ leptonica-1.69/src/gifio.c 2013-07-30 18:27:19.269137200 +0400 -@@ -100,7 +100,7 @@ - _lseek(fd, 0, SEEK_SET); - #endif /* _MSC_VER */ - -- if ((gif = DGifOpenFileHandle(fd)) == NULL) -+ if ((gif = DGifOpenFileHandle(fd, NULL)) == NULL) - return (PIX *)ERROR_PTR("invalid file or file not found", - procName, NULL); - -@@ -316,7 +316,7 @@ - } - - /* Save the cmap colors in a gif_cmap */ -- if ((gif_cmap = MakeMapObject(gif_ncolor, NULL)) == NULL) { -+ if ((gif_cmap = GifMakeMapObject(gif_ncolor, NULL)) == NULL) { - pixDestroy(&pixd); - return ERROR_INT("failed to create GIF color map", procName, 1); - } -@@ -325,7 +325,7 @@ - if (ncolor > 0) { - if (pixcmapGetColor(cmap, i, &rval, &gval, &bval) != 0) { - pixDestroy(&pixd); -- FreeMapObject(gif_cmap); -+ GifFreeMapObject(gif_cmap); - return ERROR_INT("failed to get color from color map", - procName, 1); - } -@@ -337,9 +337,9 @@ - } - - /* Get the gif file handle */ -- if ((gif = EGifOpenFileHandle(fd)) == NULL) { -+ if ((gif = EGifOpenFileHandle(fd, NULL)) == NULL) { - pixDestroy(&pixd); -- FreeMapObject(gif_cmap); -+ GifFreeMapObject(gif_cmap); - return ERROR_INT("failed to create GIF image handle", procName, 1); - } - -@@ -347,11 +347,11 @@ - if (EGifPutScreenDesc(gif, w, h, gif_cmap->BitsPerPixel, 0, gif_cmap) - != GIF_OK) { - pixDestroy(&pixd); -- FreeMapObject(gif_cmap); -+ GifFreeMapObject(gif_cmap); - EGifCloseFile(gif); - return ERROR_INT("failed to write screen description", procName, 1); - } -- FreeMapObject(gif_cmap); /* not needed after this point */ -+ GifFreeMapObject(gif_cmap); /* not needed after this point */ - - if (EGifPutImageDesc(gif, 0, 0, w, h, FALSE, NULL) != GIF_OK) { - pixDestroy(&pixd); diff --git a/media-libs/leptonica/patches/leptonica-1.69.patch b/media-libs/leptonica/patches/leptonica-1.69.patch deleted file mode 100644 index 40db92b7b..000000000 --- a/media-libs/leptonica/patches/leptonica-1.69.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 0b6499e1a9868539583d776f2c0c6251b38a02e6 Mon Sep 17 00:00:00 2001 -From: Luke -Date: Thu, 26 Dec 2013 01:39:15 +0000 -Subject: [PATCH] Fix building on Haiku - ---- - configure.ac | 2 +- - src/sarray.c | 5 ++++- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index fb5ca0c..88b52c9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1,7 +1,7 @@ - AC_PREREQ([2.50]) - AC_INIT([leptonica], [1.69], [dan.bloomberg@gmail.com]) - AC_CONFIG_AUX_DIR([config]) --AM_CONFIG_HEADER([config_auto.h:config/config.h.in]) -+AC_CONFIG_HEADERS([config_auto.h:config/config.h.in]) - AC_CONFIG_SRCDIR([src/adaptmap.c]) - - AC_CONFIG_MACRO_DIR([m4]) -diff --git a/src/sarray.c b/src/sarray.c -index c21bf3b..b212bf8 100644 ---- a/src/sarray.c -+++ b/src/sarray.c -@@ -131,6 +131,7 @@ - #include - #ifndef _WIN32 - #include /* unix only */ -+#include - #endif /* ! _WIN32 */ - #include "allheaders.h" - -@@ -1831,6 +1832,7 @@ l_int32 len; - SARRAY *safiles; - DIR *pdir; - struct dirent *pdirentry; -+struct stat s; - - PROCNAME("getFilenamesInDirectory"); - -@@ -1847,7 +1849,8 @@ struct dirent *pdirentry; - * define _BSD_SOURCE in the CC command, because the DT_DIR - * flag is non-standard. */ - #if !defined(__SOLARIS__) -- if (pdirentry->d_type == DT_DIR) -+ stat(pdirentry->d_name, &s); -+ if(S_ISDIR(s.st_mode)) - continue; - #endif - --- -1.8.3.4 -