1 |
# $Header: /magellan-cvs/smage/include/kde4.sminc,v 1.16 2008/04/05 08:24:39 niro Exp $ |
# $Id$ |
2 |
|
|
3 |
sminclude mtools cmake |
sminclude mtools cmake qt4 |
4 |
|
|
5 |
## some global vars ## |
## some global vars ## |
|
export QTDIR=/opt/qt4 |
|
6 |
export KDEDIR=/opt/kde4 |
export KDEDIR=/opt/kde4 |
7 |
export KDECONFDIR=/etc/kde4 |
export KDECONFDIR=/etc/kde4 |
8 |
export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins |
export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins |
9 |
|
export DBUS_SYSTEM_DIR=/usr/share/dbus-1 |
10 |
|
|
11 |
# fixes some compile issues ala "kde-config: command not found" |
# fixes some compile issues ala "kde-config: command not found" |
12 |
export PATH="${KDEDIR}/bin:${PATH}" |
export PATH="${KDEDIR}/bin:${PATH}" |
27 |
DEPEND="${DEPEND} |
DEPEND="${DEPEND} |
28 |
>= x11-libs/libXt-1 |
>= x11-libs/libXt-1 |
29 |
>= x11-libs/libXinerama-1 |
>= x11-libs/libXinerama-1 |
30 |
>= x11-libs/qt4-4.3.0" |
>= x11-libs/qt4-gui-4.5 |
31 |
|
>= x11-libs/qt4-qt3support-4.5 |
32 |
|
>= x11-libs/qt4-script-4.5 |
33 |
|
>= x11-libs/qt4-sql-4.5 |
34 |
|
>= x11-libs/qt4-svg-4.5 |
35 |
|
>= x11-libs/qt4-test-4.5 |
36 |
|
>= x11-libs/qt4-dbus-4.5 |
37 |
|
>= x11-libs/qt4-phonon-4.5 |
38 |
|
>= x11-libs/qt4-opengl-4.5 |
39 |
|
>= x11-libs/qt4-webkit-4.5" |
40 |
|
|
41 |
SDEPEND="${SDEPEND} |
SDEPEND="${SDEPEND} |
42 |
>= dev-util/cmake-2.4.7 |
>= dev-util/cmake-2.4.7 |
55 |
) |
) |
56 |
|
|
57 |
# exported functions and variables for mage-file |
# exported functions and variables for mage-file |
58 |
SPECIAL_VARS="KDEDIR" |
SPECIAL_VARS="${SPECIAL_VARS} KDEDIR" |
59 |
SPECIAL_FUNCTIONS="kde4_buildsycoca kde4_postinstall kde4_postremove" |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_buildsycoca kde4_postinstall kde4_postremove" |
60 |
|
|
61 |
kde4_configure() |
kde4_configure() |
62 |
{ |
{ |
64 |
|
|
65 |
# disabled, seems to be broken atm |
# disabled, seems to be broken atm |
66 |
# # use --enable-final only on i*86 |
# # use --enable-final only on i*86 |
67 |
# [[ ${ARCH} = i*86 ]] && configure_opts="${configure_opts} -DKDE4_ENABLE_FINAL=ON" |
# [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON" |
68 |
|
configure_opts+=" -DCMAKE_BUILD_TYPE=Release" |
69 |
|
|
70 |
|
# use full rpath on non /usr installations |
71 |
|
[[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON" |
72 |
|
|
73 |
|
# add akonadi dbus dir |
74 |
|
if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]] |
75 |
|
then |
76 |
|
configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/" |
77 |
|
configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/" |
78 |
|
fi |
79 |
|
|
80 |
# add commandline given arguments |
# add commandline given arguments |
81 |
configure_opts="${configure_opts} $@" |
configure_opts+=" $@" |
82 |
|
|
83 |
# remove build dir if exist |
# remove build dir if exist |
84 |
[[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build |
[[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build |
88 |
cd ${BUILDDIR}/build |
cd ${BUILDDIR}/build |
89 |
|
|
90 |
cmake_configure \ |
cmake_configure \ |
91 |
-DCMAKE_INSTALL_PREFIX=${PREFIX:-${KDEDIR}} \ |
-DCMAKE_INSTALL_PREFIX=${KDEDIR} \ |
92 |
-DLIB_INSTALL_DIR=${PREFIX:-${KDEDIR}/$(mlibdir)} \ |
-DSYSCONF_INSTALL_DIR=${KDECONFDIR} \ |
93 |
-DKDE4_USE_ALWAYS_FULL_RPATH=ON \ |
-DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \ |
94 |
|
-DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ |
95 |
|
-DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \ |
96 |
|
-DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ |
97 |
|
-DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \ |
98 |
-DKDE4_ENABLE_FPIE=ON \ |
-DKDE4_ENABLE_FPIE=ON \ |
99 |
-DKDE4_BUILD_TESTS=OFF \ |
-DKDE4_BUILD_TESTS=OFF \ |
100 |
-DKDE4_ENABLE_HTMLHANDBOOK=ON \ |
-DKDE4_ENABLE_HTMLHANDBOOK=ON \ |
112 |
cd ${SRCDIR} |
cd ${SRCDIR} |
113 |
|
|
114 |
kde4_configure || die |
kde4_configure || die |
115 |
mmake || die |
mmake ${KDE4_MAKE_OPTS} || die |
116 |
} |
} |
117 |
|
|
118 |
kde4_src_install() |
kde4_src_install() |
119 |
{ |
{ |
120 |
cd ${BUILDDIR}/build |
cd ${BUILDDIR}/build |
121 |
mmake DESTDIR=${BINDIR} ${KDE3_MAKE_OPTS} install || die |
mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die |
122 |
|
|
123 |
|
# move dbus service dirs to a proper location if KDEDIR != /usr |
124 |
|
if [[ ${KDEDIR} != /usr ]] |
125 |
|
then |
126 |
|
if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]] |
127 |
|
then |
128 |
|
echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" |
129 |
|
minstalldir /usr/share || die |
130 |
|
cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die |
131 |
|
rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die |
132 |
|
fi |
133 |
|
fi |
134 |
|
|
135 |
cd ${SRCDIR} |
cd ${SRCDIR} |
136 |
local i |
local i |