Merge branch 'master' into pythonize1

This commit is contained in:
Cassandra Watergate
2021-07-28 08:04:19 -07:00
committed by GitHub
11 changed files with 225 additions and 136 deletions

View File

@@ -67,13 +67,6 @@ CREW_LICENSE = <<~LICENSESTRING
along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html.
LICENSESTRING
# Set XZ_OPT environment variable for build command.
# If CREW_XZ_OPT is defined, use it by default. Use `-7e`, otherwise.
ENV["XZ_OPT"] = ENV['CREW_XZ_OPT'] || "-7e -T #{CREW_NPROC}"
# If CURL environment variable exists use it in lieu of curl.
CURL = ENV['CURL'] || 'curl'
# All available crew commands.
@cmds = ["build", "const", "deps", "download", "files", "help", "install", "list", "postinstall", "reinstall", "remove", "search", "update", "upgrade", "whatprovides"]
@@ -503,19 +496,14 @@ end
def update
abort "'crew update' is used to update crew itself. Use 'crew upgrade <package1> [<package2> ...]' to update specific packages.".orange if @pkgName
@crew_testing_repo = ENV['CREW_TESTING_REPO']
@crew_testing_branch = ENV['CREW_TESTING_BRANCH']
@crew_testing = ENV['CREW_TESTING']
@crew_testing = 0 if @crew_testing_repo.nil? || @crew_testing_repo.empty?
@crew_testing = 0 if @crew_testing_branch.nil? || @crew_testing_branch.empty?
#update package lists
Dir.chdir CREW_LIB_PATH do
if @crew_testing == '1'
if CREW_TESTING == '1'
puts "Updating crew from testing repository..."
system "git remote add testing #{@crew_testing_repo} 2>/dev/null || \
git remote set-url testing #{@crew_testing_repo}"
system "git fetch testing #{@crew_testing_branch}"
system "git reset --hard testing/#{@crew_testing_branch}"
system "git remote add testing #{CREW_TESTING_REPO} 2>/dev/null || \
git remote set-url testing #{CREW_TESTING_REPO}"
system "git fetch testing #{CREW_TESTING_BRANCH}"
system "git reset --hard testing/#{CREW_TESTING_BRANCH}"
else
system 'git fetch origin master'
system 'git reset --hard origin/master'
@@ -680,8 +668,9 @@ def download
abort 'Checksum mismatch. 😔 Try again.'.lightred unless
Digest::SHA256.hexdigest( File.read(filename) ) == sha256sum || sha256sum =~ /^SKIP$/i
puts "#{@pkg.name.capitalize} archive downloaded.".lightgreen
# Stow file in cache if requested (and if file is not from cache).
if CREW_CACHE_ENABLED and cachefile.to_s.empty?
# Stow file in cache if requested, if file is not from cache,
# and cache is writable.
if CREW_CACHE_ENABLED and cachefile.to_s.empty? and File.writable?(CREW_CACHE_DIR)
begin
# Hard link to cache if possible.
FileUtils.ln filename, CREW_CACHE_DIR, verbose: @fileutils_verbose
@@ -691,7 +680,6 @@ def download
FileUtils.cp filename, CREW_CACHE_DIR, verbose: @fileutils_verbose
puts "Archive copied to cache".green if @opt_verbose
end
puts 'Archive copied to cache.'.lightgreen
end
return {source: source, filename: filename}
@@ -747,8 +735,8 @@ def download
system 'git submodule update --init --recursive'
puts 'Repository downloaded.'.lightgreen
end
# Stow file in cache if requested
if CREW_CACHE_ENABLED
# Stow file in cache if requested and cache is writable.
if CREW_CACHE_ENABLED and File.writable?(CREW_CACHE_DIR)
puts 'Caching downloaded git repo...'
Dir.chdir "#{@extract_dir}" do
system "tar c#{@verbose}Jf #{cachefile} \
@@ -874,7 +862,7 @@ end
def compress_doc(dir)
# check whether crew should compress
return if CREW_NOT_COMPRESS || ENV['CREW_NOT_COMPRESS'] || !File.exist?("#{CREW_PREFIX}/bin/compressdoc")
return if CREW_NOT_COMPRESS || !File.exist?("#{CREW_PREFIX}/bin/compressdoc")
if Dir.exist? dir
system "find #{dir} -type f ! -perm -200 | xargs -r chmod u+w"
@@ -937,11 +925,11 @@ def prepare_package(destdir)
puts f.lightred
pp = p
end
abort unless ENV['CREW_CONFLICTS_ONLY_ADVISORY'] == '1'
abort unless CREW_CONFLICTS_ONLY_ADVISORY == '1'
end
# abort if not FHS compliant
abort "Exiting due to above errors.".lightred unless ENV['CREW_FHS_NONCOMPLIANCE_ONLY_ADVISORY'] == '1' or @_abort_fhs == 0
abort "Exiting due to above errors.".lightred unless CREW_FHS_NONCOMPLIANCE_ONLY_ADVISORY == '1' or @_abort_fhs == 0
# create directory list
@@ -961,7 +949,7 @@ end
def strip_find_files(find_cmd, strip_option = "")
# check whether crew should strip
return if CREW_NOT_STRIP || ENV['CREW_NOT_STRIP'] || !File.exist?("#{CREW_PREFIX}/bin/llvm-strip")
return if CREW_NOT_STRIP || !File.exist?("#{CREW_PREFIX}/bin/llvm-strip")
# run find_cmd and strip only ar or ELF files
system "#{find_cmd} | xargs -r chmod u+w"
@@ -969,7 +957,7 @@ def strip_find_files(find_cmd, strip_option = "")
end
def strip_dir(dir)
unless CREW_NOT_STRIP || ENV['CREW_NOT_STRIP']
unless CREW_NOT_STRIP
Dir.chdir dir do
# Strip libraries with -S
puts "Stripping libraries..."
@@ -985,7 +973,7 @@ def strip_dir(dir)
end
def shrink_dir(dir)
unless ENV['CREW_SHRINK_ARCHIVE'] == '0'
unless CREW_SHRINK_ARCHIVE == '0'
Dir.chdir dir do
if File.exist?("#{CREW_PREFIX}/bin/rdfind")
puts "Using rdfind to find duplicate or hard linked files."
@@ -1284,7 +1272,7 @@ def build_package(pwd)
end
def archive_package(pwd)
unless ENV['CREW_USE_PIXZ'] == '0' || !File.exist?("#{CREW_PREFIX}/bin/pixz")
unless CREW_USE_PIXZ == '0' || !File.exist?("#{CREW_PREFIX}/bin/pixz")
puts "Using pixz to compress archive."
pkg_name = "#{@pkg.name}-#{@pkg.version}-chromeos-#{@device[:architecture]}.tpxz"
Dir.chdir CREW_DEST_DIR do
@@ -1417,7 +1405,7 @@ def install_command(args)
@pkgName = name
search @pkgName
print_current_package true
@pkg.build_from_source = true if @opt_src or @opt_recursive or ENV['CREW_BUILD_FROM_SOURCE'] == '1'
@pkg.build_from_source = true if @opt_src or @opt_recursive or CREW_BUILD_FROM_SOURCE == '1'
resolve_dependencies_and_install
end
end
@@ -1451,7 +1439,7 @@ def reinstall_command(args)
@pkgName = name
search @pkgName
print_current_package
@pkg.build_from_source = true if @opt_src or @opt_recursive or ENV['CREW_BUILD_FROM_SOURCE'] == '1'
@pkg.build_from_source = true if @opt_src or @opt_recursive or CREW_BUILD_FROM_SOURCE == '1'
if @pkgName
@pkg.in_upgrade = true
resolve_dependencies_and_install
@@ -1487,7 +1475,7 @@ def upgrade_command(args)
@pkgName = name
search @pkgName
print_current_package
@pkg.build_from_source = true if @opt_src or ENV['CREW_BUILD_FROM_SOURCE'] == '1'
@pkg.build_from_source = true if @opt_src or CREW_BUILD_FROM_SOURCE == '1'
upgrade
end.empty? and begin
upgrade

View File

@@ -16,14 +16,16 @@ CREW_DEST_DIR="${CREW_BREW_DIR}/dest"
CREW_PACKAGES_PATH="${CREW_LIB_PATH}/packages"
CURL="${CURL:-curl}"
CREW_CACHE_DIR="${CREW_CACHE_DIR:-$CREW_PREFIX/tmp/packages}"
# For container usage, where we want to specify i686 arch
# on a x86_64 host by setting ARCH=i686.
: "${ARCH:=$(uname -m)}"
# For container usage, when we are emulating armv7l via linux32
# uname -m reports armv8l.
ARCH="${ARCH/armv8l/armv7l}"
# BOOTSTRAP_PACKAGES cannot depend on crew_profile_base for their core operations (completion scripts are fine)
BOOTSTRAP_PACKAGES="pixz jq ca_certificates git gmp ncurses libyaml ruby"
ARCH="$(uname -m)"
# For container usage, where we are emulating armv7l via linux32
ARCH="${ARCH/armv8l/armv7l}"
RED='\e[1;91m'; # Use Light Red for errors.
YELLOW='\e[1;33m'; # Use Yellow for informational messages.
GREEN='\e[1;32m'; # Use Green for success messages.
@@ -214,11 +216,14 @@ rm -rf "${CREW_LIB_PATH}"
# Do a minimal clone, which also sets origin to the master/main branch
# by default. For more on why this setup might be useful see:
# https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/
git clone --depth=1 --filter=blob:none --no-checkout "https://github.com/${OWNER}/${REPO}.git" "${CREW_LIB_PATH}"
# If using alternate branch don't use depth=1
[[ "$BRANCH" == "master" ]] && GIT_DEPTH="--depth=1" || GIT_DEPTH=
git clone $GIT_DEPTH --filter=blob:none --no-checkout "https://github.com/${OWNER}/${REPO}.git" "${CREW_LIB_PATH}"
cd "${CREW_LIB_PATH}"
# Checkout, overwriting local files.
[[ "$BRANCH" != "master" ]] && git fetch --all
git checkout "${BRANCH}"
# Set sparse-checkout folders and include install.sh for use in reinstalls
@@ -228,6 +233,9 @@ git reset --hard origin/"${BRANCH}"
echo -e "${RESET}"
echo -e "${YELLOW}Updating crew package information...${RESET}\n"
# Without setting LD_LIBRARY_PATH, the mandb postinstall fails
# from not being able to find the gdbm library.
export LD_LIBRARY_PATH=$(crew const CREW_LIB_PREFIX | sed -e 's:CREW_LIB_PREFIX=::g')
# Since we just ran git, just update package compatibility information.
crew update compatible

