mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Update tesseract + deps (#8259)
* Update giflib, leptonica * update tesseract
This commit is contained in:
committed by
GitHub
parent
54ea10b278
commit
52a77dd660
@@ -3,31 +3,30 @@ require 'package'
|
||||
class Giflib < Package
|
||||
description 'giflib is a library for reading and writing gif images.'
|
||||
homepage 'http://giflib.sourceforge.net/'
|
||||
version '5.1.4'
|
||||
version '5.2.1'
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'https://prdownloads.sourceforge.net/project/giflib/giflib-5.1.4.tar.bz2'
|
||||
source_sha256 'df27ec3ff24671f80b29e6ab1c4971059c14ac3db95406884fc26574631ba8d5'
|
||||
source_url 'https://downloads.sourceforge.net/project/giflib/giflib-5.2.1.tar.gz'
|
||||
source_sha256 '31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd'
|
||||
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.1.4_armv7l/giflib-5.1.4-chromeos-armv7l.tar.xz',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.1.4_armv7l/giflib-5.1.4-chromeos-armv7l.tar.xz',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.1.4_i686/giflib-5.1.4-chromeos-i686.tar.xz',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.1.4_x86_64/giflib-5.1.4-chromeos-x86_64.tar.xz'
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.2.1_armv7l/giflib-5.2.1-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.2.1_armv7l/giflib-5.2.1-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.2.1_i686/giflib-5.2.1-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.2.1_x86_64/giflib-5.2.1-chromeos-x86_64.tar.zst'
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: '546af3350ca70ffc33ba0c12e6de65efe2fc9bce95ef3c48ab81da2d6cc1cae0',
|
||||
armv7l: '546af3350ca70ffc33ba0c12e6de65efe2fc9bce95ef3c48ab81da2d6cc1cae0',
|
||||
i686: 'ad9b824becceb46ad8b22515085ea105497117e10e7550f7ba965398c4d56d36',
|
||||
x86_64: '2efb3d4ac43bd4400e5af45cf8281e1852b86a2050af1efb0437eb9e92cd3312'
|
||||
aarch64: '727b6d1cdbcbc59a90d2b759faeaddf29a957bc4670e088683f5f867caf04593',
|
||||
armv7l: '727b6d1cdbcbc59a90d2b759faeaddf29a957bc4670e088683f5f867caf04593',
|
||||
i686: 'cc0a7353ec3c691b37e33512f25bd7b5d0d20a57dcc5d516162c3a66b6905c4e',
|
||||
x86_64: '06bb0ff65e3562c7779671eaa4a0fbd45ae51e01e46e4b4ced6e89df05b6abbf'
|
||||
})
|
||||
|
||||
depends_on 'glibc' # R
|
||||
|
||||
def self.build
|
||||
system './configure',
|
||||
"--prefix=#{CREW_PREFIX}",
|
||||
"--libdir=#{CREW_LIB_PREFIX}",
|
||||
'--disable-dependency-tracking'
|
||||
system 'make'
|
||||
# No configure script in the source.
|
||||
system 'make', "PREFIX=#{CREW_PREFIX}", "LIBDIR=#{CREW_LIB_PREFIX}"
|
||||
end
|
||||
|
||||
def self.check
|
||||
@@ -35,6 +34,60 @@ class Giflib < Package
|
||||
end
|
||||
|
||||
def self.install
|
||||
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
|
||||
system 'make', "DESTDIR=#{CREW_DEST_DIR}", "PREFIX=#{CREW_PREFIX}", "LIBDIR=#{CREW_LIB_PREFIX}", 'install'
|
||||
@libname = name.to_s.start_with?('lib') ? name.downcase : "lib#{name.gsub('lib', '').downcase}"
|
||||
@libnames = Dir["#{CREW_DEST_LIB_PREFIX}/#{@libname}.so*"]
|
||||
@libnames = Dir["#{CREW_DEST_LIB_PREFIX}/#{@libname}-*.so*"] if @libnames.empty?
|
||||
@libnames.each do |s|
|
||||
s.gsub!("#{CREW_DEST_LIB_PREFIX}/", '')
|
||||
end
|
||||
@dlname = @libnames.grep(/.so./).first
|
||||
@libname = @dlname.gsub(/.so.\d+/, '')
|
||||
@longest_libname = @libnames.max_by(&:length)
|
||||
@libvars = @longest_libname.rpartition('.so.')[2].split('.')
|
||||
@libtool_file = <<~LIBTOOLEOF
|
||||
# #{@libname}.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool) (Created by Chromebrew)
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname='#{@dlname}'
|
||||
|
||||
# Names of this library.
|
||||
library_names='#{@libnames.reverse.join(' ')}'
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='#{@libname}.a'
|
||||
|
||||
# Linker flags that cannot go in dependency_libs.
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for #{name}.
|
||||
current=#{@libvars[1]}
|
||||
age=#{@libvars[1]}
|
||||
revision=#{@libvars[2]}
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='#{CREW_LIB_PREFIX}'
|
||||
LIBTOOLEOF
|
||||
File.write("#{CREW_DEST_LIB_PREFIX}/#{@libname}.la", @libtool_file)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user