Annotation of /trunk/include/kde4-split.sminc
Parent Directory | Revision Log
Revision 9863 -
(hide annotations)
(download)
Fri Jan 13 19:22:05 2012 UTC (12 years, 10 months ago) by niro
Original Path: branches/magellan-next/include/kde4-split.sminc
File size: 4575 byte(s)
Fri Jan 13 19:22:05 2012 UTC (12 years, 10 months ago) by niro
Original Path: branches/magellan-next/include/kde4-split.sminc
File size: 4575 byte(s)
- PCATEGORIE -> PCAT transition
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 | niro | 4866 | == kde-base/kdelibs4-${PVER}" |
62 | niro | 4133 | |
63 | niro | 4866 | if [[ ${PVER%.*} = 4.3 ]] |
64 | then | ||
65 | commondepend+="== kde-base/kdelibs4-experimental-${PVER}" | ||
66 | fi | ||
67 | |||
68 | niro | 4133 | case ${PNAME/-${subpackage}} in |
69 | kdegraphics) | ||
70 | commondepend+=" | ||
71 | == kde-base/kdebase4-runtime-${PVER} | ||
72 | >= kde-base/qimageblitz-0.0.4" | ||
73 | ;; | ||
74 | |||
75 | kdepim) | ||
76 | commondepend+=" | ||
77 | == kde-base/kdebase4-runtime-${PVER}" | ||
78 | ;; | ||
79 | |||
80 | kdepim-runtime) | ||
81 | commondepend+=" | ||
82 | == kde-base/kdebase4-runtime-${PVER} | ||
83 | >= dev-libs/boost-1.40 | ||
84 | == kde-base/kdepimlibs4-${PVER}" | ||
85 | ;; | ||
86 | |||
87 | # case ${PN} in | ||
88 | # akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker) | ||
89 | # IUSE+=" +kontact" | ||
90 | # if ! slot_is_at_least 4.4 ${SLOT} || [[ ${SLOT} == 4.4 && ${PV} < 4.3.68 ]]; then | ||
91 | # RDEPEND+=" kontact? ( $(add_kdebase_dep kontactinterfaces) )" | ||
92 | # fi | ||
93 | # ;; | ||
94 | # esac | ||
95 | # ;; | ||
96 | # | ||
97 | # kdegames) | ||
98 | # if [[ ${PN} != libkdegames ]]; then | ||
99 | # COMMONDEPEND+=" $(add_kdebase_dep libkdegames)" | ||
100 | # fi | ||
101 | # ;; | ||
102 | esac | ||
103 | } | ||
104 | |||
105 | kde4-split_generate_split_info() | ||
106 | { | ||
107 | local subpackage | ||
108 | |||
109 | niro | 9863 | # get all subpackages with the specified pcat |
110 | niro | 4133 | for subpackage in ${SPLIT_PACKAGES} |
111 | do | ||
112 | # exclude meta packages | ||
113 | [[ ${subpackage} = ${PNAME}-meta ]] && continue | ||
114 | |||
115 | eval "kde4-split_split_info_${subpackage}() | ||
116 | { | ||
117 | DESCRIPTION=\"'${subpackage/${PNAME}-/}' from ${PNAME}.\" | ||
118 | DEPEND=\"== kde-base/kdelibs4-${PVER} | ||
119 | == kde-base/kdepimlibs4-${PVER} | ||
120 | == kde-base/kdebase4-runtime-${PVER}\" | ||
121 | niro | 4898 | |
122 | if [[ ${PVER%.*} = 4.3 ]] | ||
123 | then | ||
124 | niro | 4899 | DEPEND+=\" |
125 | niro | 4900 | == kde-base/kdelibs4-experimental-${PVER}\" |
126 | niro | 4898 | fi |
127 | niro | 4133 | }" |
128 | export_inherits kde4-split split_info_${subpackage} | ||
129 | done | ||
130 | } | ||
131 | |||
132 | kde4-split_generate_meta_package() | ||
133 | { | ||
134 | local subpackage | ||
135 | local export_depends | ||
136 | |||
137 | niro | 9863 | # get all subpackages with the specified pcat |
138 | niro | 4133 | for subpackage in ${SPLIT_PACKAGES} |
139 | do | ||
140 | niro | 9863 | # we assume the pcat is always kde-base! |
141 | niro | 4133 | export_depends="${export_depends} |
142 | niro | 9863 | >= ${PCAT}/${subpackage}-${PVER}" |
143 | niro | 4133 | done |
144 | |||
145 | eval "split_info_${PNAME}-meta() | ||
146 | { | ||
147 | DESCRIPTION=\"Meta package for ${PNAME}.\" | ||
148 | DEPEND=\"${export_depends}\" | ||
149 | PKGTYPE=\"virtual\" | ||
150 | NOPKGBUILD=\"true\" | ||
151 | |||
152 | # drop everything we don't need in the meta package: | ||
153 | INHERITS="" | ||
154 | SPECIAL_VARS="" | ||
155 | SPECIAL_FUNCTIONS="" | ||
156 | SDEPEND="" | ||
157 | PROVIDE="" | ||
158 | unset -f preinstall | ||
159 | unset -f postinstall | ||
160 | unset -f preremove | ||
161 | unset -f postremove | ||
162 | }" | ||
163 | |||
164 | export SPLIT_PACKAGES+=" ${PNAME}-meta" | ||
165 | } | ||
166 | |||
167 | kde4-split_generate_src_install() | ||
168 | { | ||
169 | local subpackage | ||
170 | |||
171 | # run kde4-split_src_install for all SPLIT_PACKAGES | ||
172 | for subpackage in ${SPLIT_PACKAGES} | ||
173 | do | ||
174 | # exclude meta packages | ||
175 | [[ ${subpackage} = ${PNAME}-meta ]] && continue | ||
176 | |||
177 | # create function kde-split_src_install-${subpackage} | ||
178 | eval "kde4-split_src_install_${subpackage}(){ kde4-split_src_install_wrapper ${subpackage} || die; }" | ||
179 | |||
180 | # export kde-split_src_install_${subpackage} as src_install_${subpackage} | ||
181 | export_inherits kde4-split src_install_${subpackage} | ||
182 | done | ||
183 | } | ||
184 | |||
185 | # generate generic split_infos | ||
186 | kde4-split_generate_split_info | ||
187 | |||
188 | # generate a meta package | ||
189 | # run this after kde-split_generate_split_info | ||
190 | # as we add the virtual meta package | ||
191 | kde4-split_generate_meta_package | ||
192 | |||
193 | # run kde4-split_src_install for all SPLIT_PACKAGES | ||
194 | kde4-split_generate_src_install | ||
195 | |||
196 | # export empty src_install | ||
197 | export_inherits kde4-split src_install |