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