Commit 2d2e9f6c authored by satmandu's avatar satmandu Committed by GitHub

Rebuild gdb, add source_highlight, add texinfo to buildessential (#5780)

* Combine binutils and gdb, add source_highlight

* gtk3,gtk4,glib,gdk_pixbuf updates, fix to crew & pygments

* simply preflight

* split binutils and gdb, add texinfo to buildessential

* revert binutils changes to avoid gcc recompilation

* standalone gdb w/o binutils conflicts

* clean up gdb deps
parent d12f6464
......@@ -38,6 +38,7 @@ class Buildessential < Package
depends_on 'doxygen'
depends_on 'help2man'
depends_on 'gtk_doc'
depends_on 'texinfo' # This contains makeinfo
# Assembler
#depends_on 'nasm'
......
# Adapted from Arch Linux gdb PKGBUILD at:
# https://github.com/archlinux/svntogit-packages/raw/packages/gdb/trunk/PKGBUILD
require 'package'
class Gdb < Package
description 'GDB, the GNU Project debugger, allows you to see what is going on \'inside\' another program while it executes -- or what another program was doing at the moment it crashed.'
description 'The GNU Debugger'
homepage 'https://www.gnu.org/software/gdb/'
version '8.3'
license 'GPL-2 and LGPL-2'
version '10.2'
license 'GPL3'
compatibility 'all'
source_url 'http://ftpmirror.gnu.org/gdb/gdb-8.3.tar.xz'
source_sha256 '802f7ee309dcc547d65a68d61ebd6526762d26c3051f52caebe2189ac1ffd72e'
source_url 'https://ftp.gnu.org/gnu/gdb/gdb-10.2.tar.xz'
source_sha256 'aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29'
binary_url ({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gdb/8.3_armv7l/gdb-8.3-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gdb/8.3_armv7l/gdb-8.3-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gdb/8.3_i686/gdb-8.3-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gdb/8.3_x86_64/gdb-8.3-chromeos-x86_64.tar.xz',
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gdb/10.2_armv7l/gdb-10.2-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gdb/10.2_armv7l/gdb-10.2-chromeos-armv7l.tpxz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gdb/10.2_i686/gdb-10.2-chromeos-i686.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gdb/10.2_x86_64/gdb-10.2-chromeos-x86_64.tpxz'
})
binary_sha256 ({
aarch64: 'cb31458449dbe3901b104a0e0629e9ef0cd219ea2783db736360d0176c321ca9',
armv7l: 'cb31458449dbe3901b104a0e0629e9ef0cd219ea2783db736360d0176c321ca9',
i686: '84bd95e06d5515647135ab5ce1f1c6a2956d5df8f324837dc26705fc28bcd07c',
x86_64: 'afb397d5022e72ea19e7d87fff5167b798f5063f59b1174dd56337837fdc7dea',
binary_sha256({
aarch64: 'c3a708da100b18e4da8d22cfe3f046d7fbebe1f62af6f6f0fd19b3cceb75e349',
armv7l: 'c3a708da100b18e4da8d22cfe3f046d7fbebe1f62af6f6f0fd19b3cceb75e349',
i686: 'a25af22de11214b9d6011d533b47dac518f1c1ac7cc49f0cd1f2cca312167308',
x86_64: 'f3b420aff23c86604c9b0e4945458d734764f18372808bc5bddff568e1ed7262'
})
depends_on 'libx11'
depends_on 'six'
depends_on 'mpfr' # R
depends_on 'gmp' # R
depends_on 'source_highlight' # R
depends_on 'boost' # R
def self.patch
system "sed -i 's%#include <term.h>%#include <ncursesw/term.h>%g' gdb/gdb_curses.h"
end
def self.build
system './configure',
'--with-x',
'--with-lzma',
'--enable-sim',
'--with-expat',
'--enable-tui',
'--with-python',
'--with-curses',
'--enable-shared',
'--with-system-zlib',
'--enable-64-bit-bfd',
'--enable-host-shared',
'--with-system-readline',
"--prefix=#{CREW_PREFIX}",
"--libdir=#{CREW_LIB_PREFIX}",
'--with-pkgversion=Chromebrew'
system "make"
FileUtils.mkdir_p 'build'
Dir.chdir('build') do
system "env #{CREW_ENV_OPTIONS} \
CPPFLAGS='-I#{CREW_PREFIX}/include/ncursesw -lncursesw' \
../configure \
#{CREW_OPTIONS} \
--disable-nls \
--enable-64-bit-bfd \
--enable-host-shared \
--enable-lto \
--enable-shared \
--enable-sim \
--enable-source-highlight \
--enable-tui \
--with-curses \
--with-lzma \
--with-pkgversion=Chromebrew \
--with-python=python3 \
--with-system-gdbinit=#{CREW_PREFIX}/etc/gdb/gdbinit \
--with-system-readline \
--with-system-zlib \
--with-x"
system 'make'
end
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
Dir.chdir('build') do
system "make -C gdb DESTDIR=#{CREW_DEST_DIR} install"
system "make -C gdbserver DESTDIR=#{CREW_DEST_DIR} install"
end
# Remove files conflicting with binutils
FileUtils.rm "#{CREW_DEST_PREFIX}/share/info/bfd.info" if File.exist?("#{CREW_DEST_PREFIX}/share/info/bfd.info")
conflict_packages = %w[binutils]
conflict_packages.each do |package|
file = File.open("#{CREW_META_PATH}#{package}.filelist").read
file.each_line do |line|
if File.exist?("#{CREW_DEST_DIR}#{line}")
FileUtils.rm_f "#{CREW_DEST_DIR}#{line}"
puts "Removed #{CREW_DEST_DIR}#{line}"
end
end
end
FileUtils.rm "#{CREW_DEST_LIB_PREFIX}/libinproctrace.so" if File.exist?("#{CREW_DEST_LIB_PREFIX}/libinproctrace.so")
end
end
# Adapted from Arch Linux source-highlight PKGBUILD at:
# https://github.com/archlinux/svntogit-packages/raw/packages/source-highlight/trunk/PKGBUILD
require 'package'
class Source_highlight < Package
description 'Convert source code to syntax highlighted document'
homepage 'https://www.gnu.org/software/src-highlite/'
version '3.1.9-9049'
license 'GPL'
compatibility 'all'
source_url 'https://git.savannah.gnu.org/git/src-highlite.git'
git_hashtag '904949c9026cb772dc93fbe0947a252ef47127f4'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/source_highlight/3.1.9-9049_armv7l/source_highlight-3.1.9-9049-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/source_highlight/3.1.9-9049_armv7l/source_highlight-3.1.9-9049-chromeos-armv7l.tpxz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/source_highlight/3.1.9-9049_i686/source_highlight-3.1.9-9049-chromeos-i686.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/source_highlight/3.1.9-9049_x86_64/source_highlight-3.1.9-9049-chromeos-x86_64.tpxz'
})
binary_sha256({
aarch64: 'd684918851e16cda44873f6f9d70f9c7c1d65c93689851de6cbc9a6024311986',
armv7l: 'd684918851e16cda44873f6f9d70f9c7c1d65c93689851de6cbc9a6024311986',
i686: 'a177f2214443d14111a75242e97b1f3b45d2d5dcfc23a5336215a358b6f80a9a',
x86_64: '1e0ea17e28e39601fb97771dfa75f13dc9a5b9a201381f0470ce3a7f5d2d12e1'
})
depends_on 'boost' # R
depends_on 'ctags' => :build
depends_on 'texinfo' => :build
def self.build
system 'NOCONFIGURE=1 autoreconf -fiv'
system 'filefix'
system "env #{CREW_ENV_OPTIONS} \
./configure #{CREW_OPTIONS} \
--sysconfdir=#{CREW_PREFIX}/etc \
--with-bash-completion=#{CREW_PREFIX}/share/bash-completion/completions"
system 'make'
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
system "make prefix=#{CREW_DEST_PREFIX} bash_completiondir=#{CREW_DEST_PREFIX}/share/bash-completion/completions install"
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