View File

@@ -1,22 +1,28 @@
# Defines common constants used in different parts of crew
CREW_VERSION = '1.12.0'
CREW_VERSION = '1.15.0'
ARCH_ACTUAL = `uname -m`.strip
# This helps with virtualized builds on aarch64 machines
# which report armv8l when linux32 is run.
ARCH = if ARCH_ACTUAL == 'armv8l' then 'armv7l' else ARCH_ACTUAL end
ARCH_LIB = if ARCH == 'x86_64' then 'lib64' else 'lib' end
# Allow for edge case of i686 install on a x86_64 host before linux32 is
# downloaded, e.g. in a docker container.
ARCH_LIB = if ARCH == 'x86_64' and Dir.exist?('/lib64') then 'lib64' else 'lib' end
# Glibc version can be found from the output of libc.so.6
@libcvertokens= %x[/#{ARCH_LIB}/libc.so.6].lines.first.chomp.split(/[\s]/)
LIBC_VERSION = @libcvertokens[@libcvertokens.find_index("version") + 1].sub!(/[[:punct:]]?$/,'')
CREW_PREFIX = '/usr/local'
if ENV['CREW_PREFIX'] and ENV['CREW_PREFIX'] != CREW_PREFIX
CREW_PREFIX = ENV['CREW_PREFIX']
if ENV['CREW_PREFIX'] and ENV['CREW_PREFIX'] != '' and ENV['CREW_PREFIX'] != '/usr/local'
CREW_BUILD_FROM_SOURCE = 1
CREW_PREFIX = ENV['CREW_PREFIX']
HOME = CREW_PREFIX + ENV['HOME']
else
CREW_BUILD_FROM_SOURCE = ENV['CREW_BUILD_FROM_SOURCE']
CREW_PREFIX = '/usr/local'
HOME = ENV['HOME']
end
CREW_LIB_PREFIX = CREW_PREFIX + '/' + ARCH_LIB
@@ -31,11 +37,7 @@ CREW_DEST_PREFIX = CREW_DEST_DIR + CREW_PREFIX
CREW_DEST_LIB_PREFIX = CREW_DEST_DIR + CREW_LIB_PREFIX
CREW_DEST_MAN_PREFIX = CREW_DEST_DIR + CREW_MAN_PREFIX
if ENV['CREW_PREFIX'].to_s.empty?
HOME = ENV['HOME']
else
HOME = CREW_PREFIX + ENV['HOME']
end
CREW_DEST_HOME = CREW_DEST_DIR + HOME
# File.join ensures a trailing slash if one does not exist.
if ENV['CREW_CACHE_DIR'].to_s.empty?
@@ -48,25 +50,44 @@ FileUtils.mkdir_p CREW_CACHE_DIR unless Dir.exist? CREW_CACHE_DIR
CREW_CACHE_ENABLED = ENV['CREW_CACHE_ENABLED']
CREW_DEST_HOME = CREW_DEST_DIR + HOME
CREW_CONFLICTS_ONLY_ADVISORY = ENV['CREW_CONFLICTS_ONLY_ADVISORY']
CREW_FHS_NONCOMPLIANCE_ONLY_ADVISORY = ENV['CREW_FHS_NONCOMPLIANCE_ONLY_ADVISORY']
# Set CREW_NPROC from environment variable or `nproc`
if ENV["CREW_NPROC"].to_s.empty?
if ENV['CREW_NPROC'].to_s.empty?
CREW_NPROC = `nproc`.strip
else
CREW_NPROC = ENV["CREW_NPROC"]
CREW_NPROC = ENV['CREW_NPROC']
end
# Set CREW_NOT_COMPRESS from environment variable
CREW_NOT_COMPRESS = ENV["CREW_NOT_COMPRESS"]
CREW_NOT_COMPRESS = ENV['CREW_NOT_COMPRESS']
# Set CREW_NOT_STRIP from environment variable
CREW_NOT_STRIP = ENV["CREW_NOT_STRIP"]
CREW_NOT_STRIP = ENV['CREW_NOT_STRIP']
CREW_SHRINK_ARCHIVE = ENV['CREW_SHRINK_ARCHIVE']
# Set testing constants from environment variables
crew_testing_repo = ENV['CREW_TESTING_REPO']
crew_testing_branch = ENV['CREW_TESTING_BRANCH']
crew_testing = ENV['CREW_TESTING']
crew_testing = '0' if crew_testing_repo.nil? || crew_testing_repo.empty?
crew_testing = '0' if crew_testing_branch.nil? || crew_testing_branch.empty?
CREW_TESTING = crew_testing
CREW_TESTING_BRANCH = crew_testing_branch
CREW_TESTING_REPO = crew_testing_repo
CREW_USE_PIXZ = ENV['CREW_USE_PIXZ']
USER = `whoami`.chomp
CHROMEOS_RELEASE = `grep CHROMEOS_RELEASE_CHROME_MILESTONE= /etc/lsb-release | cut -d'=' -f2`.chomp
# If CURL environment variable exists use it in lieu of curl.
CURL = ENV['CURL'] || 'curl'
case ARCH
when 'aarch64', 'armv7l'
CREW_TGT = 'armv7l-cros-linux-gnueabihf'

View File

@@ -3,23 +3,24 @@ require 'package'
class Boost < Package
description 'Boost provides free peer-reviewed portable C++ source libraries.'
homepage 'https://www.boost.org/'
version '1.74.0'
@_ver = '1.76.0'
version @_ver
license 'Boost-1.0'
compatibility 'all'
source_url 'https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2'
source_sha256 '83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1'
source_url "https://boostorg.jfrog.io/artifactory/main/release/#{@_ver}/source/boost_#{@_ver.gsub('.','_')}.tar.bz2"
source_sha256 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41'
binary_url ({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/boost/1.74.0_armv7l/boost-1.74.0-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/boost/1.74.0_armv7l/boost-1.74.0-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/boost/1.74.0_i686/boost-1.74.0-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/boost/1.74.0_x86_64/boost-1.74.0-chromeos-x86_64.tar.xz',
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/boost/1.76.0_armv7l/boost-1.76.0-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/boost/1.76.0_armv7l/boost-1.76.0-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/boost/1.76.0_i686/boost-1.76.0-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/boost/1.76.0_x86_64/boost-1.76.0-chromeos-x86_64.tpxz',
})
binary_sha256 ({
aarch64: '3ae8405849a0a624682f230a8f4d8135c4eca3657246bf5dd8fdbb79461bce1d',
armv7l: '3ae8405849a0a624682f230a8f4d8135c4eca3657246bf5dd8fdbb79461bce1d',
i686: 'de792b84f1a2629a58a1bd9e4169271e1d856ba3cf7247ea67283dd2a14c7652',
x86_64: 'e1e1faca0d6458b83e2338dd9786f16846607a2a30d41ebc6a2fc3545bc972ff',
aarch64: '3faf1c0322845086c77e4ef173beee27ec5fa6c780727c3e6eef85584ee8bc40',
armv7l: '3faf1c0322845086c77e4ef173beee27ec5fa6c780727c3e6eef85584ee8bc40',
i686: 'f5f924e7ccaead8a1db56fff2963233d36e5466dc34fcbf7d9527ee00c117aeb',
x86_64: 'b64b49911d39f51b9460e3ae4ba76f6239b5b2aec473a8376780330ea68b2277',
})
def self.build
@@ -27,6 +28,10 @@ class Boost < Package
end
def self.install
system "./b2 -a --prefix=#{CREW_DEST_PREFIX} --libdir=#{CREW_DEST_LIB_PREFIX} install"
system "#{CREW_ENV_OPTIONS} ./b2 \
--build-dir=\${PWD}/builddir \
-a --prefix=#{CREW_DEST_PREFIX} \
--libdir=#{CREW_DEST_LIB_PREFIX} \
install"
end
end

View File

@@ -124,6 +124,7 @@ class Ca_certificates < Package
# This isn't run from install.sh, but that's ok. This is for cleanup if updated after an install.
def self.postinstall
system "update-ca-certificates --fresh --certsconf #{CREW_PREFIX}/etc/ca-certificates.conf"
# Do not call system update-ca-certificates as that tries to update certs in /etc .
system "#{CREW_PREFIX}/bin/update-ca-certificates --fresh --certsconf #{CREW_PREFIX}/etc/ca-certificates.conf"
end
end

45
packages/chafa.rb Normal file
View File

@@ -0,0 +1,45 @@
# Adapted from Arch Linux chafa PKGBUILD at:
# https://github.com/archlinux/svntogit-community/raw/packages/chafa/trunk/PKGBUILD
require 'package'
class Chafa < Package
description 'Image-to-text converter supporting a wide range of symbols and palettes, transparency, animations, etc.'
homepage 'https://hpjansson.org/chafa/'
version '1.6.1'
license 'LGPL'
compatibility 'x86_64 aarch64 armv7l'
source_url 'https://github.com/hpjansson/chafa/releases/download/1.6.1/chafa-1.6.1.tar.xz'
source_sha256 '76c98930e99b3e5fadb986148b99d65636e9e9619124e568ff13d364ede89fa5'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/chafa/1.6.1_armv7l/chafa-1.6.1-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/chafa/1.6.1_armv7l/chafa-1.6.1-chromeos-armv7l.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/chafa/1.6.1_x86_64/chafa-1.6.1-chromeos-x86_64.tpxz'
})
binary_sha256({
aarch64: '3b1070f6bb7c4e3756fec41b9241b7823d34c09cbedf59fb7a700921e06cb561',
armv7l: '3b1070f6bb7c4e3756fec41b9241b7823d34c09cbedf59fb7a700921e06cb561',
x86_64: '4b3fd102523ce0458a897bcd0ce1bbe8c60e30eb830e4aa98cedb782576795e6'
})
depends_on 'imagemagick7' => :build
depends_on 'freetype_sub' => :build
depends_on 'libxslt'
depends_on 'gtk_doc' => ':build'
def self.patch
system 'filefix'
end
def self.build
system "#{CREW_ENV_OPTIONS} \
./configure \
#{CREW_OPTIONS}"
system 'make'
end
def self.install
system "make DESTDIR=#{CREW_DEST_DIR} install"
end
end

