Contents of /branches/R11-unstable/include/kde4.sminc
Parent Directory | Revision Log
Revision 12279 -
(show annotations)
(download)
Tue May 15 13:12:16 2012 UTC (12 years, 4 months ago) by niro
Original Path: trunk/include/kde4.sminc
File size: 4143 byte(s)
Tue May 15 13:12:16 2012 UTC (12 years, 4 months ago) by niro
Original Path: trunk/include/kde4.sminc
File size: 4143 byte(s)
-added qt4-declarative
1 | # $Id$ |
2 | |
3 | sminclude mtools cmake qt4 |
4 | |
5 | ## some global vars ## |
6 | export KDEDIR=/usr |
7 | export KDECONFDIR=/etc/kde4 |
8 | 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" |
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 | : ${PCAT="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 | >= x11-libs/libXinerama-1 |
30 | >= 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 | >= x11-libs/qt4-declarative-4.7" |
40 | |
41 | if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] |
42 | then |
43 | DEPEND="${DEPEND} |
44 | >= virtual/phonon |
45 | >= virtual/phonon-backend" |
46 | fi |
47 | |
48 | SDEPEND="${SDEPEND} |
49 | >= dev-util/cmake-2.8.5 |
50 | >= dev-util/pkgconfig-0.25 |
51 | >= x11-proto/xf86vidmodeproto-2 |
52 | >= x11-proto/xineramaproto-1" |
53 | |
54 | if [[ ${PNAME} != automoc4 ]] |
55 | then |
56 | SDEPEND="${SDEPEND} |
57 | >= kde-base/automoc4-0.9.88" |
58 | fi |
59 | |
60 | # small hack to fix kdemirrors |
61 | [[ ${KDE_MIRROR_UNSTABLE} = 1 ]] && KDE_MIRRORS=$(echo ${KDE_MIRRORS} | sed "s:/stable:/unstable:g") |
62 | |
63 | SRC_URI=( |
64 | ${SRC_URI[*]} |
65 | kde://${PVER}/src/${SRCFILE} |
66 | kde://${PVER%.*}/src/${SRCFILE} |
67 | mirror://${PNAME}/${SRCFILE} |
68 | ) |
69 | |
70 | # exported functions and variables for mage-file |
71 | SPECIAL_VARS="${SPECIAL_VARS} KDEDIR" |
72 | SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove" |
73 | |
74 | kde4_configure() |
75 | { |
76 | local configure_opts |
77 | |
78 | # disabled, seems to be broken atm |
79 | # # use --enable-final only on i*86 |
80 | # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON" |
81 | configure_opts+=" -DCMAKE_BUILD_TYPE=Release" |
82 | |
83 | # use full rpath on non /usr installations |
84 | [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON" |
85 | |
86 | # add akonadi dbus dir |
87 | if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]] |
88 | then |
89 | configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/" |
90 | configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/" |
91 | fi |
92 | |
93 | # add commandline given arguments |
94 | configure_opts+=" $@" |
95 | |
96 | # remove build dir if exist |
97 | [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build |
98 | |
99 | # build outside of the source dir |
100 | install -d ${BUILDDIR}/build || die |
101 | cd ${BUILDDIR}/build |
102 | |
103 | cmake_configure \ |
104 | -DCMAKE_INSTALL_PREFIX=${KDEDIR} \ |
105 | -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \ |
106 | -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \ |
107 | -DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ |
108 | -DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \ |
109 | -DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ |
110 | -DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \ |
111 | -DKDE4_ENABLE_FPIE=ON \ |
112 | -DKDE4_BUILD_TESTS=OFF \ |
113 | -DKDE4_ENABLE_HTMLHANDBOOK=ON \ |
114 | ${configure_opts} \ |
115 | || die |
116 | } |
117 | |
118 | kde4_src_prepare() |
119 | { |
120 | munpack ${SRCFILE} || die |
121 | } |
122 | |
123 | kde4_src_compile() |
124 | { |
125 | cd ${SRCDIR} |
126 | |
127 | kde4_configure || die |
128 | mmake ${KDE4_MAKE_OPTS} || die |
129 | } |
130 | |
131 | kde4_src_install() |
132 | { |
133 | cd ${BUILDDIR}/build |
134 | mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die |
135 | |
136 | # move dbus service dirs to a proper location if KDEDIR != /usr |
137 | if [[ ${KDEDIR} != /usr ]] |
138 | then |
139 | if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]] |
140 | then |
141 | echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" |
142 | minstalldir /usr/share || die |
143 | cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die |
144 | rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die |
145 | fi |
146 | fi |
147 | |
148 | cd ${SRCDIR} |
149 | local i |
150 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |
151 | FAQ LICENSE NEWS README TODO |
152 | do |
153 | if [ -f ${SRCDIR}/${i} ] |
154 | then |
155 | minstalldocs ${i} || die |
156 | fi |
157 | done |
158 | } |
159 | |
160 | export_inherits kde4 src_prepare src_compile src_install |