Commit d6dd75df authored by Jérome Perrin's avatar Jérome Perrin

component/ghostscript: version up 9.54.0

This version includes an OCR engine based on tesseract.
parent 5f616dd7
...@@ -2,17 +2,21 @@ ...@@ -2,17 +2,21 @@
extends = extends =
../fontconfig/buildout.cfg ../fontconfig/buildout.cfg
../freetype/buildout.cfg ../freetype/buildout.cfg
../libjpeg/buildout.cfg
../libtiff/buildout.cfg ../libtiff/buildout.cfg
../libxml2/buildout.cfg ../libxml2/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../tesseract/buildout.cfg
../xz-utils/buildout.cfg ../xz-utils/buildout.cfg
parts = ghostscript parts = ghostscript
[ghostscript-common] [ghostscript]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
pkg_config_depends = ${libtiff:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${fontconfig:pkg_config_depends} url = https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9540/ghostscript-9.54.0.tar.gz
md5sum = 5d571792a8eb826c9f618fb69918d9fc
pkg_config_depends = ${libtiff:location}/lib/pkgconfig:${libjpeg:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${fontconfig:pkg_config_depends}
configure-options = configure-options =
--disable-cups --disable-cups
--disable-threadsafe --disable-threadsafe
...@@ -20,18 +24,18 @@ configure-options = ...@@ -20,18 +24,18 @@ configure-options =
--without-libidn --without-libidn
--without-x --without-x
--with-drivers=FILES --with-drivers=FILES
# it seems that parallel build sometimes fails for ghostscript. --with-tessdata=${:tessdata-location}
make-options = -j1
environment = environment =
PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:pkg_config_depends} PKG_CONFIG_PATH=${:pkg_config_depends}
LDFLAGS=-Wl,-rpath=${fontconfig:location}/lib -Wl,-rpath=${freetype:location}/lib -Wl,-rpath=${libtiff:location}/lib CFLAGS=-I${libjpeg:location}/include
LDFLAGS=-Wl,-rpath=${fontconfig:location}/lib -Wl,-rpath=${freetype:location}/lib -Wl,-rpath=${libtiff:location}/lib -L${libjpeg:location}/lib -Wl,-rpath=${libjpeg:location}/lib
LD_LIBRARY_PATH=${fontconfig:location}/lib:${freetype:location}/lib:${libtiff:location}/lib:${libxml2:location}/lib LD_LIBRARY_PATH=${fontconfig:location}/lib:${freetype:location}/lib:${libtiff:location}/lib:${libxml2:location}/lib
[ghostscript] # configure gives priority to local jpeg library and refuse mixing local libjpeg with "system" libtiff.
<= ghostscript-9 # We remove this local jpeg library source folder so that configure picks up the slapos versions of these libraries.
pre-configure = rm -r jpeg
[ghostscript-9] post-make-hook = ${tesseract-download-traineddata:post-make-hook}
<= ghostscript-common tessdata-location = @@LOCATION@@/share/tessdata/
url = https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs950/ghostscript-9.50.tar.xz tessdata-urls = ${tesseract-download-traineddata:urls}
md5sum = 6cea6bae4a7cdfac6ccb09f07f0caf8c
[download-tessdata.py] [download-tessdata.py]
filename = download-tessdata.py filename = download-tessdata.py
md5sum = 02960cbbe84f484a532ee4e279b87150 md5sum = 2d283a6d8662d6bb8c9de7b26162b702
...@@ -9,7 +9,8 @@ import os ...@@ -9,7 +9,8 @@ import os
def post_make_hook(options, buildout, env): def post_make_hook(options, buildout, env):
os.makedirs(options['tessdata-location']) if not os.path.exists(options['tessdata-location']):
os.makedirs(options['tessdata-location'])
download = zc.buildout.download.Download( download = zc.buildout.download.Download(
buildout['buildout'], buildout['buildout'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment