[Frugalware-git] kdetesting: include/kde.sh

2010-01-21 Thread Michel Hermier
Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kdetesting.git;a=commitdiff;h=0317239219166c74197f2f8859ec8aa5df0e2eb0

commit 0317239219166c74197f2f8859ec8aa5df0e2eb0
Author: Michel Hermier 
Date:   Thu Jan 21 12:50:52 2010 +0100

include/kde.sh

* Introduce _F_kde_qtver, the minimal required qt version for KDE.

diff --git a/source/include/kde.sh b/source/include/kde.sh
index 7d13f7b..8a025cf 100644
--- a/source/include/kde.sh
+++ b/source/include/kde.sh
@@ -28,6 +28,7 @@ Finclude cmake
#
# == OPTIONS
# * _F_kde_ver (defaults to the current KDE version)
+# * _F_kde_qtver (defaults to the qt version required to build the current 
version)
# * _F_kde_name (defaults to $pkgname): if you want to use a custom package
# name (for example the upstream name contains uppercase letters) then use this
# to declare the real name
@@ -42,6 +43,10 @@ if [ -z "$_F_kde_ver" ]; then
_F_kde_ver=4.3.4
fi

+if [ -z "$_F_kde_qtver" ]; then
+   _F_kde_qtver=4.6.0
+fi
+
if [ -z "$_F_kde_name" ]; then
_F_kde_name=$pkgname
fi
___
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git


[Frugalware-git] kdetesting: include/kde.sh

2010-01-18 Thread Michel Hermier
Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kdetesting.git;a=commitdiff;h=31c2a5baba9c43cbe0822624dfb90422c7c6cf5b

commit 31c2a5baba9c43cbe0822624dfb90422c7c6cf5b
Author: Michel Hermier 
Date:   Tue Jan 19 00:03:15 2010 +0100

include/kde.sh

* Hack kde.sh to ease splitting.
* Renamed functions from CMakeKDE_* to KDE_*.

diff --git a/source/include/kde.sh b/source/include/kde.sh
index bc4d7f9..7d13f7b 100644
--- a/source/include/kde.sh
+++ b/source/include/kde.sh
@@ -5,6 +5,7 @@ Finclude cmake
###
# = kde.sh(3)
# Gabriel Craciunescu 
+# Michel Hermier 
#
# == NAME
# kde.sh - for Frugalware
@@ -33,8 +34,8 @@ Finclude cmake
# * _F_kde_pkgver (defaults to $pkgver or to $_F_kde_ver if empty): the version 
of the package
# used to construct the source.
# * _F_kde_subpkgs (no defaults): Special array for splitting packages 
automatically.
-# * _F_cmakekde_final (default: FALSE): Enable finalisation of binaries 
(Optimize more)
-# Disable by default since it is an optimisation not allways tested/available 
by upstream.
+# * _F_kde_final (no defaults): Enable finalisation of binaries (Optimize more)
+# Use project default since it is an optimisation not allways tested/available 
by upstream.
###

if [ -z "$_F_kde_ver" ]; then
@@ -63,8 +64,8 @@ if [ -z "$_F_kde_dirname" ]; then
_F_kde_dirname="stable/$_F_kde_ver/src"
fi

-if [ -z "$_F_cmakekde_final" ]; then
-   _F_cmakekde_final="FALSE"
+if [ -n "$_F_kde_final" ]; then
+   _F_cmake_confopts="$_F_cmake_confopts -DKDE4_ENABLE_FINAL=$_F_kde_final"
fi

###
@@ -102,36 +103,33 @@ if [ -z "$_F_cd_path" ]; then
_F_cd_path=$_F_kde_name-$_F_kde_pkgver
fi

-if [ "$_F_cmakekde_final" = "TRUE" ]; then
-   _F_cmake_type="None"
-fi
-
###
# == APPENDED VARIABLES
# makedepends: append automoc4 unless building it.
+# _F_cmake_confopts: append some kde specific options.
###
if [ "$_F_kde_name" != 'automoc4' ]; then
makedepends=("${makedepen...@]}" 'automoc4')
fi

-if [ "$_F_cmake_type" = "None" ]; then
-   _F_KDE_CXX_FLAGS="$_F_KDE_CXX_FLAGS -DNDEBUG -DQT_NO_DEBUG"
-fi
-
-if [ "$_F_cmake_type" = "Debug" ]; then
-_F_KDE_CXX_FLAGS="$_F_KDE_CXX_FLAGS -ggdb3"
-   options=("${optio...@]}" "nostrip")
-fi
+case "$_F_cmake_type" in
+None)  _F_KDE_CXX_FLAGS="$_F_KDE_CXX_FLAGS -DNDEBUG -DQT_NO_DEBUG";;
+Debug*)_F_KDE_CXX_FLAGS="$_F_KDE_CXX_FLAGS -ggdb3";;
+esac

_F_cmake_confopts="$_F_cmake_confopts \
-DCONFIG_INSTALL_DIR=/etc/kde/config \
-DKCFG_INSTALL_DIR=/etc/kde/config.kcfg \
-DICON_INSTALL_DIR=/usr/share/kde/icons \
-DKDE4_USE_ALWAYS_FULL_RPATH=ON \
-   -DKDE4_ENABLE_FINAL=$_F_cmakekde_final \
-DKDE_DISTRIBUTION_TEXT='Frugalware Linux'"

-kde_install()
+###
+# == PROVIDED FUNCTIONS
+# * KDE_project_install: Install a specific package. Parameters: 1) Name of the
+# project (Must also be the name of a directory).
+###
+KDE_project_install()
{
## What is that ?
## - usually an 'normal' named 'project' looks like this:
@@ -144,40 +142,49 @@ kde_install()
if [ -d "doc/$1" ]; then #  does the package has docs ?
Fmessage "Installing docs for $1."
## install docs
-   make -C "doc/$1" DESTDIR=$Fdestdir  install || Fdie
+   make -C "doc/$1" DESTDIR="$Fdestdir" install || Fdie
fi
fi
## install the package
-   make -C "$1" DESTDIR=$Fdestdir  install || Fdie
+   make -C "$1" DESTDIR="$Fdestdir" install || Fdie
}

-kde_split()
+###
+# * KDE_project_split(): Moves a KDE project to a subpackage. Parameters:
+# 1) name of the subpackage 2) Name of the project (see KDE_project_install).
+# Example: KDE_project_split kopete-irc kopete/protocols/irc
+###
+KDE_project_split()
{
-   kde_install "$1"
-   ## figure whatever we have /etc
-   if [ -d "$startdir/pkg/etc" ]; then
-   Fsplit "$2" /usr /etc
-   else
-   Fsplit "$2" /usr
-   fi
+   KDE_project_install "$2"
+   Fsplit "$1" /\*
}

-CMakeKDE_split()
+###
+# * KDE_split(): Moves the _F_kde_subpkgs name list to subpackages. Parameters:
+# None. To find the projects dir, front "$pkgname-" and '-' are changed in '/'
+# to _F_kde_subpkgs names. That way one can produce subpackage for a
+# subdirectory project. Example: "kdelibs-kioslave-ftp" would search for
+# kioslave/ftp project subdir.
+###
+KDE_split()
{
-   local i
-   local clean
+   local i clean

## let's try that way
-   for i in ${_f_kde_subpk...@]}
+   for i in "${_f_kde_subpk...@]}"
do
## we use for weird or not logical names
## $pkgname-
-   clean=$(echo $i|sed 's/.*-//1') # foo-blah -> blah
+   clean=$(eval "echo \"\${i/#$pkgname-/}\"") # Remove front 
"$pkgname-"
+   if [ ! -d "$clean" ]; then
+   clean="${clean//-//}" # Transform "-" into "/"
+   fi

## check whatever that project exists
if [ -d "$clean" ]; then
## split it
-   kde_split "$clean" "$i"
+   KDE_project_split "$i" "$clean"
else
Fmessage "Aieee 

[Frugalware-git] kdetesting: include/kde.sh

2010-01-10 Thread Michel Hermier
Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kdetesting.git;a=commitdiff;h=0161e9b3fe0a9372ad3675f94652e694cf8f5aee

commit 0161e9b3fe0a9372ad3675f94652e694cf8f5aee
Author: Michel Hermier 
Date:   Sun Jan 10 12:05:33 2010 +0100

include/kde.sh

* Make _F_cmakekde_final FALSE by default. It is not allways available
by upstream code, and disabling this optimisation is allways safe.

diff --git a/source/include/kde.sh b/source/include/kde.sh
index 1156aa8..bc4d7f9 100644
--- a/source/include/kde.sh
+++ b/source/include/kde.sh
@@ -33,7 +33,8 @@ Finclude cmake
# * _F_kde_pkgver (defaults to $pkgver or to $_F_kde_ver if empty): the version 
of the package
# used to construct the source.
# * _F_kde_subpkgs (no defaults): Special array for splitting packages 
automatically.
-# * _F_cmakekde_final (default: TRUE): Enable finalisation of binaries 
(Optimize more)
+# * _F_cmakekde_final (default: FALSE): Enable finalisation of binaries 
(Optimize more)
+# Disable by default since it is an optimisation not allways tested/available 
by upstream.
###