View File

@@ -3,17 +3,17 @@ require 'package'
class Codium < Package
description 'VSCodium is Open Source Software Binaries of VSCode with a community-driven default configuration.'
homepage 'https://vscodium.com/'
version '1.58.0'
version '1.58.2'
license 'MIT'
compatibility 'aarch64,armv7l,x86_64'
case ARCH
when 'aarch64', 'armv7l'
source_url "https://github.com/VSCodium/vscodium/releases/download/#{version}/VSCodium-linux-armhf-#{version}.tar.gz"
source_sha256 'f5f2b68a2e764541f7c74676bf21c37571b8578b1a6f33002e63dddcd050edb1'
source_sha256 '0ecd273f3b9f55680060336972aa7058b2dc75dfcf4849e50e2e0033755d42c6'
@arch = 'arm'
when 'x86_64'
source_url "https://github.com/VSCodium/vscodium/releases/download/#{version}/VSCodium-linux-x64-#{version}.tar.gz"
source_sha256 '74d536db88b777be7e3ef5d6c8001d4bc200109e1d9e454e60997c356783ef8a'
source_sha256 '48462b95b74d2dc279b4ed9dd593fdd80dca4656574069cccb78d8075f610486'
@arch = 'x64'
end
@@ -46,6 +46,7 @@ class Codium < Package
def self.install
ENV['CREW_SHRINK_ARCHIVE'] = '0'
ENV['CREW_FHS_NONCOMPLIANCE_ONLY_ADVISORY'] = '1'
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/VSCodium-linux-#{@arch}"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
FileUtils.cp_r '.', "#{CREW_DEST_PREFIX}/VSCodium-linux-#{@arch}"

