mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Handbrake + deps (take 2) (#7696)
* new builds * lint updates * fix postinstall * remove trailing whitespace
This commit is contained in:
@@ -3,23 +3,23 @@ require 'package'
|
||||
class Freetype < Package
|
||||
description 'FreeType is a freely available software library to render fonts.'
|
||||
homepage 'https://www.freetype.org/'
|
||||
version '2.12.0' # Update freetype in harfbuzz when updating freetype
|
||||
version '2.12.1' # Update freetype in harfbuzz when updating freetype
|
||||
license 'FTL or GPL-2+'
|
||||
compatibility 'all'
|
||||
source_url 'https://gitlab.freedesktop.org/freetype/freetype.git'
|
||||
git_hashtag "VER-#{version.tr('.', '-')}"
|
||||
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.12.0_armv7l/freetype-2.12.0-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.12.0_armv7l/freetype-2.12.0-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.12.0_i686/freetype-2.12.0-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.12.0_x86_64/freetype-2.12.0-chromeos-x86_64.tar.zst'
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.12.1_armv7l/freetype-2.12.1-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.12.1_armv7l/freetype-2.12.1-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.12.1_i686/freetype-2.12.1-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.12.1_x86_64/freetype-2.12.1-chromeos-x86_64.tar.zst'
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: '7ff2e02d08ead4e7b5fb1a16d4e8f5551a4420a51a8b0dae8f12d33d308d469a',
|
||||
armv7l: '7ff2e02d08ead4e7b5fb1a16d4e8f5551a4420a51a8b0dae8f12d33d308d469a',
|
||||
i686: 'b2c34d291f9324105f712434274c4d360c3e98b8b567162d44b54ff74b22b3ba',
|
||||
x86_64: 'a49bad49bfc204855936a8124229f1e8b21cb11e719981dd925c76edfecea0de'
|
||||
aarch64: '3f5eed6ccf7971482eb10aaa9ceae4f215987ec0f970d041da370da192332c4d',
|
||||
armv7l: '3f5eed6ccf7971482eb10aaa9ceae4f215987ec0f970d041da370da192332c4d',
|
||||
i686: '9895147ac6bdac52535e3c68ccc8ba28a7c175d28650a5c99ebe9e348a01894e',
|
||||
x86_64: '2e7bceecce63383b9e13f03c84e56ddd8181a774814280d4246c38446dfc890b'
|
||||
})
|
||||
|
||||
depends_on 'brotli'
|
||||
@@ -32,6 +32,9 @@ class Freetype < Package
|
||||
depends_on 'librsvg'
|
||||
depends_on 'pcre'
|
||||
depends_on 'zlibpkg'
|
||||
depends_on 'glibc' # R
|
||||
depends_on 'libpng' # R
|
||||
|
||||
# to avoid resetting mold usage
|
||||
no_env_options
|
||||
# This overwrites the freetype in harfbuzz, which have
|
||||
@@ -40,7 +43,7 @@ class Freetype < Package
|
||||
|
||||
def self.build
|
||||
system 'pip3 install docwriter'
|
||||
system "meson #{CREW_MESON_OPTIONS} \
|
||||
system "meson setup #{CREW_MESON_OPTIONS} \
|
||||
-Dharfbuzz=enabled \
|
||||
builddir"
|
||||
system 'meson configure builddir'
|
||||
@@ -51,11 +54,69 @@ class Freetype < Package
|
||||
|
||||
def self.install
|
||||
system "DESTDIR=#{CREW_DEST_DIR} samu -C builddir install"
|
||||
# Create libtool file. Needed by handbrake build.
|
||||
return if File.file?("#{CREW_DEST_LIB_PREFIX}/#{@libname}.la")
|
||||
|
||||
@libname = name.to_s.start_with?('lib') ? name.downcase : "lib#{name.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) (hacked up 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
|
||||
|
||||
def self.postinstall
|
||||
# make sure to delete downloaded files
|
||||
system "find #{CREW_BREW_DIR}/* -name freetype*.tar -exec rm -rf {} \+"
|
||||
system "find #{CREW_BREW_DIR}/* -name freetype*.tar -exec rm -rf {} +"
|
||||
# This should become a function.
|
||||
# check for conflicts with other installed files
|
||||
@override_allowed = %w[fontconfig harfbuzz]
|
||||
@@ -74,7 +135,7 @@ class Freetype < Package
|
||||
conflicts.each do |conflict|
|
||||
conflict.each do |thisconflict|
|
||||
singleconflict = thisconflict.split(':', -1)
|
||||
system "sed -i '\\\?^#{singleconflict[1]}?d' #{CREW_META_PATH}/#{singleconflict[0]}.filelist" if @override_allowed.include?(singleconflict[0])
|
||||
system "sed -i '\\?^#{singleconflict[1]}?d' #{CREW_META_PATH}/#{singleconflict[0]}.filelist" if @override_allowed.include?(singleconflict[0])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,32 +3,96 @@ require 'package'
|
||||
class Fribidi < Package
|
||||
description 'GNU FriBidi is an implementation of the Unicode Bidirectional Algorithm (bidi).'
|
||||
homepage 'https://www.fribidi.org/'
|
||||
version '1.0.10'
|
||||
version '1.0.12'
|
||||
license 'LGPL-2.1+'
|
||||
compatibility 'all'
|
||||
source_url 'https://github.com/fribidi/fribidi/archive/v1.0.10.tar.gz'
|
||||
source_sha256 '3ebb19c4184ed6dc324d2e291d7465bc6108a20be019f053f33228e07e879c4f'
|
||||
source_url 'https://github.com/fribidi/fribidi/archive/v1.0.12.tar.gz'
|
||||
source_sha256 '2e9e859876571f03567ac91e5ed3b5308791f31cda083408c2b60fa1fe00a39d'
|
||||
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fribidi/1.0.10_armv7l/fribidi-1.0.10-chromeos-armv7l.tar.xz',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fribidi/1.0.10_armv7l/fribidi-1.0.10-chromeos-armv7l.tar.xz',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fribidi/1.0.10_i686/fribidi-1.0.10-chromeos-i686.tar.xz',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fribidi/1.0.10_x86_64/fribidi-1.0.10-chromeos-x86_64.tar.xz'
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fribidi/1.0.12_armv7l/fribidi-1.0.12-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fribidi/1.0.12_armv7l/fribidi-1.0.12-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fribidi/1.0.12_i686/fribidi-1.0.12-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fribidi/1.0.12_x86_64/fribidi-1.0.12-chromeos-x86_64.tar.zst'
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: '1200e97b55266d2640939faf5d63fb587819d699f248ff65a957263f346e9546',
|
||||
armv7l: '1200e97b55266d2640939faf5d63fb587819d699f248ff65a957263f346e9546',
|
||||
i686: '85d3bb92cfbaeacd1c59e68a1be89837f4c626ff8c7b12a754550030ea64b1f9',
|
||||
x86_64: 'c6785afffafa8144c59319e6629566b3d984f0af685c0ae5acc928bc4f3522fa'
|
||||
aarch64: '13c899b89cde0b3c30a83999333748373fa343dd49e1add72f19484a98d9a9c1',
|
||||
armv7l: '13c899b89cde0b3c30a83999333748373fa343dd49e1add72f19484a98d9a9c1',
|
||||
i686: '8d25201398c849b5993b27127e15ff3b5523c2354a543f8bb6b9423b426102be',
|
||||
x86_64: '4e4b3e936a23f145efaa878895cc8448196d6ead30d7bc0a61b3d8add4401a48'
|
||||
})
|
||||
|
||||
depends_on 'glibc' # R
|
||||
|
||||
def self.build
|
||||
system "meson #{CREW_MESON_FNO_LTO_OPTIONS} -Ddocs=false -Dtests=false build"
|
||||
system 'meson configure build'
|
||||
system 'ninja -v -C build'
|
||||
system "meson setup #{CREW_MESON_OPTIONS} \
|
||||
--default-library=both \
|
||||
-Ddocs=false \
|
||||
-Dtests=false \
|
||||
builddir"
|
||||
system 'meson configure builddir'
|
||||
system 'ninja -v -C builddir'
|
||||
end
|
||||
|
||||
def self.install
|
||||
system "DESTDIR=#{CREW_DEST_DIR} ninja -C build install"
|
||||
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
|
||||
# Create libtool file. Needed by handbrake build.
|
||||
return if File.file?("#{CREW_DEST_LIB_PREFIX}/#{@libname}.la")
|
||||
|
||||
@libname = name.to_s.start_with?('lib') ? name.downcase : "lib#{name.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) (hacked up 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
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'package'
|
||||
class Glib < Package
|
||||
description 'GLib provides the core application building blocks for libraries and applications written in C.'
|
||||
homepage 'https://developer.gnome.org/glib'
|
||||
@_ver = '2.74.1'
|
||||
@_ver = '2.75.0'
|
||||
@_ver_prelastdot = @_ver.rpartition('.')[0]
|
||||
version @_ver
|
||||
license 'LGPL-2.1'
|
||||
@@ -12,23 +12,22 @@ class Glib < Package
|
||||
git_hashtag @_ver
|
||||
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/glib/2.74.1_armv7l/glib-2.74.1-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/glib/2.74.1_armv7l/glib-2.74.1-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/glib/2.74.1_i686/glib-2.74.1-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/glib/2.74.1_x86_64/glib-2.74.1-chromeos-x86_64.tar.zst'
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/glib/2.75.0_armv7l/glib-2.75.0-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/glib/2.75.0_armv7l/glib-2.75.0-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/glib/2.75.0_i686/glib-2.75.0-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/glib/2.75.0_x86_64/glib-2.75.0-chromeos-x86_64.tar.zst'
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: '4793afd0f2cd2d168d52a112f18de001d7e308383937e18ec177b3751a7da3ab',
|
||||
armv7l: '4793afd0f2cd2d168d52a112f18de001d7e308383937e18ec177b3751a7da3ab',
|
||||
i686: 'c7a5a227d4744079333d6597297acab9fa4ce30cbb4341744b49a805a4655ae5',
|
||||
x86_64: '67515679d697eb29fdff6ffff1392569636adcb6d51c542f56ddf02ce02c62d5'
|
||||
aarch64: '5f78133dffb955b080d398fabc7297e27dbd2b83f367bb823492143676da1f3b',
|
||||
armv7l: '5f78133dffb955b080d398fabc7297e27dbd2b83f367bb823492143676da1f3b',
|
||||
i686: '6764c8f6870d8a889d84f3619da8d9c8b96d71f030097e0ac9f7ae0ad6db038a',
|
||||
x86_64: 'd52ba0f8ce8f94ca54f42a4f16fa01049e5c504dd5d19638f99e385d68ebc8ae'
|
||||
})
|
||||
|
||||
depends_on 'elfutils' # R
|
||||
depends_on 'libffi' # R
|
||||
depends_on 'pcre' # R
|
||||
depends_on 'py3_pygments' => :build
|
||||
depends_on 'py3_six' => :build
|
||||
depends_on 'shared_mime_info' # L
|
||||
depends_on 'util_linux' # R
|
||||
depends_on 'zlibpkg' # R
|
||||
@@ -39,7 +38,7 @@ class Glib < Package
|
||||
gnome
|
||||
|
||||
def self.build
|
||||
system "meson #{CREW_MESON_OPTIONS.gsub('strip=true', 'strip=false')} \
|
||||
system "meson setup #{CREW_MESON_OPTIONS.gsub('strip=true', 'strip=false')} \
|
||||
-Dselinux=disabled \
|
||||
-Dsysprof=disabled \
|
||||
-Dman=false \
|
||||
@@ -51,5 +50,63 @@ class Glib < Package
|
||||
|
||||
def self.install
|
||||
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
|
||||
# Create libtool file. Needed by handbrake build.
|
||||
return if File.file?("#{CREW_DEST_LIB_PREFIX}/#{@libname}.la")
|
||||
|
||||
@libname = name.to_s.start_with?('lib') ? name.downcase : "lib#{name.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) (hacked up 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
|
||||
|
||||
@@ -3,45 +3,92 @@ require 'package'
|
||||
class Handbrake < Package
|
||||
description 'HandBrake is a tool for converting video from nearly any format to a selection of modern, widely supported codecs.'
|
||||
homepage 'https://handbrake.fr/'
|
||||
version '1.3.3-1'
|
||||
version '1.6-d260dde'
|
||||
license 'GPL-2'
|
||||
compatibility 'x86_64'
|
||||
source_url 'https://github.com/HandBrake/HandBrake/releases/download/1.3.3/HandBrake-1.3.3-source.tar.bz2'
|
||||
source_sha256 '218a37d95f48b5e7cf285363d3ab16c314d97627a7a710cab3758902ae877f85'
|
||||
source_url 'https://github.com/HandBrake/HandBrake.git'
|
||||
git_hashtag 'd260ddeb569330500baddc8433491842fb954861'
|
||||
|
||||
binary_url({
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/handbrake/1.3.3-1_x86_64/handbrake-1.3.3-1-chromeos-x86_64.tar.xz'
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/handbrake/1.6-d260dde_x86_64/handbrake-1.6-d260dde-chromeos-x86_64.tar.zst'
|
||||
})
|
||||
binary_sha256({
|
||||
x86_64: '13e06c6458fe918ab1a46deeadcea9415c00be877a333b9bfbe5969c1ca1ba2a'
|
||||
x86_64: '95ffecf8fe9eba20ef4f85e1091330930ca9742ec467b64d047684b734b8998c'
|
||||
})
|
||||
|
||||
depends_on 'gtk3'
|
||||
depends_on 'atk' # R
|
||||
depends_on 'at_spi2_core' # R
|
||||
depends_on 'bz2' # R
|
||||
depends_on 'expat' # R
|
||||
depends_on 'ffmpeg'
|
||||
depends_on 'jansson'
|
||||
depends_on 'nasm' => :build
|
||||
depends_on 'numactl'
|
||||
depends_on 'wayland_protocols'
|
||||
depends_on 'freetype' # R
|
||||
depends_on 'fribidi' # R
|
||||
depends_on 'gcc' # R
|
||||
depends_on 'gdk_pixbuf' # R
|
||||
depends_on 'glibc' # R
|
||||
depends_on 'glib' # R
|
||||
depends_on 'gstreamer' # R
|
||||
depends_on 'gtk3' # R
|
||||
depends_on 'harfbuzz' # R
|
||||
depends_on 'icu4c' # R
|
||||
depends_on 'intel_media_sdk' if ARCH == 'x86_64'
|
||||
depends_on 'jansson' # R
|
||||
depends_on 'libass' # R
|
||||
depends_on 'libdvdcss'
|
||||
depends_on 'libgudev' # R
|
||||
depends_on 'libjpeg' # R
|
||||
depends_on 'libmp3lame' # R
|
||||
depends_on 'libogg' # R
|
||||
depends_on 'libpng' # R
|
||||
depends_on 'libtheora' # R
|
||||
depends_on 'libva' # R
|
||||
depends_on 'libvorbis' # R
|
||||
depends_on 'libvpx' # R
|
||||
depends_on 'libx264' # R
|
||||
depends_on 'libxml2' # R
|
||||
depends_on 'mesa'
|
||||
depends_on 'xcb_util'
|
||||
depends_on 'freetype'
|
||||
depends_on 'nasm' => :build
|
||||
depends_on 'numactl' # R
|
||||
depends_on 'onevpl' if ARCH == 'x86_64' # R
|
||||
depends_on 'opus' # R
|
||||
depends_on 'pango' # R
|
||||
depends_on 'speex' # R
|
||||
depends_on 'util_linux' # R
|
||||
depends_on 'wayland_protocols' => :build
|
||||
depends_on 'xcb_util' => :build
|
||||
depends_on 'xzutils' # R
|
||||
depends_on 'zlibpkg' # R
|
||||
|
||||
def self.patch
|
||||
system "for f in \$(find -name '*.*'); do sed -i 's,/usr/include/libxml2,#{CREW_PREFIX}/include/libxml2,g' \$f; done"
|
||||
end
|
||||
no_env_options
|
||||
|
||||
def self.build
|
||||
system "env CFLAGS='-pipe -flto=auto' CXXFLAGS='-pipe -flto=auto' \
|
||||
./configure --prefix=#{CREW_PREFIX} --enable-x265 --enable-numa --enable-fdk-aac --harden"
|
||||
Dir.chdir 'build' do
|
||||
system 'make'
|
||||
system "#{CREW_ENV_FNO_LTO_OPTIONS} ./configure #{CREW_OPTIONS} \
|
||||
--enable-x265 \
|
||||
--enable-numa \
|
||||
--enable-fdk-aac \
|
||||
--enable-qsv \
|
||||
--no-harden \
|
||||
--force"
|
||||
FileUtils.mkdir_p 'x86_64-cros-linux-gnu/contrib/lib/pkgconfig'
|
||||
Dir.chdir('x86_64-cros-linux-gnu/contrib/lib/pkgconfig') do
|
||||
@handbrake_libs = %w[glib-2.0 fribidi harfbuzz freetype]
|
||||
@handbrake_libs.each do |f|
|
||||
next if File.file?("#{f}.pc")
|
||||
|
||||
FileUtils.ln_sf "#{CREW_LIB_PREFIX}/pkgconfig/#{f}.pc", "#{f}.pc"
|
||||
end
|
||||
end
|
||||
system 'make -C x86_64-cros-linux-gnu || make -j1 -C x86_64-cros-linux-gnu'
|
||||
end
|
||||
|
||||
def self.install
|
||||
Dir.chdir 'build' do
|
||||
Dir.chdir 'x86_64-cros-linux-gnu' do
|
||||
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
|
||||
end
|
||||
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/env.d"
|
||||
File.write "#{CREW_DEST_PREFIX}/etc/env.d/10-handbrake", <<~'HANDBRAKE_ENVD_EOF'
|
||||
alias ghb="GDK_BACKEND=wayland ghb"
|
||||
HANDBRAKE_ENVD_EOF
|
||||
end
|
||||
|
||||
def self.postinstall
|
||||
@@ -50,8 +97,10 @@ class Handbrake < Package
|
||||
puts
|
||||
puts "Type 'HandBrakeCLI' for the command line.".lightblue
|
||||
puts
|
||||
puts 'To complete the installation, execute the following:'.lightblue
|
||||
puts "echo 'alias ghb=\"WAYLAND_DISPLAY=wayland-0 DISPLAY=\'\' GDK_BACKEND=wayland ghb\"' >> ~/.bashrc".lightblue
|
||||
puts 'Please run the following to finish the install:'.orange
|
||||
puts "source #{CREW_PREFIX}/etc/env.d/10-handbrake".lightblue
|
||||
puts
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'package'
|
||||
class Harfbuzz < Package
|
||||
description 'HarfBuzz is an OpenType text shaping engine.'
|
||||
homepage 'https://www.freedesktop.org/wiki/Software/HarfBuzz/'
|
||||
@_ver = '5.2.0'
|
||||
@_ver = '5.3.1'
|
||||
version @_ver
|
||||
license 'Old-MIT, ISC and icu'
|
||||
compatibility 'all'
|
||||
@@ -11,16 +11,16 @@ class Harfbuzz < Package
|
||||
git_hashtag @_ver
|
||||
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/5.2.0_armv7l/harfbuzz-5.2.0-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/5.2.0_armv7l/harfbuzz-5.2.0-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/5.2.0_i686/harfbuzz-5.2.0-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/5.2.0_x86_64/harfbuzz-5.2.0-chromeos-x86_64.tar.zst'
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/5.3.1_armv7l/harfbuzz-5.3.1-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/5.3.1_armv7l/harfbuzz-5.3.1-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/5.3.1_i686/harfbuzz-5.3.1-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/5.3.1_x86_64/harfbuzz-5.3.1-chromeos-x86_64.tar.zst'
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: 'c9e3fb9162a5976f57f42ff1c7985697192597d5080064d3b1da7133eaa5b1b1',
|
||||
armv7l: 'c9e3fb9162a5976f57f42ff1c7985697192597d5080064d3b1da7133eaa5b1b1',
|
||||
i686: 'ac49731b4a83fd3683b9961a5811cc100e1cf109773f8966dd398adc5f2e3f9c',
|
||||
x86_64: '1e8922ae353da616f936e495779e7777acafa2166d010b4f3b1fc2e8ebb4ea5c'
|
||||
aarch64: '43473d97214e99b955d0455db5dd21ac8fdb1bb417f6ce6d57b364190b84277c',
|
||||
armv7l: '43473d97214e99b955d0455db5dd21ac8fdb1bb417f6ce6d57b364190b84277c',
|
||||
i686: '15f91dd2f6d29fa908f90331d746c1014b3b62d1e4f20cf9b4cb906092bf5f8f',
|
||||
x86_64: 'a7260181dd0fcda38651c87607f3c42f3aca199da2fec7939cc4ebf200d446c6'
|
||||
})
|
||||
|
||||
# provides freetype (sans harfbuzz), ragel, and a non-x11 cairo stub
|
||||
@@ -30,14 +30,13 @@ class Harfbuzz < Package
|
||||
depends_on 'gcc'
|
||||
depends_on 'glib'
|
||||
depends_on 'gobject_introspection' => :build
|
||||
depends_on 'fontconfig'
|
||||
# depends_on 'fontconfig' # This pulls in freetype.
|
||||
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'
|
||||
depends_on 'expat' # R
|
||||
# depends_on 'freetype' # R harfbuzz provides this.
|
||||
@@ -53,12 +52,12 @@ class Harfbuzz < Package
|
||||
|
||||
def self.patch
|
||||
# Update to new versions of freetype as they come out.
|
||||
system "sed -i 's,revision=VER-2-11-0,revision=VER-2-12-0,g' subprojects/freetype2.wrap"
|
||||
system "sed -i 's,revision=VER-2-11-0,revision=VER-2-12-1,g' subprojects/freetype2.wrap"
|
||||
system "sed -i 's,revision=c90faeb7492b1b778d18a796afe5c2e4b32a6356,revision=521a3a7bdb9299d511dcb1e4f243670141e53847,g' subprojects/cairo.wrap"
|
||||
end
|
||||
|
||||
def self.build
|
||||
system "meson #{CREW_MESON_OPTIONS} \
|
||||
system "meson setup #{CREW_MESON_OPTIONS} \
|
||||
--wrap-mode=default \
|
||||
--default-library=both \
|
||||
-Dbenchmark=disabled \
|
||||
@@ -80,6 +79,64 @@ class Harfbuzz < 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*"]
|
||||
# Create libtool file. Needed by handbrake build
|
||||
return if File.file?("#{CREW_DEST_LIB_PREFIX}/#{@libname}.la")
|
||||
|
||||
@libname = name.to_s.start_with?('lib') ? name.downcase : "lib#{name.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) (hacked up 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[0]}
|
||||
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
|
||||
|
||||
def self.preinstall
|
||||
@@ -109,7 +166,7 @@ class Harfbuzz < Package
|
||||
conflicts.each do |conflict|
|
||||
conflict.each do |thisconflict|
|
||||
singleconflict = thisconflict.split(':', -1)
|
||||
system "sed -i '\\\?^#{singleconflict[1]}?d' #{CREW_META_PATH}/#{singleconflict[0]}.filelist" if @override_allowed.include?(singleconflict[0])
|
||||
system "sed -i '\\?^#{singleconflict[1]}?d' #{CREW_META_PATH}/#{singleconflict[0]}.filelist" if @override_allowed.include?(singleconflict[0])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user