mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Update libpng, fontconfig and harfbuzz packages (#7180)
This commit is contained in:
@@ -2,90 +2,46 @@ require 'package'
|
||||
|
||||
class Fontconfig < Package
|
||||
description 'Fontconfig is a library for configuring and customizing font access.'
|
||||
homepage 'https://www.freedesktop.org/software/fontconfig/front.html'
|
||||
@_ver = '2.14.0'
|
||||
version "#{@_ver}-1"
|
||||
homepage 'https://www.freedesktop.org/wiki/Software/fontconfig/'
|
||||
version '2.14.0'
|
||||
license 'MIT'
|
||||
compatibility 'all'
|
||||
source_url 'https://gitlab.freedesktop.org/fontconfig/fontconfig.git'
|
||||
git_hashtag @_ver
|
||||
source_url 'https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.14.0/fontconfig-2.14.0.tar.bz2'
|
||||
source_sha256 'e89a0c6868771b88de27bd20cd98f1056a3083666a1cf7c85d26ac5c67cc25a8'
|
||||
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.14.0-1_armv7l/fontconfig-2.14.0-1-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.14.0-1_armv7l/fontconfig-2.14.0-1-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.14.0-1_i686/fontconfig-2.14.0-1-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.14.0-1_x86_64/fontconfig-2.14.0-1-chromeos-x86_64.tar.zst'
|
||||
binary_url ({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.14.0_armv7l/fontconfig-2.14.0-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.14.0_armv7l/fontconfig-2.14.0-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.14.0_i686/fontconfig-2.14.0-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.14.0_x86_64/fontconfig-2.14.0-chromeos-x86_64.tar.zst',
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: 'e84766cac7cbb4416041e49c9d668ee8b52a1689737f652be6b6eb5c17b652e3',
|
||||
armv7l: 'e84766cac7cbb4416041e49c9d668ee8b52a1689737f652be6b6eb5c17b652e3',
|
||||
i686: '4012be43038438529efd2ba423ce1a561c012d37fdc8c33bd03b6b702a5d86ad',
|
||||
x86_64: 'b2a370a40b5fd70213555c598663be865ed67f263fa9bcaa9c910f5394c87200'
|
||||
binary_sha256 ({
|
||||
aarch64: '99c5724f5a53e7ba476b4fb5dfbec97632608fc28afb39a26f0ea394b6b8ca86',
|
||||
armv7l: '99c5724f5a53e7ba476b4fb5dfbec97632608fc28afb39a26f0ea394b6b8ca86',
|
||||
i686: 'fce56b685e312d9754c3376c6ff8ed83f7cc99154da5f6a913d2d76c9b8736c2',
|
||||
x86_64: 'ea6e16d4505be56cbb9ed5a0b971e1df7f34c8ddd9e6c160cda62c8f30ca6af2',
|
||||
})
|
||||
|
||||
depends_on 'gperf'
|
||||
depends_on 'expat'
|
||||
depends_on 'jsonc'
|
||||
depends_on 'gperf'
|
||||
depends_on 'freetype'
|
||||
depends_on 'libpng'
|
||||
depends_on 'util_linux'
|
||||
depends_on 'graphite'
|
||||
|
||||
no_fhs
|
||||
|
||||
# Remove fontconfig before rebuilding this package.
|
||||
|
||||
def self.build
|
||||
# Fix build failure from font directories not being writable.
|
||||
@install_cache = <<~INSTALLCACHE_HEREDOC
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
sys.exit()
|
||||
INSTALLCACHE_HEREDOC
|
||||
File.write('install-cache', @install_cache, perm: 0o666)
|
||||
system "meson #{CREW_MESON_OPTIONS} \
|
||||
--localstatedir=#{CREW_PREFIX}/cache \
|
||||
--default-library=both \
|
||||
-Ddoc=disabled \
|
||||
-Dfreetype2:harfbuzz=disabled \
|
||||
-Dfreetype2:default_library=both \
|
||||
builddir"
|
||||
system 'meson configure builddir'
|
||||
system 'ninja -C builddir'
|
||||
system "./autogen.sh #{CREW_OPTIONS} --localstatedir=#{CREW_PREFIX}/cache"
|
||||
system 'make'
|
||||
end
|
||||
|
||||
def self.install
|
||||
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
|
||||
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/fonts/conf.d"
|
||||
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/cache/fontconfig"
|
||||
@fonts_conf = <<~FONTCONF_HEREDOC
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Load local customization file</description>
|
||||
<!-- Font directory list -->
|
||||
<dir>/usr/local/share/fonts</dir>
|
||||
<dir>~/.fonts</dir>
|
||||
<!-- Font cache directory list -->
|
||||
<cachedir>#{CREW_PREFIX}/cache/fontconfig</cachedir>
|
||||
<cachedir>~/.fontconfig</cachedir>
|
||||
</fontconfig>
|
||||
FONTCONF_HEREDOC
|
||||
File.write("#{CREW_DEST_PREFIX}/etc/fonts/conf.d/52-chromebrew.conf", @fonts_conf, perm: 0o666)
|
||||
|
||||
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/env.d/"
|
||||
@env = <<~EOF
|
||||
# Fontconfig configuration
|
||||
export FONTCONFIG_PATH=#{CREW_PREFIX}/etc/fonts
|
||||
EOF
|
||||
File.write("#{CREW_DEST_PREFIX}/etc/env.d/fontconfig", @env)
|
||||
end
|
||||
|
||||
def self.preinstall
|
||||
@device = JSON.parse(File.read("#{CREW_CONFIG_PATH}device.json"), symbolize_names: true)
|
||||
if @device[:installed_packages].any? { |elem| elem[:name] == 'freetype' }
|
||||
system "sed -i '/freetype2/d;/libfreetype/d' filelist"
|
||||
system "sed -i '/freetype2/d;/libfreetype/d' dlist"
|
||||
end
|
||||
end
|
||||
|
||||
def self.postinstall
|
||||
system "FONTCONFIG_PATH=#{CREW_PREFIX}/etc/fonts fc-cache -fv || true"
|
||||
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
|
||||
# The following are included the libpng package.
|
||||
FileUtils.rm Dir["#{CREW_DEST_LIB_PREFIX}/libpng*"]
|
||||
FileUtils.rm Dir["#{CREW_DEST_PREFIX}/include/libpng16/png*"]
|
||||
FileUtils.rm Dir["#{CREW_DEST_LIB_PREFIX}/pkgconfig/libpng*"]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,27 +3,27 @@ require 'package'
|
||||
class Harfbuzz < Package
|
||||
description 'HarfBuzz is an OpenType text shaping engine.'
|
||||
homepage 'https://www.freedesktop.org/wiki/Software/HarfBuzz/'
|
||||
@_ver = '4.2.0'
|
||||
@_ver = '4.4.1'
|
||||
version @_ver
|
||||
license 'Old-MIT, ISC and icu'
|
||||
compatibility 'all'
|
||||
source_url 'https://github.com/harfbuzz/harfbuzz.git'
|
||||
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/4.2.0_armv7l/harfbuzz-4.2.0-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/4.2.0_armv7l/harfbuzz-4.2.0-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/4.2.0_i686/harfbuzz-4.2.0-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/4.2.0_x86_64/harfbuzz-4.2.0-chromeos-x86_64.tar.zst'
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: '0e2f9f45e620ec75db77481292a90273ad79b5afeca3c07afb24568917cef9c9',
|
||||
armv7l: '0e2f9f45e620ec75db77481292a90273ad79b5afeca3c07afb24568917cef9c9',
|
||||
i686: '14c173bb67126e2b0a862dd61b1071a7e3520d3235b923c9c95dd33a0564ac2d',
|
||||
x86_64: 'ae8e1ceb094880512c493f8a8559ec1162393a06756b8363517d39343086c684'
|
||||
})
|
||||
git_hashtag @_ver
|
||||
|
||||
# provides libpng, freetype (sans harfbuzz), ragel, and a non-x11 cairo stub
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/4.4.1_armv7l/harfbuzz-4.4.1-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/4.4.1_armv7l/harfbuzz-4.4.1-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/4.4.1_i686/harfbuzz-4.4.1-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/4.4.1_x86_64/harfbuzz-4.4.1-chromeos-x86_64.tar.zst',
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: '556b8124f7d4181f15111dd841cce4fdb9ab39914fa0fbd0516fda5e7d929a94',
|
||||
armv7l: '556b8124f7d4181f15111dd841cce4fdb9ab39914fa0fbd0516fda5e7d929a94',
|
||||
i686: '8acbf2871d86e2b8a91e85f4ab9945b435b5a1e2ac854ebac770544d3f4adbb4',
|
||||
x86_64: '2a03c4db970323bd94a886d3350d6aacde20f415a1f553342400443075c06588',
|
||||
})
|
||||
|
||||
# provides freetype (sans harfbuzz), ragel, and a non-x11 cairo stub
|
||||
depends_on 'brotli'
|
||||
depends_on 'bz2'
|
||||
depends_on 'chafa'
|
||||
@@ -34,10 +34,12 @@ class Harfbuzz < Package
|
||||
depends_on 'graphite'
|
||||
depends_on 'icu4c'
|
||||
depends_on 'libffi'
|
||||
depends_on 'libpng'
|
||||
depends_on 'pixman' # Needed for cairo subproject
|
||||
depends_on 'pcre'
|
||||
depends_on 'py3_six' => :build
|
||||
depends_on 'zlibpkg'
|
||||
|
||||
no_env_options
|
||||
conflicts_ok
|
||||
|
||||
@@ -66,6 +68,10 @@ class Harfbuzz < Package
|
||||
|
||||
def self.install
|
||||
system "DESTDIR=#{CREW_DEST_DIR} ninja install -C builddir"
|
||||
# The following are included the libpng package.
|
||||
FileUtils.rm Dir["#{CREW_DEST_LIB_PREFIX}/libpng*"]
|
||||
FileUtils.rm Dir["#{CREW_DEST_PREFIX}/include/libpng16/png*"]
|
||||
FileUtils.rm Dir["#{CREW_DEST_LIB_PREFIX}/pkgconfig/libpng*"]
|
||||
end
|
||||
|
||||
def self.preinstall
|
||||
|
||||
@@ -1,13 +1,42 @@
|
||||
require 'package'
|
||||
|
||||
class Libpng < Package
|
||||
description 'libpng is the official PNG reference library. Now bundled with harfbuzz.'
|
||||
description 'libpng is the official PNG reference library.'
|
||||
homepage 'http://libpng.org/pub/png/libpng.html'
|
||||
version "1.0"
|
||||
version '1.6.37'
|
||||
license 'libpng2'
|
||||
compatibility 'all'
|
||||
source_url 'https://downloads.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.xz'
|
||||
source_sha256 '505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca'
|
||||
|
||||
depends_on 'harfbuzz'
|
||||
is_fake
|
||||
binary_url ({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libpng/1.6.37_armv7l/libpng-1.6.37-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libpng/1.6.37_armv7l/libpng-1.6.37-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libpng/1.6.37_i686/libpng-1.6.37-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libpng/1.6.37_x86_64/libpng-1.6.37-chromeos-x86_64.tar.zst',
|
||||
})
|
||||
binary_sha256 ({
|
||||
aarch64: 'a38812b2665ff8c46b6f7b1398bc9a77875f3db199e71c5181e5db195063fbbb',
|
||||
armv7l: 'a38812b2665ff8c46b6f7b1398bc9a77875f3db199e71c5181e5db195063fbbb',
|
||||
i686: '2cc3c4a73a0e33e8d35ea6c9da5443b24cb6f2250475d9cc63016d438968fa4b',
|
||||
x86_64: '30be8b66be155cdd233dcc7b638ba2cd173e347165f088c71b1d9dab928cca95',
|
||||
})
|
||||
|
||||
depends_on 'zlibpkg'
|
||||
|
||||
def self.patch
|
||||
# Fix /usr/bin/file: No such file or directory
|
||||
system 'filefix'
|
||||
end
|
||||
|
||||
def self.build
|
||||
system "./configure #{CREW_OPTIONS} \
|
||||
--disable-dependency-tracking \
|
||||
--disable-maintainer-mode"
|
||||
system 'make'
|
||||
end
|
||||
|
||||
def self.install
|
||||
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user