/[gentoo-x86]/eclass/qt4-build.eclass
Gentoo

Diff of /eclass/qt4-build.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.91 Revision 1.93
1# Copyright 1999-2009 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/qt4-build.eclass,v 1.91 2011/07/08 11:35:01 ssuominen Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.93 2011/08/22 04:46:32 vapier Exp $
4 4
5# @ECLASS: qt4-build.eclass 5# @ECLASS: qt4-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ben de Groot <yngwin@gentoo.org>, 7# Ben de Groot <yngwin@gentoo.org>,
8# Markos Chandras <hwoarang@gentoo.org>, 8# Markos Chandras <hwoarang@gentoo.org>,
135# @FUNCTION: qt4-build_src_unpack 135# @FUNCTION: qt4-build_src_unpack
136# @DESCRIPTION: 136# @DESCRIPTION:
137# Unpacks the sources 137# Unpacks the sources
138qt4-build_src_unpack() { 138qt4-build_src_unpack() {
139 setqtenv 139 setqtenv
140 local unpack_p="${MY_P}"
141 case "${PV}" in
142 4.8.0_beta*)
143 unpack_p="qt-everywhere-opensource-src-${PV/_*}"
144 ;;
145 esac
140 local target targets= 146 local target targets=
141 for target in configure LICENSE.GPL3 LICENSE.LGPL projects.pro \ 147 for target in configure LICENSE.GPL3 LICENSE.LGPL projects.pro \
142 src/{qbase,qt_targets,qt_install}.pri bin config.tests mkspecs qmake \ 148 src/{qbase,qt_targets,qt_install}.pri bin config.tests mkspecs qmake \
143 ${QT4_EXTRACT_DIRECTORIES}; do 149 ${QT4_EXTRACT_DIRECTORIES}; do
144 targets+=" ${MY_P}/${target}" 150 targets+=" ${unpack_p}/${target}"
145 done 151 done
146 152
147 echo tar xzf "${DISTDIR}"/${MY_P}.tar.gz ${targets} 153 echo tar xzf "${DISTDIR}"/${MY_P}.tar.gz ${targets}
148 tar xzf "${DISTDIR}"/${MY_P}.tar.gz ${targets} || die 154 tar xzf "${DISTDIR}"/${MY_P}.tar.gz ${targets} || die
155 case "${PV}" in
156 4.8.0_beta*)
157 mv ${WORKDIR}/qt-everywhere-opensource-src-${PV/_*} \
158 ${WORKDIR}/qt-everywhere-opensource-src-${MY_PV}
159 ;;
160 esac
149} 161}
150 162
151# @ECLASS-VARIABLE: PATCHES 163# @ECLASS-VARIABLE: PATCHES
152# @DESCRIPTION: 164# @DESCRIPTION:
153# In case you have patches to apply, specify them in PATCHES variable. Make sure 165# In case you have patches to apply, specify them in PATCHES variable. Make sure
343 355
344 prepare_directories ${QT4_TARGET_DIRECTORIES} 356 prepare_directories ${QT4_TARGET_DIRECTORIES}
345} 357}
346 358
347# @FUNCTION: qt4-build_src_compile 359# @FUNCTION: qt4-build_src_compile
360# @DESCRIPTION:
348# @DESCRIPTION: Actual compile phase 361# Actual compile phase
349qt4-build_src_compile() { 362qt4-build_src_compile() {
350 setqtenv 363 setqtenv
351 364
352 build_directories ${QT4_TARGET_DIRECTORIES} 365 build_directories ${QT4_TARGET_DIRECTORIES}
353} 366}
396 install_directories ${QT4_TARGET_DIRECTORIES} 409 install_directories ${QT4_TARGET_DIRECTORIES}
397 install_qconfigs 410 install_qconfigs
398 fix_library_files 411 fix_library_files
399 fix_includes 412 fix_includes
400 # remove .la files since we are building only shared Qt libraries 413 # remove .la files since we are building only shared Qt libraries
401 find "${D}"${QTLIBDIR} -name "*.la" -print0 | xargs -0 rm 414 find "${D}"${QTLIBDIR} -name "*.la" -print0 | xargs -0 rm
402} 415}
403 416
404# @FUNCTION: setqtenv 417# @FUNCTION: setqtenv
405setqtenv() { 418setqtenv() {
406 # Set up installation directories 419 # Set up installation directories
554# @DESCRIPTION: 567# @DESCRIPTION:
555# List variables that should be defined at the top of QtCore/qconfig.h 568# List variables that should be defined at the top of QtCore/qconfig.h
556: ${QCONFIG_DEFINE:=} 569: ${QCONFIG_DEFINE:=}
557 570
558# @FUNCTION: install_qconfigs 571# @FUNCTION: install_qconfigs
572# @DESCRIPTION:
559# @DESCRIPTION: Install gentoo-specific mkspecs configurations 573# Install gentoo-specific mkspecs configurations
560install_qconfigs() { 574install_qconfigs() {
561 local x 575 local x
562 if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} ]]; then 576 if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} ]]; then
563 for x in QCONFIG_ADD QCONFIG_REMOVE; do 577 for x in QCONFIG_ADD QCONFIG_REMOVE; do
564 [[ -n ${!x} ]] && echo ${x}=${!x} >> "${T}"/${PN}-qconfig.pri 578 [[ -n ${!x} ]] && echo ${x}=${!x} >> "${T}"/${PN}-qconfig.pri
575 doins "${T}"/gentoo-${PN}-qconfig.h || die "installing ${PN}-qconfig.h failed" 589 doins "${T}"/gentoo-${PN}-qconfig.h || die "installing ${PN}-qconfig.h failed"
576 fi 590 fi
577} 591}
578 592
579# @FUNCTION: generate_qconfigs 593# @FUNCTION: generate_qconfigs
594# @DESCRIPTION:
580# @DESCRIPTION: Generates gentoo-specific configurations 595# Generates gentoo-specific configurations
581generate_qconfigs() { 596generate_qconfigs() {
582 if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${CATEGORY}/${PN} == x11-libs/qt-core ]]; then 597 if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${CATEGORY}/${PN} == x11-libs/qt-core ]]; then
583 local x qconfig_add qconfig_remove qconfig_new 598 local x qconfig_add qconfig_remove qconfig_new
584 for x in "${ROOT}${QTDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do 599 for x in "${ROOT}${QTDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
585 [[ -f ${x} ]] || continue 600 [[ -f ${x} ]] || continue
633 fi 648 fi
634 fi 649 fi
635} 650}
636 651
637# @FUNCTION: qt4-build_pkg_postrm 652# @FUNCTION: qt4-build_pkg_postrm
653# @DESCRIPTION:
638# @DESCRIPTION: Generate configurations when the package is completely removed 654# Generate configurations when the package is completely removed
639qt4-build_pkg_postrm() { 655qt4-build_pkg_postrm() {
640 generate_qconfigs 656 generate_qconfigs
641} 657}
642 658
643# @FUNCTION: qt4-build_pkg_postinst 659# @FUNCTION: qt4-build_pkg_postinst
660# @DESCRIPTION:
644# @DESCRIPTION: Generate configuration, plus throws a message about possible 661# Generate configuration, plus throws a message about possible
645# breakages and proposed solutions. 662# breakages and proposed solutions.
646qt4-build_pkg_postinst() { 663qt4-build_pkg_postinst() {
647 generate_qconfigs 664 generate_qconfigs
648} 665}
649 666

Legend:
Removed from v.1.91  
changed lines
  Added in v.1.93

  ViewVC Help
Powered by ViewVC 1.1.20