mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
* Add binary_compression value to each package * Remove binary_url values and arrays * Handle packages with empty binary_sha256 arrays (either missing binaries or not compiled by us)
74 lines
2.5 KiB
Ruby
74 lines
2.5 KiB
Ruby
require 'package'
|
|
|
|
class Gdk_pixbuf < Package
|
|
description 'GdkPixbuf is a library for image loading and manipulation.'
|
|
homepage 'https://developer.gnome.org/gdk-pixbuf'
|
|
@_ver = '2.42.10'
|
|
version "#{@_ver}-1"
|
|
license 'LGPL-2.1+'
|
|
compatibility 'all'
|
|
source_url 'https://gitlab.gnome.org/GNOME/gdk-pixbuf.git'
|
|
git_hashtag @_ver
|
|
binary_compression 'tar.zst'
|
|
|
|
binary_sha256({
|
|
aarch64: '8d79852a5069b1c1e5a6834648c32f346ad407e894be2ecc75a66f69cf42160c',
|
|
armv7l: '8d79852a5069b1c1e5a6834648c32f346ad407e894be2ecc75a66f69cf42160c',
|
|
i686: '948434f4e7e58091e04a9a7918f08fe52db255bc1dc5dbacb8a59c58cf99cd93',
|
|
x86_64: '65eb125c9b4a15ba85b5f3d95f7e5a66d1024154ed34cf807d8fa651800e259d'
|
|
})
|
|
|
|
depends_on 'glib' # R
|
|
depends_on 'gobject_introspection' => :build
|
|
depends_on 'harfbuzz' # R
|
|
depends_on 'libjpeg' # R
|
|
depends_on 'libtiff' # R
|
|
depends_on 'libwebp' unless ARCH.eql?('i686')
|
|
depends_on 'pango' => :build
|
|
depends_on 'py3_docutils' => :build
|
|
depends_on 'py3_gi_docgen' => :build
|
|
depends_on 'py3_jinja2' => :build
|
|
depends_on 'py3_markdown' => :build
|
|
depends_on 'py3_pygments' => :build
|
|
depends_on 'py3_six' => :build
|
|
depends_on 'py3_toml' => :build
|
|
depends_on 'py3_typogrify' => :build
|
|
depends_on 'glibc' # R
|
|
depends_on 'libpng' # R
|
|
depends_on 'zlibpkg' # R
|
|
|
|
def self.build
|
|
system "mold -run meson setup #{CREW_MESON_OPTIONS} \
|
|
-Dinstalled_tests=false \
|
|
-Dbuiltin_loaders=all \
|
|
-Drelocatable=true \
|
|
-Ddebug=false \
|
|
-Dgtk_doc=false \
|
|
-Dman=true \
|
|
-Dtests=false \
|
|
builddir"
|
|
system 'mold -run samu -C builddir'
|
|
end
|
|
|
|
def self.install
|
|
system "DESTDIR=#{CREW_DEST_DIR} samu -C builddir install"
|
|
loader_dir = "#{CREW_DEST_LIB_PREFIX}/gdk-pixbuf-2.0/2.10.0/loaders"
|
|
FileUtils.mkdir_p loader_dir
|
|
system "touch #{loader_dir}.cache"
|
|
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/env.d/"
|
|
@gdk_pixbuf_env = <<~GDK_PIXBUF_ENV_EOF
|
|
# gdk-pixbuf configuration
|
|
export GDK_PIXBUF_MODULEDIR=#{CREW_LIB_PREFIX}/gdk-pixbuf-2.0/2.10.0/loaders
|
|
export GDK_PIXBUF_MODULE_FILE=#{CREW_LIB_PREFIX}/gdk-pixbuf-2.0/2.10.0/loaders.cache
|
|
GDK_PIXBUF_ENV_EOF
|
|
File.write("#{CREW_DEST_PREFIX}/etc/env.d/gdk_pixbuf", @gdk_pixbuf_env)
|
|
end
|
|
|
|
def self.postinstall
|
|
system "env GDK_PIXBUF_MODULEDIR=#{CREW_LIB_PREFIX}/gdk-pixbuf-2.0/2.10.0/loaders \
|
|
GDK_PIXBUF_MODULE_FILE=#{CREW_LIB_PREFIX}/gdk-pixbuf-2.0/2.10.0/loaders.cache \
|
|
LD_LIBRARY_PATH=#{CREW_LIB_PREFIX} gdk-pixbuf-query-loaders --update-cache"
|
|
end
|
|
end
|