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 7AB6313877A for ; Wed, 20 Aug 2014 08:06:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B13DE082B; Wed, 20 Aug 2014 08:06:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 040DCE07E0 for ; Wed, 20 Aug 2014 08:06:39 +0000 (UTC) Received: from pomiot.lan (77-253-136-53.adsl.inetia.pl [77.253.136.53]) (using SSLv3 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id CC23F33FF4E; Wed, 20 Aug 2014 08:06:37 +0000 (UTC) Date: Wed, 20 Aug 2014 10:07:27 +0200 From: =?ISO-8859-2?B?TWljaGGzIEfzcm55?= To: Davide Pesavento Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [RFC] qt5-build.eclass Message-ID: <20140820100727.07f25b3c@pomiot.lan> In-Reply-To: References: Organization: Gentoo X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.24; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/FKf9hvkP=GDH50/RpuvV.vI"; protocol="application/pgp-signature" X-Archives-Salt: 9ae13e3e-2022-4a42-a793-0f2bfc93003f X-Archives-Hash: a86ee707aede72d4325417ecde97ba24 --Sig_/FKf9hvkP=GDH50/RpuvV.vI Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Dnia 2014-08-17, o godz. 20:38:18 Davide Pesavento napisa=B3(a): > # @FUNCTION: qt5-build_src_unpack > # @DESCRIPTION: > # Unpacks the sources. > qt5-build_src_unpack() { > if [[ $(gcc-major-version) -lt 4 ]] || [[ $(gcc-major-version) -eq 4 && = $(gcc-minor-version) -lt 5 ]]; then > ewarn > ewarn "Using a GCC version lower than 4.5 is not supported." > ewarn > fi >=20 > if [[ ${PN} =3D=3D qtwebkit ]]; then > eshopts_push -s extglob > if is-flagq '-g?(gdb)?([1-9])'; then Wouldn't that be equivalent to '-g[^0]'? And I think this would actually work without extglob. > ewarn > 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 increas= ed memory usage." > ewarn "If compilation fails, please try removing -g/-ggdb before repor= ting a bug." > ewarn "For more info check out https://bugs.gentoo.org/307861" > ewarn > fi > eshopts_pop > fi >=20 > case ${QT5_BUILD_TYPE} in > live) git-r3_src_unpack ;; > release) default ;; > esac > } >=20 > # @FUNCTION: qt5-build_src_prepare > # @DESCRIPTION: > # Prepares the sources before the configure phase. > qt5-build_src_prepare() { > qt5_prepare_env >=20 > if [[ ${QT5_MODULE} =3D=3D qtbase ]]; then > # Avoid unnecessary qmake recompilations > sed -i -re "s|^if true;.*(\[ '\!').*(\"\\\$outpath/bin/qmake\".*)|if \1= -e \2 then|" \ > configure || die "sed failed (skip qmake bootstrap)" Any chance for something more readable? :) Like a inline patch. > # Respect CC, CXX, *FLAGS, MAKEOPTS and EXTRA_EMAKE when bootstrapping = qmake > sed -i -e "/outpath\/qmake\".*\"\$MAKE\")/ s:): \ > ${MAKEOPTS} ${EXTRA_EMAKE} 'CC=3D$(tc-getCC)' 'CXX=3D$(tc-getCXX)' \ > 'QMAKE_CFLAGS=3D${CFLAGS}' 'QMAKE_CXXFLAGS=3D${CXXFLAGS}' 'QMAKE_LFLAG= S=3D${LDFLAGS}'&:" \ > -e '/"$CFG_RELEASE_QMAKE"/,/^\s\+fi$/ d' \ > configure || die "sed failed (respect env for qmake build)" Ditto ;). > sed -i -e '/^CPPFLAGS\s*=3D/ s/-g //' \ > qmake/Makefile.unix || die "sed failed (CPPFLAGS for qmake build)" >=20 > # Respect CXX in {bsymbolic_functions,fvisibility,precomp}.test > sed -i -e "/^QMAKE_CONF_COMPILER=3D/ s:=3D.*:=3D\"$(tc-getCXX)\":" \ > configure || die "sed failed (QMAKE_CONF_COMPILER)" >=20 > # Respect toolchain and flags in config.tests > find config.tests/unix -name '*.test' -type f -print0 \ > | xargs -0 sed -i -e '/bin\/qmake/ s/-nocache //' \ > || die "sed failed (config.tests)" find ... -exec sed ... {} + > fi >=20 > if [[ ${PN} !=3D qtcore ]]; then > qt5_symlink_tools_to_build_dir > fi >=20 > # apply patches > [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" > epatch_user > } [...] > # @FUNCTION: qt5-build_src_install > # @DESCRIPTION: > # Performs the actual installation of target directories. > qt5-build_src_install() { > qt5_foreach_target_subdir emake INSTALL_ROOT=3D"${D}" install >=20 > if [[ ${PN} =3D=3D qtcore ]]; then > pushd "${QT5_BUILD_DIR}" >/dev/null || die > einfo "Running emake INSTALL_ROOT=3D${D} install_{mkspecs,qmake,syncqt}" You can put that command-line in an array or set to argv. > emake INSTALL_ROOT=3D"${D}" install_{mkspecs,qmake,syncqt} > popd >/dev/null || die >=20 > # install an empty Gentoo/gentoo-qconfig.h in ${D} > # so that it's placed under package manager control > > "${T}"/gentoo-qconfig.h =20 > ( > insinto "${QT5_HEADERDIR#${EPREFIX}}"/Gentoo > doins "${T}"/gentoo-qconfig.h > ) >=20 > # include gentoo-qconfig.h at the beginning of QtCore/qconfig.h > sed -i -e '1a#include \n' \ > "${D}${QT5_HEADERDIR}"/QtCore/qconfig.h \ > || die "sed failed (qconfig.h)" > fi >=20 > qt5_install_module_qconfigs > prune_libtool_files > } [...] > # @FUNCTION: qt5_base_configure > # @INTERNAL > # @DESCRIPTION: > # Runs ./configure for modules belonging to qtbase. > qt5_base_configure() { > # setup toolchain variables used by configure > tc-export CC CXX RANLIB STRIP > export LD=3D"$(tc-getCXX)" >=20 > # configure arguments > local conf=3D( > # installation paths > -prefix "${QT5_PREFIX}" > -bindir "${QT5_BINDIR}" > -headerdir "${QT5_HEADERDIR}" > -libdir "${QT5_LIBDIR}" > -archdatadir "${QT5_ARCHDATADIR}" > -plugindir "${QT5_PLUGINDIR}" > -libexecdir "${QT5_LIBEXECDIR}" > -importdir "${QT5_IMPORTDIR}" > -qmldir "${QT5_QMLDIR}" > -datadir "${QT5_DATADIR}" > -docdir "${QT5_DOCDIR}" > -translationdir "${QT5_TRANSLATIONDIR}" > -sysconfdir "${QT5_SYSCONFDIR}" > -examplesdir "${QT5_EXAMPLESDIR}" > -testsdir "${QT5_TESTSDIR}" >=20 > # debug/release > $(use debug && echo -debug || echo -release) > -no-separate-debug-info >=20 > # licensing stuff > -opensource -confirm-license >=20 > # let configure automatically figure out if C++11 is supported > #-c++11 Doesn't switching C++11 support involve changing ABI? I suspect Qt may be actually free of that. > # build shared libraries > -shared >=20 > # always enable large file support > -largefile >=20 > # disabling accessibility is not recommended by upstream, as > # it will break QStyle and may break other internal parts of Qt > -accessibility >=20 > # disable all SQL drivers by default, override in qtsql > -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc > -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds >=20 > # obsolete flag, does nothing > #-qml-debug >=20 > # use pkg-config to detect include and library paths > -pkg-config >=20 > # prefer system libraries (only common deps here) > -system-zlib > -system-pcre >=20 > # don't specify -no-gif because there is no way to override it later > #-no-gif >=20 > # disable everything to prevent automagic deps (part 1) > -no-mtdev > -no-journald > -no-libpng -no-libjpeg > -no-freetype -no-harfbuzz > -no-openssl > -no-xinput2 -no-xcb-xlib >=20 > # always enable glib event loop support > -glib >=20 > # disable everything to prevent automagic deps (part 2) > -no-pulseaudio -no-alsa >=20 > # disable gtkstyle because it adds qt4 include paths to the compiler > # command line if x11-libs/cairo is built with USE=3Dqt4 (bug 433826) > -no-gtkstyle >=20 > # exclude examples and tests from default build > -nomake examples > -nomake tests > -no-compile-examples >=20 > # disable rpath on non-prefix (bugs 380415 and 417169) > $(use prefix || echo -no-rpath) >=20 > # print verbose information about each configure test > -verbose >=20 > # doesn't actually matter since we override CXXFLAGS > #-no-optimized-qmake >=20 > # obsolete flag, does nothing > #-nis >=20 > # always enable iconv support > -iconv >=20 > # disable everything to prevent automagic deps (part 3) > -no-cups -no-evdev -no-icu -no-fontconfig -no-dbus >=20 > # don't strip > -no-strip >=20 > # precompiled headers are not that useful for us > # and cause problems on hardened, so turn them off > -no-pch >=20 > # reduced relocations cause major breakage on at least arm and ppc, so = we > # don't specify anything and let configure figure out if they are suppo= rted, > # see also https://bugreports.qt-project.org/browse/QTBUG-36129 > #-reduce-relocations >=20 > # let configure automatically detect if GNU gold is available > #-use-gold-linker >=20 > # disable all platform plugins by default, override in qtgui > -no-xcb -no-eglfs -no-directfb -no-linuxfb -no-kms >=20 > # disable undocumented X11-related flags, override in qtgui > # (not shown in ./configure -help output) > -no-xkb -no-xrender >=20 > # disable obsolete/unused X11-related flags > # (not shown in ./configure -help output) > -no-mitshm -no-xcursor -no-xfixes -no-xinerama -no-xinput > -no-xrandr -no-xshape -no-xsync -no-xvideo >=20 > # always enable session management support: it doesn't need extra deps > # at configure time and turning it off is dangerous, see bug 518262 > -sm >=20 > # typedef qreal to double (warning: changing this flag breaks the ABI) > -qreal double >=20 > # disable opengl and egl by default, override in qtgui and qtopengl > -no-opengl -no-egl >=20 > # use upstream default > #-no-system-proxies >=20 > # do not build with -Werror > -no-warnings-are-errors >=20 > # module-specific options > "${myconf[@]}" > ) >=20 > mkdir -p "${QT5_BUILD_DIR}" || die > pushd "${QT5_BUILD_DIR}" >/dev/null || die >=20 > einfo "Configuring with: ${conf[@]}" > "${S}"/configure "${conf[@]}" || die "configure failed" >=20 > popd >/dev/null || die > } --=20 Best regards, Micha=B3 G=F3rny --Sig_/FKf9hvkP=GDH50/RpuvV.vI Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJT9Fc/XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZO/mIQAIN8wneG5y2itRMYuKYEhy+E 74XsQsW5XFjRlEjMznzwHf7tDUoIFlc9UWaL88516LZ73UGpeM8PgjMR7i8xYZbV +x/dJ5Z/pzcIT5/foDs0ZUQRnaXLq7JNr75Y3L3HXlrlZLXvHQLRwu6wUwl9sscB 3b12PcKwQr1q2UNyLXJSyDeQ0xUrJy0UGiOsomBoKKL5NAeItBo/Ix58VtR9I8R2 r8I3lpoaOlP/Z56pESw/B5TQ70d+sqCYW04e51MNJ8fzDc35AOSPNTB3ojIMJ1PU 3re9ANBEjJmn4v+ngKDd3Sp/bqdznBhnJieVG2yeI8Q662Qst0eqH3vfIu1y8tCC HkHWeohTueQB8MoVXqB/vuV0sSn8NuFRR8UmZGBieRjq5HOwOUoBNmTlu/Peu452 wu3Zr2L09Usw8mdpfgCsiIsLH5T/WLeKzoQwWd5om27/EAfvtYFmxcF6KqF0kLL2 ewkLaHBMwHivcIw0hLr1gFHywvxXnF4NOaVdF6tA2Po/XUqs97PRoSxB7WizKy45 nog1zZh0WRMTRatSnmQyH17pmctYaAWijsCvMVGCQJ5s1G1QuJqRZ5R6FEbAAfoK jaofKC4QtjegWqf1MB2s9F6C1/bMBvlgcrzfbimkkr91BgQ0g2jAPXw2otZTL1c0 yBKRwRHTJBsidb8RG+LZ =wQoF -----END PGP SIGNATURE----- --Sig_/FKf9hvkP=GDH50/RpuvV.vI--