View File

@@ -3,24 +3,24 @@ 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.13.93'
version "#{@_ver}-2"
@_ver = '2.13.94'
version @_ver
license 'MIT'
compatibility 'all'
source_url "https://github.com/freedesktop/fontconfig/archive/#{@_ver}.tar.gz"
source_sha256 'f8452c78d1a12f6966455b0d584f89553b13e970b40644c3650f690ec0b3b4fe'
source_sha256 '4cfaf426a59ad65ea7397182156efdc01835bab9a8e81d15e008f08d38f38d58'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.13.93-2_armv7l/fontconfig-2.13.93-2-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.13.93-2_armv7l/fontconfig-2.13.93-2-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.13.93-2_i686/fontconfig-2.13.93-2-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.13.93-2_x86_64/fontconfig-2.13.93-2-chromeos-x86_64.tar.xz'
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.13.94_i686/fontconfig-2.13.94-chromeos-i686.tpxz',
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.13.94_armv7l/fontconfig-2.13.94-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.13.94_armv7l/fontconfig-2.13.94-chromeos-armv7l.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fontconfig/2.13.94_x86_64/fontconfig-2.13.94-chromeos-x86_64.tpxz'
})
binary_sha256({
aarch64: '0047a707a1fc8531fa6bfc6fa45f2aead43ece0e65d1eaad094e4e98f3e43ec0',
armv7l: '0047a707a1fc8531fa6bfc6fa45f2aead43ece0e65d1eaad094e4e98f3e43ec0',
i686: 'abef1aab53d6880c0f43fc188a6de1ca1bf9b60c20c3f6459cdbcb40b32cb80a',
x86_64: '762b2f4a1d0d593f7f4c5000b651e9d03e98b11759a113bac0c260cc45830391'
i686: '63bfecf60d42174392ba22d0762f0fb6102540d784eaa86cd098a411e7349d8d',
aarch64: '85980c50415f61219e04efc1bb7ae977083756bccb65f7dbe5d6bfc7562698a6',
armv7l: '85980c50415f61219e04efc1bb7ae977083756bccb65f7dbe5d6bfc7562698a6',
x86_64: '00e921605653191b9b62fadf1437834211e11436c685660782fc1641bd20bfbe'
})
depends_on 'gperf'
@@ -40,7 +40,7 @@ class Fontconfig < Package
INSTALLCACHE_HEREDOC
IO.write('install-cache', @install_cache, perm: 0o666)
system "meson #{CREW_MESON_OPTIONS} \
--localstatedir=#{CREW_PREFIX}/cache \
--localstatedir=#{CREW_PREFIX}/var \
--default-library=both \
-Ddoc=disabled \
-Dfreetype2:harfbuzz=enabled \
@@ -53,7 +53,7 @@ class Fontconfig < Package
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"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/var/cache/fontconfig"
@fonts_conf = <<~FONTCONF_HEREDOC
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
@@ -63,17 +63,17 @@ class Fontconfig < Package
<dir>/usr/local/share/fonts</dir>
<dir>~/.fonts</dir>
<!-- Font cache directory list -->
<cachedir>#{CREW_PREFIX}/cache/fontconfig</cachedir>
<cachedir>#{CREW_PREFIX}/var/cache/fontconfig</cachedir>
<cachedir>~/.fontconfig</cachedir>
</fontconfig>
FONTCONF_HEREDOC
IO.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
@env = <<~FONTCONFIG_ENV_HEREDOC
# Fontconfig configuration
export FONTCONFIG_PATH=#{CREW_PREFIX}/etc/fonts
EOF
FONTCONFIG_ENV_HEREDOC
IO.write("#{CREW_DEST_PREFIX}/etc/env.d/fontconfig", @env)
end

