Contents of /trunk/include/kde4.sminc
Parent Directory
|
Revision Log
Revision 9863 -
(show annotations)
(download)
Fri Jan 13 19:22:05 2012 UTC (12 years, 4 months ago) by niro
Original Path: branches/magellan-next/include/kde4.sminc
File size: 4110 byte(s)
Fri Jan 13 19:22:05 2012 UTC (12 years, 4 months ago) by niro
Original Path: branches/magellan-next/include/kde4.sminc
File size: 4110 byte(s)
- PCATEGORIE -> PCAT transition
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 | |
40 | if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] |
41 | then |
42 | DEPEND="${DEPEND} |
43 | >= virtual/phonon |
44 | >= virtual/phonon-backend" |
45 | fi |
46 | |
47 | SDEPEND="${SDEPEND} |
48 | >= dev-util/cmake-2.8.5 |
49 | >= dev-util/pkgconfig-0.25 |
50 | >= x11-proto/xf86vidmodeproto-2 |
51 | >= x11-proto/xineramaproto-1" |
52 | |
53 | if [[ ${PNAME} != automoc4 ]] |
54 | then |
55 | SDEPEND="${SDEPEND} |
56 | >= kde-base/automoc4-0.9.88" |
57 | fi |
58 | |
59 | # 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 | SPECIAL_VARS="${SPECIAL_VARS} KDEDIR" |
71 | SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove" |
72 | |
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 | # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON" |
80 | configure_opts+=" -DCMAKE_BUILD_TYPE=Release" |
81 | |
82 | # use full rpath on non /usr installations |
83 | [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON" |
84 | |
85 | # add akonadi dbus dir |
86 | if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]] |
87 | then |
88 | configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/" |
89 | configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/" |
90 | fi |
91 | |
92 | # add commandline given arguments |
93 | configure_opts+=" $@" |
94 | |
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 | -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 | -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 | mmake ${KDE4_MAKE_OPTS} || die |
128 | } |
129 | |
130 | kde4_src_install() |
131 | { |
132 | cd ${BUILDDIR}/build |
133 | mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die |
134 | |
135 | # 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 | |
147 | 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 | export_inherits kde4 src_prepare src_compile src_install |