mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
* Rename IgnoredPatterns to AllowedPatterns. * Exclude docopt.rb (not our code) from Rubocop * Disable Style/RedundantReturn * Disable Style/MutableConstant * Disable Style/NumericLiterals * Set Layout/IndentationStyle to spaces * Temporarily disable various cops. * Add Rubocop CI via Octocop * Lint tree with rubocop -A -c .rubocop.yml Co-authored-by: Satadru Pramanik <satadru@gmail.com>
56 lines
2.2 KiB
Ruby
56 lines
2.2 KiB
Ruby
require 'package'
|
|
|
|
class Libnewt < Package
|
|
description 'Not Eriks Windowing Toolkit - text mode windowing with slang'
|
|
homepage 'https://pagure.io/newt'
|
|
@_ver = '0.52.21'
|
|
version @_ver
|
|
license 'LGPL-2'
|
|
compatibility 'all'
|
|
source_url "https://releases.pagure.org/newt/newt-#{@_ver}.tar.gz"
|
|
source_sha256 '265eb46b55d7eaeb887fca7a1d51fe115658882dfe148164b6c49fccac5abb31'
|
|
|
|
binary_url({
|
|
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnewt/0.52.21_armv7l/libnewt-0.52.21-chromeos-armv7l.tar.xz',
|
|
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnewt/0.52.21_armv7l/libnewt-0.52.21-chromeos-armv7l.tar.xz',
|
|
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnewt/0.52.21_i686/libnewt-0.52.21-chromeos-i686.tar.xz',
|
|
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnewt/0.52.21_x86_64/libnewt-0.52.21-chromeos-x86_64.tar.xz'
|
|
})
|
|
binary_sha256({
|
|
aarch64: 'd1813f44254d795347e412bfffcc6a86b4dffc934db3e0341b5072f7a7518b12',
|
|
armv7l: 'd1813f44254d795347e412bfffcc6a86b4dffc934db3e0341b5072f7a7518b12',
|
|
i686: 'e4850288e06cdc7f35233e8beeb2ead16fd934c0eac6afea7c8b26666feaf20a',
|
|
x86_64: '07ebbb1fe4cfe931a583e1195d1340fec0387a1bd5c83ee8a0fda9754730f185'
|
|
})
|
|
|
|
depends_on 'gpm'
|
|
depends_on 'libxcrypt'
|
|
depends_on 'popt'
|
|
depends_on 'tcl' => :build
|
|
depends_on 'py3_pygments' => :build
|
|
|
|
def self.patch
|
|
patch_url = 'http://deb.debian.org/debian/pool/main/n/newt/newt_0.52.21-4.debian.tar.xz'
|
|
patch_sha256 = '163f2f58bf4d0ac8a0907a1c2530a02d7c178b88c53fb98ee69d4b33bc86187d'
|
|
|
|
system('curl', '-Lf', patch_url, '-o', 'zippatches.tar.xz')
|
|
abort 'Checksum mismatch :/ try again' unless Digest::SHA256.hexdigest(File.read('./zippatches.tar.xz')) == patch_sha256
|
|
system('tar', '-xf', 'zippatches.tar.xz')
|
|
|
|
system('for i in `cat debian/patches/series`; do patch -p 1 < debian/patches/$i; done')
|
|
system "echo '#define USE_INTERP_RESULT 1' >> config.h"
|
|
end
|
|
|
|
def self.build
|
|
system "env CFLAGS='-flto=auto' \
|
|
CXXFLAGS='-flto=auto' LDFLAGS='-flto=auto' \
|
|
./configure #{CREW_OPTIONS} \
|
|
--with-gpm-support"
|
|
system 'make'
|
|
end
|
|
|
|
def self.install
|
|
system "make DESTDIR=#{CREW_DEST_DIR} install"
|
|
end
|
|
end
|