[SCM] Debian Qt/KDE packaging tools branch, master, updated. master/0.4.11-8-g8b49f8a

Modestas Vainius modax-guest at alioth.debian.org
Thu Aug 27 09:05:22 UTC 2009


The following commit has been merged in the master branch:
commit 92f99fe9d95e5498acb9f320039245a9be400459
Author: Modestas Vainius <modestas at vainius.eu>
Date:   Thu Aug 27 11:13:14 2009 +0300

    Add a kde build system for debhelper (>= 7.3).
---
 debhelper/Debian/Debhelper/Buildsystem/kde.pm |   53 +++++++++++++++++++++++++
 debian/changelog                              |    1 +
 2 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/debhelper/Debian/Debhelper/Buildsystem/kde.pm b/debhelper/Debian/Debhelper/Buildsystem/kde.pm
new file mode 100644
index 0000000..5903836
--- /dev/null
+++ b/debhelper/Debian/Debhelper/Buildsystem/kde.pm
@@ -0,0 +1,53 @@
+# A debhelper build system class for building KDE 4 packages.
+# It is based on cmake class but passes KDE 4 flags by default.
+#
+# Copyright: © 2009 Modestas Vainius
+# License: GPL-2+
+
+package Debian::Debhelper::Buildsystem::kde;
+
+use strict;
+use warnings;
+use Debian::Debhelper::Dh_Lib qw(error);
+use base 'Debian::Debhelper::Buildsystem::cmake';
+
+sub DESCRIPTION {
+    "CMake with KDE 4 flags"
+}
+
+sub KDE4_FLAGS_FILE {
+    my $file = "makefiles/1/kde4_flags";
+    if (! -r $file) {
+        $file = "/usr/share/pkg-kde-tools/makefiles/1/kde4_flags";
+    }
+    if (! -r $file) {
+        error "kde4_flags file could not be found";
+    }
+    return $file;
+}
+
+# Use shell for parsing contents of the kde4_flags file
+sub get_kde4_flags {
+    my $this=shift;
+    my $file = KDE4_FLAGS_FILE;
+    my ($escaped_flags, @escaped_flags);
+    my $flags;
+
+    # Read escaped flags from the file
+    open(KDE4_FLAGS, "<", $file) || error("unable to open KDE 4 flags file: $file");
+    @escaped_flags = <KDE4_FLAGS>;
+    chop @escaped_flags;
+    $escaped_flags = join(" ", @escaped_flags);
+    close KDE4_FLAGS;
+
+    # Unescape flags using shell
+    $flags = `$^X -w -Mstrict -e 'print join("\\x1e", \@ARGV);' -- $escaped_flags`;
+    return split("\x1e", $flags);
+}
+
+sub configure {
+    my $this=shift;
+    return $this->SUPER::configure($this->get_kde4_flags(), @_);
+}
+
+1;
diff --git a/debian/changelog b/debian/changelog
index 85f8b7d..399ce41 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ pkg-kde-tools (0.4.12~pre1) UNRELEASED; urgency=low
 
   * Split off KDE 4 cmake flags from variables.mk to the text file.
   * Create debhelper subdir and move dh_sameversiondep to it.
+  * Add a kde build system for debhelper (>= 7.3).
 
  -- Modestas Vainius <modestas at vainius.eu>  Thu, 27 Aug 2009 09:45:30 +0300
 

-- 
Debian Qt/KDE packaging tools



More information about the pkg-kde-commits mailing list