rev 11464 - branches/kde4/cdbs

Modestas Vainius modax-guest at alioth.debian.org
Sat Jul 12 09:12:52 UTC 2008


Author: modax-guest
Date: 2008-07-12 09:12:51 +0000 (Sat, 12 Jul 2008)
New Revision: 11464

Added:
   branches/kde4/cdbs/variables.mk
Modified:
   branches/kde4/cdbs/kde.mk
Log:
Split off build system non-specific variables to variables.mk. This should make it easier to reuse build configuration for alternative build systems (eg. debhelper 7). This change is not supposed to alter CDBS end result in any way.

Modified: branches/kde4/cdbs/kde.mk
===================================================================
--- branches/kde4/cdbs/kde.mk	2008-07-11 12:18:14 UTC (rev 11463)
+++ branches/kde4/cdbs/kde.mk	2008-07-12 09:12:51 UTC (rev 11464)
@@ -3,41 +3,14 @@
 include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 include /usr/share/cdbs/1/rules/utils.mk
 
-DEB_CONFIG_INSTALL_DIR ?= /usr/share/kde4/config
+# Include default KDE 4 cmake configuration variables
+include debian/cdbs/variables.mk
+# Pass standard KDE 4 flags to cmake via appropriate CDBS variable
+# (DEB_CMAKE_EXTRA_FLAGS)
+DEB_CMAKE_EXTRA_FLAGS = $(DEB_CMAKE_KDE4_FLAGS) $(DEB_CMAKE_CUSTOM_FLAGS) $(DEB_CMAKE_EXTRA_FLAGS)
 
 DEB_COMPRESS_EXCLUDE = .dcl .docbook -license .tag .sty .el
-DEB_CMAKE_EXTRA_FLAGS += \
-			-DCMAKE_BUILD_TYPE=Debian \
-			$(KDE4-ENABLE-FINAL) \
-			-DKDE4_BUILD_TESTS=false \
-			-DKDE_DISTRIBUTION_TEXT="Debian packages" \
-			-DKDE_DEFAULT_HOME=.kde4 \
-			-DCMAKE_SKIP_RPATH=true \
-			-DKDE4_USE_ALWAYS_FULL_RPATH=false \
-			-DCONFIG_INSTALL_DIR=$(DEB_CONFIG_INSTALL_DIR) \
-			-DDATA_INSTALL_DIR=/usr/share/kde4/apps \
-			-DHTML_INSTALL_DIR=/usr/share/doc/kde4/HTML \
-			-DKCFG_INSTALL_DIR=/usr/share/kde4/config.kcfg \
-			-DLIB_INSTALL_DIR=/usr/lib \
-			-DSYSCONF_INSTALL_DIR=/etc
 
-# Set the one below to something else than 'yes' to disable linking 
-# with --as-needed (on by default)
-DEB_KDE_LINK_WITH_AS_NEEDED ?= yes
-ifneq (,$(findstring yes, $(DEB_KDE_LINK_WITH_AS_NEEDED)))
-	ifeq (,$(findstring no-as-needed, $(DEB_BUILD_OPTIONS)))
-		DEB_KDE_LINK_WITH_AS_NEEDED := yes
-		DEB_CMAKE_EXTRA_FLAGS += \
-					-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--no-undefined -Wl,--as-needed" \
-					-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--no-undefined -Wl,--as-needed" \
-					-DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined -Wl,--as-needed"
-	else
-		DEB_KDE_LINK_WITH_AS_NEEDED := no
-	endif
-else
-	DEB_KDE_LINK_WITH_AS_NEEDED := no
-endif
-
 #DEB_CMAKE_PREFIX = /usr/lib/kde4
 DEB_DH_INSTALL_SOURCEDIR = debian/tmp
 #DEB_DH_SHLIBDEPS_ARGS = -l/usr/lib/kde4/lib/
