Commit c0ac707d authored by Ed Reel's avatar Ed Reel Committed by GitHub

Update fpc from 3.2.0 to 3.2.2 (#5921)

Add self.remove section
parent a0cab3dd
...@@ -3,33 +3,61 @@ require 'package' ...@@ -3,33 +3,61 @@ require 'package'
class Fpc < Package class Fpc < Package
description 'Free Pascal is a 32, 64 and 16 bit professional Pascal compiler.' description 'Free Pascal is a 32, 64 and 16 bit professional Pascal compiler.'
homepage 'https://www.freepascal.org/' homepage 'https://www.freepascal.org/'
version '3.2.0' version '3.2.2'
license 'GPL-2 and LGPL-2.1-with-linking-exception' license 'GPL-2 and LGPL-2.1-with-linking-exception'
compatibility 'all' compatibility 'all'
case ARCH case ARCH
when 'aarch64', 'armv7l' when 'aarch64', 'armv7l'
source_url 'https://downloads.sourceforge.net/project/freepascal/Linux/3.2.0/fpc-3.2.0.arm-linux.tar' source_url 'https://downloads.sourceforge.net/project/freepascal/Linux/3.2.2/fpc-3.2.2.arm-linux.tar'
source_sha256 'b78c72859e1e147e33991e1bb1e937654859799ae2afc145257c834a8d52737e' source_sha256 '971bbcaa1934286ccdaf3998d338afc19a33235e910f8881c75579ed5d6adefd'
when 'i686' when 'i686'
source_url 'https://downloads.sourceforge.net/project/freepascal/Linux/3.2.0/fpc-3.2.0.i386-linux.tar' source_url 'https://downloads.sourceforge.net/project/freepascal/Linux/3.2.2/fpc-3.2.2.i386-linux.tar'
source_sha256 '2110eb1d7a35311f587694f9b25dc2660e0116eafd9884c4c7ab2f2716080578' source_sha256 'f62980ac0b2861221f79fdbff67836aa6912a4256d4192cfa4dfa0ac5b419958'
when 'x86_64' when 'x86_64'
source_url 'https://downloads.sourceforge.net/project/freepascal/Linux/3.2.0/fpc-3.2.0-x86_64-linux.tar' source_url 'https://downloads.sourceforge.net/project/freepascal/Linux/3.2.2/fpc-3.2.2.x86_64-linux.tar'
source_sha256 'd19252e6cfe52f1217f4822a548ee699eaa7e044807aaf8429a0532cb7e4cb3d' source_sha256 '5adac308a5534b6a76446d8311fc340747cbb7edeaacfe6b651493ff3fe31e83'
end end
def self.build binary_url ({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fpc/3.2.2_armv7l/fpc-3.2.2-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fpc/3.2.2_armv7l/fpc-3.2.2-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fpc/3.2.2_i686/fpc-3.2.2-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/fpc/3.2.2_x86_64/fpc-3.2.2-chromeos-x86_64.tar.xz',
})
binary_sha256 ({
aarch64: '84701dedbee28a6db2386366318a8c2e27c389a758ea8033502d40fa2f4ec588',
armv7l: '84701dedbee28a6db2386366318a8c2e27c389a758ea8033502d40fa2f4ec588',
i686: '20062e277f6432b76115a74b6b46a38888ef696f15bbf79efce8546a1aff9a46',
x86_64: 'b5b9152ce23f5e7f33ab8b788ef80ca440d2d26ef300321f1e944c24051f9b45',
})
def self.patch
system "sed -i 's,PREFIX=\"\$HOME/fpc-\$VERSION\",PREFIX=#{CREW_DEST_PREFIX},' install.sh" system "sed -i 's,PREFIX=\"\$HOME/fpc-\$VERSION\",PREFIX=#{CREW_DEST_PREFIX},' install.sh"
system "sed -i '264,272d' install.sh" system "sed -i 's,\$PREFIX/lib,#{CREW_DEST_LIB_PREFIX},' install.sh"
end end
def self.install def self.install
system './install.sh' system './install.sh'
FileUtils.ln_sf "#{CREW_LIB_PREFIX}/fpc/#{version}/ppcarm", "#{CREW_DEST_PREFIX}/bin/ppcarm"
FileUtils.mv "#{CREW_DEST_PREFIX}/man", CREW_DEST_MAN_PREFIX
end end
def self.postinstall def self.postinstall
puts puts "\nType 'fp' to start.\n".lightblue
puts "Type 'fp' to start.".lightblue end
puts
def self.remove
print "Would you like to remove the config directories? [y/N] "
response = STDIN.getc
config_dirs = ["#{HOME}/.fpc.cfg", "#{HOME}/.config/fppkg.cfg", "#{HOME}/.fppkg"]
config_dirs.each { |config_dir|
case response
when "y", "Y"
FileUtils.rm_rf config_dir
puts "#{config_dir} removed.".lightred
else
puts "#{config_dir} saved.".lightgreen
end
}
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment