mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
* crew: Add a LD_PRELOAD library for hijacking linker/library path Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Add `glibc_{build,dev.lib}` to deprecated package list Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Bump version Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Minor changes Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Move static libraries to CREW_LIB_PREFIX Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Remove glibc_build from const.rb Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Make rubocop happy Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Fix arm build and add binaries. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * cleanup Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust x86_64 unit tests to use the Nocturne M90 container image and armv7l unit tests to use the fievel M91 container image since we are using the same glibc for everything now. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust build containers to use the oldest glibc based containers. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add i686 builds. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add x86_64 build. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Set LD_PRELOAD before running any command Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Use File.join Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Use File.join Signed-off-by: SupeChicken666 <me@supechicken666.dev> * adjust unit tests. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Fix arm CREW_GLIBC_INTERPRETER Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update Rhythmbox Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update Rhythmbox Signed-off-by: Satadru Pramanik <satadru@gmail.com> * lint Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Do not install crew_sudo in container. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Bump version Signed-off-by: SupeChicken666 <me@supechicken666.dev> --------- Signed-off-by: SupeChicken666 <me@supechicken666.dev> Signed-off-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: Satadru Pramanik <satadru@gmail.com>
125 lines
3.7 KiB
Ruby
125 lines
3.7 KiB
Ruby
require 'package'
|
|
require 'convenience_functions'
|
|
|
|
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.9.1'
|
|
license 'GPL-2'
|
|
compatibility 'x86_64'
|
|
source_url 'https://github.com/HandBrake/HandBrake.git'
|
|
git_hashtag version
|
|
binary_compression 'tar.zst'
|
|
|
|
binary_sha256({
|
|
x86_64: '4a1cbdaab5931a9e878f3103cb9df6750e44ca8f6272fc80aa924ddf15cd3d64'
|
|
})
|
|
|
|
depends_on 'at_spi2_core' # R
|
|
depends_on 'bzip2' # R
|
|
depends_on 'cairo' # R
|
|
depends_on 'expat' # R
|
|
depends_on 'ffmpeg' # R
|
|
depends_on 'fontconfig' # R
|
|
depends_on 'freetype' # R
|
|
depends_on 'fribidi' # R
|
|
depends_on 'gcc_lib' # R
|
|
depends_on 'gdk_pixbuf' # R
|
|
depends_on 'glibc' # R
|
|
depends_on 'glib' # R
|
|
depends_on 'graphene' # R
|
|
depends_on 'gstreamer' # R
|
|
depends_on 'gtk4' # R
|
|
depends_on 'harfbuzz' # R
|
|
depends_on 'icu4c' # R
|
|
depends_on 'intel_media_sdk'
|
|
depends_on 'jansson' # R
|
|
depends_on 'libass' # R
|
|
depends_on 'libdrm' # R
|
|
depends_on 'libdvdcss'
|
|
depends_on 'libgudev' # R
|
|
depends_on 'libjpeg_turbo' # 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' # R
|
|
depends_on 'nasm' => :build
|
|
depends_on 'numactl' # R
|
|
depends_on 'onevpl' # R
|
|
depends_on 'opus' # R
|
|
depends_on 'pango' # R
|
|
depends_on 'rust' => :build
|
|
depends_on 'speex' # R
|
|
depends_on 'util_linux' # R
|
|
depends_on 'vulkan_headers' => :build
|
|
depends_on 'vulkan_icd_loader' # R
|
|
depends_on 'wayland_protocols' => :build
|
|
depends_on 'xcb_util' => :build
|
|
depends_on 'xzutils' # R
|
|
depends_on 'zlib' # R
|
|
|
|
no_lto
|
|
|
|
def self.prebuild
|
|
ConvenienceFunctions.libtoolize('freetype')
|
|
ConvenienceFunctions.libtoolize('fribidi')
|
|
ConvenienceFunctions.libtoolize('glib')
|
|
ConvenienceFunctions.libtoolize('harfbuzz')
|
|
ConvenienceFunctions.libtoolize('libpng')
|
|
ConvenienceFunctions.libtoolize('libuuid', 'util_linux')
|
|
ConvenienceFunctions.libtoolize('libxml2')
|
|
end
|
|
|
|
def self.build
|
|
# Need to temporarily create a symlink for libfribidi.la or the build fails
|
|
# with a libtool error.
|
|
FileUtils.ln_sf "#{CREW_LIB_PREFIX}/libfribidi.la", "#{CREW_PREFIX}/lib/"
|
|
|
|
system "LDFLAGS+=' -L #{CREW_LIB_PREFIX}' ./configure #{CREW_CONFIGURE_OPTIONS} \
|
|
--enable-x265 \
|
|
--enable-numa \
|
|
--enable-fdk-aac \
|
|
--enable-qsv \
|
|
--no-harden \
|
|
--force"
|
|
FileUtils.mkdir_p 'build/contrib/lib/pkgconfig'
|
|
Dir.chdir('build/contrib/lib/pkgconfig') do
|
|
@handbrake_libs = %w[glib-2.0 fribidi harfbuzz freetype2]
|
|
@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 build || make -j1 -C build'
|
|
|
|
# Remove temporarily created symlink for libfribidi.la.
|
|
FileUtils.rm_f "#{CREW_PREFIX}/lib/libfribidi.la"
|
|
end
|
|
|
|
def self.install
|
|
Dir.chdir 'build' do
|
|
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
|
|
end
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/env.d"
|
|
FileUtils.ln_s "#{CREW_PREFIX}/bin/HandBrakeCLI", "#{CREW_DEST_PREFIX}/bin/hb"
|
|
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
|
|
ExitMessage.add <<~EOT1.lightblue
|
|
To get started, type 'ghb'.
|
|
Type 'hb' for the command line.
|
|
EOT1
|
|
end
|
|
end
|