@@ -45,15 +18,6 @@
 #DEB_MAKE_ENVVARS += XDG_CONFIG_DIRS=/etc/xdg XDG_DATA_DIRS=/usr/share
 #DEB_STRIP_EXCLUDE = so
 
-ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-    cdbs_treat_me_gently_arches := arm m68k alpha ppc64 armel armeb
-    ifeq (,$(filter $(DEB_HOST_ARCH_CPU),$(cdbs_treat_me_gently_arches)))
-        KDE4-ENABLE-FINAL = $(if $(DEB_KDE_ENABLE_FINAL),-DKDE4_ENABLE_FINAL=true,)
-    else
-        KDE4-ENABLE-FINAL =
-    endif
-endif
-
 common-build-arch:: debian/stamp-man-pages
 debian/stamp-man-pages:
 	if ! test -d debian/man/out; then mkdir -p debian/man/out; fi

Added: branches/kde4/cdbs/variables.mk
===================================================================
--- branches/kde4/cdbs/variables.mk	                        (rev 0)
+++ branches/kde4/cdbs/variables.mk	2008-07-12 09:12:51 UTC (rev 11464)
@@ -0,0 +1,49 @@
+# KDE 4 global configuration file installation directory
+DEB_CONFIG_INSTALL_DIR ?= /usr/share/kde4/config
+
+# Standard Debian KDE 4 cmake flags
+DEB_CMAKE_KDE4_FLAGS += \
+        -DCMAKE_BUILD_TYPE=Debian \
+        -DKDE4_ENABLE_FINAL=$(KDE4-ENABLE-FINAL) \
+        -DKDE4_BUILD_TESTS=false \
+        -DKDE_DISTRIBUTION_TEXT="Debian packages" \
+        -DKDE_DEFAULT_HOME=.kde4 \
+        -DCMAKE_SKIP_RPATH=true \
+        -DKDE4_USE_ALWAYS_FULL_RPATH=false \
+        -DCONFIG_INSTALL_DIR=$(DEB_CONFIG_INSTALL_DIR) \
+        -DDATA_INSTALL_DIR=/usr/share/kde4/apps \
+        -DHTML_INSTALL_DIR=/usr/share/doc/kde4/HTML \
+        -DKCFG_INSTALL_DIR=/usr/share/kde4/config.kcfg \
+        -DLIB_INSTALL_DIR=/usr/lib \
+        -DSYSCONF_INSTALL_DIR=/etc
+
+# Support building with enable final (disabled by default)
+DEB_KDE_ENABLE_FINAL ?=
+KDE4-ENABLE-FINAL := false
+ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+    treat_me_gently_arches := arm m68k alpha ppc64 armel armeb
+    DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+    ifeq (,$(filter $(DEB_HOST_ARCH_CPU),$(treat_me_gently_arches)))
+        KDE4-ENABLE-FINAL := $(if $(DEB_KDE_ENABLE_FINAL),true,false)
+    endif
+endif
+
+#### Default additional (custom) cmake flags ####
+DEB_CMAKE_CUSTOM_FLAGS ?=
+
+# Set the one below to something else than 'yes' to disable linking 
+# with --as-needed (on by default)
+DEB_KDE_LINK_WITH_AS_NEEDED ?= yes
+ifneq (,$(findstring yes, $(DEB_KDE_LINK_WITH_AS_NEEDED)))
+    ifeq (,$(findstring no-as-needed, $(DEB_BUILD_OPTIONS)))
+        DEB_KDE_LINK_WITH_AS_NEEDED := yes
+        DEB_CMAKE_CUSTOM_FLAGS += \
+            -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--no-undefined -Wl,--as-needed" \
+            -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--no-undefined -Wl,--as-needed" \
+            -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined -Wl,--as-needed"
+    else
+        DEB_KDE_LINK_WITH_AS_NEEDED := no
+    endif
+else
+    DEB_KDE_LINK_WITH_AS_NEEDED := no
+endif




More information about the pkg-kde-commits mailing list