From de49812990871e1705b64051c35161d5e6400269 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 24 Dec 2018 14:11:38 +0000 Subject: gentoo resync : 24.12.2018 --- eclass/Manifest.gz | Bin 37598 -> 37453 bytes eclass/apache-2.eclass | 4 +- eclass/bazel.eclass | 220 +++++++++++++++++++++++ eclass/cmake-utils.eclass | 53 ++++-- eclass/distutils-r1.eclass | 1 + eclass/golang-build.eclass | 1 + eclass/kde5-functions.eclass | 17 +- eclass/kde5.eclass | 6 +- eclass/meson.eclass | 1 + eclass/mozconfig-v6.45.eclass | 410 ------------------------------------------ eclass/mozconfig-v6.58.eclass | 396 ---------------------------------------- eclass/netsurf.eclass | 4 +- eclass/perl-module.eclass | 2 +- eclass/qt5-build.eclass | 245 ++++++++++--------------- eclass/ruby-fakegem.eclass | 3 +- eclass/ruby-ng-gnome2.eclass | 4 +- eclass/ruby-utils.eclass | 8 +- eclass/tests/toolchain.sh | 95 +++++++++- eclass/toolchain.eclass | 58 +++--- 19 files changed, 507 insertions(+), 1021 deletions(-) create mode 100644 eclass/bazel.eclass delete mode 100644 eclass/mozconfig-v6.45.eclass delete mode 100644 eclass/mozconfig-v6.58.eclass (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index 80dff8b35111..741ab8a9020c 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass index 26f3d2d28913..d7c8254d8b24 100644 --- a/eclass/apache-2.eclass +++ b/eclass/apache-2.eclass @@ -293,7 +293,9 @@ setup_modules() { if ver_test ${PV} -ge 2.4.34 ; then MY_CONF+=( $(use_with !suexec-syslog suexec-logfile "${SUEXEC_LOGFILE:-${EPREFIX}/var/log/apache2/suexec_log}") ) MY_CONF+=( $(use_with suexec-syslog) ) - MY_CONF+=( $(usex suexec-syslog $(usex suexec-caps --enable-suexec-capabilities '') '') ) + if use suexec-syslog && use suexec-caps ; then + MY_CONF+=( --enable-suexec-capabilities ) + fi else MY_CONF+=( --with-suexec-logfile="${SUEXEC_LOGFILE:-${EPREFIX}/var/log/apache2/suexec_log}" ) fi diff --git a/eclass/bazel.eclass b/eclass/bazel.eclass new file mode 100644 index 000000000000..ce80ea185e9c --- /dev/null +++ b/eclass/bazel.eclass @@ -0,0 +1,220 @@ +# Copyright 1999-2018 Jason Zaman +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: bazel.eclass +# @MAINTAINER: +# Jason Zaman +# @AUTHOR: +# Jason Zaman +# @BLURB: Utility functions for packages using Bazel Build +# @DESCRIPTION: +# A utility eclass providing functions to run the Bazel Build system. +# +# This eclass does not export any phase functions. + +case "${EAPI:-0}" in + 0|1|2|3|4|5|6) + die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" + ;; + 7) + ;; + *) + die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" + ;; +esac + +if [[ ! ${_BAZEL_ECLASS} ]]; then + +inherit multiprocessing toolchain-funcs + +BDEPEND=">=dev-util/bazel-0.20" + +# @FUNCTION: bazel_get_flags +# @DESCRIPTION: +# Obtain and print the bazel flags for target and host *FLAGS. +# +# To add more flags to this, append the flags to the +# appropriate variable before calling this function +bazel_get_flags() { + local i fs=() + for i in ${CFLAGS}; do + fs+=( "--conlyopt=${i}" ) + done + for i in ${BUILD_CFLAGS}; do + fs+=( "--host_conlyopt=${i}" ) + done + for i in ${CXXFLAGS}; do + fs+=( "--cxxopt=${i}" ) + done + for i in ${BUILD_CXXFLAGS}; do + fs+=( "--host_cxxopt=${i}" ) + done + for i in ${CPPFLAGS}; do + fs+=( "--conlyopt=${i}" "--cxxopt=${i}" ) + done + for i in ${BUILD_CPPFLAGS}; do + fs+=( "--host_conlyopt=${i}" "--host_cxxopt=${i}" ) + done + for i in ${LDFLAGS}; do + fs+=( "--linkopt=${i}" ) + done + for i in ${BUILD_LDFLAGS}; do + fs+=( "--host_linkopt=${i}" ) + done + echo "${fs[*]}" +} + +# @FUNCTION: bazel_setup_bazelrc +# @DESCRIPTION: +# Creates the bazelrc with common options that will be passed +# to bazel. This will be called by ebazel automatically so +# does not need to be called from the ebuild. +bazel_setup_bazelrc() { + if [[ -f "${T}/bazelrc" ]]; then + return + fi + + # F: fopen_wr + # P: /proc/self/setgroups + # Even with standalone enabled, the Bazel sandbox binary is run for feature test: + # https://github.com/bazelbuild/bazel/blob/7b091c1397a82258e26ab5336df6c8dae1d97384/src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java#L61 + # https://github.com/bazelbuild/bazel/blob/76555482873ffcf1d32fb40106f89231b37f850a/src/main/tools/linux-sandbox-pid1.cc#L113 + addpredict /proc + + mkdir -p "${T}/bazel-cache" || die + mkdir -p "${T}/bazel-distdir" || die + + cat > "${T}/bazelrc" <<-EOF || die + startup --batch + + # dont strip HOME, portage sets a temp per-package dir + build --action_env HOME + + # make bazel respect MAKEOPTS + build --jobs=$(makeopts_jobs) + build --compilation_mode=opt --host_compilation_mode=opt + + # FLAGS + build $(bazel_get_flags) + + # Use standalone strategy to deactivate the bazel sandbox, since it + # conflicts with FEATURES=sandbox. + build --spawn_strategy=standalone --genrule_strategy=standalone + test --spawn_strategy=standalone --genrule_strategy=standalone + + build --strip=never + build --verbose_failures --noshow_loading_progress + test --verbose_test_summary --verbose_failures --noshow_loading_progress + + # make bazel only fetch distfiles from the cache + fetch --repository_cache="${T}/bazel-cache/" --distdir="${T}/bazel-distdir/" + build --repository_cache="${T}/bazel-cache/" --distdir="${T}/bazel-distdir/" + + build --define=PREFIX=${EPREFIX%/}/usr + build --define=LIBDIR=\$(PREFIX)/$(get_libdir) + EOF + + if tc-is-cross-compiler; then + echo "build --nodistinct_host_configuration" >> "${T}/bazelrc" || die + fi +} + +# @FUNCTION: ebazel +# @USAGE: [...] +# @DESCRIPTION: +# Run bazel with the bazelrc and output_base. +# +# output_base will be specific to $BUILD_DIR (if unset, $S). +# bazel_setup_bazelrc will be called and the created bazelrc +# will be passed to bazel. +# +# Will automatically die if bazel does not exit cleanly. +ebazel() { + bazel_setup_bazelrc + + # Use different build folders for each multibuild variant. + local output_base="${BUILD_DIR:-${S}}" + output_base="${output_base%/}-bazel-base" + mkdir -p "${output_base}" || die + + set -- bazel --bazelrc="${T}/bazelrc" --output_base="${output_base}" ${@} + echo "${*}" >&2 + "${@}" || die "ebazel failed" +} + +# @FUNCTION: bazel_load_distfiles +# @USAGE: ... +# @DESCRIPTION: +# Populate the bazel distdir to fetch from since it cannot use +# the network. Bazel looks in distdir but will only look for the +# original filename, not the possibly renamed one that portage +# downloaded. If the line has -> we to rename it back. This also +# handles use-conditionals that SRC_URI does. +# +# Example: +# @CODE +# bazel_external_uris="http://a/file-2.0.tgz +# python? ( http://b/1.0.tgz -> foo-1.0.tgz )" +# SRC_URI="http://c/${PV}.tgz +# ${bazel_external_uris}" +# +# src_unpack() { +# unpack ${PV}.tgz +# bazel_load_distfiles "${bazel_external_uris}" +# } +# @CODE +bazel_load_distfiles() { + local file="" + local rename=0 + + [[ "${@}" ]] || die "Missing args" + mkdir -p "${T}/bazel-distdir" || die + + for word in ${@} + do + if [[ "${word}" == "->" ]]; then + # next word is a dest filename + rename=1 + elif [[ "${word}" == ")" ]]; then + # close conditional block + continue + elif [[ "${word}" == "(" ]]; then + # open conditional block + continue + elif [[ "${word}" == ?(\!)[A-Za-z0-9]*([A-Za-z0-9+_@-])\? ]]; then + # use-conditional block + # USE-flags can contain [A-Za-z0-9+_@-], and start with alphanum + # https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-200003.1.4 + # ?(\!) matches zero-or-one !'s + # *(...) zero-or-more characters + # ends with a ? + continue + elif [[ ${rename} -eq 1 ]]; then + # Make sure the distfile is used + if [[ "${A}" == *"${word}"* ]]; then + echo "Copying ${file} to bazel distdir as ${word}" + ln -s "${DISTDIR}/${word}" "${T}/bazel-distdir/${file}" || die + fi + rename=0 + file="" + else + # another URL, current one may or may not be a rename + # if there was a previous one, its not renamed so copy it now + if [[ -n "${file}" && "${A}" == *"${file}"* ]]; then + echo "Copying ${file} to bazel distdir" + ln -s "${DISTDIR}/${file}" "${T}/bazel-distdir/${file}" || die + fi + # save the current URL, later we will find out if its a rename or not. + file="${word##*/}" + fi + done + + # handle last file + if [[ -n "${file}" ]]; then + echo "Copying ${file} to bazel distdir" + ln -s "${DISTDIR}/${file}" "${T}/bazel-distdir/${file}" || die + fi +} + +_BAZEL_ECLASS=1 +fi diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 98f5fa41b55a..776de76b31d4 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -9,7 +9,7 @@ # Maciej Mrozowski # (undisclosed contributors) # Original author: Zephyrus (zephyrus@mirach.it) -# @SUPPORTED_EAPIS: 5 6 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: common ebuild functions for cmake-based packages # @DESCRIPTION: # The cmake-utils eclass makes creating ebuilds for cmake-based packages much easier. @@ -50,10 +50,12 @@ _CMAKE_UTILS_ECLASS=1 # Set to enable in-source build. # @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR +# @DEFAULT_UNSET # @DESCRIPTION: # Specify a makefile generator to be used by cmake. # At this point only "emake" and "ninja" are supported. -: ${CMAKE_MAKEFILE_GENERATOR:=emake} +# In EAPI 7 and above, the default is set to "ninja", +# whereas in EAPIs below 7, it is set to "emake". # @ECLASS-VARIABLE: CMAKE_MIN_VERSION # @DESCRIPTION: @@ -105,27 +107,39 @@ _CMAKE_UTILS_ECLASS=1 case ${EAPI} in 5) : ${CMAKE_WARN_UNUSED_CLI:=no} ;; - 6) : ${CMAKE_WARN_UNUSED_CLI:=yes} ;; + 6|7) : ${CMAKE_WARN_UNUSED_CLI:=yes} ;; *) die "EAPI=${EAPI:-0} is not supported" ;; esac inherit toolchain-funcs ninja-utils flag-o-matic multiprocessing xdg-utils case ${EAPI} in - 5|6) inherit eutils multilib ;; + [56]) + : ${CMAKE_MAKEFILE_GENERATOR:=emake} + inherit eutils multilib + ;; + *) + : ${CMAKE_MAKEFILE_GENERATOR:=ninja} + ;; esac EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install -[[ ${WANT_CMAKE} ]] && eqawarn "\${WANT_CMAKE} has been removed and is a no-op now" +if [[ ${WANT_CMAKE} ]]; then + if [[ ${EAPI} != [56] ]]; then + die "\${WANT_CMAKE} has been removed and is a no-op now" + else + eqawarn "\${WANT_CMAKE} has been removed and is a no-op now" + fi +fi [[ ${PREFIX} ]] && die "\${PREFIX} has been removed and is a no-op now" case ${CMAKE_MAKEFILE_GENERATOR} in emake) - DEPEND="sys-devel/make" + BDEPEND="sys-devel/make" ;; ninja) - DEPEND="dev-util/ninja" + BDEPEND="dev-util/ninja" ;; *) eerror "Unknown value for \${CMAKE_MAKEFILE_GENERATOR}" @@ -134,9 +148,14 @@ case ${CMAKE_MAKEFILE_GENERATOR} in esac if [[ ${PN} != cmake ]]; then - DEPEND+=" >=dev-util/cmake-${CMAKE_MIN_VERSION}" + BDEPEND+=" >=dev-util/cmake-${CMAKE_MIN_VERSION}" fi +case ${EAPI} in + 7) ;; + *) DEPEND=" ${BDEPEND}" ;; +esac + # Internal functions used by cmake-utils_use_* _cmake_use_me_now() { debug-print-function ${FUNCNAME} "$@" @@ -195,8 +214,13 @@ _cmake_check_build_dir() { # Respect both the old variable and the new one, depending # on which one was set by the ebuild. if [[ ! ${BUILD_DIR} && ${CMAKE_BUILD_DIR} ]]; then - eqawarn "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR." - eqawarn "Please migrate the ebuild to use the new one." + if [[ ${EAPI} != [56] ]]; then + eerror "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR." + die "The ebuild must be migrated to BUILD_DIR." + else + eqawarn "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR." + eqawarn "Please migrate the ebuild to use the new one." + fi # In the next call, both variables will be set already # and we'd have to know which one takes precedence. @@ -211,7 +235,7 @@ _cmake_check_build_dir() { fi # Backwards compatibility for getting the value. - CMAKE_BUILD_DIR=${BUILD_DIR} + [[ ${EAPI} == [56] ]] && CMAKE_BUILD_DIR=${BUILD_DIR} mkdir -p "${BUILD_DIR}" || die echo ">>> Working in BUILD_DIR: \"$BUILD_DIR\"" @@ -495,7 +519,11 @@ cmake-utils_src_configure() { debug-print-function ${FUNCNAME} "$@" if [[ ! ${_CMAKE_UTILS_SRC_PREPARE_HAS_RUN} ]]; then - eqawarn "cmake-utils_src_prepare has not been run, please open a bug on https://bugs.gentoo.org/" + if [[ ${EAPI} != [56] ]]; then + die "FATAL: cmake-utils_src_prepare has not been run" + else + eqawarn "cmake-utils_src_prepare has not been run, please open a bug on https://bugs.gentoo.org/" + fi fi [[ ${EAPI} == 5 ]] && _cmake_cleanup_cmake @@ -617,6 +645,7 @@ cmake-utils_src_configure() { if [[ ${EAPI} != [56] ]]; then cat >> "${common_config}" <<- _EOF_ || die SET (CMAKE_INSTALL_DOCDIR "${EPREFIX}/usr/share/doc/${PF}" CACHE PATH "") + SET (BUILD_SHARED_LIBS ON CACHE BOOLEAN "") _EOF_ fi diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index ffb07441ad99..fa7a3ab5c12b 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -545,6 +545,7 @@ distutils-r1_python_install() { # python likes to compile any module it sees, which triggers sandbox # failures if some packages haven't compiled their modules yet. + addpredict "${EPREFIX}/usr/lib/${EPYTHON}" addpredict "${EPREFIX}/usr/$(get_libdir)/${EPYTHON}" addpredict /usr/lib/portage/pym addpredict /usr/local # bug 498232 diff --git a/eclass/golang-build.eclass b/eclass/golang-build.eclass index 4d5bcdf73189..bb662ad45baf 100644 --- a/eclass/golang-build.eclass +++ b/eclass/golang-build.eclass @@ -55,6 +55,7 @@ golang-build_src_compile() { ego_pn_check set -- env GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \ + GOCACHE="${T}/go-cache" \ go build -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" echo "$@" "$@" || die diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass index 4ddff029a09b..c6cdc4ba9d0e 100644 --- a/eclass/kde5-functions.eclass +++ b/eclass/kde5-functions.eclass @@ -4,7 +4,7 @@ # @ECLASS: kde5-functions.eclass # @MAINTAINER: # kde@gentoo.org -# @SUPPORTED_EAPIS: 6 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: Common ebuild functions for packages based on KDE Frameworks 5. # @DESCRIPTION: # This eclass contains functions shared by the other KDE eclasses and forms @@ -18,6 +18,7 @@ _KDE5_FUNCTIONS_ECLASS=1 inherit toolchain-funcs case ${EAPI} in + 7) ;; 6) inherit eapi7-ver ;; *) die "EAPI=${EAPI:-0} is not supported" ;; esac @@ -35,31 +36,27 @@ export KDE_BUILD_TYPE case ${CATEGORY} in kde-frameworks) [[ ${KDE_BUILD_TYPE} = live ]] && : ${FRAMEWORKS_MINIMAL:=9999} + [[ ${PV} = 5.52.0* ]] && : ${QT_MINIMAL:=5.9.4} ;; kde-plasma) - if [[ ${PV} = 5.13.5 ]]; then - : ${FRAMEWORKS_MINIMAL:=5.46.0} - : ${KDE_APPS_MINIMAL:=17.12.3} - fi if [[ ${KDE_BUILD_TYPE} = live && ${PV} != 5.??.49* ]]; then : ${FRAMEWORKS_MINIMAL:=9999} fi - : ${QT_MINIMAL:=5.11.1} ;; kde-apps) - [[ ${PV} = 18.04.3 ]] && : ${FRAMEWORKS_MINIMAL:=5.46.0} + [[ ${PV} = 18.08.3* ]] && : ${QT_MINIMAL:=5.9.4} ;; esac # @ECLASS-VARIABLE: QT_MINIMAL # @DESCRIPTION: # Minimum version of Qt to require. This affects add_qt_dep. -: ${QT_MINIMAL:=5.9.4} +: ${QT_MINIMAL:=5.11.1} # @ECLASS-VARIABLE: FRAMEWORKS_MINIMAL # @DESCRIPTION: # Minimum version of Frameworks to require. This affects add_frameworks_dep. -: ${FRAMEWORKS_MINIMAL:=5.50.0} +: ${FRAMEWORKS_MINIMAL:=5.52.0} # @ECLASS-VARIABLE: PLASMA_MINIMAL # @DESCRIPTION: @@ -69,7 +66,7 @@ esac # @ECLASS-VARIABLE: KDE_APPS_MINIMAL # @DESCRIPTION: # Minimum version of KDE Applications to require. This affects add_kdeapps_dep. -: ${KDE_APPS_MINIMAL:=18.04.3} +: ${KDE_APPS_MINIMAL:=18.08.3} # @ECLASS-VARIABLE: KDE_GCC_MINIMAL # @DEFAULT_UNSET diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index 03be801c0605..79887823556f 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -215,11 +215,7 @@ case ${KDE_AUTODEPS} in if [[ ${CATEGORY} = kde-apps ]]; then [[ ${KDE_BLOCK_SLOT4} = true ]] && RDEPEND+=" !kde-apps/${PN}:4" - RDEPEND+=" - !kde-apps/kde-l10n - ! -# @SUPPORTED_EAPIS: 5 6 7 -# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 -# @DESCRIPTION: -# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) -# to provide a single common place for the common mozilla engine compoments. -# -# The eclass provides all common dependencies as well as common use flags. -# -# Some use flags which may be optional in particular mozilla packages can be -# supported through setting eclass variables. -# -# This eclass inherits mozconfig helper functions as defined in mozcoreconf-v4, -# and so ebuilds inheriting this eclass do not need to inherit that. - -case ${EAPI} in - 0|1|2|3|4) - die "EAPI=${EAPI} not supported" - ;; - 5) - inherit multilib - ;; -esac - -inherit flag-o-matic toolchain-funcs mozcoreconf-v4 - -# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_WIFI -# @DEFAULT_UNSET -# @DESCRIPTION: -# Set this variable before the inherit line, when an ebuild needs to provide -# optional necko-wifi support via IUSE="wifi". Currently this would include -# ebuilds for firefox, and potentially seamonkey. -# -# Leave the variable UNSET if necko-wifi support should not be available. -# Set the variable to "enabled" if the use flag should be enabled by default. -# Set the variable to any value if the use flag should exist but not be default-enabled. - -# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_JIT -# @DEFAULT_UNSET -# @DESCRIPTION: -# Set this variable before the inherit line, when an ebuild needs to provide -# optional necko-wifi support via IUSE="jit". Currently this would include -# ebuilds for firefox, and potentially seamonkey. -# -# Leave the variable UNSET if optional jit support should not be available. -# Set the variable to "enabled" if the use flag should be enabled by default. -# Set the variable to any value if the use flag should exist but not be default-enabled. - -# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK3 -# @DEFAULT_UNSET -# @DESCRIPTION: -# Set this variable before the inherit line, when an ebuild can provide -# optional gtk3 support via IUSE="gtk3". Currently this would include -# ebuilds for firefox, but thunderbird and seamonkey could follow in the future. -# -# Leave the variable UNSET if gtk3 support should not be available. -# Set the variable to "enabled" if the use flag should be enabled by default. -# Set the variable to any value if the use flag should exist but not be default-enabled. - -# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_QT5 -# @DEFAULT_UNSET -# @DESCRIPTION: -# Set this variable before the inherit line, when an ebuild can provide -# optional qt5 support via IUSE="qt5". Currently this would include -# ebuilds for firefox, but thunderbird and seamonkey could follow in the future. -# -# Leave the variable UNSET if qt5 support should not be available. -# Set the variable to "enabled" if the use flag should be enabled by default. -# Set the variable to any value if the use flag should exist but not be default-enabled. - -# use-flags common among all mozilla ebuilds -IUSE="${IUSE} dbus debug ffmpeg +gstreamer +jemalloc3 neon pulseaudio selinux startup-notification system-cairo - system-harfbuzz system-icu system-jpeg system-libevent system-sqlite system-libvpx" - -# some notes on deps: -# gtk:2 minimum is technically 2.10 but gio support (enabled by default) needs 2.14 -# media-libs/mesa needs to be 10.2 or above due to a bug with flash+vdpau -# media-libs/libcanberra is dlopen'ed rather than linked - -RDEPEND=">=app-text/hunspell-1.2:= - dev-libs/atk - dev-libs/expat - >=x11-libs/cairo-1.10[X] - >=x11-libs/gtk+-2.18:2 - x11-libs/gdk-pixbuf - >=x11-libs/pango-1.22.0 - >=media-libs/libpng-1.6.19:0=[apng] - >=media-libs/mesa-10.2:* - media-libs/fontconfig - >=media-libs/freetype-2.4.10 - media-libs/libcanberra:*[pulseaudio?] - kernel_linux? ( media-libs/alsa-lib ) - pulseaudio? ( media-sound/pulseaudio ) - virtual/freedesktop-icon-theme - dbus? ( >=sys-apps/dbus-0.60 - >=dev-libs/dbus-glib-0.72 ) - startup-notification? ( >=x11-libs/startup-notification-0.8 ) - >=dev-libs/glib-2.26:2 - >=sys-libs/zlib-1.2.3 - >=virtual/libffi-3.0.10 - ffmpeg? ( virtual/ffmpeg ) - gstreamer? ( - >=media-libs/gstreamer-1.4.5:1.0 - >=media-libs/gst-plugins-base-1.4.5:1.0 - >=media-libs/gst-plugins-good-1.4.5:1.0 - >=media-plugins/gst-plugins-libav-1.4.5:1.0 - ) - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrender - x11-libs/libXt - system-cairo? ( >=x11-libs/cairo-1.12[X,xcb] >=x11-libs/pixman-0.19.2 ) - system-icu? ( >=dev-libs/icu-51.1:= ) - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) - system-libevent? ( >=dev-libs/libevent-2.0:0= ) - system-sqlite? ( >=dev-db/sqlite-3.9.1:3[secure-delete,debug=] ) - system-harfbuzz? ( >=media-libs/harfbuzz-1.1.3:0=[graphite,icu] >=media-gfx/graphite2-1.3.8 ) -" - -if [[ ${PV/45.0*/} == "" ]]; then - RDEPEND+=" - system-libvpx? ( >=media-libs/libvpx-1.3.0:0=[postproc] )" -else - # 45.1.0 and above bumped the libvpx requirement - RDEPEND+=" - system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] )" -fi - -if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then - if [[ ${MOZCONFIG_OPTIONAL_GTK3} = "enabled" ]]; then - IUSE+=" +gtk3" - else - IUSE+=" gtk3" - fi - RDEPEND+=" - gtk3? ( >=x11-libs/gtk+-3.4.0:3 )" -fi -if [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]]; then - inherit qmake-utils - if [[ ${MOZCONFIG_OPTIONAL_QT5} = "enabled" ]]; then - IUSE+=" +qt5" - else - IUSE+=" qt5" - fi - RDEPEND+=" - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtnetwork:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 - dev-qt/qtxml:5 - dev-qt/qtdeclarative:5 - )" -fi -if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]]; then - if [[ ${MOZCONFIG_OPTIONAL_WIFI} = "enabled" ]]; then - IUSE+=" +wifi" - else - IUSE+=" wifi" - fi - RDEPEND+=" - wifi? ( - kernel_linux? ( >=sys-apps/dbus-0.60 - >=dev-libs/dbus-glib-0.72 - net-misc/networkmanager ) - )" -fi -if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then - if [[ ${MOZCONFIG_OPTIONAL_JIT} = "enabled" ]]; then - IUSE+=" +jit" - else - IUSE+=" jit" - fi -fi - -DEPEND="app-arch/zip - app-arch/unzip - >=sys-devel/binutils-2.16.1 - ${RDEPEND}" - -RDEPEND+=" - selinux? ( sec-policy/selinux-mozilla )" - -# force system-icu if system-harfbuzz is set to avoid any potential ABI issues -REQUIRED_USE=" - system-harfbuzz? ( system-icu )" - -# only one of gtk3 or qt5 should be permitted to be selected, since only one will be used. -[[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]] && [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]] && \ - REQUIRED_USE+=" ?? ( gtk3 qt5 )" - -# @FUNCTION: mozconfig_config -# @DESCRIPTION: -# Set common configure options for mozilla packages. -# Call this within src_configure() phase, after mozconfig_init -# -# Example: -# -# inherit mozconfig-v5.33 -# -# src_configure() { -# mozconfig_init -# mozconfig_config -# # ... misc ebuild-unique settings via calls to -# # ... mozconfig_{annotate,use_with,use_enable} -# mozconfig_final -# } - -mozconfig_config() { - # Migrated from mozcoreconf-v3 - mozconfig_annotate 'more disable_update_strip' \ - --disable-pedantic \ - --disable-installer \ - --disable-strip-libs - - if [[ ${PN} != seamonkey ]]; then - mozconfig_annotate 'basic_profile' \ - --disable-profilelocking \ - --enable-single-profile \ - --disable-profilesharing - fi - - # Migrated from mozcoreconf-2 - mozconfig_annotate 'system_libs' \ - --with-system-zlib \ - --enable-pango \ - --enable-svg \ - --with-system-bz2 - - if has bindist ${IUSE}; then - mozconfig_use_enable !bindist official-branding - if [[ ${PN} == firefox ]] && use bindist ; then - mozconfig_annotate '' --with-branding=browser/branding/aurora - fi - fi - - mozconfig_use_enable debug - mozconfig_use_enable debug tests - - if ! use debug ; then - mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols - else - mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols - fi - - mozconfig_use_enable startup-notification - - if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]] ; then - # wifi pulls in dbus so manage both here - mozconfig_use_enable wifi necko-wifi - if use kernel_linux && use wifi && ! use dbus; then - echo "Enabling dbus support due to wifi request" - mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus - else - mozconfig_use_enable dbus - fi - else - mozconfig_use_enable dbus - mozconfig_annotate 'disabled' --disable-necko-wifi - fi - - # These are forced-on for webm support - mozconfig_annotate 'required' --enable-ogg - mozconfig_annotate 'required' --enable-wave - - if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then - mozconfig_use_enable jit ion - fi - - # These are enabled by default in all mozilla applications - mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr - mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr - mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir) - if use system-libevent; then - mozconfig_annotate '' --with-system-libevent="${EPREFIX}"/usr - fi - mozconfig_annotate '' --prefix="${EPREFIX}"/usr - mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) - mozconfig_annotate 'Gentoo default' --enable-system-hunspell - mozconfig_annotate '' --disable-gnomeui - mozconfig_annotate '' --enable-gio - mozconfig_annotate '' --disable-crashreporter - mozconfig_annotate 'Gentoo default' --with-system-png - mozconfig_annotate '' --enable-system-ffi - mozconfig_annotate 'Gentoo default to honor system linker' --disable-gold - mozconfig_annotate 'Gentoo default' --disable-skia - mozconfig_annotate '' --disable-gconf - mozconfig_annotate '' --with-intl-api - - # default toolkit is cairo-gtk2, optional use flags can change this - local toolkit="cairo-gtk2" - local toolkit_comment="" - if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then - if use gtk3; then - toolkit="cairo-gtk3" - toolkit_comment="gtk3 use flag" - fi - fi - if [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]]; then - if use qt5; then - toolkit="cairo-qt" - toolkit_comment="qt5 use flag" - # need to specify these vars because the qt5 versions are not found otherwise, - # and setting --with-qtdir overrides the pkg-config include dirs - local i - for i in qmake moc rcc; do - echo "export HOST_${i^^}=\"$(qt5_get_bindir)/${i}\"" \ - >> "${S}"/.mozconfig || die - done - echo 'unset QTDIR' >> "${S}"/.mozconfig || die - mozconfig_annotate '+qt5' --disable-gio - fi - fi - mozconfig_annotate "${toolkit_comment}" --enable-default-toolkit=${toolkit} - - # Use jemalloc unless libc is not glibc >= 2.4 - # at this time the minimum glibc in the tree is 2.9 so we should be safe. - if use elibc_glibc && use jemalloc3; then - # We must force-enable jemalloc 3 via .mozconfig - echo "export MOZ_JEMALLOC3=1" >> "${S}"/.mozconfig || die - mozconfig_annotate '' --enable-jemalloc - mozconfig_annotate '' --enable-replace-malloc - fi - - mozconfig_annotate '' --target="${CTARGET:-${CHOST}}" - mozconfig_annotate '' --build="${CTARGET:-${CHOST}}" - - use ffmpeg || mozconfig_annotate '-ffmpeg' --disable-ffmpeg - if use gstreamer ; then - use ffmpeg && einfo "${PN} will not use ffmpeg unless gstreamer:1.0 is not available at runtime" - mozconfig_annotate '+gstreamer' --enable-gstreamer=1.0 - else - mozconfig_annotate '' --disable-gstreamer - fi - mozconfig_use_enable pulseaudio - - mozconfig_use_enable system-cairo - mozconfig_use_enable system-sqlite - mozconfig_use_with system-jpeg - mozconfig_use_with system-icu - mozconfig_use_with system-libvpx - mozconfig_use_with system-harfbuzz - mozconfig_use_with system-harfbuzz system-graphite2 - - # Modifications to better support ARM, bug 553364 - if use neon ; then - mozconfig_annotate '' --with-fpu=neon - mozconfig_annotate '' --with-thumb=yes - mozconfig_annotate '' --with-thumb-interwork=no - fi - if [[ ${CHOST} == armv* ]] ; then - mozconfig_annotate '' --with-float-abi=hard - mozconfig_annotate '' --enable-skia - - if ! use system-libvpx ; then - sed -i -e "s|softfp|hard|" \ - "${S}"/media/libvpx/moz.build - fi - fi -} - -# @FUNCTION: mozconfig_install_prefs -# @DESCRIPTION: -# Set preferences into the prefs.js file specified as a parameter to -# the function. This sets both some common prefs to all mozilla -# packages, and any prefs that may relate to the use flags administered -# by mozconfig_config(). -# -# Call this within src_install() phase, after copying the template -# prefs file (if any) from ${FILESDIR} -# -# Example: -# -# inherit mozconfig-v6.46 -# -# src_install() { -# cp "${FILESDIR}"/gentoo-default-prefs.js \ -# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ -# || die -# -# mozconfig_install_prefs \ -# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" -# -# ... -# } - -mozconfig_install_prefs() { - local prefs_file="${1}" - - einfo "Adding prefs from mozconfig to ${prefs_file}" - - # set dictionary path, to use system hunspell - echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \ - >>"${prefs_file}" || die - - # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it - if use system-harfbuzz ; then - echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \ - >>"${prefs_file}" || die - fi -} diff --git a/eclass/mozconfig-v6.58.eclass b/eclass/mozconfig-v6.58.eclass deleted file mode 100644 index a27e40438e18..000000000000 --- a/eclass/mozconfig-v6.58.eclass +++ /dev/null @@ -1,396 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# -# @ECLASS: mozconfig-v6.58.eclass -# @MAINTAINER: -# mozilla team -# @SUPPORTED_EAPIS: 5 6 7 -# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 -# @DESCRIPTION: -# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) -# to provide a single common place for the common mozilla engine compoments. -# -# The eclass provides all common dependencies as well as common use flags. -# -# Some use flags which may be optional in particular mozilla packages can be -# supported through setting eclass variables. -# -# This eclass inherits mozconfig helper functions as defined in mozcoreconf-v3, -# and so ebuilds inheriting this eclass do not need to inherit that. - -case ${EAPI} in - 0|1|2|3|4) - die "EAPI=${EAPI} not supported" - ;; - 5) - inherit multilib - ;; -esac - -inherit flag-o-matic toolchain-funcs mozcoreconf-v5 - -# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_WIFI -# @DESCRIPTION: -# Set this variable before the inherit line, when an ebuild needs to provide -# optional necko-wifi support via IUSE="wifi". Currently this would include -# ebuilds for firefox, and potentially seamonkey. -# -# Leave the variable UNSET if necko-wifi support should not be available. -# Set the variable to "enabled" if the use flag should be enabled by default. -# Set the variable to any value if the use flag should exist but not be default-enabled. - -# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_JIT -# @DESCRIPTION: -# Set this variable before the inherit line, when an ebuild needs to provide -# deterministic jit support via IUSE="jit". The upstream default will be used -# otherwise, which is generally to enable jit unless support for the platform -# is missing. -# -# Set the variable to "enabled" if the use flag should be enabled by default. -# Set the variable to any value if the use flag should exist but not be default-enabled. - -# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK3 -# @DESCRIPTION: -# Set this variable before the inherit line, when an ebuild can provide -# optional gtk3 support via IUSE="force-gtk3". Currently this would include -# thunderbird and seamonkey in the future, once support is ready for testing. -# -# Leave the variable UNSET if gtk3 support should not be optionally available. -# Set the variable to "enabled" if the use flag should be enabled by default. -# Set the variable to any value if the use flag should exist but not be default-enabled. -# If gtk+:3 is to be the standard toolkit, do not use this and instead use -# MOZCONFIG_OPTIONAL_GTK2ONLY. - -# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK2ONLY -# @DESCRIPTION: -# Set this variable before the inherit line, when an ebuild can provide -# optional gtk2-only support via IUSE="gtk2". -# -# Note that this option conflicts directly with MOZCONFIG_OPTIONAL_GTK3, both -# variables cannot be set at the same time and this variable will be ignored if -# MOZCONFIG_OPTIONAL_GTK3 is set. -# -# Leave the variable UNSET if gtk2-only support should not be available. -# Set the variable to "enabled" if the use flag should be enabled by default. -# Set the variable to any value if the use flag should exist but not be default-enabled. - -# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_QT5 -# @DESCRIPTION: -# Set this variable before the inherit line, when an ebuild can provide -# optional qt5 support via IUSE="qt5". Currently this would include -# ebuilds for firefox, but thunderbird and seamonkey could follow in the future. -# -# Leave the variable UNSET if qt5 support should not be available. -# Set the variable to "enabled" if the use flag should be enabled by default. -# Set the variable to any value if the use flag should exist but not be default-enabled. - -# use-flags common among all mozilla ebuilds -IUSE="${IUSE} dbus debug neon pulseaudio selinux startup-notification system-harfbuzz - system-icu system-jpeg system-libevent system-sqlite system-libvpx" - -# some notes on deps: -# gtk:2 minimum is technically 2.10 but gio support (enabled by default) needs 2.14 -# media-libs/mesa needs to be 10.2 or above due to a bug with flash+vdpau - -RDEPEND=">=app-text/hunspell-1.5.4:= - dev-libs/atk - dev-libs/expat - >=x11-libs/cairo-1.10[X] - >=x11-libs/gtk+-2.18:2 - x11-libs/gdk-pixbuf - >=x11-libs/pango-1.22.0 - >=media-libs/libpng-1.6.34:0=[apng] - >=media-libs/mesa-10.2:* - media-libs/fontconfig - >=media-libs/freetype-2.4.10 - kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) ) - virtual/freedesktop-icon-theme - dbus? ( >=sys-apps/dbus-0.60 - >=dev-libs/dbus-glib-0.72 ) - startup-notification? ( >=x11-libs/startup-notification-0.8 ) - >=x11-libs/pixman-0.19.2 - >=dev-libs/glib-2.26:2 - >=sys-libs/zlib-1.2.3 - >=virtual/libffi-3.0.10 - virtual/ffmpeg - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrender - x11-libs/libXt - system-icu? ( >=dev-libs/icu-59.1:= ) - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) - system-libevent? ( >=dev-libs/libevent-2.0:0= ) - system-sqlite? ( >=dev-db/sqlite-3.20.1:3[secure-delete,debug=] ) - system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] ) - system-harfbuzz? ( >=media-libs/harfbuzz-1.4.2:0= >=media-gfx/graphite2-1.3.9-r1 ) -" - -if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then - MOZCONFIG_OPTIONAL_GTK2ONLY= - if [[ ${MOZCONFIG_OPTIONAL_GTK3} = "enabled" ]]; then - IUSE+=" +force-gtk3" - else - IUSE+=" force-gtk3" - fi - RDEPEND+=" force-gtk3? ( >=x11-libs/gtk+-3.4.0:3 )" -elif [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then - if [[ ${MOZCONFIG_OPTIONAL_GTK2ONLY} = "enabled" ]]; then - IUSE+=" +gtk2" - else - IUSE+=" gtk2" - fi - RDEPEND+=" !gtk2? ( >=x11-libs/gtk+-3.4.0:3 )" -else - # no gtk3 related dep set by optional use flags, force it - RDEPEND+=" >=x11-libs/gtk+-3.4.0:3" -fi -if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]]; then - if [[ ${MOZCONFIG_OPTIONAL_WIFI} = "enabled" ]]; then - IUSE+=" +wifi" - else - IUSE+=" wifi" - fi - RDEPEND+=" - wifi? ( - kernel_linux? ( >=sys-apps/dbus-0.60 - >=dev-libs/dbus-glib-0.72 - net-misc/networkmanager ) - )" -fi - -DEPEND="app-arch/zip - app-arch/unzip - >=sys-devel/binutils-2.16.1 - sys-apps/findutils - pulseaudio? ( media-sound/pulseaudio ) - || ( - ( >=dev-lang/rust-1.21.0 >=dev-util/cargo-0.22.0 ) - >=dev-lang/rust-1.21.0[extended] - ( >=dev-lang/rust-bin-1.21.0 >=dev-util/cargo-0.22.0 ) - ) - ${RDEPEND}" - -RDEPEND+=" - pulseaudio? ( || ( media-sound/pulseaudio - >=media-sound/apulse-0.1.9 ) ) - selinux? ( sec-policy/selinux-mozilla )" - -# @FUNCTION: mozconfig_config -# @DESCRIPTION: -# Set common configure options for mozilla packages. -# Call this within src_configure() phase, after mozconfig_init -# -# Example: -# -# inherit mozconfig-v6.46 -# -# src_configure() { -# mozconfig_init -# mozconfig_config -# # ... misc ebuild-unique settings via calls to -# # ... mozconfig_{annotate,use_with,use_enable} -# mozconfig_final -# } - -mozconfig_config() { - # Migrated from mozcoreconf-2 - mozconfig_annotate 'system_libs' \ - --with-system-zlib \ - --with-system-bz2 - - # Stylo is only broken on x86 builds - use x86 && mozconfig_annotate 'Upstream bug 1341234' --disable-stylo - - # Must pass release in order to properly select linker - mozconfig_annotate 'Enable by Gentoo' --enable-release - - # Must pass --enable-gold if using ld.gold - if tc-ld-is-gold ; then - mozconfig_annotate 'tc-ld-is-gold=true' --enable-gold - else - mozconfig_annotate 'tc-ld-is-gold=false' --disable-gold - fi - - if has bindist ${IUSE}; then - mozconfig_use_enable !bindist official-branding - if [[ ${PN} == firefox ]] && use bindist ; then - mozconfig_annotate '' --with-branding=browser/branding/aurora - fi - fi - - # Enable position independent executables - mozconfig_annotate 'enabled by Gentoo' --enable-pie - mozconfig_use_enable debug - mozconfig_use_enable debug tests - - if ! use debug ; then - mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols - else - mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols - fi - - mozconfig_use_enable startup-notification - - if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]] ; then - # wifi pulls in dbus so manage both here - mozconfig_use_enable wifi necko-wifi - if use kernel_linux && use wifi && ! use dbus; then - echo "Enabling dbus support due to wifi request" - mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus - else - mozconfig_use_enable dbus - fi - else - mozconfig_use_enable dbus - mozconfig_annotate 'disabled' --disable-necko-wifi - fi - - if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then - mozconfig_use_enable jit ion - fi - - # These are enabled by default in all mozilla applications - mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr - mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr - mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir) - if use system-libevent; then - mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr - fi - mozconfig_annotate '' --prefix="${EPREFIX}"/usr - mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) - mozconfig_annotate 'Gentoo default' --enable-system-hunspell - mozconfig_annotate '' --disable-crashreporter - mozconfig_annotate 'Gentoo default' --with-system-png - mozconfig_annotate '' --enable-system-ffi - mozconfig_annotate '' --disable-gconf - mozconfig_annotate '' --with-intl-api - - # skia has no support for big-endian platforms - if [[ $(tc-endian) == "big" ]]; then - mozconfig_annotate 'big endian target' --disable-skia - else - mozconfig_annotate '' --enable-skia - fi - - # default toolkit is cairo-gtk3, optional use flags can change this - local toolkit="cairo-gtk3" - local toolkit_comment="" - if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then - if ! use force-gtk3; then - toolkit="cairo-gtk2" - toolkit_comment="force-gtk3 use flag" - fi - fi - if [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then - if use gtk2 ; then - toolkit="cairo-gtk2" - else - toolkit_comment="gtk2 use flag" - fi - fi - if [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]]; then - if use qt5; then - toolkit="cairo-qt" - toolkit_comment="qt5 use flag" - # need to specify these vars because the qt5 versions are not found otherwise, - # and setting --with-qtdir overrides the pkg-config include dirs - local i - for i in qmake moc rcc; do - echo "export HOST_${i^^}=\"$(qt5_get_bindir)/${i}\"" \ - >> "${S}"/.mozconfig || die - done - echo 'unset QTDIR' >> "${S}"/.mozconfig || die - mozconfig_annotate '+qt5' --disable-gio - fi - fi - mozconfig_annotate "${toolkit_comment}" --enable-default-toolkit=${toolkit} - - # Instead of the standard --build= and --host=, mozilla uses --host instead - # of --build, and --target intstead of --host. - # Note, mozilla also has --build but it does not do what you think it does. - # Set both --target and --host as mozilla uses python to guess values otherwise - mozconfig_annotate '' --target="${CHOST}" - mozconfig_annotate '' --host="${CBUILD:-${CHOST}}" - - mozconfig_use_enable pulseaudio - # force the deprecated alsa sound code if pulseaudio is disabled - if use kernel_linux && ! use pulseaudio ; then - mozconfig_annotate '-pulseaudio' --enable-alsa - fi - - # For testing purpose only - mozconfig_annotate 'Sandbox' --enable-content-sandbox - - mozconfig_use_enable system-sqlite - mozconfig_use_with system-jpeg - mozconfig_use_with system-icu - mozconfig_use_with system-libvpx - mozconfig_use_with system-harfbuzz - mozconfig_use_with system-harfbuzz system-graphite2 - - # Modifications to better support ARM, bug 553364 - if use neon ; then - mozconfig_annotate '' --with-fpu=neon - mozconfig_annotate '' --with-thumb=yes - mozconfig_annotate '' --with-thumb-interwork=no - fi - if [[ ${CHOST} == armv* ]] ; then - mozconfig_annotate '' --with-float-abi=hard - if ! use system-libvpx ; then - sed -i -e "s|softfp|hard|" \ - "${S}"/media/libvpx/moz.build - fi - fi -} - -# @FUNCTION: mozconfig_install_prefs -# @DESCRIPTION: -# Set preferences into the prefs.js file specified as a parameter to -# the function. This sets both some common prefs to all mozilla -# packages, and any prefs that may relate to the use flags administered -# by mozconfig_config(). -# -# Call this within src_install() phase, after copying the template -# prefs file (if any) from ${FILESDIR} -# -# Example: -# -# inherit mozconfig-v6.46 -# -# src_install() { -# cp "${FILESDIR}"/gentoo-default-prefs.js \ -# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ -# || die -# -# mozconfig_install_prefs \ -# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" -# -# ... -# } - -mozconfig_install_prefs() { - local prefs_file="${1}" - - einfo "Adding prefs from mozconfig to ${prefs_file}" - - # set dictionary path, to use system hunspell - echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \ - >>"${prefs_file}" || die - - # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it - if use system-harfbuzz ; then - echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \ - >>"${prefs_file}" || die - fi - - # force cairo as the canvas renderer on platforms without skia support - if [[ $(tc-endian) == "big" ]] ; then - echo "sticky_pref(\"gfx.canvas.azure.backends\",\"cairo\");" \ - >>"${prefs_file}" || die - echo "sticky_pref(\"gfx.content.azure.backends\",\"cairo\");" \ - >>"${prefs_file}" || die - fi -} diff --git a/eclass/netsurf.eclass b/eclass/netsurf.eclass index 7eda3264939a..d2da56ba39d7 100644 --- a/eclass/netsurf.eclass +++ b/eclass/netsurf.eclass @@ -1,9 +1,9 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: netsurf.eclass # @MAINTAINER: -# Michael Weber +# maintainer-needed@gentoo.org # @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Handle buildsystem of www.netsurf-browser.org components # @DESCRIPTION: diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index a6f56fe9e1b0..20b9947caca9 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -175,7 +175,7 @@ else [[ -z "${SRC_URI}" && -n "${DIST_AUTHOR}" ]] && \ SRC_URI="mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${DIST_SECTION:+${DIST_SECTION}/}${DIST_A}" [[ -z "${HOMEPAGE}" ]] && \ - HOMEPAGE="http://metacpan.org/release/${DIST_NAME}" + HOMEPAGE="https://metacpan.org/release/${DIST_NAME}" [[ -z "${DIST_EXAMPLES}" ]] || IUSE+=" examples" fi diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index defbcad2e6b7..83f66220c735 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -80,26 +80,14 @@ case ${PV} in *_alpha*|*_beta*|*_rc*) # development release QT5_BUILD_TYPE="release" - - if [[ ${QT5_MINOR_VERSION} -ge 10 ]]; then - MY_P=${QT5_MODULE}-everywhere-src-${PV/_/-} - else - MY_P=${QT5_MODULE}-opensource-src-${PV/_/-} - fi - + MY_P=${QT5_MODULE}-everywhere-src-${PV/_/-} SRC_URI="https://download.qt.io/development_releases/qt/${PV%.*}/${PV/_/-}/submodules/${MY_P}.tar.xz" S=${WORKDIR}/${MY_P} ;; *) # official stable release QT5_BUILD_TYPE="release" - - if [[ ${QT5_MINOR_VERSION} -ge 10 ]]; then - MY_P=${QT5_MODULE}-everywhere-src-${PV} - else - MY_P=${QT5_MODULE}-opensource-src-${PV} - fi - + MY_P=${QT5_MODULE}-everywhere-src-${PV} SRC_URI="https://download.qt.io/official_releases/qt/${PV%.*}/${PV}/submodules/${MY_P}.tar.xz" S=${WORKDIR}/${MY_P} ;; @@ -123,14 +111,13 @@ esac IUSE="debug test" -[[ ${PN} == qtwebkit ]] && RESTRICT+=" mirror" # bug 524584 [[ ${QT5_BUILD_TYPE} == release ]] && RESTRICT+=" test" # bug 457182 DEPEND=" dev-lang/perl virtual/pkgconfig " -if [[ (${PN} != qttest && ${PN} != qtwebkit) || (${PN} == qtwebkit && ${QT5_MINOR_VERSION} -lt 9) ]]; then +if [[ ${PN} != qttest ]]; then DEPEND+=" test? ( ~dev-qt/qttest-${PV} )" fi RDEPEND=" @@ -147,7 +134,7 @@ EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install sr # Unpacks the sources. qt5-build_src_unpack() { # bug 307861 - if [[ ${PN} == qtwebengine || ${PN} == qtwebkit ]]; then + if [[ ${PN} == qtwebengine ]]; then eshopts_push -s extglob if is-flagq '-g?(gdb)?([1-9])'; then ewarn @@ -175,14 +162,8 @@ qt5-build_src_prepare() { qt5_symlink_tools_to_build_dir # Avoid unnecessary qmake recompilations - if [[ ${QT5_MINOR_VERSION} -ge 8 ]]; then - sed -i -e "/Creating qmake/i if [ '!' -e \"\$outpath/bin/qmake\" ]; then" \ - -e '/echo "Done."/a fi' \ - configure || die "sed failed (skip qmake bootstrap)" - else - sed -i -re "s|^if true;.*(\[ '\!').*(\"\\\$outpath/bin/qmake\".*)|if \1 -e \2 then|" \ - configure || die "sed failed (skip qmake bootstrap)" - fi + sed -i -e "/Creating qmake/i if [ '!' -e \"\$outpath/bin/qmake\" ]; then" \ + -e '/echo "Done."/a fi' configure || die "sed failed (skip qmake bootstrap)" # Respect CC, CXX, *FLAGS, MAKEOPTS and EXTRA_EMAKE when bootstrapping qmake sed -i -e "/outpath\/qmake\".*\"\$MAKE\")/ s:): \ @@ -197,12 +178,6 @@ qt5-build_src_prepare() { sed -i -e "/^QMAKE_CONF_COMPILER=/ s:=.*:=\"$(tc-getCXX)\":" \ configure || die "sed failed (QMAKE_CONF_COMPILER)" - if [[ ${QT5_MINOR_VERSION} -le 7 ]]; then - # Respect toolchain and flags in config.tests - find config.tests/unix -name '*.test' -type f -execdir \ - sed -i -e 's/-nocache //' '{}' + || die - fi - # Don't inject -msse/-mavx/... into CXXFLAGS when detecting # compiler support for extended instruction sets (bug 552942) find config.tests/common -name '*.pro' -type f -execdir \ @@ -213,9 +188,7 @@ qt5-build_src_prepare() { src/{corelib/corelib,gui/gui}.pro || die "sed failed (optimize_full)" # Respect build variables in configure tests (bug #639494) - if [[ ${QT5_MINOR_VERSION} -ge 9 ]]; then - sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- \"\$@\"|& $(qt5_qmake_args) |" configure || die - fi + sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- \"\$@\"|& $(qt5_qmake_args) |" configure || die fi default @@ -521,9 +494,7 @@ qt5_base_configure() { export LD="$(tc-getCXX)" # bug 633838 - if [[ ${QT5_MINOR_VERSION} -ge 9 ]]; then - unset QMAKESPEC XQMAKESPEC QMAKEPATH QMAKEFEATURES - fi + unset QMAKESPEC XQMAKESPEC QMAKEPATH QMAKEFEATURES # configure arguments local conf=( @@ -552,13 +523,11 @@ qt5_base_configure() { echo -platform freebsd-clang fi fi) - $(if [[ ${QT5_MINOR_VERSION} -ge 10 ]]; then - if use kernel_linux; then - if tc-is-gcc; then - echo -platform linux-g++ - elif tc-is-clang; then - echo -platform linux-clang - fi + $(if use kernel_linux; then + if tc-is-gcc; then + echo -platform linux-g++ + elif tc-is-clang; then + echo -platform linux-clang fi fi) @@ -580,9 +549,6 @@ qt5_base_configure() { # build shared libraries -shared - # always enable large file support - $([[ ${QT5_MINOR_VERSION} -lt 8 ]] && echo -largefile) - # disabling accessibility is not recommended by upstream, as # it will break QStyle and may break other internal parts of Qt -accessibility @@ -591,9 +557,6 @@ qt5_base_configure() { -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 - # ensure the QML debugging support (qmltooling) is built in qtdeclarative - $([[ ${QT5_MINOR_VERSION} -lt 11 ]] && echo -qml-debug) - # MIPS DSP instruction set extensions $(is-flagq -mno-dsp && echo -no-mips_dsp) $(is-flagq -mno-dspr2 && echo -no-mips_dspr2) @@ -612,8 +575,10 @@ qt5_base_configure() { -no-libpng -no-libjpeg -no-freetype -no-harfbuzz -no-openssl -no-libproxy - -no-xkbcommon-x11 -no-xkbcommon-evdev - -no-xinput2 -no-xcb-xlib + -no-xcb-xlib + $([[ ${QT5_MINOR_VERSION} -lt 12 ]] && echo -no-xinput2 -no-xkbcommon-x11 -no-xkbcommon-evdev) + $([[ ${PV} = 5.12.0* ]] && echo -no-xcb-xinput -no-xkbcommon-x11 -no-xkbcommon-evdev) # bug 672340 + $([[ ${QT5_MINOR_VERSION} -ge 12 && ${PV} != 5.12.0* ]] && echo -no-xcb-xinput -no-xkbcommon) # bug 672340 # cannot use -no-gif because there is no way to override it later #-no-gif @@ -623,7 +588,6 @@ qt5_base_configure() { # disable everything to prevent automagic deps (part 2) -no-gtk - $([[ ${QT5_MINOR_VERSION} -lt 8 ]] && echo -no-pulseaudio -no-alsa) # exclude examples and tests from default build -nomake examples @@ -636,10 +600,6 @@ qt5_base_configure() { # print verbose information about each configure test -verbose - # always enable iconv support - # since 5.8 this is handled in qtcore - $([[ ${QT5_MINOR_VERSION} -lt 8 ]] && echo -iconv) - # disable everything to prevent automagic deps (part 3) -no-cups -no-evdev -no-tslib -no-icu -no-fontconfig -no-dbus @@ -666,10 +626,6 @@ qt5_base_configure() { # disable undocumented X11-related flags, override in qtgui # (not shown in ./configure -help output) -no-xkb - $([[ ${QT5_MINOR_VERSION} -lt 8 ]] && echo -no-xrender) - - # disable obsolete/unused X11-related flags - $([[ ${QT5_MINOR_VERSION} -lt 8 ]] && echo -no-mitshm -no-xcursor -no-xfixes -no-xrandr -no-xshape -no-xsync) # always enable session management support: it doesn't need extra deps # at configure time and turning it off is dangerous, see bug 518262 @@ -685,9 +641,6 @@ qt5_base_configure() { # disable libinput-based generic plugin by default, override in qtgui -no-libinput - # disable gstreamer by default, override in qtmultimedia - $([[ ${QT5_MINOR_VERSION} -lt 8 ]] && echo -no-gstreamer) - # respect system proxies by default: it's the most natural # setting, and it'll become the new upstream default in 5.8 -system-proxies @@ -696,7 +649,7 @@ qt5_base_configure() { -no-warnings-are-errors # enable in respective modules to avoid poisoning QT.global_private.enabled_features - $([[ ${QT5_MINOR_VERSION} -ge 9 ]] && echo -no-gui -no-widgets) + -no-gui -no-widgets # module-specific options "${myconf[@]}" @@ -707,11 +660,9 @@ qt5_base_configure() { einfo "Configuring with: ${conf[@]}" "${S}"/configure "${conf[@]}" || die "configure failed" - if [[ ${QT5_MINOR_VERSION} -ge 8 ]]; then - # a forwarding header is no longer created since 5.8, causing the system - # config to always be used. bug 599636 - cp src/corelib/global/qconfig.h include/QtCore/ || die - fi + # a forwarding header is no longer created since 5.8, causing the system + # config to always be used. bug 599636 + cp src/corelib/global/qconfig.h include/QtCore/ || die popd >/dev/null || die @@ -795,7 +746,7 @@ qt5_install_module_config() { > "${T}"/${PN}-qconfig.h > "${T}"/${PN}-qconfig.pri - [[ ${QT5_MINOR_VERSION} -ge 9 ]] && > "${T}"/${PN}-qmodule.pri + > "${T}"/${PN}-qmodule.pri # generate qconfig_{add,remove} and ${PN}-qconfig.h for x in "${QT5_GENTOO_CONFIG[@]}"; do @@ -829,32 +780,30 @@ qt5_install_module_config() { doins "${T}"/${PN}-qconfig.pri ) - if [[ ${QT5_MINOR_VERSION} -ge 9 ]]; then - # generate qprivateconfig - for x in "${QT5_GENTOO_PRIVATE_CONFIG[@]}"; do - local flag=${x%%:*} - x=${x#${flag}:} - local feature=${x%%:*} - x=${x#${feature}:} - - if [[ -z ${flag} ]] || { [[ ${flag} != '!' ]] && use ${flag}; }; then - [[ -n ${feature} ]] && qprivateconfig_add+=" ${feature}" - else - [[ -n ${feature} ]] && qprivateconfig_remove+=" ${feature}" - fi - done + # generate qprivateconfig + for x in "${QT5_GENTOO_PRIVATE_CONFIG[@]}"; do + local flag=${x%%:*} + x=${x#${flag}:} + local feature=${x%%:*} + x=${x#${feature}:} - # generate and install ${PN}-qmodule.pri - [[ -n ${qprivateconfig_add} ]] && echo "QT.global_private.enabled_features = ${qprivateconfig_add}" >> "${T}"/${PN}-qmodule.pri - [[ -n ${qprivateconfig_remove} ]] && echo "QT.global_private.disabled_features = ${qprivateconfig_remove}" >> "${T}"/${PN}-qmodule.pri - [[ -s ${T}/${PN}-qmodule.pri ]] && ( - insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo - doins "${T}"/${PN}-qmodule.pri - ) - fi + if [[ -z ${flag} ]] || { [[ ${flag} != '!' ]] && use ${flag}; }; then + [[ -n ${feature} ]] && qprivateconfig_add+=" ${feature}" + else + [[ -n ${feature} ]] && qprivateconfig_remove+=" ${feature}" + fi + done + + # generate and install ${PN}-qmodule.pri + [[ -n ${qprivateconfig_add} ]] && echo "QT.global_private.enabled_features = ${qprivateconfig_add}" >> "${T}"/${PN}-qmodule.pri + [[ -n ${qprivateconfig_remove} ]] && echo "QT.global_private.disabled_features = ${qprivateconfig_remove}" >> "${T}"/${PN}-qmodule.pri + [[ -s ${T}/${PN}-qmodule.pri ]] && ( + insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo + doins "${T}"/${PN}-qmodule.pri + ) # install the original {qconfig,qmodule}.pri from qtcore - [[ ${PN} == qtcore && ${QT5_MINOR_VERSION} -ge 9 ]] && ( + [[ ${PN} == qtcore ]] && ( insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo newins "${D}${QT5_ARCHDATADIR}"/mkspecs/qconfig.pri qconfig-qtcore.pri newins "${D}${QT5_ARCHDATADIR}"/mkspecs/qmodule.pri qmodule-qtcore.pri @@ -912,60 +861,58 @@ qt5_regenerate_global_configs() { ewarn "${qconfig_pri} does not exist or is not a regular file" fi - if [[ ${QT5_MINOR_VERSION} -ge 9 ]]; then - einfo "Updating QT.global_private in qmodule.pri" - - local qmodule_pri=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/qmodule.pri - local qmodule_pri_orig=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/gentoo/qmodule-qtcore.pri - if [[ -f ${qmodule_pri} && -f ${qmodule_pri_orig} ]]; then - local x - local qprivateconfig_enabled= qprivateconfig_disabled= - local qprivateconfig_orig_enabled= qprivateconfig_orig_disabled= - local new_qprivateconfig_enabled= new_qprivateconfig_disabled= - - # generate lists of QT.global_private.{dis,en}abled_features - qprivateconfig_orig_enabled="$(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${qmodule_pri_orig}")" - qprivateconfig_orig_disabled="$(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${qmodule_pri_orig}")" - eshopts_push -s nullglob - for x in "${ROOT%/}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qmodule.pri; do - qprivateconfig_enabled+=" $(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${x}")" - qprivateconfig_disabled+=" $(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${x}")" - done - eshopts_pop - - # anything enabled is enabled, but anything disabled is - # only disabled if it isn't enabled somewhere else. - # this is because we need to forcibly disable some stuff - # in qtcore to support split qtbase. - new_qprivateconfig_enabled=${qprivateconfig_enabled} - for x in ${qprivateconfig_disabled}; do - if ! has "${x}" ${qprivateconfig_enabled}; then - new_qprivateconfig_disabled+=" ${x}" - fi - done - - # check all items from the original qtcore qmodule.pri, - # and add them to the appropriate list if not overridden - # elsewhere - for x in ${qprivateconfig_orig_enabled}; do - if ! has "${x}" ${new_qprivateconfig_enabled} ${new_qprivateconfig_disabled}; then - new_qprivateconfig_enabled+=" ${x}" - fi - done - for x in ${qprivateconfig_orig_disabled}; do - if ! has "${x}" ${new_qprivateconfig_enabled} ${new_qprivateconfig_disabled}; then - new_qprivateconfig_disabled+=" ${x}" - fi - done - - # now replace the existing QT.global_private.{dis,en}abled_features - # with the generated list - sed \ - -e "s/^QT.global_private.enabled_features\s*=.*/QT.global_private.enabled_features =${new_qprivateconfig_enabled}/" \ - -e "s/^QT.global_private.disabled_features\s*=.*/QT.global_private.disabled_features =${new_qprivateconfig_disabled}/" \ - -i "${qmodule_pri}" || eerror "Failed to sed QT.global_private.enabled_features in ${qmodule_pri}" - else - ewarn "${qmodule_pri} or ${qmodule_pri_orig} does not exist or is not a regular file" - fi + einfo "Updating QT.global_private in qmodule.pri" + + local qmodule_pri=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/qmodule.pri + local qmodule_pri_orig=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/gentoo/qmodule-qtcore.pri + if [[ -f ${qmodule_pri} && -f ${qmodule_pri_orig} ]]; then + local x + local qprivateconfig_enabled= qprivateconfig_disabled= + local qprivateconfig_orig_enabled= qprivateconfig_orig_disabled= + local new_qprivateconfig_enabled= new_qprivateconfig_disabled= + + # generate lists of QT.global_private.{dis,en}abled_features + qprivateconfig_orig_enabled="$(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${qmodule_pri_orig}")" + qprivateconfig_orig_disabled="$(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${qmodule_pri_orig}")" + eshopts_push -s nullglob + for x in "${ROOT%/}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qmodule.pri; do + qprivateconfig_enabled+=" $(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${x}")" + qprivateconfig_disabled+=" $(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${x}")" + done + eshopts_pop + + # anything enabled is enabled, but anything disabled is + # only disabled if it isn't enabled somewhere else. + # this is because we need to forcibly disable some stuff + # in qtcore to support split qtbase. + new_qprivateconfig_enabled=${qprivateconfig_enabled} + for x in ${qprivateconfig_disabled}; do + if ! has "${x}" ${qprivateconfig_enabled}; then + new_qprivateconfig_disabled+=" ${x}" + fi + done + + # check all items from the original qtcore qmodule.pri, + # and add them to the appropriate list if not overridden + # elsewhere + for x in ${qprivateconfig_orig_enabled}; do + if ! has "${x}" ${new_qprivateconfig_enabled} ${new_qprivateconfig_disabled}; then + new_qprivateconfig_enabled+=" ${x}" + fi + done + for x in ${qprivateconfig_orig_disabled}; do + if ! has "${x}" ${new_qprivateconfig_enabled} ${new_qprivateconfig_disabled}; then + new_qprivateconfig_disabled+=" ${x}" + fi + done + + # now replace the existing QT.global_private.{dis,en}abled_features + # with the generated list + sed \ + -e "s/^QT.global_private.enabled_features\s*=.*/QT.global_private.enabled_features =${new_qprivateconfig_enabled}/" \ + -e "s/^QT.global_private.disabled_features\s*=.*/QT.global_private.disabled_features =${new_qprivateconfig_disabled}/" \ + -i "${qmodule_pri}" || eerror "Failed to sed QT.global_private.enabled_features in ${qmodule_pri}" + else + ewarn "${qmodule_pri} or ${qmodule_pri_orig} does not exist or is not a regular file" fi } diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index ecbf6403e43d..e2c333a5e7f4 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-fakegem.eclass @@ -380,6 +380,7 @@ all_fakegem_compile() { ;; rdoc) rdoc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation" + rm -f doc/js/*.gz || die "failed to remove duplicated compressed javascript files" ;; yard) yard doc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation" diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass index d0be6a2d4f23..ce52f27789a2 100644 --- a/eclass/ruby-ng-gnome2.eclass +++ b/eclass/ruby-ng-gnome2.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-ng-gnome2.eclass @@ -45,7 +45,7 @@ else RUBY_S=ruby-gnome2-all-${PV}/${subbinding} fi SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz" -HOMEPAGE="http://ruby-gnome2.sourceforge.jp/" +HOMEPAGE="https://ruby-gnome2.osdn.jp/" LICENSE="Ruby" SLOT="0" diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass index 6098a7ed7645..1b3d5a51e633 100644 --- a/eclass/ruby-utils.eclass +++ b/eclass/ruby-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-utils.eclass @@ -27,11 +27,11 @@ if [[ ! ${_RUBY_UTILS} ]]; then # implementation will be installed first (and thus eselected). This will # provide for a better first installation experience. -# All RUBY_TARGETS -RUBY_TARGETS_PREFERENCE="ruby23 " +# All stable RUBY_TARGETS +RUBY_TARGETS_PREFERENCE="ruby24 ruby23 " # All other active ruby targets -RUBY_TARGETS_PREFERENCE+="ruby24 ruby25" +RUBY_TARGETS_PREFERENCE+="ruby25" _ruby_implementation_depend() { diff --git a/eclass/tests/toolchain.sh b/eclass/tests/toolchain.sh index 47401e687520..ec2253568569 100755 --- a/eclass/tests/toolchain.sh +++ b/eclass/tests/toolchain.sh @@ -2,6 +2,12 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +EAPI=5 + +# apply exlass globals to test version parsing +TOOLCHAIN_GCC_PV=7.3.0 +PR=r0 + source tests-common.sh inherit toolchain @@ -14,7 +20,7 @@ test_downgrade_arch_flags() { shift 2 CFLAGS=${@} - tbegin "${ver} ${CFLAGS} => ${exp}" + tbegin "downgrade_arch_flags: ${ver} ${CFLAGS} => ${exp}" CHOST=x86_64 # needed for tc-arch downgrade_arch_flags ${ver} @@ -79,4 +85,91 @@ test_downgrade_arch_flags 4.3 "-march=foo -mno-sse4.1" "-march=foo -mno-sha -mno test_downgrade_arch_flags 4.2 "-march=foo" "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" test_downgrade_arch_flags 4.4 "-O2 -march=core2 -ffoo -fblah" "-O2 -march=atom -mno-sha -ffoo -mno-rtm -fblah" + +# basic version parsing tests in preparation to eapi7-ver switch + +test_tc_version_is_at_least() { + local exp msg ret=0 want mine res + + want=${1} + mine=${2} + exp=${3} + + tbegin "tc_version_is_at_least: ${want} ${mine} => ${exp}" + + tc_version_is_at_least ${want} ${mine} + res=$? + + if [[ ${res} -ne ${exp} ]]; then + msg="Failure - Expected: \"${exp}\" Got: \"${res}\"" + ret=1 + fi + tend ${ret} ${msg} +} + +# want mine expect +test_tc_version_is_at_least 8 '' 1 +test_tc_version_is_at_least 8.0 '' 1 +test_tc_version_is_at_least 7 '' 0 +test_tc_version_is_at_least 7.0 '' 0 +test_tc_version_is_at_least ${TOOLCHAIN_GCC_PV} '' 0 +test_tc_version_is_at_least 5.0 6.0 0 + +test_tc_version_is_between() { + local exp msg ret=0 lo hi res + + lo=${1} + hi=${2} + exp=${3} + + tbegin "tc_version_is_between: ${lo} ${hi} => ${exp}" + + tc_version_is_between ${lo} ${hi} + res=$? + + if [[ ${res} -ne ${exp} ]]; then + msg="Failure - Expected: \"${exp}\" Got: \"${res}\"" + ret=1 + fi + tend ${ret} ${msg} +} + +# lo hi expect +test_tc_version_is_between 1 0 1 +test_tc_version_is_between 1 2 1 +test_tc_version_is_between 7 8 0 +test_tc_version_is_between ${TOOLCHAIN_GCC_PV} 8 0 +test_tc_version_is_between ${TOOLCHAIN_GCC_PV} ${TOOLCHAIN_GCC_PV} 1 +test_tc_version_is_between 7 ${TOOLCHAIN_GCC_PV} 1 +test_tc_version_is_between 8 9 1 + +# eclass has a few critical global variables worth not breaking +test_var_assert() { + local var_name exp + + var_name=${1} + exp=${2} + + tbegin "asserv variable value: ${var_name} => ${exp}" + + if [[ ${!var_name} != ${exp} ]]; then + msg="Failure - Expected: \"${exp}\" Got: \"${!var_name}\"" + ret=1 + fi + tend ${ret} ${msg} +} + +# TODO: convert these globals to helpers to ease testing against multiple +# ${TOOLCHAIN_GCC_PV} vaues. +test_var_assert GCC_PV 7.3.0 +test_var_assert GCC_PVR 7.3.0 +test_var_assert GCC_RELEASE_VER 7.3.0 +test_var_assert GCC_BRANCH_VER 7.3 +test_var_assert GCCMAJOR 7 +test_var_assert GCCMINOR 3 +test_var_assert GCCMICRO 0 +test_var_assert BRANCH_UPDATE '' +test_var_assert GCC_CONFIG_VER 7.3.0 +test_var_assert PREFIX /usr + texit diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 47620e5ae5da..018079ba9378 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -8,7 +8,7 @@ DESCRIPTION="The GNU Compiler Collection" HOMEPAGE="https://gcc.gnu.org/" RESTRICT="strip" # cross-compilers need controlled stripping -inherit eutils fixheadtails flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs versionator prefix +inherit eutils fixheadtails flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix if [[ ${PV} == *_pre9999* ]] ; then EGIT_REPO_URI="git://gcc.gnu.org/git/gcc.git" @@ -26,8 +26,8 @@ FEATURES=${FEATURES/multilib-strict/} case ${EAPI:-0} in 0|1|2|3|4*) die "Need to upgrade to at least EAPI=5" ;; - 5*) ;; - *) die "I don't speak EAPI ${EAPI}." ;; + 5*) inherit eapi7-ver ;; + *) die "I don't speak EAPI ${EAPI}." ;; esac EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \ src_compile src_test src_install pkg_postinst pkg_postrm @@ -50,7 +50,7 @@ is_crosscompile() { # General purpose version check. Without a second arg matches up to minor version (x.x.x) tc_version_is_at_least() { - version_is_at_least "$1" "${2:-${GCC_RELEASE_VER}}" + ver_test "${2:-${GCC_RELEASE_VER}}" -ge "$1" } # General purpose version range check @@ -62,17 +62,17 @@ tc_version_is_between() { GCC_PV=${TOOLCHAIN_GCC_PV:-${PV}} GCC_PVR=${GCC_PV} [[ ${PR} != "r0" ]] && GCC_PVR=${GCC_PVR}-${PR} -GCC_RELEASE_VER=$(get_version_component_range 1-3 ${GCC_PV}) -GCC_BRANCH_VER=$(get_version_component_range 1-2 ${GCC_PV}) -GCCMAJOR=$(get_version_component_range 1 ${GCC_PV}) -GCCMINOR=$(get_version_component_range 2 ${GCC_PV}) -GCCMICRO=$(get_version_component_range 3 ${GCC_PV}) +GCC_RELEASE_VER=$(ver_cut 1-3 ${GCC_PV}) +GCC_BRANCH_VER=$(ver_cut 1-2 ${GCC_PV}) +GCCMAJOR=$(ver_cut 1 ${GCC_PV}) +GCCMINOR=$(ver_cut 2 ${GCC_PV}) +GCCMICRO=$(ver_cut 3 ${GCC_PV}) [[ ${BRANCH_UPDATE-notset} == "notset" ]] && \ - BRANCH_UPDATE=$(get_version_component_range 4 ${GCC_PV}) + BRANCH_UPDATE=$(ver_cut 4 ${GCC_PV}) # According to gcc/c-cppbuiltin.c, GCC_CONFIG_VER MUST match this regex. # ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? -GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(replace_version_separator 3 '-' ${GCC_PV})} +GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(ver_rs 3 '-' ${GCC_PV})} # Pre-release support if [[ ${GCC_PV} == *_pre* ]] ; then @@ -1028,7 +1028,7 @@ toolchain_src_configure() { then #291870 confgcc+=( --disable-shared ) fi - needed_libc=uclibc + needed_libc=uclibc-ng ;; *-cygwin) needed_libc=cygwin;; x86_64-*-mingw*|\ @@ -1512,6 +1512,7 @@ gcc_do_filter_flags() { fi if ! tc_version_is_at_least 4.1 ; then filter-flags -fdiagnostics-show-option + filter-flags -Wstack-protector fi if tc_version_is_at_least 3.4 ; then @@ -1828,14 +1829,15 @@ toolchain_src_install() { fi fi - # Now do the fun stripping stuff - env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}" - is_crosscompile && \ - env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${HOSTLIBPATH}" - env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}" - # gcc used to install helper binaries in lib/ but then moved to libexec/ - [[ -d ${D}${PREFIX}/libexec/gcc ]] && \ - env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}" + # TODO: implement stripping (we use RESTRICT=strip) + # As gcc installs object files both build against ${CHOST} and ${CTARGET} + # we will ned to run stripping using different tools: + # Using ${CHOST} tools: + # - "${D}${BINPATH}" + # - (for is_crosscompile) "${D}${HOSTLIBPATH}" + # - "${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}" + # Using ${CTARGET} tools: + # - "${D}${LIBPATH}" cd "${S}" if is_crosscompile; then @@ -1848,13 +1850,15 @@ toolchain_src_install() { cp -r "${cxx_mandir}"/man? "${D}${DATAPATH}"/man/ fi fi - has noinfo ${FEATURES} \ - && rm -r "${D}${DATAPATH}"/info \ - || prepinfo "${DATAPATH#${EPREFIX}}" - has noman ${FEATURES} \ - && rm -r "${D}${DATAPATH}"/man \ - || prepman "${DATAPATH#${EPREFIX}}" fi + + # portage regenerates 'dir' files on it's own: bug #672408 + # Drop 'dir' files to avoid collisions. + if [[ -f "${D}${DATAPATH}"/info/dir ]]; then + einfo "Deleting '${D}${DATAPATH}/info/dir'" + rm "${D}${DATAPATH}"/info/dir || die + fi + # prune empty dirs left behind find "${ED}" -depth -type d -delete 2>/dev/null @@ -2286,7 +2290,7 @@ should_we_gcc_config() { # for being in the same SLOT, make sure we run gcc-config. local curr_config_ver=$(gcc-config -S ${curr_config} | awk '{print $2}') - local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver}) + local curr_branch_ver=$(ver_cut 1-2 ${curr_config_ver}) if [[ ${curr_branch_ver} == ${GCC_BRANCH_VER} ]] ; then return 0 -- cgit v1.2.3