public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/kde:frameworks commit in: eclass/
@ 2013-09-09 18:52 Michael Palimaka
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Palimaka @ 2013-09-09 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     9fd4c4e70798ea47764a517ca5e3bae0eaa90a19
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  9 18:06:40 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Mon Sep  9 18:25:54 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=9fd4c4e7

[eclass] Add initial kde-frameworks eclass.

---
 eclass/kde-frameworks.eclass | 320 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 320 insertions(+)

diff --git a/eclass/kde-frameworks.eclass b/eclass/kde-frameworks.eclass
new file mode 100644
index 0000000..64d4b41
--- /dev/null
+++ b/eclass/kde-frameworks.eclass
@@ -0,0 +1,320 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# @ECLASS: kde-frameworks.eclass
+# @MAINTAINER:
+# kde@gentoo.org
+# @BLURB: Support eclass for KDE Frameworks
+# @DESCRIPTION:
+# The kde-frameworks.eclass provides support for building KDE Frameworks.
+
+if [[ ${___ECLASS_ONCE_KDE_FRAMEWORKS} != "recur -_+^+_- spank" ]] ; then
+___ECLASS_ONCE_KDE_FRAMEWORKS="recur -_+^+_- spank"
+
+# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
+# @DESCRIPTION:
+# For proper description see virtualx.eclass manpage.
+# Here we redefine default value to be manual, if your package needs virtualx
+# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
+: ${VIRTUALX_REQUIRED:=manual}
+
+inherit kde4-functions toolchain-funcs fdo-mime flag-o-matic gnome2-utils base virtualx versionator eutils multilib cmake-utils
+
+if [[ ${KDE_BUILD_TYPE} = live ]]; then
+	inherit git-2
+	EGIT_BRANCH="frameworks"
+	EGIT_SOURCEDIR=${S}
+fi
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
+
+# @ECLASS-VARIABLE: QT_MINIMAL
+# @DESCRIPTION:
+# Determine version of qt we enforce as minimal for the package.
+QT_MINIMAL="${QT_MINIMAL:-5.2.0}"
+
+# @ECLASS-VARIABLE: FRAMEWORKS_DOXYGEN
+# @DESCRIPTION:
+# If defined, add doc to IUSE, add a dependency on doxygen,
+# and generate and install API documentation.
+
+# @ECLASS-VARIABLE: FRAMEWORKS_TEST
+# @DESCRIPTION:
+# If set to "false", do nothing.
+# For any other value, add test to IUSE and add a dependency on qttest.
+: ${FRAMEWORKS_TEST:=true}
+
+# @ECLASS-VARIABLE: FRAMEWORKS_TYPE
+# @DESCRIPTION:
+# Framework source (eg. tier1, tier2 etc.)
+
+if [[ ${FRAMEWORKS_TYPE} = tier* ]] ; then
+	KMNAME="kdelibs"
+	S=${WORKDIR}/${P}/${FRAMEWORKS_TYPE}/${PN}
+fi
+
+HOMEPAGE="http://www.kde.org/"
+LICENSE="GPL-2"
+
+SLOT=5
+
+COMMONDEPEND+="
+	>=dev-qt/qtcore-${QT_MINIMAL}:5
+"
+DEPEND+="dev-libs/extra-cmake-modules"
+
+if [[ -n "${FRAMEWORKS_DOXYGEN}" ]]; then
+	IUSE+=" doc"
+	DEPEND+=" doc? ( app-doc/doxygen )"
+fi
+
+case ${FRAMEWORKS_TEST} in
+	false)	;;
+	*)
+		IUSE+=" test"
+		DEPEND+=" test? ( dev-qt/qttest:5 )"
+		;;
+esac
+
+DEPEND+=" ${COMMONDEPEND}"
+RDEPEND+=" ${COMMONDEPEND}"
+unset COMMONDEPEND
+
+# Determine fetch location for released tarballs
+_calculate_src_uri() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	die "not implemented yet"
+}
+
+# Determine fetch location for live sources
+_calculate_live_repo() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	SRC_URI=""
+
+	local _kmname
+	# @ECLASS-VARIABLE: EGIT_MIRROR
+	# @DESCRIPTION:
+	# This variable allows easy overriding of default kde mirror service
+	# (anongit) with anything else you might want to use.
+	EGIT_MIRROR=${EGIT_MIRROR:=git://anongit.kde.org}
+
+	# @ECLASS-VARIABLE: EGIT_REPONAME
+	# @DESCRIPTION:
+	# This variable allows overriding of default repository
+	# name. Specify only if this differ from PN and KMNAME.
+	if [[ -n ${EGIT_REPONAME} ]]; then
+		# the repository and kmname different
+		_kmname=${EGIT_REPONAME}
+	elif [[ -n ${KMNAME} ]]; then
+		_kmname=${KMNAME}
+	else
+		_kmname=${PN}
+	fi
+
+	# default branching
+	[[ ${PV} != 9999* && ${KDEBASE} == kde-base ]] && \
+		EGIT_BRANCH="KDE/$(get_kde_version)"
+
+	# default repo uri
+	EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}"
+}
+
+case ${KDE_BUILD_TYPE} in
+	live) _calculate_live_repo ;;
+	*) _calculate_src_uri ;;
+esac
+
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
+
+# @ECLASS-VARIABLE: PREFIX
+# @DESCRIPTION:
+# Set the installation PREFIX for non kde-base applications. It defaults to /usr.
+# kde-base packages go into KDE4 installation directory (/usr).
+# No matter the PREFIX, package will be built against KDE installed in /usr.
+
+# @FUNCTION: kde-frameworks_pkg_setup
+# @DESCRIPTION:
+# Do some basic settings
+kde-frameworks_pkg_setup() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# Don't set KDEHOME during compilation, it will cause access violations
+	unset KDEHOME
+
+	# Check if gcc compiler is fresh enough.
+	# In theory should be in pkg_pretend but we check it only for kdelibs there
+	# and for others we do just quick scan in pkg_setup because pkg_pretend
+	# executions consume quite some time.
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		[[ $(gcc-major-version) -lt 4 ]] || \
+				( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \
+			&& die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)."
+	fi
+
+	: ${PREFIX:=/usr}
+
+	# Point to correct QT plugins path
+	QT_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/kde4/plugins/"
+
+	# Fix XDG collision with sandbox
+	export XDG_CONFIG_HOME="${T}"
+}
+
+# @FUNCTION: kde-frameworks_src_unpack
+# @DESCRIPTION:
+# Function for unpacking KDE frameworks.
+kde-frameworks_src_unpack() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if [[ ${KDE_BUILD_TYPE} = live ]]; then
+		git-2_src_unpack
+	else
+		unpack ${A}
+	fi
+}
+
+# @FUNCTION: kde4-base_src_prepare
+# @DESCRIPTION:
+# Function for preparing the KDE frameworks sources.
+kde4-base_src_prepare() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	cmake-utils_src_prepare
+}
+
+# @FUNCTION: kde-frameworks_src_configure
+# @DESCRIPTION:
+# Function for configuring the build of KDE frameworks.
+kde-frameworks_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# having the use flag is only useful in a few packages
+	# it should not be used indiscriminately as with KDE 4
+	# todo: look at KDE_NO_DEBUG too
+	if ! use_if_iuse debug; then
+		append-cppflags -DQT_NO_DEBUG
+	fi
+
+	# Here we set the install prefix
+	tc-is-cross-compiler || cmakeargs+=(-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}")
+
+	# Shadow existing installations
+	unset KDEDIRS
+
+	#qmake -query QT_INSTALL_LIBS unavailable when cross-compiling
+	# todo: is this still relevant?
+	tc-is-cross-compiler && cmakeargs+=(-DQT_LIBRARY_DIR=${ROOT}/usr/$(get_libdir)/qt4)
+	#kde-config -path data unavailable when cross-compiling
+	tc-is-cross-compiler && cmakeargs+=(-DKDE4_DATA_DIR=${ROOT}/usr/share/apps/)
+
+	# sysconf needs to be /etc, not /usr/etc
+	# todo: move this to frameworks that require it
+	# currently tier2/kauth, but possibly more later
+	cmakeargs+=(-DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc)
+
+	# allow the ebuild to override what we set here
+	mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
+
+	cmake-utils_src_configure
+}
+
+# @FUNCTION: kde-frameworks_src_compile
+# @DESCRIPTION:
+# Function for compiling KDE frameworks.
+kde-frameworks_src_compile() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	cmake-utils_src_compile "$@"
+
+	# Build doxygen documentation if applicable
+	if use_if_iuse doc ; then
+		doxygen "${S}"
+	fi
+}
+
+# @FUNCTION: kde-frameworks_src_test
+# @DESCRIPTION:
+# Function for testing KDE frameworks.
+kde-frameworks_src_test() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	_test_runner() {
+		if [[ -n "${VIRTUALDBUS_TEST}" ]]; then
+			export $(dbus-launch)
+		fi
+
+		cmake-utils_src_test
+	}		
+
+	# When run as normal user during ebuild development with the ebuild command, the
+	# kde tests tend to access the session DBUS. This however is not possible in a real
+	# emerge or on the tinderbox.
+	# > make sure it does not happen, so bad tests can be recognized and disabled
+	unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
+
+	if [[ ${VIRTUALX_REQUIRED} == always || ${VIRTUALX_REQUIRED} == test ]]; then
+		VIRTUALX_COMMAND="_test_runner" virtualmake
+	else
+		_test_runner
+	fi
+
+	if [ -n "${DBUS_SESSION_BUS_PID}" ] ; then
+		kill ${DBUS_SESSION_BUS_PID}
+	fi
+}
+
+# @FUNCTION: kde-frameworks_src_install
+# @DESCRIPTION:
+# Function for installing KDE frameworks.
+kde-frameworks_src_install() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# Install common documentation
+	local doc
+	for doc in "${S}"/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do
+		[[ -f ${doc} && -s ${doc} ]] && dodoc "${doc}"
+	done
+
+	# Install doxygen documentation if applicable
+	if use_if_iuse doc ; then
+		dohtml -r html/*
+	fi
+
+	cmake-utils_src_install
+}
+
+# @FUNCTION: kde-frameworks_pkg_preinst
+# @DESCRIPTION:
+# Function storing icon caches
+kde-frameworks_pkg_preinst() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	gnome2_icon_savelist
+}
+
+# @FUNCTION: kde-frameworks_pkg_postinst
+# @DESCRIPTION:
+# Function to rebuild the KDE System Configuration Cache after an application has been installed.
+kde-frameworks_pkg_postinst() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	gnome2_icon_cache_update
+	fdo-mime_desktop_database_update
+	fdo-mime_mime_database_update
+}
+
+# @FUNCTION: kde-frameworks_pkg_postrm
+# @DESCRIPTION:
+# Function to rebuild the KDE System Configuration Cache after an application has been removed.
+kde-frameworks_pkg_postrm() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	gnome2_icon_cache_update
+	fdo-mime_desktop_database_update
+	fdo-mime_mime_database_update
+}
+
+fi


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/kde:frameworks commit in: eclass/
@ 2013-09-09 19:46 Michael Palimaka
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Palimaka @ 2013-09-09 19:46 UTC (permalink / raw
  To: gentoo-commits

commit:     f839a5ac037ec927f9230164bee55d465568dc70
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  9 19:43:27 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Mon Sep  9 19:43:27 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=f839a5ac

[eclass] GCC 4.5 is the minimum for frameworks.

---
 eclass/kde-frameworks.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/kde-frameworks.eclass b/eclass/kde-frameworks.eclass
index 64d4b41..a43fbe3 100644
--- a/eclass/kde-frameworks.eclass
+++ b/eclass/kde-frameworks.eclass
@@ -150,8 +150,8 @@ kde-frameworks_pkg_setup() {
 	# executions consume quite some time.
 	if [[ ${MERGE_TYPE} != binary ]]; then
 		[[ $(gcc-major-version) -lt 4 ]] || \
-				( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \
-			&& die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)."
+				( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 5 ]] ) \
+			&& die "Sorry, but gcc-4.5 or later is required for KDE frameworks."
 	fi
 
 	: ${PREFIX:=/usr}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/kde:frameworks commit in: eclass/
@ 2013-09-10 15:11 Michael Palimaka
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Palimaka @ 2013-09-10 15:11 UTC (permalink / raw
  To: gentoo-commits

commit:     58168f19f79a459a45dbf7a3aa31d8fd26d827e9
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 10 15:08:09 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Tue Sep 10 15:08:09 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=58168f19

[eclass] Only build tests when they are wanted.

---
 eclass/kde-frameworks.eclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/eclass/kde-frameworks.eclass b/eclass/kde-frameworks.eclass
index a43fbe3..16ad96d 100644
--- a/eclass/kde-frameworks.eclass
+++ b/eclass/kde-frameworks.eclass
@@ -215,6 +215,10 @@ kde-frameworks_src_configure() {
 	# currently tier2/kauth, but possibly more later
 	cmakeargs+=(-DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc)
 
+	if ! use_if_iuse test ; then
+		cmakeargs+=( -DBUILD_TESTING=OFF )
+	fi
+
 	# allow the ebuild to override what we set here
 	mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/kde:frameworks commit in: eclass/
@ 2013-09-16 18:19 Michael Palimaka
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Palimaka @ 2013-09-16 18:19 UTC (permalink / raw
  To: gentoo-commits

commit:     6c8bf45285489aa6a753b505f1da5d3bdb69c94a
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 16 18:15:00 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Mon Sep 16 18:15:00 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=6c8bf452

[eclass] Debug code is more widespread than I initially thought, so introduce the USE flag for all consumers.

---
 eclass/kde-frameworks.eclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/eclass/kde-frameworks.eclass b/eclass/kde-frameworks.eclass
index 16ad96d..a820fe2 100644
--- a/eclass/kde-frameworks.eclass
+++ b/eclass/kde-frameworks.eclass
@@ -58,6 +58,7 @@ HOMEPAGE="http://www.kde.org/"
 LICENSE="GPL-2"
 
 SLOT=5
+IUSE+=" debug"
 
 COMMONDEPEND+="
 	>=dev-qt/qtcore-${QT_MINIMAL}:5
@@ -191,9 +192,7 @@ kde4-base_src_prepare() {
 kde-frameworks_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	# having the use flag is only useful in a few packages
-	# it should not be used indiscriminately as with KDE 4
-	# todo: look at KDE_NO_DEBUG too
+	# we rely on cmake-utils.eclass to append -DNDEBUG too
 	if ! use_if_iuse debug; then
 		append-cppflags -DQT_NO_DEBUG
 	fi


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/kde:frameworks commit in: eclass/
@ 2013-11-13 11:44 Michael Palimaka
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Palimaka @ 2013-11-13 11:44 UTC (permalink / raw
  To: gentoo-commits

commit:     c2bf1c49ed657c8bbded302e9ac7260c2acaac35
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 13 11:40:40 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Nov 13 11:40:40 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=c2bf1c49

[eclass] Raise minimum CMake requirement.

---
 eclass/kde-frameworks.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/kde-frameworks.eclass b/eclass/kde-frameworks.eclass
index a820fe2..359ca91 100644
--- a/eclass/kde-frameworks.eclass
+++ b/eclass/kde-frameworks.eclass
@@ -12,6 +12,8 @@
 if [[ ${___ECLASS_ONCE_KDE_FRAMEWORKS} != "recur -_+^+_- spank" ]] ; then
 ___ECLASS_ONCE_KDE_FRAMEWORKS="recur -_+^+_- spank"
 
+CMAKE_MIN_VERSION="2.8.12"
+
 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
 # @DESCRIPTION:
 # For proper description see virtualx.eclass manpage.


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/kde:frameworks commit in: eclass/
@ 2013-11-13 13:46 Michael Palimaka
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Palimaka @ 2013-11-13 13:46 UTC (permalink / raw
  To: gentoo-commits

commit:     79f3a7386f6e4567462ea108a43e544b75e9e35f
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 13 13:42:17 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Nov 13 13:42:17 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=79f3a738

[eclass] Install libraries to kf5 prefix to permit slotting with KDE 4.

---
 eclass/kde-frameworks.eclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/eclass/kde-frameworks.eclass b/eclass/kde-frameworks.eclass
index 359ca91..4bedaab 100644
--- a/eclass/kde-frameworks.eclass
+++ b/eclass/kde-frameworks.eclass
@@ -216,6 +216,11 @@ kde-frameworks_src_configure() {
 	# currently tier2/kauth, but possibly more later
 	cmakeargs+=(-DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc)
 
+	# to support slotting with KDE 4
+	cmakeargs+=(
+		-DINCLUDE_INSTALL_DIR="${EPREFIX}"/usr/include/kf5/
+	)
+
 	if ! use_if_iuse test ; then
 		cmakeargs+=( -DBUILD_TESTING=OFF )
 	fi


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/kde:frameworks commit in: eclass/
@ 2013-11-13 15:10 Michael Palimaka
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Palimaka @ 2013-11-13 15:10 UTC (permalink / raw
  To: gentoo-commits

commit:     47b081c9c7d83530c9adef4582b5ba1c47c296bd
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 13 15:06:13 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Nov 13 15:06:13 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=47b081c9

[eclass] Install binaries to kf5 prefix to permit slotting with KDE 4.

---
 eclass/kde-frameworks.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/kde-frameworks.eclass b/eclass/kde-frameworks.eclass
index 4bedaab..58b4d48 100644
--- a/eclass/kde-frameworks.eclass
+++ b/eclass/kde-frameworks.eclass
@@ -218,6 +218,7 @@ kde-frameworks_src_configure() {
 
 	# to support slotting with KDE 4
 	cmakeargs+=(
+		-DBIN_INSTALL_DIR="${EPREFIX}"/usr/bin/kf5/
 		-DINCLUDE_INSTALL_DIR="${EPREFIX}"/usr/include/kf5/
 	)
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/kde:frameworks commit in: eclass/
@ 2013-11-13 16:33 Michael Palimaka
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Palimaka @ 2013-11-13 16:33 UTC (permalink / raw
  To: gentoo-commits

commit:     02e77a004b3c3dca66b8e1e542397fa893aaa737
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 13 16:28:09 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Nov 13 16:28:09 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=02e77a00

[eclass] Add add_frameworks_dep function.

---
 eclass/kde4-functions.eclass | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 9079fc2..cb6d331 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -39,6 +39,9 @@ esac
 if [[ ${CATEGORY} = kde-base ]]; then
 	debug-print "${ECLASS}: KDEBASE ebuild recognized"
 	KDEBASE=kde-base
+elif [[ ${CATEGORY} = kde-frameworks ]]; then
+	debug-print "${ECLASS}: KDEFRAMEWORKS ebuild recognized"
+	KDEBASE=kde-frameworks
 elif [[ ${KMNAME-${PN}} = kdevelop ]]; then
 	debug-print "${ECLASS}: KDEVELOP ebuild recognized"
 	KDEBASE=kdevelop
@@ -358,6 +361,44 @@ add_kdebase_dep() {
 	echo " >=kde-base/${1}-${ver}:4[aqua=${2:+,${2}}]"
 }
 
+# @FUNCTION: add_frameworks_dep
+# @DESCRIPTION:
+# Create proper dependency for kde-frameworks/ dependencies.
+# This takes 1 to 3 arguments. The first being the package name, the optional
+# second is additional USE flags to append, and the optional third is the
+# version to use instead of the automatic version (use sparingly).
+# The output of this should be added directly to DEPEND/RDEPEND, and may be
+# wrapped in a USE conditional (but not an || conditional without an extra set
+# of parentheses).
+add_frameworks_dep() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local ver
+
+	if [[ -n ${3} ]]; then
+		ver=${3}
+	elif [[ -n ${KDE_OVERRIDE_MINIMAL} ]]; then
+		ver=${KDE_OVERRIDE_MINIMAL}
+	elif [[ ${KDEBASE} != kde-frameworks ]]; then
+		ver=${KDE_MINIMAL}
+	# if building stable-live version depend just on the raw KDE version
+	# to allow merging packages against more stable basic stuff
+	elif [[ ${PV} == *.9999 ]]; then
+		ver=$(get_kde_version)
+	else
+		ver=${PV}
+	fi
+
+	[[ -z ${1} ]] && die "Missing parameter"
+
+	local usedep=
+	if [[ -n ${2} ]] ; then
+		usedep="[${2}]"
+	fi
+
+	echo " >=kde-frameworks/${1}-${ver}:5${usedep}"
+}
+
 # local function to enable specified translations for specified directory
 # used from kde4-functions_enable_selected_linguas function
 _enable_selected_linguas_dir() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/kde:frameworks commit in: eclass/
@ 2013-11-13 16:41 Michael Palimaka
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Palimaka @ 2013-11-13 16:41 UTC (permalink / raw
  To: gentoo-commits

commit:     43c7bf1107162cc2ff55b8e8cfee65522e1483bd
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 13 16:36:26 2013 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Nov 13 16:36:26 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=43c7bf11

[eclass] Permit disabling of the debug USE flag where it makes no sense (remains enabled by default).

---
 eclass/kde-frameworks.eclass | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/eclass/kde-frameworks.eclass b/eclass/kde-frameworks.eclass
index 58b4d48..c92a6b8 100644
--- a/eclass/kde-frameworks.eclass
+++ b/eclass/kde-frameworks.eclass
@@ -36,6 +36,12 @@ EXPORT_FUNCTIONS pkg_setup src_unpack src_configure src_compile src_test src_ins
 # Determine version of qt we enforce as minimal for the package.
 QT_MINIMAL="${QT_MINIMAL:-5.2.0}"
 
+# @ECLASS-VARIABLE: FRAMEWORKS_DEBUG
+# @DESCRIPTION:
+# If set to "false", do nothing.
+# For any other value, add debug to IUSE.
+: ${FRAMEWORKS_DEBUG:=true}
+
 # @ECLASS-VARIABLE: FRAMEWORKS_DOXYGEN
 # @DESCRIPTION:
 # If defined, add doc to IUSE, add a dependency on doxygen,
@@ -60,7 +66,6 @@ HOMEPAGE="http://www.kde.org/"
 LICENSE="GPL-2"
 
 SLOT=5
-IUSE+=" debug"
 
 COMMONDEPEND+="
 	>=dev-qt/qtcore-${QT_MINIMAL}:5
@@ -72,6 +77,13 @@ if [[ -n "${FRAMEWORKS_DOXYGEN}" ]]; then
 	DEPEND+=" doc? ( app-doc/doxygen )"
 fi
 
+case ${FRAMEWORKS_DEBUG} in
+	false)	;;
+	*)
+		IUSE+=" debug"
+		;;
+esac
+
 case ${FRAMEWORKS_TEST} in
 	false)	;;
 	*)


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-13 16:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13 11:44 [gentoo-commits] proj/kde:frameworks commit in: eclass/ Michael Palimaka
  -- strict thread matches above, loose matches on Subject: below --
2013-11-13 16:41 Michael Palimaka
2013-11-13 16:33 Michael Palimaka
2013-11-13 15:10 Michael Palimaka
2013-11-13 13:46 Michael Palimaka
2013-09-16 18:19 Michael Palimaka
2013-09-10 15:11 Michael Palimaka
2013-09-09 19:46 Michael Palimaka
2013-09-09 18:52 Michael Palimaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox