mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
tesseract, fix reference to libpng16, cleanup (#3899)
This commit is contained in:
committed by
Jérôme Duval
parent
8f812ccc02
commit
e0c3340849
@@ -1,84 +0,0 @@
|
||||
From 785c8eaccca5064a358f8fa510266856049031c0 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Tue, 31 Mar 2015 14:43:55 +0300
|
||||
Subject: Backport 16aa99315a3d - make ocrclass.h public header
|
||||
|
||||
|
||||
diff --git a/ccutil/Makefile.am b/ccutil/Makefile.am
|
||||
index 5c08f6b..8737dda 100644
|
||||
--- a/ccutil/Makefile.am
|
||||
+++ b/ccutil/Makefile.am
|
||||
@@ -14,13 +14,13 @@ EXTRA_DIST = mfcpch.cpp
|
||||
|
||||
include_HEADERS = \
|
||||
basedir.h errcode.h fileerr.h genericvector.h helpers.h host.h memry.h \
|
||||
- ndminx.h params.h platform.h serialis.h strngs.h tesscallback.h \
|
||||
- unichar.h unicharmap.h unicharset.h
|
||||
+ ndminx.h params.h ocrclass.h platform.h serialis.h strngs.h \
|
||||
+ tesscallback.h unichar.h unicharmap.h unicharset.h
|
||||
|
||||
noinst_HEADERS = \
|
||||
ambigs.h bits16.h bitvector.h ccutil.h clst.h elst2.h \
|
||||
elst.h globaloc.h hashfn.h hosthplb.h indexmapbidi.h lsterr.h \
|
||||
- mfcpch.h notdll.h nwmain.h ocrclass.h qrsequence.h secname.h \
|
||||
+ mfcpch.h notdll.h nwmain.h qrsequence.h secname.h \
|
||||
sorthelper.h stderr.h tessdatamanager.h tprintf.h unicity_table.h \
|
||||
unicodes.h
|
||||
|
||||
@@ -51,4 +51,4 @@ if MINGW
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/vs2008/port -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\"
|
||||
noinst_HEADERS += ../vs2008/port/strtok_r.h
|
||||
libtesseract_ccutil_la_SOURCES += ../vs2008/port/strtok_r.cpp
|
||||
-endif
|
||||
\ No newline at end of file
|
||||
+endif
|
||||
--
|
||||
2.12.2
|
||||
|
||||
|
||||
From aa028a41dc6503154b65a115ccc9864f323ca20c Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 21 Jan 2017 14:05:21 +0100
|
||||
Subject: fix missing declaration for fd_set,FD_SET,FD_ZERO,select.
|
||||
|
||||
|
||||
diff --git a/viewer/svutil.cpp b/viewer/svutil.cpp
|
||||
index bef51b1..20b1d6b 100644
|
||||
--- a/viewer/svutil.cpp
|
||||
+++ b/viewer/svutil.cpp
|
||||
@@ -38,6 +38,7 @@ struct addrinfo {
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <netdb.h>
|
||||
+#include <sys/select.h>
|
||||
#include <sys/socket.h>
|
||||
#ifdef __linux__
|
||||
#include <sys/prctl.h>
|
||||
--
|
||||
2.12.2
|
||||
|
||||
|
||||
From b8e745f1de322b7fe7e60aa43e9ec2a81ef560d7 Mon Sep 17 00:00:00 2001
|
||||
From: Philippe Houdoin <philippe.houdoin@gmail.com>
|
||||
Date: Wed, 5 Jul 2017 17:10:00 +0000
|
||||
Subject: tesseract: fix symbol 'connect' not found when loading
|
||||
libtesseract.so
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a64e167..12fc8fd 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -199,6 +199,9 @@ case "$host" in
|
||||
LDFLAGS="$LDFLAGS -L/sw/lib"
|
||||
fi
|
||||
;;
|
||||
+ *-haiku*)
|
||||
+ LDFLAGS="$LDFLAGS -lnetwork"
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
# ----------------------------------------
|
||||
--
|
||||
2.12.2
|
||||
|
||||
25
app-text/tesseract/patches/tesseract-3.05.02.patchset
Normal file
25
app-text/tesseract/patches/tesseract-3.05.02.patchset
Normal file
@@ -0,0 +1,25 @@
|
||||
From 3bfa9839fddaf9312f60415fbd348806a81b5472 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Wed, 12 Jun 2019 16:53:17 +0200
|
||||
Subject: =?UTF-8?q?Haiku=20doesn't=20have=20-lrt,=20add=20haiku=20to=20con?=
|
||||
=?UTF-8?q?figure.ac=20to=20resolve=20this=0Aand=20add=20-lnetwork?=
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b9a8be8..6ff7c41 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -106,6 +106,10 @@ case "${host_os}" in
|
||||
OPENCL_INC=""
|
||||
AM_CONDITIONAL([ADD_RT], false)
|
||||
;;
|
||||
+ haiku*)
|
||||
+ LIBS="-lnetwork"
|
||||
+ AM_CONDITIONAL([ADD_RT], false)
|
||||
+ ;;
|
||||
powerpc-*-darwin*)
|
||||
OPENCL_LIBS=""
|
||||
;;
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@@ -9,18 +9,21 @@ It was one of the top 3 engines in the 1995 UNLV Accuracy test. Between \
|
||||
1995 and 2006 it had little work done on it, but since then it has been \
|
||||
improved extensively by Google. It is released under the Apache License \
|
||||
2.0."
|
||||
HOMEPAGE="http://code.google.com/p/tesseract-ocr"
|
||||
HOMEPAGE="https://github.com/tesseract-ocr/"
|
||||
COPYRIGHT="1985-1995 HP labs
|
||||
2012 Google Inc."
|
||||
LICENSE="Apache v2"
|
||||
REVISION="4"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/tesseract-ocr/tesseract/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="1566a78f81570e7dc656e881a0fa688fe1c700d4657041807f2160bf67fbb485"
|
||||
CHECKSUM_SHA256="494d64ffa7069498a97b909a0e65a35a213989e0184f1ea15332933a90d43445"
|
||||
PATCHES="tesseract-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="3.0.5"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
tesseract$secondaryArchSuffix = $portVersion
|
||||
vendor_tesseract = $portVersion
|
||||
@@ -34,53 +37,54 @@ PROVIDES="
|
||||
cmd:tesseract$secondaryArchSuffix = $portVersion
|
||||
cmd:unicharset_extractor$secondaryArchSuffix = $portVersion
|
||||
cmd:wordlist2dawg$secondaryArchSuffix = $portVersion
|
||||
lib:libtesseract$secondaryArchSuffix = $portVersion compat >= 3
|
||||
lib:libtesseract$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
tesseract_data_eng
|
||||
lib:libgif$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:liblept$secondaryArchSuffix
|
||||
lib:libpng$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libwebp$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix"
|
||||
|
||||
PROVIDES_devel="
|
||||
tesseract${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libtesseract$secondaryArchSuffix = $portVersion compat >= 3
|
||||
devel:libtesseract$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
tesseract$secondaryArchSuffix == $portVersion
|
||||
tesseract$secondaryArchSuffix == $portVersion base
|
||||
devel:liblept$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgif$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:liblept$secondaryArchSuffix
|
||||
devel:libpng$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libwebp$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:awk
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,g' configure.ac
|
||||
}
|
||||
defineDebugInfoPackage tesseract$secondaryArchSuffix \
|
||||
$libDir/libtesseract.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autogen.sh
|
||||
export LIBLEPT_HEADERSDIR=$(finddir B_SYSTEM_HEADERS_DIRECTORY)${secondaryArchSubDir}/leptonica
|
||||
export LEPTONICA_CFLAGS=-I$(finddir B_SYSTEM_HEADERS_DIRECTORY)${secondaryArchSubDir}/leptonica
|
||||
export TESSDATA_PREFIX=$dataDir/tessdata
|
||||
runConfigure configure
|
||||
make $jobArgs
|
||||
@@ -90,15 +94,12 @@ INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
#remove libtool file
|
||||
rm -f $libDir/*.la
|
||||
|
||||
prepareInstalledDevelLibs libtesseract
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel $developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make test
|
||||
make check
|
||||
}
|
||||
Reference in New Issue
Block a user