Commit 1c859c6d authored by Matthew Downey's avatar Matthew Downey Committed by GitHub

Merge branch 'master' into naming

parents 476918d5 d2661c66
......@@ -173,7 +173,9 @@ def download
url = @pkg.get_url(@device[:architecture])
source = @pkg.is_source?(@device[:architecture])
if !source
if !url
abort "No precompiled binary for #{@device[:architecture]} nor source is available."
elsif !source
puts "Precompiled binary available, downloading..."
elsif @pkg.build_from_source
puts "Downloading source..."
......@@ -297,17 +299,22 @@ def resolveDependencies
@source_package = 0
def push_dependencies
if @pkg.binary_url && @pkg.binary_url.has_key?(@device[:architecture])
@check_deps = @pkg.dependencies
if @pkg.is_binary?(@device[:architecture])
# retrieve name of dependencies that doesn't contain :build tag
@check_deps = @pkg.dependencies.select {|k, v| !v.include?(:build)}.map {|k, v| k}
elsif @pkg.is_fake?
# retrieve name of all dependencies
@check_deps = @pkg.dependencies.map {|k, v| k}
else
# Use source dependencies
@check_deps = @pkg.dependencies
# retrieve name of all dependencies
@check_deps = @pkg.dependencies.map {|k, v| k}
# count the number of source packages to add buildessential into dependencies later
@source_package += 1
end
if @check_deps && !@check_deps.empty?
@dependencies.unshift @check_deps
@pkg.dependencies.each do |dep|
@check_deps.each do |dep|
search dep, true
push_dependencies
end
......
......@@ -2,16 +2,36 @@ require 'package_helpers'
class Package
property :version, :binary_url, :binary_sha1, :source_url, :source_sha1, :is_fake
class << self
attr_reader :dependencies, :is_fake
attr_reader :is_fake
attr_accessor :name, :in_build, :build_from_source
attr_accessor :in_upgrade
end
def self.dependencies
# Not sure how to initialize instance variable of not constructed class.
# Therefore, initialize it in reader function.
@dependencies = Hash.new unless @dependencies
@dependencies
end
def self.depends_on (dependency = nil)
@dependencies = [] unless @dependencies
@dependencies = Hash.new unless @dependencies
if dependency
@dependencies << dependency
# add element in "[ name, [ tag1, tag2, ... ] ]" format
if dependency.is_a?(Hash)
if dependency.first[1].is_a?(Array)
# parse "depends_on name => [ tag1, tag2 ]"
@dependencies.store(dependency.first[0], dependency.first[1])
else
# parse "depends_on name => tag"
@dependencies.store(dependency.first[0], [ dependency.first[1] ])
end
else
# parse "depends_on name"
@dependencies.store(dependency, [])
end
end
@dependencies
end
......
require 'package'
class Bc < Package
version '1.06-1'
source_url 'http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz'
source_sha1 'c8f258a7355b40a485007c40865480349c157292'
version '1.07.1'
source_url 'https://ftp.gnu.org/gnu/bc/bc-1.07.1.tar.gz'
source_sha1 'b4475c6d66590a5911d30f9747361db47231640a'
depends_on 'readline'
depends_on 'flex'
depends_on 'ed'
def self.build
system "./configure"
system "./configure", "--with-readline"
system "make"
end
......
require 'package'
class Ed < Package
version '1.14.2'
source_url 'http://ftpmirror.gnu.org/ed/ed-1.14.2.tar.lz'
source_sha1 '3e8aa331ffbc929884107ff3f8fbd76d01252277'
# only lz archive is available for ed and it requires lzip.
depends_on 'lzip'
def self.build
system "./configure"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
def self.check
system "make", "check"
end
end
require 'package'
class Libffi < Package
version '3.2.1'
version '3.2.1-1'
source_url 'ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz'
source_sha1 '280c265b789e041c02e5c97815793dfc283fb1e6'
depends_on 'autoconf'
depends_on 'automake'
def self.build
system "./configure", "--disable-debug", "--disable-dependency-tracking"
system "./configure", "--enable-shared", "--disable-static", "--with-pic", "--disable-debug", "--disable-dependency-tracking"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
def self.check
# system "make check" # DejaGNU required
end
end
require 'package'
class Libpipeline < Package
version '1.4.1'
version '1.4.1-1'
source_url 'https://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.4.1.tar.gz'
source_sha1 'b31cc955f22b1aa4545dc8d00ddbde831936594f'
def self.build
system './configure'
system './configure', '--disable-static', '--enable-shared', '--with-pic'
system 'make'
end
......
require 'package'
class Libtasn1 < Package
version '4.10'
source_url 'http://ftp.snt.utwente.nl/pub/software/gnu/libtasn1/libtasn1-4.10.tar.gz'
version '4.10-1'
source_url 'http://ftpmirror.gnu.org/libtasn1/libtasn1-4.10.tar.gz'
source_sha1 'c7b36fa50866bbc889f7503c7fd1e9f9d7c52a64'
def self.build
system './configure --prefix=/usr/local'
system "./configure", "--enable-shared", "--disable-static", "--with-pic", "--prefix=/usr/local"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
def self.check
system "make", "check"
end
end
require 'package'
class Lzip < Package
version '1.19'
source_url 'http://download.savannah.gnu.org/releases/lzip/lzip-1.19.tar.gz'
source_sha1 'c6042a786b69e3209112fa991806e2e7e0ba5f07'
def self.build
# default -O2 cause run-time segmentation fault on armv7l
system "./configure", "CXXFLAGS=-Wall -W -O1"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
def self.check
system "make", "check"
end
end
require 'package'
class P11kit < Package
version '0.23.2'
version '0.23.2-1'
source_url 'https://p11-glue.freedesktop.org/releases/p11-kit-0.23.2.tar.gz'
source_sha1 '4da0d7b47935b6cb0f321dd00358b063ae42df71'
......@@ -9,11 +9,17 @@ class P11kit < Package
depends_on 'libtasn1'
def self.build
system './configure --prefix=/usr/local'
system "./configure", "--enable-shared", "--disable-static", "--with-pic", "--prefix=/usr/local"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
def self.check
# Doesn't perform tests since 2 out of 45 fail as
# reported in https://bugs.freedesktop.org/show_bug.cgi?id=95366
# system "make", "check"
end
end
require 'package'
class Xzutils < Package
version '5.2.3'
source_url 'http://tukaani.org/xz/xz-5.2.3.tar.gz'
source_sha1 '529638eec3597e429cc54c74551ac0a89169e841'
version '5.2.3-1'
source_url 'http://tukaani.org/xz/xz-5.2.3.tar.gz'
source_sha1 '529638eec3597e429cc54c74551ac0a89169e841'
def self.build
system "./configure",
"--prefix=/usr/local",
"--disable-docs"
system "./configure", "--prefix=/usr/local", "--disable-docs", "--enable-shared", "--disable-static", "--with-pic"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
def self.check
system "make", "check"
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