Obsolete
/
packaging
Archived
3
0
Fork 0

Run/Build dependencies split.

master
Luka Vandervelden 2019-08-06 20:55:24 +02:00
parent 9db8704a78
commit 4c10d0d5f8
2 changed files with 17 additions and 3 deletions

View File

@ -25,7 +25,7 @@ class Package::Package
inherit url : String? inherit url : String?
inherit description : String inherit description : String
inherit dependencies : Array(String) setter dependencies : Array(String)?
inherit conflicts : Array(String) inherit conflicts : Array(String)
inherit provides : Array(String) inherit provides : Array(String)
@ -35,6 +35,10 @@ class Package::Package
@fake_root_directory : String? @fake_root_directory : String?
def dependencies
@dependencies || @recipe.run_dependencies
end
def fake_root_directory def fake_root_directory
@fake_root_directory || "#{recipe.working_directory}/root-#{name}" @fake_root_directory || "#{recipe.working_directory}/root-#{name}"
end end

View File

@ -101,7 +101,8 @@ class Package::Recipe
# Relations to other packages. # Relations to other packages.
# FIXME: `dependencies` needs splitting between run-time and build-time. # FIXME: `dependencies` needs splitting between run-time and build-time.
getter dependencies = Array(String).new getter run_dependencies = Array(String).new
getter build_dependencies = Array(String).new
getter provides = Array(String).new getter provides = Array(String).new
getter conflicts = Array(String).new getter conflicts = Array(String).new
@ -164,7 +165,16 @@ class Package::Recipe
@instructions.install << value.as_s_or_ls @instructions.install << value.as_s_or_ls
when "dependencies" when "dependencies"
value.as_a_or_s.each do |atom| value.as_a_or_s.each do |atom|
@dependencies << atom @run_dependencies << atom
@build_dependencies << atom
end
when "build-dependencies"
value.as_a_or_s.each do |atom|
@build_dependencies << atom
end
when "run-dependencies"
value.as_a_or_s.each do |atom|
@run_dependencies << atom
end end
when "conflicts" when "conflicts"
value.as_a_or_s.each do |atom| value.as_a_or_s.each do |atom|