mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
* update graphene * update libpng * rebuild zlibpkg * rebuild giflib * libjpeg update * libtiff rebuild * libwebp rebuild * update libwebp deps * update minizip version * update ghostscript * rebuild gettext * gstreamer update * libpng: add libtool file * rebuild liburcu
99 lines
3.6 KiB
Ruby
99 lines
3.6 KiB
Ruby
require 'package'
|
|
|
|
class Giflib < Package
|
|
description 'giflib is a library for reading and writing gif images.'
|
|
homepage 'http://giflib.sourceforge.net/'
|
|
version '5.2.1-1'
|
|
license 'MIT'
|
|
compatibility 'all'
|
|
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.2.1-1_armv7l/giflib-5.2.1-1-chromeos-armv7l.tar.zst',
|
|
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.2.1-1_armv7l/giflib-5.2.1-1-chromeos-armv7l.tar.zst',
|
|
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.2.1-1_i686/giflib-5.2.1-1-chromeos-i686.tar.zst',
|
|
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/giflib/5.2.1-1_x86_64/giflib-5.2.1-1-chromeos-x86_64.tar.zst'
|
|
})
|
|
binary_sha256({
|
|
aarch64: '3b0b0b66720c1eec34ba17441a5edb0a27b1accfcd91ea22cd52c1e5f343e95e',
|
|
armv7l: '3b0b0b66720c1eec34ba17441a5edb0a27b1accfcd91ea22cd52c1e5f343e95e',
|
|
i686: 'd94ebf373666a28f98c2010c5e1e72f35b3f1559e512a7307ff52b646ec3db34',
|
|
x86_64: '9828787f55c5af5fc53587a3a7c2552adf53079f4291164eef3fe982ba51bdb6'
|
|
})
|
|
|
|
depends_on 'glibc' # R
|
|
|
|
no_env_options
|
|
|
|
def self.build
|
|
# No configure script in the source.
|
|
system "#{CREW_ENV_OPTIONS.gsub('-mfpu=vfpv3-d16',
|
|
'-mfpu=neon-fp16')} make PREFIX=#{CREW_PREFIX} LIBDIR=#{CREW_LIB_PREFIX}"
|
|
end
|
|
|
|
def self.check
|
|
system 'make', 'check'
|
|
end
|
|
|
|
def self.install
|
|
system 'make', "DESTDIR=#{CREW_DEST_DIR}", "PREFIX=#{CREW_PREFIX}", "LIBDIR=#{CREW_LIB_PREFIX}", 'install'
|
|
# Remove static library.
|
|
FileUtils.rm "#{CREW_DEST_LIB_PREFIX}/libgif.a"
|
|
@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
|