While updating the kdesrc-buildrc-sample for the last module-set change, it

occurred to me that I broke it (the repository special feature, the whole point
to module-set, was broken).  That is now fixed, and the kdesrc-buildrc-sample
file is updated to reflect how to use module-set currently.

svn path=/trunk/KDE/kdesdk/scripts/kdesrc-build; revision=1207658
wilder
Michael Pyne 15 years ago
parent 46184c6e01
commit 07f70a8d3a
  1. 40
      kdesrc-build
  2. 46
      kdesrc-buildrc-sample

@ -3118,6 +3118,7 @@ EOF
sub parse_moduleset
{
my $fh = shift;
my $repoSet = get_option('global', 'git-repository-base');
my @modules;
my %optionSet; # We read all options, and apply them to all modules
my $startLine = $.; # For later error messages
@ -3160,7 +3161,25 @@ sub parse_moduleset
# At this point it's possible to override repository after we just
# set it, but let's not announce that too loudly...
for my $option (keys %optionSet) {
set_option($moduleName, $option, $optionSet{$option});
my $value = $optionSet{$option};
if ($option eq 'repository') {
if (not exists $repoSet->{$value}) {
error <<EOF;
There is no repository assigned to y[b[$value] when assigning a moduleset on
line $startLine of $rcfile.
These repositories are defined by g[b[git-repository-base] in the global
section of $rcfile. Make sure you spelled your repository name right!
EOF
exit 1;
}
$value = $repoSet->{$value} . $module;
}
set_option($moduleName, $option, $value);
}
}
@ -3573,25 +3592,6 @@ sub set_option
return if handle_set_env($package_opts{$module}, $option, $value);
if ($option eq 'repository')
{
my $repos = get_option('global', 'git-repository-base');
if (exists $repos->{$value})
{
# Use repository alias defined earlier.
$value = $repos->{$value};
}
elsif ($value =~ /^[a-zA-Z0-9_-]+$/)
{
# Check for people trying to use repo aliases and failing.
error "Trying to set $value as the repository for $module, but $value neither:";
error " 1) Looks like a valid Git repository URL, or";
error " 2) Matches a previously defined git-repository-base alias";
error "You probably misspelled y[b[$value], check your $rcfile!";
die "Invalid repository option for $module";
}
}
debug " Setting $module,$option = $value";
$package_opts{$module}{$option} = $value;

@ -40,10 +40,10 @@ global
# but also see the qt-copy and kdesupport modules below, which have special
# requirements
# To use a single git repository to download multiple KDE source modules, you can
# define a "base repository", which you can use later with a "module-set" declaration
# and the "use-modules" option. This sets up the "kde-git" git repository, you can change
# the URL if you are a developer.
# To use a single git repository to download multiple KDE source modules, you
# can define a "base repository", which you can use later with a "module-set"
# grouping and the "use-modules" option. This sets up the "kde-git" git
# repository, you can change the URL if you are a developer.
git-repository-base kde-git git://anongit.kde.org/
# git-repository-base kde-git git@git.kde.org: # Developers
@ -167,21 +167,32 @@ module qt-copy
branch master
end module
# Next is shown a "module-set", which is passed the name of the repository base (defined
# in the global section with git-repository-base). The only option accepted inside a
# module-set is the 'use-modules' option, which is simply passed a list of each module
# you want to build. For every single module passed, kdesrc-build will create the
# appropriate "module" option, with the right repository setting (base + module name).
# Next is shown a "module-set", which is a grouping of modules that has special
# handling of the "repository" option (the module name is automatically added
# to the end for every module defined in this set), and accepts the special
# use-modules option to determine what modules are included in the group.
# Any other options included as defined for every module in the set.
# For every single module passed, kdesrc-build will create the appropriate
# "module" option, with the right repository setting (base + module name).
#
# If you need to set more options, you can add a module <name> ... end module as normal
# after the module-set, but keep in mind if you do this that you won't change the order
# the modules are built in.
# If you need to set more options for only individual modules, you can add a
# module <name> ... end module as normal after the module-set, but keep in mind
# if you do this that you won't change the order the modules are built in.
#
# Example:
module-set kde-git
module-set
# automoc is essential for building KDE's CMake-based modules, and so should be first
# in this module set (but after Qt, if you're using qt-copy)
use-modules automoc cagibi attica soprano polkit-qt-1
# Special handling occurs with this option when used in module-set so you don't
# have to re-type repository names.
repository kde-git
# Other options are simply passed to each defined module. For example if you
# uncomment the next line, then the "debugfull" build type will be used for every
# module in this set.
# cmake-options -DCMAKE_BUILD_TYPE=debugfull
end module-set
# kdesupport contains taglib and QCA, and the Strigi library required for
@ -221,9 +232,11 @@ module kdelibs
end module
# akonadi is required for kdepimlibs. Added to this module-set so that it is next to
# kdepimlibs -- it could just as well be part of the earlier module-set.
module-set kde-git
# kdepimlibs -- it could just as well be part of the earlier module-set. Having a
# module-set of only one module allows us to use the repository alias made earlier.
module-set
use-modules akonadi
repository kde-git
end module-set
# kdepimlibs contains required PIM (mail, instant messenger, etc.) basics
@ -348,8 +361,9 @@ end module
#end module
# --- The K3B cd/dvd/etc. burner.
#module-set kde-git
#module-set
# use-modules k3b
# repository kde-git
#end module-set
# Includes various media players.

Loading…
Cancel
Save