Annotation of /trunk/include/kde4.sminc
Parent Directory | Revision Log
Revision 8532 -
(hide annotations)
(download)
Thu Jul 21 21:15:42 2011 UTC (13 years, 3 months ago) by niro
Original Path: branches/magellan-next/include/kde4.sminc
File size: 4116 byte(s)
Thu Jul 21 21:15:42 2011 UTC (13 years, 3 months ago) by niro
Original Path: branches/magellan-next/include/kde4.sminc
File size: 4116 byte(s)
-autoadd automoc4 SDEPEND
1 | niro | 1927 | # $Id$ |
2 | niro | 2 | |
3 | niro | 1927 | sminclude mtools cmake qt4 |
4 | niro | 2 | |
5 | ## some global vars ## | ||
6 | niro | 6839 | export KDEDIR=/usr |
7 | niro | 2 | export KDECONFDIR=/etc/kde4 |
8 | export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins | ||
9 | niro | 4091 | export DBUS_SYSTEM_DIR=/usr/share/dbus-1 |
10 | niro | 2 | |
11 | # fixes some compile issues ala "kde-config: command not found" | ||
12 | export PATH="${KDEDIR}/bin:${PATH}" | ||
13 | export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${KDEDIR}/$(mlibdir)/pkgconfig | ||
14 | |||
15 | # if kde is already installed it may fuck up the build process because it | ||
16 | # try to use the wrong docp etc. | ||
17 | # so we prevent this: | ||
18 | export KDEDIRS=${KDEDIR} | ||
19 | |||
20 | # some sane default values | ||
21 | : ${PCATEGORIE="kde-base"} | ||
22 | : ${SRCFILE="${PNAME/4/}-${PVER}.tar.bz2"} | ||
23 | : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"} | ||
24 | : ${DESCRIPTION="${PNAME}"} | ||
25 | : ${HOMEPAGE="http://www.kde.org/"} | ||
26 | |||
27 | DEPEND="${DEPEND} | ||
28 | >= x11-libs/libXt-1 | ||
29 | niro | 5394 | >= x11-libs/libXinerama-1 |
30 | niro | 8496 | >= x11-libs/qt4-gui-4.7 |
31 | >= x11-libs/qt4-qt3support-4.7 | ||
32 | >= x11-libs/qt4-script-4.7 | ||
33 | >= x11-libs/qt4-sql-4.7 | ||
34 | >= x11-libs/qt4-svg-4.7 | ||
35 | >= x11-libs/qt4-test-4.7 | ||
36 | >= x11-libs/qt4-dbus-4.7 | ||
37 | >= x11-libs/qt4-opengl-4.7 | ||
38 | >= x11-libs/qt4-webkit-4.7" | ||
39 | niro | 2 | |
40 | niro | 8496 | if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] |
41 | niro | 5637 | then |
42 | DEPEND="${DEPEND} | ||
43 | niro | 8496 | >= virtual/phonon |
44 | >= virtual/phonon-backend" | ||
45 | niro | 5637 | fi |
46 | |||
47 | niro | 2 | SDEPEND="${SDEPEND} |
48 | niro | 8496 | >= dev-util/cmake-2.8.5 |
49 | >= dev-util/pkgconfig-0.25 | ||
50 | niro | 2 | >= x11-proto/xf86vidmodeproto-2 |
51 | >= x11-proto/xineramaproto-1" | ||
52 | |||
53 | niro | 8532 | if [[ ${PNAME} != automoc4 ]] |
54 | then | ||
55 | SDEPEND="${SDEPEND} | ||
56 | >= kde-base/automoc4-0.9.88" | ||
57 | fi | ||
58 | |||
59 | niro | 2 | # small hack to fix kdemirrors |
60 | [[ ${KDE_MIRROR_UNSTABLE} = 1 ]] && KDE_MIRRORS=$(echo ${KDE_MIRRORS} | sed "s:/stable:/unstable:g") | ||
61 | |||
62 | SRC_URI=( | ||
63 | ${SRC_URI[*]} | ||
64 | kde://${PVER}/src/${SRCFILE} | ||
65 | kde://${PVER%.*}/src/${SRCFILE} | ||
66 | mirror://${PNAME}/${SRCFILE} | ||
67 | ) | ||
68 | |||
69 | # exported functions and variables for mage-file | ||
70 | niro | 4788 | SPECIAL_VARS="${SPECIAL_VARS} KDEDIR" |
71 | niro | 6918 | SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove" |
72 | niro | 2 | |
73 | kde4_configure() | ||
74 | { | ||
75 | local configure_opts | ||
76 | |||
77 | # disabled, seems to be broken atm | ||
78 | # # use --enable-final only on i*86 | ||
79 | niro | 4091 | # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON" |
80 | configure_opts+=" -DCMAKE_BUILD_TYPE=Release" | ||
81 | niro | 2 | |
82 | niro | 4083 | # use full rpath on non /usr installations |
83 | niro | 4091 | [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON" |
84 | niro | 4083 | |
85 | niro | 4090 | # add akonadi dbus dir |
86 | if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]] | ||
87 | then | ||
88 | niro | 4091 | configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/" |
89 | configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/" | ||
90 | niro | 4090 | fi |
91 | |||
92 | niro | 2 | # add commandline given arguments |
93 | niro | 4091 | configure_opts+=" $@" |
94 | niro | 2 | |
95 | # remove build dir if exist | ||
96 | [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build | ||
97 | |||
98 | # build outside of the source dir | ||
99 | install -d ${BUILDDIR}/build || die | ||
100 | cd ${BUILDDIR}/build | ||
101 | |||
102 | cmake_configure \ | ||
103 | niro | 4091 | -DCMAKE_INSTALL_PREFIX=${KDEDIR} \ |
104 | -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \ | ||
105 | -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \ | ||
106 | -DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ | ||
107 | -DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \ | ||
108 | -DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ | ||
109 | -DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \ | ||
110 | niro | 2 | -DKDE4_ENABLE_FPIE=ON \ |
111 | -DKDE4_BUILD_TESTS=OFF \ | ||
112 | -DKDE4_ENABLE_HTMLHANDBOOK=ON \ | ||
113 | ${configure_opts} \ | ||
114 | || die | ||
115 | } | ||
116 | |||
117 | kde4_src_prepare() | ||
118 | { | ||
119 | munpack ${SRCFILE} || die | ||
120 | } | ||
121 | |||
122 | kde4_src_compile() | ||
123 | { | ||
124 | cd ${SRCDIR} | ||
125 | |||
126 | kde4_configure || die | ||
127 | niro | 1921 | mmake ${KDE4_MAKE_OPTS} || die |
128 | niro | 2 | } |
129 | |||
130 | kde4_src_install() | ||
131 | { | ||
132 | cd ${BUILDDIR}/build | ||
133 | niro | 1921 | mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die |
134 | niro | 2 | |
135 | niro | 4091 | # move dbus service dirs to a proper location if KDEDIR != /usr |
136 | if [[ ${KDEDIR} != /usr ]] | ||
137 | then | ||
138 | if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]] | ||
139 | then | ||
140 | echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" | ||
141 | minstalldir /usr/share || die | ||
142 | cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die | ||
143 | rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die | ||
144 | fi | ||
145 | fi | ||
146 | niro | 4090 | |
147 | niro | 2 | cd ${SRCDIR} |
148 | local i | ||
149 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ | ||
150 | FAQ LICENSE NEWS README TODO | ||
151 | do | ||
152 | if [ -f ${SRCDIR}/${i} ] | ||
153 | then | ||
154 | minstalldocs ${i} || die | ||
155 | fi | ||
156 | done | ||
157 | } | ||
158 | |||
159 | niro | 7127 | export_inherits kde4 src_prepare src_compile src_install |