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