Annotation of /trunk/include/kde4.sminc
Parent Directory | Revision Log
Revision 13883 -
(hide annotations)
(download)
Mon Oct 29 09:08:25 2012 UTC (11 years, 11 months ago) by niro
File size: 4324 byte(s)
Mon Oct 29 09:08:25 2012 UTC (11 years, 11 months ago) by niro
File size: 4324 byte(s)
-do not apply default depend on oxygen-icons
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 | niro | 9863 | : ${PCAT="kde-base"} |
22 | niro | 12339 | if [[ ${PVER//.} -ge 483 ]] |
23 | then | ||
24 | KDE4_TARBALL_EXTENSION="tar.xz" | ||
25 | else | ||
26 | KDE4_TARBALL_EXTENSION="tar.bz2" | ||
27 | fi | ||
28 | : ${SRCFILE="${PNAME/4/}-${PVER}.${KDE4_TARBALL_EXTENSION}"} | ||
29 | niro | 2 | : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"} |
30 | : ${DESCRIPTION="${PNAME}"} | ||
31 | : ${HOMEPAGE="http://www.kde.org/"} | ||
32 | |||
33 | niro | 13883 | if [[ ${PNAME} != oxygen-icons ]] |
34 | then | ||
35 | DEPEND="${DEPEND} | ||
36 | >= x11-libs/libXt-1 | ||
37 | >= x11-libs/libXinerama-1 | ||
38 | >= x11-libs/qt4-gui-4.7 | ||
39 | >= x11-libs/qt4-qt3support-4.7 | ||
40 | >= x11-libs/qt4-script-4.7 | ||
41 | >= x11-libs/qt4-sql-4.7 | ||
42 | >= x11-libs/qt4-svg-4.7 | ||
43 | >= x11-libs/qt4-test-4.7 | ||
44 | >= x11-libs/qt4-dbus-4.7 | ||
45 | >= x11-libs/qt4-opengl-4.7 | ||
46 | >= x11-libs/qt4-webkit-4.7 | ||
47 | >= x11-libs/qt4-declarative-4.7" | ||
48 | fi | ||
49 | niro | 2 | |
50 | niro | 8496 | if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] |
51 | niro | 5637 | then |
52 | DEPEND="${DEPEND} | ||
53 | niro | 8496 | >= virtual/phonon |
54 | >= virtual/phonon-backend" | ||
55 | niro | 5637 | fi |
56 | |||
57 | niro | 2 | SDEPEND="${SDEPEND} |
58 | niro | 8496 | >= dev-util/cmake-2.8.5 |
59 | >= dev-util/pkgconfig-0.25 | ||
60 | niro | 2 | >= x11-proto/xf86vidmodeproto-2 |
61 | >= x11-proto/xineramaproto-1" | ||
62 | |||
63 | niro | 8532 | if [[ ${PNAME} != automoc4 ]] |
64 | then | ||
65 | SDEPEND="${SDEPEND} | ||
66 | >= kde-base/automoc4-0.9.88" | ||
67 | fi | ||
68 | |||
69 | niro | 2 | # small hack to fix kdemirrors |
70 | [[ ${KDE_MIRROR_UNSTABLE} = 1 ]] && KDE_MIRRORS=$(echo ${KDE_MIRRORS} | sed "s:/stable:/unstable:g") | ||
71 | |||
72 | SRC_URI=( | ||
73 | ${SRC_URI[*]} | ||
74 | kde://${PVER}/src/${SRCFILE} | ||
75 | kde://${PVER%.*}/src/${SRCFILE} | ||
76 | mirror://${PNAME}/${SRCFILE} | ||
77 | ) | ||
78 | |||
79 | # exported functions and variables for mage-file | ||
80 | niro | 4788 | SPECIAL_VARS="${SPECIAL_VARS} KDEDIR" |
81 | niro | 6918 | SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove" |
82 | niro | 2 | |
83 | kde4_configure() | ||
84 | { | ||
85 | local configure_opts | ||
86 | |||
87 | # disabled, seems to be broken atm | ||
88 | # # use --enable-final only on i*86 | ||
89 | niro | 4091 | # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON" |
90 | configure_opts+=" -DCMAKE_BUILD_TYPE=Release" | ||
91 | niro | 2 | |
92 | niro | 4083 | # use full rpath on non /usr installations |
93 | niro | 4091 | [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON" |
94 | niro | 4083 | |
95 | niro | 4090 | # add akonadi dbus dir |
96 | if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]] | ||
97 | then | ||
98 | niro | 4091 | configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/" |
99 | configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/" | ||
100 | niro | 4090 | fi |
101 | |||
102 | niro | 2 | # add commandline given arguments |
103 | niro | 4091 | configure_opts+=" $@" |
104 | niro | 2 | |
105 | # remove build dir if exist | ||
106 | [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build | ||
107 | |||
108 | # build outside of the source dir | ||
109 | install -d ${BUILDDIR}/build || die | ||
110 | cd ${BUILDDIR}/build | ||
111 | |||
112 | cmake_configure \ | ||
113 | niro | 4091 | -DCMAKE_INSTALL_PREFIX=${KDEDIR} \ |
114 | -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \ | ||
115 | -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \ | ||
116 | -DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ | ||
117 | -DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \ | ||
118 | -DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ | ||
119 | -DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \ | ||
120 | niro | 2 | -DKDE4_ENABLE_FPIE=ON \ |
121 | -DKDE4_BUILD_TESTS=OFF \ | ||
122 | -DKDE4_ENABLE_HTMLHANDBOOK=ON \ | ||
123 | ${configure_opts} \ | ||
124 | || die | ||
125 | } | ||
126 | |||
127 | kde4_src_prepare() | ||
128 | { | ||
129 | munpack ${SRCFILE} || die | ||
130 | } | ||
131 | |||
132 | kde4_src_compile() | ||
133 | { | ||
134 | cd ${SRCDIR} | ||
135 | |||
136 | kde4_configure || die | ||
137 | niro | 1921 | mmake ${KDE4_MAKE_OPTS} || die |
138 | niro | 2 | } |
139 | |||
140 | kde4_src_install() | ||
141 | { | ||
142 | cd ${BUILDDIR}/build | ||
143 | niro | 1921 | mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die |
144 | niro | 2 | |
145 | niro | 4091 | # move dbus service dirs to a proper location if KDEDIR != /usr |
146 | if [[ ${KDEDIR} != /usr ]] | ||
147 | then | ||
148 | if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]] | ||
149 | then | ||
150 | echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" | ||
151 | minstalldir /usr/share || die | ||
152 | cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die | ||
153 | rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die | ||
154 | fi | ||
155 | fi | ||
156 | niro | 4090 | |
157 | niro | 2 | cd ${SRCDIR} |
158 | local i | ||
159 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ | ||
160 | FAQ LICENSE NEWS README TODO | ||
161 | do | ||
162 | if [ -f ${SRCDIR}/${i} ] | ||
163 | then | ||
164 | minstalldocs ${i} || die | ||
165 | fi | ||
166 | done | ||
167 | } | ||
168 | |||
169 | niro | 7127 | export_inherits kde4 src_prepare src_compile src_install |