commit:     72cda4f47ce9bfaf31ac5120036991c483c2a317
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  1 15:30:34 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Oct  1 15:30:34 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=72cda4f4

[eclass] Move comment_add_subdirectory from kde{4,5}-functions to cmake-utils.

---
 eclass/cmake-utils.eclass    | 15 +++++++++++++++
 eclass/kde4-functions.eclass | 15 ---------------
 eclass/kde5-functions.eclass | 15 ---------------
 3 files changed, 15 insertions(+), 30 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index baaea56..1ceadb9 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -238,6 +238,21 @@ _generator_to_use() {
        echo ${generator_name}
 }
 
+# @FUNCTION: comment_add_subdirectory
+# @USAGE: <subdirectory>
+# @DESCRIPTION:
+# Comment out an add_subdirectory call in CMakeLists.txt in the current 
directory
+comment_add_subdirectory() {
+        if [[ -z ${1} ]]; then
+                die "comment_add_subdirectory must be passed the directory 
name to comment"
+        fi
+
+        if [[ -e "CMakeLists.txt" ]]; then
+                sed -e 
"/add_subdirectory[[:space:]]*([[:space:]]*${1//\//\\/}[[:space:]]*)/s/^/#DONOTCOMPILE
 /" \
+                        -i CMakeLists.txt || die "failed to comment 
add_subdirectory(${1})"
+        fi
+}
+
 # @FUNCTION: cmake-utils_use_with
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:

diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 7fb9b81..a8d3550 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -121,21 +121,6 @@ buildsycoca() {
        done
 }
 
-# @FUNCTION: comment_add_subdirectory
-# @USAGE: subdirectory
-# @DESCRIPTION:
-# Comment out an add_subdirectory call in CMakeLists.txt in the current 
directory
-comment_add_subdirectory() {
-       if [[ -z ${1} ]]; then
-               die "comment_add_subdirectory must be passed the directory name 
to comment"
-       fi
-
-       if [[ -e "CMakeLists.txt" ]]; then
-               sed -e 
"/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE 
/" \
-                       -i CMakeLists.txt || die "failed to comment 
add_subdirectory(${1})"
-       fi
-}
-
 # @FUNCTION: comment_all_add_subdirectory
 # @USAGE: [list of directory names]
 # @DESCRIPTION:

diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index 55ce45b..4d48d0b 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -55,21 +55,6 @@ else
 fi
 export KDE_BUILD_TYPE
 
-# @FUNCTION: comment_add_subdirectory
-# @USAGE: <subdirectory>
-# @DESCRIPTION:
-# Comment out an add_subdirectory call in CMakeLists.txt in the current 
directory
-comment_add_subdirectory() {
-       if [[ -z ${1} ]]; then
-               die "comment_add_subdirectory must be passed the directory name 
to comment"
-       fi
-
-       if [[ -e "CMakeLists.txt" ]]; then
-               sed -e 
"/add_subdirectory[[:space:]]*([[:space:]]*${1//\//\\/}[[:space:]]*)/s/^/#DONOTCOMPILE
 /" \
-                       -i CMakeLists.txt || die "failed to comment 
add_subdirectory(${1})"
-       fi
-}
-
 # @FUNCTION: _add_kdecategory_dep
 # @INTERNAL
 # @DESCRIPTION:

Reply via email to