Annotation of /branches/R11-stable/include/kde4-split.sminc
Parent Directory | Revision Log
Revision 4430 -
(hide annotations)
(download)
Thu Dec 17 13:55:25 2009 UTC (14 years, 10 months ago) by niro
Original Path: trunk/core/include/kde4-split.sminc
File size: 4484 byte(s)
Thu Dec 17 13:55:25 2009 UTC (14 years, 10 months ago) by niro
Original Path: trunk/core/include/kde4-split.sminc
File size: 4484 byte(s)
-fixed a typo in dependencies
1 | niro | 4133 | # $Id$ |
2 | |||
3 | sminclude kde4 | ||
4 | |||
5 | # fake an empty src_install for split-packages | ||
6 | kde-split_src_install() { :; } | ||
7 | |||
8 | kde4-split_src_install_wrapper() | ||
9 | { | ||
10 | local KDEMODULE="$1" | ||
11 | |||
12 | # fix modulename kdesdk4-kate -> kate | ||
13 | [[ ${KDEMODULE/${SPLIT_PACKAGE_BASE}-/} != ${KDEMODULE} ]] && KDEMODULE="${KDEMODULE/${SPLIT_PACKAGE_BASE}-/}" | ||
14 | |||
15 | cd ${BUILDDIR}/build | ||
16 | |||
17 | # install the kde module | ||
18 | mmake -C ${KDEMODULE} DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die | ||
19 | |||
20 | # install docs | ||
21 | if [[ -d doc/${KDEMODULE} ]] | ||
22 | then | ||
23 | mmake -C doc/${KDEMODULE} DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die | ||
24 | fi | ||
25 | |||
26 | # move dbus service dirs to a proper location if KDEDIR != /usr | ||
27 | if [[ ${KDEDIR} != /usr ]] | ||
28 | then | ||
29 | if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]] | ||
30 | then | ||
31 | echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" | ||
32 | minstalldir /usr/share || die | ||
33 | cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die | ||
34 | rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die | ||
35 | fi | ||
36 | fi | ||
37 | |||
38 | cd ${SRCDIR} | ||
39 | local i | ||
40 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ | ||
41 | FAQ LICENSE NEWS README TODO | ||
42 | do | ||
43 | if [ -f ${SRCDIR}/${i} ] | ||
44 | then | ||
45 | minstalldocs ${i} || die | ||
46 | fi | ||
47 | done | ||
48 | } | ||
49 | |||
50 | kde4-split_common_dependencies() | ||
51 | { | ||
52 | local subpackage | ||
53 | local commondepend | ||
54 | |||
55 | # common dependencies | ||
56 | commondepend=">= x11-libs/qt-4.5 | ||
57 | >= x11-libs/libXext-1.1-r1 | ||
58 | >= x11-libs/libXt-1 | ||
59 | >= x11-libs/libXinerama-1 | ||
60 | >= x11-libs/libXxf86vm-1 | ||
61 | == kde-base/kdelibs4-${PVER} | ||
62 | == kde-base/kdelibs4-experimental-${PVER}" | ||
63 | |||
64 | case ${PNAME/-${subpackage}} in | ||
65 | kdegraphics) | ||
66 | commondepend+=" | ||
67 | == kde-base/kdebase4-runtime-${PVER} | ||
68 | >= kde-base/qimageblitz-0.0.4" | ||
69 | ;; | ||
70 | |||
71 | kdepim) | ||
72 | commondepend+=" | ||
73 | == kde-base/kdebase4-runtime-${PVER}" | ||
74 | ;; | ||
75 | |||
76 | kdepim-runtime) | ||
77 | commondepend+=" | ||
78 | == kde-base/kdebase4-runtime-${PVER} | ||
79 | >= dev-libs/boost-1.40 | ||
80 | == kde-base/kdepimlibs4-${PVER}" | ||
81 | ;; | ||
82 | |||
83 | # case ${PN} in | ||
84 | # akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker) | ||
85 | # IUSE+=" +kontact" | ||
86 | # if ! slot_is_at_least 4.4 ${SLOT} || [[ ${SLOT} == 4.4 && ${PV} < 4.3.68 ]]; then | ||
87 | # RDEPEND+=" kontact? ( $(add_kdebase_dep kontactinterfaces) )" | ||
88 | # fi | ||
89 | # ;; | ||
90 | # esac | ||
91 | # ;; | ||
92 | # | ||
93 | # kdegames) | ||
94 | # if [[ ${PN} != libkdegames ]]; then | ||
95 | # COMMONDEPEND+=" $(add_kdebase_dep libkdegames)" | ||
96 | # fi | ||
97 | # ;; | ||
98 | esac | ||
99 | } | ||
100 | |||
101 | kde4-split_generate_split_info() | ||
102 | { | ||
103 | local subpackage | ||
104 | |||
105 | # get all subpackages with the specifies pcategorie | ||
106 | for subpackage in ${SPLIT_PACKAGES} | ||
107 | do | ||
108 | # exclude meta packages | ||
109 | [[ ${subpackage} = ${PNAME}-meta ]] && continue | ||
110 | |||
111 | eval "kde4-split_split_info_${subpackage}() | ||
112 | { | ||
113 | DESCRIPTION=\"'${subpackage/${PNAME}-/}' from ${PNAME}.\" | ||
114 | DEPEND=\"== kde-base/kdelibs4-${PVER} | ||
115 | niro | 4430 | == kde-base/kdelibs4-experimental-${PVER} |
116 | niro | 4133 | == kde-base/kdepimlibs4-${PVER} |
117 | == kde-base/kdebase4-runtime-${PVER}\" | ||
118 | }" | ||
119 | export_inherits kde4-split split_info_${subpackage} | ||
120 | done | ||
121 | } | ||
122 | |||
123 | kde4-split_generate_meta_package() | ||
124 | { | ||
125 | local subpackage | ||
126 | local export_depends | ||
127 | |||
128 | # get all subpackages with the specifies pcategorie | ||
129 | for subpackage in ${SPLIT_PACKAGES} | ||
130 | do | ||
131 | # we assume the pcategorie is always kde-base! | ||
132 | export_depends="${export_depends} | ||
133 | >= ${PCATEGORIE}/${subpackage}-${PVER}" | ||
134 | done | ||
135 | |||
136 | eval "split_info_${PNAME}-meta() | ||
137 | { | ||
138 | DESCRIPTION=\"Meta package for ${PNAME}.\" | ||
139 | DEPEND=\"${export_depends}\" | ||
140 | PKGTYPE=\"virtual\" | ||
141 | NOPKGBUILD=\"true\" | ||
142 | |||
143 | # drop everything we don't need in the meta package: | ||
144 | INHERITS="" | ||
145 | SPECIAL_VARS="" | ||
146 | SPECIAL_FUNCTIONS="" | ||
147 | SDEPEND="" | ||
148 | PROVIDE="" | ||
149 | unset -f preinstall | ||
150 | unset -f postinstall | ||
151 | unset -f preremove | ||
152 | unset -f postremove | ||
153 | }" | ||
154 | |||
155 | export SPLIT_PACKAGES+=" ${PNAME}-meta" | ||
156 | } | ||
157 | |||
158 | kde4-split_generate_src_install() | ||
159 | { | ||
160 | local subpackage | ||
161 | |||
162 | # run kde4-split_src_install for all SPLIT_PACKAGES | ||
163 | for subpackage in ${SPLIT_PACKAGES} | ||
164 | do | ||
165 | # exclude meta packages | ||
166 | [[ ${subpackage} = ${PNAME}-meta ]] && continue | ||
167 | |||
168 | # create function kde-split_src_install-${subpackage} | ||
169 | eval "kde4-split_src_install_${subpackage}(){ kde4-split_src_install_wrapper ${subpackage} || die; }" | ||
170 | |||
171 | # export kde-split_src_install_${subpackage} as src_install_${subpackage} | ||
172 | export_inherits kde4-split src_install_${subpackage} | ||
173 | done | ||
174 | } | ||
175 | |||
176 | # generate generic split_infos | ||
177 | kde4-split_generate_split_info | ||
178 | |||
179 | # generate a meta package | ||
180 | # run this after kde-split_generate_split_info | ||
181 | # as we add the virtual meta package | ||
182 | kde4-split_generate_meta_package | ||
183 | |||
184 | # run kde4-split_src_install for all SPLIT_PACKAGES | ||
185 | kde4-split_generate_src_install | ||
186 | |||
187 | # export empty src_install | ||
188 | export_inherits kde4-split src_install |