aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Pesavento <pesa@gentoo.org>2015-06-10 03:56:58 +0200
committerDavide Pesavento <pesa@gentoo.org>2015-06-10 03:56:58 +0200
commitcbce78583c023404aee6e1695173b1e537c2451a (patch)
tree59c18b8de41426168994e94be836c70eb69757a9
parentMerge pull request #101 from enricotagliavini/master (diff)
downloadqt-cbce78583c023404aee6e1695173b1e537c2451a.tar.gz
qt-cbce78583c023404aee6e1695173b1e537c2451a.tar.bz2
qt-cbce78583c023404aee6e1695173b1e537c2451a.zip
[eclass] Sync.
-rw-r--r--eclass/qt4-build-multilib.eclass79
-rw-r--r--eclass/qt5-build.eclass4
2 files changed, 33 insertions, 50 deletions
diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass
index 245c0204..5b6cc952 100644
--- a/eclass/qt4-build-multilib.eclass
+++ b/eclass/qt4-build-multilib.eclass
@@ -20,7 +20,7 @@ esac
inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs
HOMEPAGE="https://www.qt.io/"
-LICENSE="|| ( LGPL-2.1 GPL-3 )"
+LICENSE="|| ( LGPL-2.1 LGPL-3 GPL-3 ) FDL-1.3"
SLOT="4"
case ${PV} in
@@ -108,6 +108,9 @@ multilib_src_install_all() { qt4_multilib_src_install_all; }
# @DESCRIPTION:
# List of macros that must be defined in QtCore/qconfig.h
+
+###### Phase functions ######
+
# @FUNCTION: qt4-build-multilib_src_unpack
# @DESCRIPTION:
# Unpacks the sources.
@@ -459,9 +462,18 @@ qt4_multilib_src_install() {
fi
fi
- install_qconfigs
- fix_library_files
- fix_includes
+ # move pkgconfig files to the correct location
+ eshopts_push -s nullglob
+ local pcfile
+ for pcfile in "${D}/${QT4_LIBDIR}"/pkgconfig/*.pc; do
+ dodir /usr/$(get_libdir)/pkgconfig
+ mv "${pcfile}" "${ED}"/usr/$(get_libdir)/pkgconfig || die
+ done
+ eshopts_pop
+ rmdir "${D}/${QT4_LIBDIR}"/pkgconfig || die
+
+ qt4_install_module_qconfigs
+ qt4_symlink_framework_headers
}
qt4_multilib_src_install_all() {
@@ -503,16 +515,19 @@ qt4_multilib_src_install_all() {
# Regenerate configuration, plus throw a message about possible
# breakages and proposed solutions.
qt4-build-multilib_pkg_postinst() {
- generate_qconfigs
+ qt4_regenerate_global_qconfigs
}
# @FUNCTION: qt4-build-multilib_pkg_postrm
# @DESCRIPTION:
# Regenerate configuration when the package is completely removed.
qt4-build-multilib_pkg_postrm() {
- generate_qconfigs
+ qt4_regenerate_global_qconfigs
}
+
+###### Public helpers ######
+
# @FUNCTION: qt_use
# @USAGE: <flag> [feature] [enableval]
# @DESCRIPTION:
@@ -547,7 +562,6 @@ qt4_prepare_env() {
QT4_PREFIX=${EPREFIX}/usr
QT4_HEADERDIR=${QT4_PREFIX}/include/qt4
QT4_LIBDIR=${QT4_PREFIX}/$(get_libdir)/qt4
- QT4_PCDIR=${QT4_PREFIX}/$(get_libdir)/pkgconfig
QT4_BINDIR=${QT4_LIBDIR}/bin
QT4_PLUGINDIR=${QT4_LIBDIR}/plugins
QT4_IMPORTDIR=${QT4_LIBDIR}/imports
@@ -616,11 +630,11 @@ qt4_qmake() {
|| die "qmake failed (${projectdir})"
}
-# @FUNCTION: install_qconfigs
+# @FUNCTION: qt4_install_module_qconfigs
# @INTERNAL
# @DESCRIPTION:
-# Install gentoo-specific mkspecs configurations.
-install_qconfigs() {
+# Creates and installs gentoo-specific ${PN}-qconfig.{h,pri} files.
+qt4_install_module_qconfigs() {
local x
if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} ]]; then
for x in QCONFIG_ADD QCONFIG_REMOVE; do
@@ -639,11 +653,12 @@ install_qconfigs() {
fi
}
-# @FUNCTION: generate_qconfigs
+# @FUNCTION: qt4_regenerate_global_qconfigs
# @INTERNAL
# @DESCRIPTION:
-# Generates gentoo-specific qconfig.{h,pri}.
-generate_qconfigs() {
+# Generates Gentoo-specific qconfig.{h,pri} according to the build configuration.
+# Don't call die here because dying in pkg_post{inst,rm} only makes things worse.
+qt4_regenerate_global_qconfigs() {
if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${PN} == qtcore ]]; then
local x qconfig_add qconfig_remove qconfig_new
for x in "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
@@ -652,8 +667,6 @@ generate_qconfigs() {
qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")"
done
- # these error checks do not use die because dying in pkg_post{inst,rm}
- # just makes things worse.
if [[ -e "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/qconfig.pri ]]; then
# start with the qconfig.pri that qtcore installed
if ! cp "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/qconfig.pri \
@@ -699,39 +712,11 @@ generate_qconfigs() {
fi
}
-# @FUNCTION: fix_library_files
-# @INTERNAL
-# @DESCRIPTION:
-# Fixes the paths in *.prl and *.pc, as they are wrong due to sandbox, and
-# moves the *.pc files into the pkgconfig directory.
-fix_library_files() {
- local libfile
- for libfile in "${D}"/${QT4_LIBDIR}/{*.prl,pkgconfig/*.pc}; do
- if [[ -e ${libfile} ]]; then
- sed -i -e "s:${S}/lib:${QT4_LIBDIR}:g" ${libfile} || die "sed on ${libfile} failed"
- fi
- done
-
- # pkgconfig files refer to WORKDIR/bin as the moc and uic locations
- for libfile in "${D}"/${QT4_LIBDIR}/pkgconfig/*.pc; do
- if [[ -e ${libfile} ]]; then
- sed -i -e "s:${S}/bin:${QT4_BINDIR}:g" ${libfile} || die "sed on ${libfile} failed"
-
- # Move .pc files into the pkgconfig directory
- dodir ${QT4_PCDIR#${EPREFIX}}
- mv ${libfile} "${D}"/${QT4_PCDIR}/ || die "moving ${libfile} to ${D}/${QT4_PCDIR}/ failed"
- fi
- done
-
- # Don't install an empty directory
- rmdir "${D}"/${QT4_LIBDIR}/pkgconfig
-}
-
-# @FUNCTION: fix_includes
+# @FUNCTION: qt4_symlink_framework_headers
# @DESCRIPTION:
-# For MacOS X we need to add some symlinks when frameworks are
-# being used, to avoid complications with some more or less stupid packages.
-fix_includes() {
+# On OS X we need to add some symlinks when frameworks are being
+# used, to avoid complications with some more or less stupid packages.
+qt4_symlink_framework_headers() {
if use_if_iuse aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
local frw dest f h rdir
# Some packages tend to include <Qt/...>
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index f8c7674e..025a7312 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -23,7 +23,7 @@ QT5_MINOR_VERSION=${PV#*.}
QT5_MINOR_VERSION=${QT5_MINOR_VERSION%%.*}
HOMEPAGE="https://www.qt.io/"
-LICENSE="|| ( LGPL-2.1 LGPL-3 )"
+LICENSE="|| ( LGPL-2.1 LGPL-3 ) FDL-1.3"
SLOT="5"
# @ECLASS-VARIABLE: QT5_MODULE
@@ -225,8 +225,6 @@ qt5-build_src_compile() {
# @DESCRIPTION:
# Runs tests in the target directories.
qt5-build_src_test() {
- echo ">>> Test phase [QtTest]: ${CATEGORY}/${PF}"
-
# '-after SUBDIRS-=...' disables broken cmake tests (bug 474004)
qt5_foreach_target_subdir qt5_qmake -after SUBDIRS-=cmake SUBDIRS-=installed_cmake
qt5_foreach_target_subdir emake