1 |
# $Id$ |
# $Id$ |
2 |
|
|
3 |
sminclude mtools cmake qt4 |
sminclude mtools cmake qt4 dbus |
4 |
|
msetfeature "!check" # no check target in Makefile |
5 |
|
|
6 |
## some global vars ## |
## some global vars ## |
7 |
export KDEDIR=/usr |
export KDEDIR=/usr |
8 |
export KDECONFDIR=/etc/kde4 |
export KDECONFDIR=/etc/kde4 |
9 |
export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins |
export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins |
|
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}" |
19 |
|
|
20 |
# some sane default values |
# some sane default values |
21 |
: ${PCAT="kde-base"} |
: ${PCAT="kde-base"} |
22 |
if [[ ${PVER//.} -ge 483 ]] |
if [[ -z ${SRCFILE} ]] |
23 |
then |
then |
24 |
KDE4_TARBALL_EXTENSION="tar.xz" |
if [[ ${PVER//.} -ge 483 ]] |
25 |
else |
then |
26 |
KDE4_TARBALL_EXTENSION="tar.bz2" |
KDE4_TARBALL_EXTENSION="tar.xz" |
27 |
|
else |
28 |
|
KDE4_TARBALL_EXTENSION="tar.bz2" |
29 |
|
fi |
30 |
fi |
fi |
31 |
: ${SRCFILE="${PNAME/4/}-${PVER}.${KDE4_TARBALL_EXTENSION}"} |
: ${SRCFILE="${PNAME/4/}-${PVER}.${KDE4_TARBALL_EXTENSION}"} |
32 |
: ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"} |
: ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"} |
38 |
DEPEND="${DEPEND} |
DEPEND="${DEPEND} |
39 |
>= x11-libs/libXt-1 |
>= x11-libs/libXt-1 |
40 |
>= x11-libs/libXinerama-1 |
>= x11-libs/libXinerama-1 |
41 |
>= x11-libs/qt4-gui-4.7 |
>= x11-libs/qt4-gui-4.8 |
42 |
>= x11-libs/qt4-qt3support-4.7 |
>= x11-libs/qt4-qt3support-4.8 |
43 |
>= x11-libs/qt4-script-4.7 |
>= x11-libs/qt4-script-4.8 |
44 |
>= x11-libs/qt4-sql-4.7 |
>= x11-libs/qt4-sql-4.8 |
45 |
>= x11-libs/qt4-svg-4.7 |
>= x11-libs/qt4-svg-4.8 |
46 |
>= x11-libs/qt4-test-4.7 |
>= x11-libs/qt4-test-4.8 |
47 |
>= x11-libs/qt4-dbus-4.7 |
>= x11-libs/qt4-dbus-4.8 |
48 |
>= x11-libs/qt4-opengl-4.7 |
>= x11-libs/qt4-opengl-4.8 |
49 |
>= x11-libs/qt4-webkit-4.7 |
>= x11-libs/qt4-webkit-4.8 |
50 |
>= x11-libs/qt4-declarative-4.7" |
>= x11-libs/qt4-declarative-4.8" |
51 |
fi |
fi |
52 |
|
|
53 |
if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] |
if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] && [[ ${PNAME} != oxygen-icons ]] |
54 |
then |
then |
55 |
DEPEND="${DEPEND} |
DEPEND="${DEPEND} |
56 |
>= virtual/phonon |
>= virtual/phonon |
58 |
fi |
fi |
59 |
|
|
60 |
SDEPEND="${SDEPEND} |
SDEPEND="${SDEPEND} |
61 |
>= dev-util/cmake-2.8.5 |
>= dev-util/cmake-2.8.12 |
62 |
>= dev-util/pkgconfig-0.25 |
>= dev-util/pkgconfig-0.25 |
63 |
>= x11-proto/xf86vidmodeproto-2 |
>= x11-proto/xf86vidmodeproto-2 |
64 |
>= x11-proto/xineramaproto-1" |
>= x11-proto/xineramaproto-1" |
79 |
mirror://${PNAME}/${SRCFILE} |
mirror://${PNAME}/${SRCFILE} |
80 |
) |
) |
81 |
|
|
82 |
|
UP2DATE="updatecmd -listonly http://download.kde.org/stable/ | grep 'stable/[0-9]' | sed -n 's:.*/\([0-9].*\)/:\1:;$ p'" |
83 |
|
|
84 |
# exported functions and variables for mage-file |
# exported functions and variables for mage-file |
85 |
SPECIAL_VARS="${SPECIAL_VARS} KDEDIR" |
SPECIAL_VARS="${SPECIAL_VARS} KDEDIR" |
86 |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove" |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove" |
100 |
# add akonadi dbus dir |
# add akonadi dbus dir |
101 |
if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]] |
if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]] |
102 |
then |
then |
103 |
configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/" |
configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=$(mget-dbus-interfaces-dir)" |
104 |
configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/" |
configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=$(mget-dbus-session-bus-services-dir)" |
105 |
fi |
fi |
106 |
|
|
107 |
# add commandline given arguments |
# add commandline given arguments |
118 |
-DCMAKE_INSTALL_PREFIX=${KDEDIR} \ |
-DCMAKE_INSTALL_PREFIX=${KDEDIR} \ |
119 |
-DSYSCONF_INSTALL_DIR=${KDECONFDIR} \ |
-DSYSCONF_INSTALL_DIR=${KDECONFDIR} \ |
120 |
-DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \ |
-DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \ |
121 |
-DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ |
-DDBUS_INTERFACES_INSTALL_DIR=$(mget-dbus-interfaces-dir) \ |
122 |
-DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \ |
-DDBUS_SERVICES_INSTALL_DIR=$(mget-dbus-session-bus-services-dir) \ |
123 |
-DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ |
-DKDE4_DBUS_INTERFACES_DIR=$(mget-dbus-interfaces-dir) \ |
124 |
-DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \ |
-DKDE4_DBUS_SERVICES_DIR=$(mget-dbus-session-bus-services-dir) \ |
125 |
-DKDE4_ENABLE_FPIE=ON \ |
-DKDE4_ENABLE_FPIE=ON \ |
126 |
-DKDE4_BUILD_TESTS=OFF \ |
-DKDE4_BUILD_TESTS=OFF \ |
127 |
-DKDE4_ENABLE_HTMLHANDBOOK=ON \ |
-DKDE4_ENABLE_HTMLHANDBOOK=ON \ |
158 |
rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die |
rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die |
159 |
fi |
fi |
160 |
fi |
fi |
161 |
|
# or if KDECONFDIR != /etc |
162 |
|
if [[ ${KDECONFDIR} != /etc ]] |
163 |
|
then |
164 |
|
if [[ -d ${BINDIR}/${KDECONFDIR}/dbus-1 ]] |
165 |
|
then |
166 |
|
echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" |
167 |
|
minstalldir /etc || die |
168 |
|
cp -R ${BINDIR}/${KDECONFDIR}/dbus-1 ${BINDIR}/etc/ || die |
169 |
|
rm -r ${BINDIR}/${KDECONFDIR}/dbus-1 || die |
170 |
|
fi |
171 |
|
fi |
172 |
|
|
173 |
cd ${SRCDIR} |
cd ${SRCDIR} |
174 |
local i |
local i |