View File

@@ -3,40 +3,48 @@ require 'package'
class Freetype < Package
description 'FreeType is a freely available software library to render fonts.'
homepage 'https://www.freetype.org/'
version '2.10.4'
version '2.11.0'
license 'FTL or GPL-2+'
compatibility 'all'
source_url 'https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.xz'
source_sha256 '86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784'
compatibility 'x86_64 aarch64 armv7l'
source_url 'https://download.savannah.gnu.org/releases/freetype/freetype-2.11.0.tar.xz'
source_sha256 '8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7'
binary_url ({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.10.4_armv7l/freetype-2.10.4-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.10.4_armv7l/freetype-2.10.4-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.10.4_i686/freetype-2.10.4-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.10.4_x86_64/freetype-2.10.4-chromeos-x86_64.tar.xz',
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.11.0_armv7l/freetype-2.11.0-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.11.0_armv7l/freetype-2.11.0-chromeos-armv7l.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype/2.11.0_x86_64/freetype-2.11.0-chromeos-x86_64.tpxz'
})
binary_sha256 ({
aarch64: 'c3063feb7034883e248ac4d62a82409df69577ccc4abe38ca7bd7e39c5ed3576',
armv7l: 'c3063feb7034883e248ac4d62a82409df69577ccc4abe38ca7bd7e39c5ed3576',
i686: 'a53b10cf19f25922aa6cc0f09fe846e5ee7221c73f2288ca04f83529191a94f5',
x86_64: '4622df673ffd07fdcec9591f039ad6e89c4687517678adb6f964dbfdff6a39cf',
binary_sha256({
aarch64: 'c08cf688f4f1ef885f349da0334de39cecdb20747465687065d95e03465c58d1',
armv7l: 'c08cf688f4f1ef885f349da0334de39cecdb20747465687065d95e03465c58d1',
x86_64: '395ed9c9be0c260428f1588ddce0a969bdfaab0c664c67f6518278610622a6d1'
})
depends_on 'expat'
depends_on 'libpng' # freetype needs zlib optionally. zlib is also the dependency of libpng
depends_on 'bz2'
depends_on 'harfbuzz'
depends_on 'libpng' # freetype needs zlib optionally. zlib is also the dependency of libpng
def self.patch
system 'sed -ri "s:.*(AUX_MODULES.*valid):\1:" modules.cfg'
system 'sed -r "s:.*(#.*SUBPIXEL_RENDERING) .*:\1:" \
-i include/freetype/config/ftoption.h'
end
def self.build
system 'pip3 install docwriter'
system "sed -i 's,/usr/include/freetype2,#{CREW_PREFIX}/include/freetype2,g' configure"
system "./configure CFLAGS=' -fPIC' #{CREW_OPTIONS} --enable-freetype-config --with-harfbuzz"
system 'make'
system "meson #{CREW_MESON_OPTIONS} \
--default-library=both \
builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
system 'pip3 uninstall docwriter -y'
system "pip3 install docwriter --root #{CREW_DEST_DIR} --prefix #{CREW_PREFIX}"
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
system "DESTDIR=#{CREW_DEST_DIR} ninja install -C builddir"
end
def self.postinstall
system "find #{CREW_BREW_DIR}/* -name freetype*.tar | xargs rm -rf" # make sure to delete downloaded files
end
end

View File

@@ -3,39 +3,51 @@ require 'package'
class Freetype_sub < Package
description 'Freetype_sub is a version without harfbuzz. It is intended to handle circular dependency betwwen freetype and harfbuzz.'
homepage 'https://www.freetype.org/'
version '2.10.4'
version '2.11.0'
license 'FTL or GPL-2+'
compatibility 'all'
source_url 'https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.xz'
source_sha256 '86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784'
compatibility 'x86_64 aarch64 armv7l'
source_url 'https://download.savannah.gnu.org/releases/freetype/freetype-2.11.0.tar.xz'
source_sha256 '8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7'
binary_url ({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype_sub/2.10.4_armv7l/freetype_sub-2.10.4-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype_sub/2.10.4_armv7l/freetype_sub-2.10.4-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype_sub/2.10.4_i686/freetype_sub-2.10.4-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype_sub/2.10.4_x86_64/freetype_sub-2.10.4-chromeos-x86_64.tar.xz',
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype_sub/2.11.0_armv7l/freetype_sub-2.11.0-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype_sub/2.11.0_armv7l/freetype_sub-2.11.0-chromeos-armv7l.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/freetype_sub/2.11.0_x86_64/freetype_sub-2.11.0-chromeos-x86_64.tpxz'
})
binary_sha256 ({
aarch64: '7c8620a0cad19fbcd7ff0d96a7304323648b97c93d86352cfbb8216c768aeb1b',
armv7l: '7c8620a0cad19fbcd7ff0d96a7304323648b97c93d86352cfbb8216c768aeb1b',
i686: '4e6ab3e8a7dacab4380099315c2d547b89ce490f33d7e677744034d4e44ccabe',
x86_64: 'a5c364bdee4a22ca72bbaba4162dc2d75730f15b4340bddf038ee3698751c116',
binary_sha256({
aarch64: '845ef60abffc0428c99102712323568f17d9a27e5a080df115dd07da25ff110a',
armv7l: '845ef60abffc0428c99102712323568f17d9a27e5a080df115dd07da25ff110a',
x86_64: '039810744e62693895f366e48f2ff9156b4a02c3784a4b7a851992dc94ded9a6'
})
depends_on 'expat'
depends_on 'libpng' # freetype needs zlib optionally. zlib is also the dependency of libpng
depends_on 'bz2'
def self.preflight
@device = JSON.parse(File.read("#{CREW_CONFIG_PATH}device.json"), symbolize_names: true)
if @device[:installed_packages].any? 'harfbuzz'
abort 'This harfbuzz prereq needs to be built without harfbuzz installed.'.lightred
end
end
def self.patch
system 'sed -ri "s:.*(AUX_MODULES.*valid):\1:" modules.cfg'
system 'sed -r "s:.*(#.*SUBPIXEL_RENDERING) .*:\1:" \
-i include/freetype/config/ftoption.h'
end
def self.build
system 'pip3 install docwriter'
system "./configure CFLAGS=' -fPIC' #{CREW_OPTIONS} --enable-freetype-config --without-harfbuzz"
system 'make'
system "meson #{CREW_MESON_OPTIONS} \
--default-library=both \
builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
system 'pip3 uninstall docwriter -y'
system "pip3 install docwriter --root #{CREW_DEST_DIR} --prefix #{CREW_PREFIX}"
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
system "DESTDIR=#{CREW_DEST_DIR} ninja install -C builddir"
end
def self.postinstall

View File

@@ -3,27 +3,26 @@ require 'package'
class Harfbuzz < Package
description 'HarfBuzz is an OpenType text shaping engine.'
homepage 'https://www.freedesktop.org/wiki/Software/HarfBuzz/'
@_ver = '2.8.1'
@_ver = '2.8.2'
version @_ver
license 'Old-MIT, ISC and icu'
compatibility 'all'
source_url "https://github.com/harfbuzz/harfbuzz/archive/#{@_ver}.tar.gz"
source_sha256 'b3f17394c5bccee456172b2b30ddec0bb87e9c5df38b4559a973d14ccd04509d'
compatibility 'x86_64 aarch64 armv7l'
source_url 'https://github.com/harfbuzz/harfbuzz.git'
git_hashtag @_ver
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/2.8.1_armv7l/harfbuzz-2.8.1-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/2.8.1_armv7l/harfbuzz-2.8.1-chromeos-armv7l.tpxz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/2.8.1_i686/harfbuzz-2.8.1-chromeos-i686.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/2.8.1_x86_64/harfbuzz-2.8.1-chromeos-x86_64.tpxz'
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/2.8.2_armv7l/harfbuzz-2.8.2-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/2.8.2_armv7l/harfbuzz-2.8.2-chromeos-armv7l.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/harfbuzz/2.8.2_x86_64/harfbuzz-2.8.2-chromeos-x86_64.tpxz'
})
binary_sha256({
aarch64: 'f39e2aba4445d71c63a6602650590d8c5463a5c093b3ec26933e2963dc354dcc',
armv7l: 'f39e2aba4445d71c63a6602650590d8c5463a5c093b3ec26933e2963dc354dcc',
i686: '25e7c49b04e81fa61db4385d4033b6b2c633bdfe5ef2a5ab3606c970ad4b307d',
x86_64: '801f46cbab0369087004aa3ce7952fc4d7754a85a0cb3c4b0648ce647fc87604'
aarch64: 'b5161044e1976ac2ed7fcc59c7ed1a1539530c6695cb84f1efdd33b1c7b55a97',
armv7l: 'b5161044e1976ac2ed7fcc59c7ed1a1539530c6695cb84f1efdd33b1c7b55a97',
x86_64: 'ab4f370493d031b21c1fbe58575096eb3616c84d824bbed5c7dfe9e3bdfd05f0'
})
depends_on 'cairo' => :build
depends_on 'chafa' => :build
depends_on 'glib' => :build
depends_on 'gobject_introspection'
depends_on 'ragel' => :build
@@ -34,6 +33,7 @@ class Harfbuzz < Package
def self.build
system "meson #{CREW_MESON_OPTIONS} \
--default-library=both \
-Dfreetype=enabled \
-Dintrospection=enabled \
-Dbenchmark=disabled \
-Dtests=disabled \