if [ -z "$_F_kde_ver" ]; then
@@ -63,7 +64,7 @@ if [ -z "$_F_kde_dirname" ]; then
fi

if [ -z "$_F_cmakekde_final" ]; then
-   _F_cmakekde_final="TRUE"
+   _F_cmakekde_final="FALSE"
fi

###
___
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git


[Frugalware-git] kdetesting: include/kde.sh

2010-01-04 Thread Michel Hermier
Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kdetesting.git;a=commitdiff;h=2cc08914dad4f3675cf97a8a59c535978878041b

commit 2cc08914dad4f3675cf97a8a59c535978878041b
Author: Michel Hermier 
Date:   Mon Jan 4 13:36:28 2010 +0100

include/kde.sh

* Update to 4.3.4 and add other small fixes.

diff --git a/source/include/kde.sh b/source/include/kde.sh
index ae1dcab..1156aa8 100644
--- a/source/include/kde.sh
+++ b/source/include/kde.sh
@@ -26,7 +26,7 @@ Finclude cmake
# --
#
# == OPTIONS
-# * _F_kde_ver (default: 4.3.1): The current KDE version.
+# * _F_kde_ver (defaults to the current KDE version)
# * _F_kde_name (defaults to $pkgname): if you want to use a custom package
# name (for example the upstream name contains uppercase letters) then use this
# to declare the real name
@@ -36,21 +36,8 @@ Finclude cmake
# * _F_cmakekde_final (default: TRUE): Enable finalisation of binaries 
(Optimize more)
###

-if [ -n "$_F_cmake_type" ] && [ "$_F_cmake_type" = "None" ]; then
-   _F_KDE_CXX_FLAGS="$_F_KDE_CXX_FLAGS -DNDEBUG -DQT_NO_DEBUG"
-fi
-
-if [ -n "$_F_cmake_type" ] && [ "$_F_cmake_type" = "Debug" ]; then
-_F_KDE_CXX_FLAGS="$_F_KDE_CXX_FLAGS -ggdb3"
-   options=("${optio...@]}" "nostrip")
-fi
-
-if [ -z "$_F_cmakekde_final" ]; then
-_F_cmakekde_final="TRUE"
-fi
-
if [ -z "$_F_kde_ver" ]; then
-   _F_kde_ver=4.3.3
+   _F_kde_ver=4.3.4
fi

if [ -z "$_F_kde_name" ]; then
@@ -75,8 +62,13 @@ if [ -z "$_F_kde_dirname" ]; then
_F_kde_dirname="stable/$_F_kde_ver/src"
fi

+if [ -z "$_F_cmakekde_final" ]; then
+   _F_cmakekde_final="TRUE"
+fi
+
###
# == OVERWRITTEN VARIABLES
+# * _F_archive_name (default to $_F_kde_name if not set)
# * pkgver (default to $_F_kde_ver if not set)
# * url (if not set)
# * up2date (if not set)
@@ -85,6 +77,10 @@ fi
# * makedepends (if not set)
###

+if [ -z "$_F_archive_name" ]; then
+   _F_archive_name="$_F_kde_name"
+fi
+
if [ -z "$pkgver" ]; then
pkgver="$_F_kde_ver"
fi
@@ -94,7 +90,7 @@ if [ -z "$url" ]; then
fi

if [ -z "$up2date" ]; then
-   up2date="lynx --dump http://www.kde.org | grep -m1 released | sed 
's/\(.*\)KDE \(.*\) released/\2/'"
+   up2date="Flasttar http://kde.org/download/";
fi

if [ ${#sour...@]} -eq 0 ]; then
@@ -105,8 +101,25 @@ if [ -z "$_F_cd_path" ]; then
_F_cd_path=$_F_kde_name-$_F_kde_pkgver
fi

-if [ -z "$makedepends" ]; then
-   makedepends=('automoc4' 'cmake')
+if [ "$_F_cmakekde_final" = "TRUE" ]; then
+   _F_cmake_type="None"
+fi
+
+###
+# == APPENDED VARIABLES
+# makedepends: append automoc4 unless building it.
+###
+if [ "$_F_kde_name" != 'automoc4' ]; then
+   makedepends=("${makedepen...@]}" 'automoc4')
+fi
+
+if [ "$_F_cmake_type" = "None" ]; then
+   _F_KDE_CXX_FLAGS="$_F_KDE_CXX_FLAGS -DNDEBUG -DQT_NO_DEBUG"
+fi
+
+if [ "$_F_cmake_type" = "Debug" ]; then
+_F_KDE_CXX_FLAGS="$_F_KDE_CXX_FLAGS -ggdb3"
+   options=("${optio...@]}" "nostrip")
fi

_F_cmake_confopts="$_F_cmake_confopts \
___
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git