[kde-doc-english] [kdesrc-build] /: Adds ignore-kde-structure as an option

Àlex Fiestas afiestas at kde.org
Mon Dec 23 15:39:13 UTC 2013


Git commit 3440790441d0aa649657ddb5cfc46fe422187857 by Àlex Fiestas.
Committed on 23/12/2013 at 15:36.
Pushed by afiestas into branch 'master'.

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

M  +15   -0    doc/index.docbook
M  +1    -0    modules/ksb/BuildContext.pm
M  +9    -2    modules/ksb/Module.pm

http://commits.kde.org/kdesrc-build/3440790441d0aa649657ddb5cfc46fe422187857

diff --git a/doc/index.docbook b/doc/index.docbook
index 9205077..b882aee 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -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>
diff --git a/modules/ksb/BuildContext.pm b/modules/ksb/BuildContext.pm
index 90ef80b..9607227 100644
--- a/modules/ksb/BuildContext.pm
+++ b/modules/ksb/BuildContext.pm
@@ -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"    => '',
diff --git a/modules/ksb/Module.pm b/modules/ksb/Module.pm
index 3dcd65e..930396b 100644
--- a/modules/ksb/Module.pm
+++ b/modules/ksb/Module.pm
@@ -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;
 


More information about the kde-doc-english mailing list