Adds ignore-kde-structure as an option

Adds ignore-kde-structure option which will fetch and compile all
projects in the same dir, meaning that instead of:

extragear/network/kde-telepathy/ktp-text-ui
it would be just
ktp-text-ui
wilder
Àlex Fiestas 12 years ago
parent edf05ca9cc
commit 3440790441
  1. 15
      doc/index.docbook
  2. 1
      modules/ksb/BuildContext.pm
  3. 11
      modules/ksb/Module.pm

@ -1947,6 +1947,21 @@ on also use that proxy server, if possible, by setting the
</entry>
</row>
<row id="ignore-kde-structure">
<entry>ignore-kde-structure</entry>
<entry>Module setting overrides global</entry>
<entry><para>This option is used to store the source and the build files directly
in the name of the module. Fir example:
source/extragear/network/telepathy/ktp-text-ui
becomes
source/ktp-text-ui.
This option is disabled by default, if you want to enable this you need to set this
option to <userinput>true</userinput></para>
<para>This option was introduced with &kdesrc-build; 1.16.</para>
</entry>
</row>
<row id="conf-ignore-modules">
<entry>ignore-modules</entry>
<entry>Can't be overridden</entry>

@ -61,6 +61,7 @@ my %defaultGlobalOptions = (
"delete-my-patches" => 0, # Should only be set from cmdline
"delete-my-settings" => 0, # Should only be set from cmdline
"dest-dir" => '${MODULE}', # single quotes used on purpose!
"ignore-kde-structure" => 0, #respect or not kde dir structure like extragear/network
"disable-agent-check" => 0, # If true we don't check on ssh-agent
"do-not-compile" => "",
"filter-out-phases" => '',

@ -1016,8 +1016,15 @@ sub destDir
{
my $self = assert_isa(shift, 'ksb::Module');
my $destDir = $self->getOption('dest-dir');
my $basePath = shift // $self->getOption('#xml-full-path', 'module');
$basePath ||= $self->name(); # Default if not provided in XML
my $basePath = "";
if ($self->getOption('ignore-kde-structure')) {
$basePath = $self->name();
} else {
$basePath = shift // $self->getOption('#xml-full-path');
$basePath ||= $self->name(); # Default if not provided in XML
}
$destDir =~ s/(\${MODULE})|(\$MODULE\b)/$basePath/g;

Loading…
Cancel
Save