From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EE14713800E for ; Mon, 6 Aug 2012 03:04:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D2695E0698; Mon, 6 Aug 2012 03:04:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 92614E06B1 for ; Mon, 6 Aug 2012 03:04:26 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C70831B4003 for ; Mon, 6 Aug 2012 03:04:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id CF360E5440 for ; Mon, 6 Aug 2012 03:04:21 +0000 (UTC) From: "Davide Pesavento" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Davide Pesavento" Message-ID: <1344222149.d30389aa5ae0d65b2ed469d9c1c7373950f0fb92.pesa@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: eclass/ X-VCS-Repository: proj/qt X-VCS-Files: eclass/qt5-module.eclass X-VCS-Directories: eclass/ X-VCS-Committer: pesa X-VCS-Committer-Name: Davide Pesavento X-VCS-Revision: d30389aa5ae0d65b2ed469d9c1c7373950f0fb92 X-VCS-Branch: master Date: Mon, 6 Aug 2012 03:04:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 41788795-ebaa-42b6-95a3-c1fb1d85e83d X-Archives-Hash: 895686302b18581549264a7b7c5f2656 commit: d30389aa5ae0d65b2ed469d9c1c7373950f0fb92 Author: Davide Pesavento gmail com> AuthorDate: Mon Aug 6 03:02:29 2012 +0000 Commit: Davide Pesavento gentoo org> CommitDate: Mon Aug 6 03:02:29 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=d30389aa Kill qt5-module.eclass with fire. --- eclass/qt5-module.eclass | 280 ---------------------------------------------- 1 files changed, 0 insertions(+), 280 deletions(-) diff --git a/eclass/qt5-module.eclass b/eclass/qt5-module.eclass deleted file mode 100644 index 0fbc140..0000000 --- a/eclass/qt5-module.eclass +++ /dev/null @@ -1,280 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# @ECLASS: qt5-module.eclass -# @MAINTAINER: -# Qt herd -# @BLURB: Eclass for Qt5 split ebuilds. -# @DESCRIPTION: -# This eclass contains various functions that are used when building Qt5. -# Requires EAPI 4. - -case ${EAPI} in - 4) : ;; - *) die "qt5-module.eclass: unsupported EAPI=${EAPI:-0}" ;; -esac - -inherit eutils flag-o-matic multilib toolchain-funcs versionator - -if [[ ${PV} == *9999* ]]; then - QT5_BUILD_TYPE="live" - inherit git-2 -else - QT5_BUILD_TYPE="release" -fi - -EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install src_test - -HOMEPAGE="http://qt-project.org/ http://qt.nokia.com/" -LICENSE="|| ( LGPL-2.1 GPL-3 )" -SLOT="5" - -EGIT_PROJECT=${PN/-} -case ${QT5_BUILD_TYPE} in - live) - EGIT_REPO_URI="git://gitorious.org/qt/${EGIT_PROJECT}.git - https://git.gitorious.org/qt/${EGIT_PROJECT}.git" - ;; - release) - SRC_URI="" # TODO - ;; -esac - -IUSE="debug test" - -DEPEND=" - virtual/pkgconfig - test? ( ~x11-libs/qt-test-${PV}[debug=] ) -" -if [[ ${QT5_BUILD_TYPE} == "live" ]]; then - DEPEND+=" dev-lang/perl" -fi - -# @ECLASS-VARIABLE: PATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array variable containing all the patches to be applied. This variable -# is expected to be defined in the global scope of ebuilds. Make sure to -# specify the full path. This variable is used in src_prepare phase. -# -# Example: -# @CODE -# PATCHES=( -# "${FILESDIR}/mypatch.patch" -# "${FILESDIR}/mypatch2.patch" -# ) -# @CODE - -# @ECLASS-VARIABLE: QT5_TARGET_SUBDIRS -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array variable containing the source directories that should be built. -# All paths must be relative to ${S}. - -# @ECLASS-VARIABLE: QT5_BUILD_DIR -# @DESCRIPTION: -# Build directory for out-of-source builds. -: ${QT5_BUILD_DIR:=${WORKDIR}/${P}_build} - -# @ECLASS-VARIABLE: QCONFIG_ADD -# @DESCRIPTION: -# List of options that need to be added to QT_CONFIG in qconfig.pri -: ${QCONFIG_ADD:=} - -# @ECLASS-VARIABLE: QCONFIG_REMOVE -# @DESCRIPTION: -# List of options that need to be removed from QT_CONFIG in qconfig.pri -: ${QCONFIG_REMOVE:=} - -# @ECLASS-VARIABLE: QCONFIG_DEFINE -# @DESCRIPTION: -# List of variables that should be defined at the top of QtCore/qconfig.h -: ${QCONFIG_DEFINE:=} - -# @FUNCTION: qt5-module_pkg_setup -# @DESCRIPTION: -# Warns and/or dies if the user is trying to downgrade Qt. -qt5-module_pkg_setup() { - # Protect users by not allowing downgrades between releases. - # Downgrading revisions within the same release should be allowed. - if has_version ">${CATEGORY}/${P}-r9999:${SLOT}"; then - if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then - eerror " *** Sanity check to keep you from breaking your system ***" - eerror "Downgrading Qt is completely unsupported and will break your system!" - die "aborting to save your system" - else - ewarn "Downgrading Qt is completely unsupported and will break your system!" - fi - fi -} - -# @FUNCTION: qt5-module_src_unpack -# @DESCRIPTION: -# Unpacks the sources. -qt5-module_src_unpack() { - if ! version_is_at_least 4.4 $(gcc-version); then - ewarn "Using a GCC version lower than 4.4 is not supported." - fi - - if [[ ${PN} == "qt-webkit" ]]; then - eshopts_push -s extglob - if is-flagq '-g?(gdb)?([1-9])'; then - echo - ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." - ewarn "You may experience really long compilation times and/or increased memory usage." - ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug." - ewarn "For more info check out https://bugs.gentoo.org/307861" - echo - fi - eshopts_pop - fi - - case ${QT5_BUILD_TYPE} in - live) - git-2_src_unpack - ;; - release) - default - ;; - esac -} - -# @FUNCTION: qt5-module_src_prepare -# @DESCRIPTION: -# Prepare the sources before the configure phase. -qt5-module_src_prepare() { - qt5_prepare_env - - mkdir -p "${QT5_BUILD_DIR}" || die - - # Apply patches - [[ -n ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" - epatch_user -} - -# @FUNCTION: qt5-module_src_configure -# @DESCRIPTION: -# Runs ./configure and qmake. -qt5-module_src_configure() { - # toolchain setup - tc-export CC CXX RANLIB STRIP - # qmake-generated Makefiles use LD/LINK for linking - export LD="$(tc-getCXX)" - - pushd "${QT5_BUILD_DIR}" > /dev/null || die - - einfo "Running qmake" - "${QTBINDIR}"/qmake \ - "${S}/${PN/-}.pro" \ - CONFIG+=nostrip \ - || die "qmake failed" - - popd > /dev/null || die -} - -# @FUNCTION: qt5-module_src_compile -# @DESCRIPTION: -# Compiles the code in target directories. -qt5-module_src_compile() { - qt5_foreach_target_subdir emake -} - -# @FUNCTION: qt5-module_src_test -# @DESCRIPTION: -# Runs tests in target directories. -# TODO: find a way to avoid circular deps with USE=test. -qt5-module_src_test() { - echo ">>> Test phase [QtTest]: ${CATEGORY}/${PF}" - - # create a custom testrunner script that correctly sets - # {,DY}LD_LIBRARY_PATH before executing the given test - local testrunner=${QT5_BUILD_DIR}/gentoo-testrunner - cat <<-EOF > "${testrunner}" - #!/bin/sh - export LD_LIBRARY_PATH="${QT5_BUILD_DIR}/lib:${QTLIBDIR}" - export DYLD_LIBRARY_PATH="${QT5_BUILD_DIR}/lib:${QTLIBDIR}" - "\$@" - EOF - chmod +x "${testrunner}" - - qmake() { - "${QTBINDIR}"/qmake \ - "${S}/${subdir}/${subdir##*/}.pro" \ - || die "qmake failed" - } - qt5_foreach_target_subdir qmake - qt5_foreach_target_subdir emake - qt5_foreach_target_subdir emake TESTRUNNER="'${testrunner}'" check -} - -# @FUNCTION: qt5-module_src_install -# @DESCRIPTION: -# Performs the actual installation of target directories. -# TODO: pkgconfig files are installed in the wrong place -qt5-module_src_install() { - qt5_foreach_target_subdir emake INSTALL_ROOT="${D}" install - - # TODO: qt5_install_module_qconfigs - - # remove .la files since we are building only shared libraries - prune_libtool_files -} - -# @FUNCTION: qt_use -# @USAGE: [feature] [enableval] -# @DESCRIPTION: -# This will echo "-${enableval}-${feature}" if is enabled, or -# "-no-${feature}" if it's disabled. If [feature] is not specified, -# will be used for that. If [enableval] is not specified, the -# "-${enableval}" prefix is omitted. -qt_use() { - use "$1" && echo "${3:+-$3}-${2:-$1}" || echo "-no-${2:-$1}" -} - - -###### Internal functions ###### - -# @FUNCTION: qt5_prepare_env -# @INTERNAL -# @DESCRIPTION: -# Prepares the environment for building Qt. -qt5_prepare_env() { - # setup installation directories - QTPREFIXDIR=${EPREFIX}/usr - QTBINDIR=${QTPREFIXDIR}/qt5/bin # FIXME - QTLIBDIR=${QTPREFIXDIR}/$(get_libdir)/qt5 - QTDOCDIR=${QTPREFIXDIR}/share/doc/qt-${PV} - QTHEADERDIR=${QTPREFIXDIR}/include/qt5 - QTPLUGINDIR=${QTLIBDIR}/plugins - QTIMPORTDIR=${QTLIBDIR}/imports - QTDATADIR=${QTPREFIXDIR}/share/qt5 - QTTRANSDIR=${QTDATADIR}/translations - QTEXAMPLESDIR=${QTDATADIR}/examples - QTTESTSDIR=${QTDATADIR}/tests - QTSYSCONFDIR=${EPREFIX}/etc/qt5 -} - -# @FUNCTION: qt5_foreach_target_subdir -# @INTERNAL -# @DESCRIPTION: -# Executes the arguments inside each directory listed in QT5_TARGET_SUBDIRS. -qt5_foreach_target_subdir() { - [[ -z ${QT5_TARGET_SUBDIRS[@]} ]] && QT5_TARGET_SUBDIRS=("") - - local subdir - for subdir in "${QT5_TARGET_SUBDIRS[@]}"; do - if [[ ${EBUILD_PHASE} == "test" ]]; then - subdir=tests/auto${subdir#src} - [[ -d ${S}/${subdir} ]] || continue - fi - - mkdir -p "${QT5_BUILD_DIR}/${subdir}" || die - pushd "${QT5_BUILD_DIR}/${subdir}" > /dev/null || die - - einfo "Running $* ${subdir:+in ${subdir}}" - "$@" - - popd > /dev/null || die - done -}