diff options
-rw-r--r-- | app-portage/eix/Manifest | 2 | ||||
-rw-r--r-- | app-portage/eix/eix-0.32.11_alpha3.ebuild (renamed from app-portage/eix/eix-0.32.11_alpha2.ebuild) | 10 | ||||
-rw-r--r-- | app-portage/eix/eix-99999999.ebuild | 10 | ||||
-rw-r--r-- | eclass/ChangeLog | 4 | ||||
-rw-r--r-- | eclass/meson_optional.eclass | 198 | ||||
-rw-r--r-- | metadata/pkg_desc_index | 2 |
6 files changed, 218 insertions, 8 deletions
diff --git a/app-portage/eix/Manifest b/app-portage/eix/Manifest index 2da03637..32354b9c 100644 --- a/app-portage/eix/Manifest +++ b/app-portage/eix/Manifest @@ -1,2 +1,2 @@ DIST eix-0.32.10.tar.xz 600120 SHA256 4ecd6ed7e5bb8859c5e5548265e622bffd19800c889d49e75c0bad556830c5da -DIST eix-0.32.11_alpha2.tar.gz 665406 SHA256 878619eb616dffcd48dbf17b9d60a8073765336cbeff0238dea5c2a1ec961077 +DIST eix-0.32.11_alpha3.tar.gz 666015 SHA256 a671a8ff838826363f5f0b22a3777859cb1230ea39fb05ad5d4f91b120955058 diff --git a/app-portage/eix/eix-0.32.11_alpha2.ebuild b/app-portage/eix/eix-0.32.11_alpha3.ebuild index 54a7ef24..90d5ce98 100644 --- a/app-portage/eix/eix-0.32.11_alpha2.ebuild +++ b/app-portage/eix/eix-0.32.11_alpha3.ebuild @@ -5,8 +5,9 @@ EAPI=6 RESTRICT="mirror" WANT_LIBTOOL=none AUTOTOOLS_AUTO_DEPEND=no +MESON_AUTO_DEPEND=no PLOCALES="de ru" -inherit autotools bash-completion-r1 l10n meson tmpfiles +inherit autotools bash-completion-r1 l10n meson_optional tmpfiles case ${PV} in 99999999*) @@ -16,7 +17,7 @@ case ${PV} in PROPERTIES="live";; *) RESTRICT="mirror" - EGIT_COMMIT="a0ce147d0da7587ba560ed2994abc045faabab77" + EGIT_COMMIT="cea240dce2e8566714b9eec88ff50cc1b7374249" SRC_URI="https://github.com/vaeth/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}/${PN}-${EGIT_COMMIT}";; esac @@ -35,7 +36,10 @@ RDEPEND="${BOTHDEPEND} >=app-shells/push-2.0-r2 >=app-shells/quoter-3.0-r2" DEPEND="${BOTHDEPEND} - meson? ( >=dev-util/meson-0.41.0 ) + meson? ( + >=dev-util/meson-0.41.0 + >=dev-util/ninja-1.7.2 + ) !meson? ( ${AUTOTOOLS_DEPEND} ) >=sys-devel/gettext-0.19.6" diff --git a/app-portage/eix/eix-99999999.ebuild b/app-portage/eix/eix-99999999.ebuild index 54a7ef24..90d5ce98 100644 --- a/app-portage/eix/eix-99999999.ebuild +++ b/app-portage/eix/eix-99999999.ebuild @@ -5,8 +5,9 @@ EAPI=6 RESTRICT="mirror" WANT_LIBTOOL=none AUTOTOOLS_AUTO_DEPEND=no +MESON_AUTO_DEPEND=no PLOCALES="de ru" -inherit autotools bash-completion-r1 l10n meson tmpfiles +inherit autotools bash-completion-r1 l10n meson_optional tmpfiles case ${PV} in 99999999*) @@ -16,7 +17,7 @@ case ${PV} in PROPERTIES="live";; *) RESTRICT="mirror" - EGIT_COMMIT="a0ce147d0da7587ba560ed2994abc045faabab77" + EGIT_COMMIT="cea240dce2e8566714b9eec88ff50cc1b7374249" SRC_URI="https://github.com/vaeth/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}/${PN}-${EGIT_COMMIT}";; esac @@ -35,7 +36,10 @@ RDEPEND="${BOTHDEPEND} >=app-shells/push-2.0-r2 >=app-shells/quoter-3.0-r2" DEPEND="${BOTHDEPEND} - meson? ( >=dev-util/meson-0.41.0 ) + meson? ( + >=dev-util/meson-0.41.0 + >=dev-util/ninja-1.7.2 + ) !meson? ( ${AUTOTOOLS_DEPEND} ) >=sys-devel/gettext-0.19.6" diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 234f4298..7ea8ab31 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -58,3 +58,7 @@ 03 Jun 2017; Martin Väth <martin@mvath.de>: Support new package layout by manually specifying id with option -i + + 25 Jul 2017; Martin Väth <martin@mvath.de>: + Copy and meson.eclass from gentoo tree, since developers refuse to make it + use optionally: https://bugs.gentoo.org/show_bug.cgi?id=626054 diff --git a/eclass/meson_optional.eclass b/eclass/meson_optional.eclass new file mode 100644 index 00000000..157b52e0 --- /dev/null +++ b/eclass/meson_optional.eclass @@ -0,0 +1,198 @@ +# Copyright 2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: meson.eclass +# @MAINTAINER: +# William Hubbs <williamh@gentoo.org> +# Mike Gilbert <floppym@gentoo.org> +# @BLURB: common ebuild functions for meson-based packages +# @DESCRIPTION: +# This eclass contains the default phase functions for packages which +# use the meson build system. +# +# @EXAMPLE: +# Typical ebuild using meson.eclass: +# +# @CODE +# EAPI=6 +# +# inherit meson +# +# ... +# +# src_configure() { +# local emesonargs=( +# -Dqt4=$(usex qt4 true false) +# -Dthreads=$(usex threads true false) +# -Dtiff=$(usex tiff true false) +# ) +# meson_src_configure +# } +# +# ... +# +# @CODE + +case ${EAPI:-0} in + 6) ;; + *) die "EAPI=${EAPI} is not supported" ;; +esac + +if [[ -z ${_MESON_ECLASS} ]]; then + +inherit ninja-utils python-utils-r1 toolchain-funcs + +fi + +EXPORT_FUNCTIONS src_configure src_compile src_test src_install + +if [[ -z ${_MESON_ECLASS} ]]; then +_MESON_ECLASS=1 + +MESON_DEPEND=">=dev-util/meson-0.40.0 + >=dev-util/ninja-1.7.2" +[ "${MESON_AUTO_DEPEND:=yes}" != yes ] || DEPEND=${MESON_DEPEND} + +# @ECLASS-VARIABLE: BUILD_DIR +# @DEFAULT_UNSET +# @DESCRIPTION: +# Build directory, location where all generated files should be placed. +# If this isn't set, it defaults to ${WORKDIR}/${P}-build. + +# @ECLASS-VARIABLE: EMESON_SOURCE +# @DEFAULT_UNSET +# @DESCRIPTION: +# The location of the source files for the project; this is the source +# directory to pass to meson. +# If this isn't set, it defaults to ${S} + +# @VARIABLE: emesonargs +# @DEFAULT_UNSET +# @DESCRIPTION: +# Optional meson arguments as Bash array; this should be defined before +# calling meson_src_configure. + +# @FUNCTION: _meson_create_cross_file +# @INTERNAL +# @DESCRIPTION: +# Creates a cross file. meson uses this to define settings for +# cross-compilers. This function is called from meson_src_configure. +_meson_create_cross_file() { + # Reference: http://mesonbuild.com/Cross-compilation.html + + # system roughly corresponds to uname -s (lowercase) + local system=unknown + case ${CHOST} in + *-aix*) system=aix ;; + *-cygwin*) system=cygwin ;; + *-darwin*) system=darwin ;; + *-freebsd*) system=freebsd ;; + *-linux*) system=linux ;; + *-solaris*) system=sunos ;; + esac + + local cpu_family=$(tc-arch) + case ${cpu_family} in + amd64) cpu_family=x86_64 ;; + arm64) cpu_family=aarch64 ;; + esac + + # This may require adjustment based on CFLAGS + local cpu=${CHOST%%-*} + + cat > "${T}/meson.${CHOST}" <<-EOF + [binaries] + ar = '${AR}' + c = '${CC}' + cpp = '${CXX}' + strip = '${STRIP}' + + [host_machine] + system = '${system}' + cpu_family = '${cpu_family}' + cpu = '${cpu}' + endian = '$(tc-endian)' + EOF +} + +# @FUNCTION: meson_src_configure +# @DESCRIPTION: +# This is the meson_src_configure function. +meson_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + # Common args + local mesonargs=( + --buildtype plain + --libdir "$(get_libdir)" + --localstatedir "${EPREFIX}/var/lib" + --prefix "${EPREFIX}/usr" + --sysconfdir "${EPREFIX}/etc" + --wrap-mode nodownload + ) + + # Both meson(1) and _meson_create_cross_file need these + local -x AR=$(tc-getAR) + local -x CC=$(tc-getCC) + local -x CXX=$(tc-getCXX) + local -x STRIP=$(tc-getSTRIP) + + if tc-is-cross-compiler; then + _meson_create_cross_file || die "unable to write meson cross file" + mesonargs+=( + --cross-file "${T}/meson.${CHOST}" + ) + # In cross mode, meson uses these as the native/build programs + AR=$(tc-getBUILD_AR) + CC=$(tc-getBUILD_CC) + CXX=$(tc-getBUILD_CXX) + STRIP=$(tc-getBUILD_STRIP) + fi + + # https://bugs.gentoo.org/625396 + python_export_utf8_locale + + # Append additional arguments from ebuild + mesonargs+=("${emesonargs[@]}") + + BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}" + set -- meson "${mesonargs[@]}" "$@" \ + "${EMESON_SOURCE:-${S}}" "${BUILD_DIR}" + echo "$@" + "$@" || die +} + +# @FUNCTION: meson_src_compile +# @DESCRIPTION: +# This is the meson_src_compile function. +meson_src_compile() { + debug-print-function ${FUNCNAME} "$@" + + eninja -C "${BUILD_DIR}" +} + +# @FUNCTION: meson_src_test +# @DESCRIPTION: +# This is the meson_src_test function. +meson_src_test() { + debug-print-function ${FUNCNAME} "$@" + + eninja -C "${BUILD_DIR}" test +} + +# @FUNCTION: meson_src_install +# @DESCRIPTION: +# This is the meson_src_install function. +meson_src_install() { + debug-print-function ${FUNCNAME} "$@" + + DESTDIR="${D}" eninja -C "${BUILD_DIR}" install + einstalldocs +} + +meson_optional_src_configure() { meson_src_configure; } +meson_optional_src_compile() { meson_src_compile; } +meson_optional_src_test() { meson_src_test; } +meson_optional_src_install() { meson_src_install; } + +fi diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index 93af8218..a8afade1 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -21,7 +21,7 @@ app-emacs/mv_emacs 1.3: (X)Emacs extensions: block support, macrorecorder, verif app-emacs/po-mode 0.19.8.1-r1: Major mode for GNU gettext PO files app-eselect/eselect-net 0.2: eselect module for managing network open-rc service configurations app-misc/knapsack 7.2-r1: A fast solver for the 0/1-knapsack problem with multiple knapsacks -app-portage/eix 0.32.10 0.32.11_alpha2 99999999: Search and query ebuilds +app-portage/eix 0.32.10 0.32.11_alpha3 99999999: Search and query ebuilds app-portage/etcat 1.0.1 99999999: Updated version of an old Portage information extractor app-portage/find_cruft 3.1.0: find cruft files not managed by portage app-portage/gentoolkit 0.4.0-r1 9999: Collection of administration scripts for Gentoo |