| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.52 2011/05/01 13:52:09 scarabeus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.53 2011/06/06 17:51:26 abcd Exp $ |
| 4 | # |
4 | # |
| 5 | # @ECLASS: kde4-meta.eclass |
5 | # @ECLASS: kde4-meta.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # kde@gentoo.org |
7 | # kde@gentoo.org |
| 8 | # @BLURB: Eclass for writing "split" KDE packages. |
8 | # @BLURB: Eclass for writing "split" KDE packages. |
| … | |
… | |
| 19 | KDEMETA_EXPF="pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm" |
19 | KDEMETA_EXPF="pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm" |
| 20 | EXPORT_FUNCTIONS ${KDEMETA_EXPF} |
20 | EXPORT_FUNCTIONS ${KDEMETA_EXPF} |
| 21 | |
21 | |
| 22 | # Add dependencies that all packages in a certain module share. |
22 | # Add dependencies that all packages in a certain module share. |
| 23 | case ${KMNAME} in |
23 | case ${KMNAME} in |
| 24 | kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics) |
24 | kdebase|kdebase-apps|kde-baseapps|kdebase-workspace|kde-workspace|kdebase-runtime|kde-runtime|kdegraphics) |
| 25 | COMMONDEPEND+=" >=media-libs/qimageblitz-0.0.4" |
25 | COMMONDEPEND+=" >=media-libs/qimageblitz-0.0.4" |
| 26 | ;; |
26 | ;; |
| 27 | kdepim|kdepim-runtime) |
27 | kdepim|kdepim-runtime) |
| 28 | case ${PN} in |
28 | case ${PN} in |
| 29 | akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker) |
29 | akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker) |
| … | |
… | |
| 237 | |
237 | |
| 238 | ebegin "Unpacking parts of ${tarball} to ${WORKDIR}" |
238 | ebegin "Unpacking parts of ${tarball} to ${WORKDIR}" |
| 239 | |
239 | |
| 240 | kde4-meta_create_extractlists |
240 | kde4-meta_create_extractlists |
| 241 | |
241 | |
| 242 | for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \ |
242 | for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake |
| 243 | AUTHORS COPYING INSTALL README NEWS ChangeLog |
|
|
| 244 | do |
243 | do |
| 245 | extractlist+=" ${topdir}${moduleprefix}${f}" |
244 | extractlist+=" ${topdir}${moduleprefix}${f}" |
| 246 | done |
245 | done |
| 247 | extractlist+=" $(__list_needed_subdirectories)" |
246 | extractlist+=" $(__list_needed_subdirectories)" |
| 248 | |
247 | |
| … | |
… | |
| 259 | else |
258 | else |
| 260 | tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null || echo "tar extract command failed at least partially - continuing anyway" |
259 | tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null || echo "tar extract command failed at least partially - continuing anyway" |
| 261 | fi |
260 | fi |
| 262 | |
261 | |
| 263 | # Default $S is based on $P; rename the extracted directory to match $S if necessary |
262 | # Default $S is based on $P; rename the extracted directory to match $S if necessary |
|
|
263 | if [[ ${KMNAME} != ${PN} ]]; then |
| 264 | mv ${topdir} ${P} || die "Died while moving \"${topdir}\" to \"${P}\"" |
264 | mv ${topdir} ${P} || die "Died while moving \"${topdir}\" to \"${P}\"" |
|
|
265 | fi |
| 265 | |
266 | |
| 266 | popd > /dev/null |
267 | popd > /dev/null |
| 267 | |
268 | |
| 268 | eend $? |
269 | eend $? |
| 269 | |
270 | |
| … | |
… | |
| 320 | KMEXTRACTONLY+=" |
321 | KMEXTRACTONLY+=" |
| 321 | config-apps.h.cmake |
322 | config-apps.h.cmake |
| 322 | ConfigureChecks.cmake" |
323 | ConfigureChecks.cmake" |
| 323 | fi |
324 | fi |
| 324 | ;; |
325 | ;; |
| 325 | kdebase-apps) |
326 | kdebase-apps | kde-baseapps) |
| 326 | KMEXTRACTONLY+=" |
327 | KMEXTRACTONLY+=" |
| 327 | config-apps.h.cmake |
328 | config-apps.h.cmake |
| 328 | ConfigureChecks.cmake" |
329 | ConfigureChecks.cmake" |
| 329 | ;; |
330 | ;; |
| 330 | kdebase-runtime) |
331 | kdebase-runtime | kde-runtime) |
| 331 | KMEXTRACTONLY+=" |
332 | KMEXTRACTONLY+=" |
| 332 | config-runtime.h.cmake" |
333 | config-runtime.h.cmake" |
| 333 | ;; |
334 | ;; |
| 334 | kdebase-workspace) |
335 | kdebase-workspace | kde-workspace) |
| 335 | KMEXTRACTONLY+=" |
336 | KMEXTRACTONLY+=" |
| 336 | config-unix.h.cmake |
337 | config-unix.h.cmake |
| 337 | ConfigureChecks.cmake |
338 | ConfigureChecks.cmake |
| 338 | config-workspace.h.cmake |
339 | config-workspace.h.cmake |
| 339 | config-X11.h.cmake |
340 | config-X11.h.cmake |
| … | |
… | |
| 390 | # Don't install cmake modules for split ebuilds, to avoid collisions. |
391 | # Don't install cmake modules for split ebuilds, to avoid collisions. |
| 391 | # note: kdegraphics >= 4.6.2 does not even have code to do that, so we |
392 | # note: kdegraphics >= 4.6.2 does not even have code to do that, so we |
| 392 | # should not try in that case |
393 | # should not try in that case |
| 393 | if [[ ${KMNAME} != kdegraphics ]] || { [[ ${SLOT} != 4.6 || ${PV} < 4.6.2 ]] && ! slot_is_at_least 4.7 ${SLOT}; }; then |
394 | if [[ ${KMNAME} != kdegraphics ]] || { [[ ${SLOT} != 4.6 || ${PV} < 4.6.2 ]] && ! slot_is_at_least 4.7 ${SLOT}; }; then |
| 394 | case ${KMNAME} in |
395 | case ${KMNAME} in |
| 395 | kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics) |
396 | kdebase-runtime|kde-runtime|kdebase-workspace|kde-workspace|kdeedu|kdegames|kdegraphics) |
| 396 | case ${PN} in |
397 | case ${PN} in |
| 397 | libkdegames|libkdeedu|libkworkspace) |
398 | libkdegames|libkdeedu|libkworkspace) |
| 398 | KMEXTRA+=" |
399 | KMEXTRA+=" |
| 399 | cmake/modules/" |
400 | cmake/modules/" |
| 400 | ;; |
401 | ;; |
| … | |
… | |
| 558 | _change_cmakelists_parent_dirs ${i} |
559 | _change_cmakelists_parent_dirs ${i} |
| 559 | fi |
560 | fi |
| 560 | done |
561 | done |
| 561 | |
562 | |
| 562 | case ${KMNAME} in |
563 | case ${KMNAME} in |
| 563 | kdebase-workspace) |
564 | kdebase-workspace | kde-workspace) |
| 564 | # COLLISION PROTECT section |
565 | # COLLISION PROTECT section |
| 565 | # Install the startkde script just once, as a part of kde-base/kdebase-startkde, |
566 | # Install the startkde script just once, as a part of kde-base/kdebase-startkde, |
| 566 | # not as a part of every package. |
567 | # not as a part of every package. |
| 567 | if [[ ${PN} != kdebase-startkde && -f CMakeLists.txt ]]; then |
568 | if [[ ${PN} != kdebase-startkde && -f CMakeLists.txt ]]; then |
| 568 | # The startkde script moved to kdebase-workspace for KDE4 versions > 3.93.0. |
569 | # The startkde script moved to kdebase-workspace for KDE4 versions > 3.93.0. |
| … | |
… | |
| 573 | if [[ ${PN} != libkworkspace ]]; then |
574 | if [[ ${PN} != libkworkspace ]]; then |
| 574 | sed -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \ |
575 | sed -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \ |
| 575 | -i CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip config install and fix EXPORT section" |
576 | -i CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip config install and fix EXPORT section" |
| 576 | fi |
577 | fi |
| 577 | ;; |
578 | ;; |
| 578 | kdebase-runtime) |
579 | kdebase-runtime | kde-runtime) |
| 579 | # COLLISION PROTECT section |
580 | # COLLISION PROTECT section |
| 580 | # Only install the kde4 script as part of kde-base/kdebase-data |
581 | # Only install the kde4 script as part of kde-base/kdebase-data |
| 581 | if [[ ${PN} != kdebase-data && -f CMakeLists.txt ]]; then |
582 | if [[ ${PN} != kdebase-data && -f CMakeLists.txt ]]; then |
| 582 | sed -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \ |
583 | sed -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \ |
| 583 | -i CMakeLists.txt || die "Sed to exclude bin/kde4 failed" |
584 | -i CMakeLists.txt || die "Sed to exclude bin/kde4 failed" |