From 6bbad8d180f20229cfa2a6f98a02d80ca8adf00f Mon Sep 17 00:00:00 2001 From: Martin Väth Date: Sat, 20 Jan 2024 16:19:51 +0100 Subject: app-portage/eix: Version bump. meson.eclass: Bump >=dev-build/meson-1.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Väth --- app-portage/eix/Manifest | 2 +- app-portage/eix/eix-0.36.7-r3.ebuild | 161 ----------------------------------- app-portage/eix/eix-0.36.8.ebuild | 161 +++++++++++++++++++++++++++++++++++ eclass/meson.eclass | 75 +++++++++------- metadata/pkg_desc_index | 2 +- 5 files changed, 206 insertions(+), 195 deletions(-) delete mode 100644 app-portage/eix/eix-0.36.7-r3.ebuild create mode 100644 app-portage/eix/eix-0.36.8.ebuild diff --git a/app-portage/eix/Manifest b/app-portage/eix/Manifest index 36c0e3b0..652778df 100644 --- a/app-portage/eix/Manifest +++ b/app-portage/eix/Manifest @@ -1 +1 @@ -DIST eix-0.36.7.tar.xz 639832 BLAKE2B 37202ae78378688ede95b410fe2e6325d63a9553dc082e4e09dc5bcd261f4e7bf49f349a92c286743c30a54cdc5bc1733fedebae33c37d601e6f5db1faf499e7 SHA512 5f5d059b502633be22c8a18fca410e2319061989bbc65b23592c87a9a109b93e615a5b5a7ca92a500999e3cc791e331b12e32a10700cc104040b1980f7f7a0f9 +DIST eix-0.36.8.tar.xz 642668 BLAKE2B 5fabbdc903f3e8fa03499542b7d151020394dcd7b6433d9b1dcab06755f932a8977c005d001da1dc766e68f2248765ce2bdec7369bac9e542529a11721e3dd89 SHA512 3c2f5c15ff56d78beca861f23d80d5abfba14883325c6efa867875b1cfb880d119fd4e5642a262ed70789542f328cbb10e67d13cb95acd22ba629206368e8985 diff --git a/app-portage/eix/eix-0.36.7-r3.ebuild b/app-portage/eix/eix-0.36.7-r3.ebuild deleted file mode 100644 index b71f0381..00000000 --- a/app-portage/eix/eix-0.36.7-r3.ebuild +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright 1999-2023 Martin V\"ath and others -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -RESTRICT="mirror" # do not access gentoo mirror until it actually is there -MESON_AUTO_DEPEND=no -inherit bash-completion-r1 meson tmpfiles - -DESCRIPTION="Search and query ebuilds" -HOMEPAGE="https://github.com/vaeth/eix/" -SRC_URI="https://github.com/vaeth/eix/releases/download/v${PV}/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -PLOCALES="de ru" -IUSE="cpu_flags_x86_sse2 debug +dep doc +jumbo-build" -for i in ${PLOCALES}; do - IUSE+=" l10n_${i}" -done -IUSE+=" +meson nls optimization +protobuf +required-use security +src-uri strong-optimization strong-security sqlite swap-remote tools usr-portage" - -DEPEND="nls? ( virtual/libintl ) - sqlite? ( >=dev-db/sqlite-3:= )" -RDEPEND="${DEPEND} - app-shells/push:0/1 - app-shells/quoter:0/1" -BDEPEND="meson? ( - >=dev-build/meson-0.41.0 - >=dev-build/ninja-1.7.2 - strong-optimization? ( >=sys-devel/gcc-config-1.9.1 ) - ) - protobuf? ( dev-libs/protobuf:= ) - app-arch/xz-utils - nls? ( sys-devel/gettext ) - virtual/pkgconfig" - -pkg_setup() { - # remove stale cache file to prevent collisions - local old_cache="${EROOT}/var/cache/${PN}" - test -f "${old_cache}" && rm -f -- "${old_cache}" -} - -src_prepare() { - sed -i -e "s'/'${EPREFIX}/'" -- "${S}"/tmpfiles.d/eix.conf || die - default -} - -src_configure() { - local i - export LINGUAS= - for i in ${PLOCALES}; do - use l10n_${i} && LINGUAS+=${LINGUAS:+ }${i} - done - if use meson; then - local emesonargs=( - -Ddocdir="${EPREFIX}/usr/share/doc/${P}" - -Dhtmldir="${EPREFIX}/usr/share/doc/${P}/html" - $(meson_use jumbo-build) - $(meson_use sqlite) - $(meson_use protobuf) - $(meson_use doc extra-doc) - $(meson_use nls) - $(meson_use tools separate-tools) - $(meson_use security) - $(meson_use optimization normal-optimization) - $(meson_use strong-security) - $(meson_use strong-optimization) - $(meson_use debug debugging) - $(meson_use swap-remote) - $(meson_use prefix always-accept-keywords) - $(meson_use cpu_flags_x86_sse2 sse2) - $(meson_use dep dep-default) - $(meson_use required-use required-use-default) - $(meson_use src-uri src-uri-default) - $(usex usr-portage -Dportdir-default=/usr/portage '') - -Dzsh-completion="${EPREFIX}/usr/share/zsh/site-functions" - -Dportage-rootpath="${ROOTPATH}" - -Deprefix-default="${EPREFIX}" - ) - if use prefix; then - emesonarge+=( - -Deix-user= - -Deix-uid=-1 - ) - fi - meson_src_configure - else - local myconf=( - $(use_enable jumbo-build) - $(use_with sqlite) - $(use_with protobuf) - $(use_with doc extra-doc) - $(use_enable nls) - $(use_enable tools separate-tools) - $(use_enable security) - $(use_enable optimization) - $(use_enable strong-security) - $(use_enable strong-optimization) - $(use_enable debug debugging) - $(use_enable swap-remote) - $(use_with prefix always-accept-keywords) - $(use_with cpu_flags_x86_sse2 sse2) - $(use_with dep dep-default) - $(use_with required-use required-use-default) - $(use_with src-uri src-uri-default) - $(use_with usr-portage portdir-default /usr/portage) - --with-zsh-completion - --with-portage-rootpath="${ROOTPATH}" - --with-eprefix-default="${EPREFIX}" - ) - if use prefix; then - myconf+=( - --with-eix-user= - --with-eix-uid=-1 - ) - fi - econf "${myconf[@]}" - fi -} - -src_compile() { - if use meson; then - meson_src_compile - else - default - fi -} - -src_test() { - if use meson; then - meson_src_test - else - default - fi -} - -src_install() { - if use meson; then - meson_src_install - else - default - fi - dobashcomp bash/eix - dotmpfiles tmpfiles.d/eix.conf - use doc && dodoc src/output/eix.proto -} - -pkg_postinst() { - local obs="${EROOT}/var/cache/eix.previous" - if test -f "${obs}"; then - ewarn "Found obsolete ${obs}, please remove it" - fi - tmpfiles_process eix.conf -} - -pkg_postrm() { - if [ -z "${REPLACED_BY_VERSION}" ]; then - rm -rf -- "${EROOT}/var/cache/${PN}" - fi -} diff --git a/app-portage/eix/eix-0.36.8.ebuild b/app-portage/eix/eix-0.36.8.ebuild new file mode 100644 index 00000000..b71f0381 --- /dev/null +++ b/app-portage/eix/eix-0.36.8.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2023 Martin V\"ath and others +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +RESTRICT="mirror" # do not access gentoo mirror until it actually is there +MESON_AUTO_DEPEND=no +inherit bash-completion-r1 meson tmpfiles + +DESCRIPTION="Search and query ebuilds" +HOMEPAGE="https://github.com/vaeth/eix/" +SRC_URI="https://github.com/vaeth/eix/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +PLOCALES="de ru" +IUSE="cpu_flags_x86_sse2 debug +dep doc +jumbo-build" +for i in ${PLOCALES}; do + IUSE+=" l10n_${i}" +done +IUSE+=" +meson nls optimization +protobuf +required-use security +src-uri strong-optimization strong-security sqlite swap-remote tools usr-portage" + +DEPEND="nls? ( virtual/libintl ) + sqlite? ( >=dev-db/sqlite-3:= )" +RDEPEND="${DEPEND} + app-shells/push:0/1 + app-shells/quoter:0/1" +BDEPEND="meson? ( + >=dev-build/meson-0.41.0 + >=dev-build/ninja-1.7.2 + strong-optimization? ( >=sys-devel/gcc-config-1.9.1 ) + ) + protobuf? ( dev-libs/protobuf:= ) + app-arch/xz-utils + nls? ( sys-devel/gettext ) + virtual/pkgconfig" + +pkg_setup() { + # remove stale cache file to prevent collisions + local old_cache="${EROOT}/var/cache/${PN}" + test -f "${old_cache}" && rm -f -- "${old_cache}" +} + +src_prepare() { + sed -i -e "s'/'${EPREFIX}/'" -- "${S}"/tmpfiles.d/eix.conf || die + default +} + +src_configure() { + local i + export LINGUAS= + for i in ${PLOCALES}; do + use l10n_${i} && LINGUAS+=${LINGUAS:+ }${i} + done + if use meson; then + local emesonargs=( + -Ddocdir="${EPREFIX}/usr/share/doc/${P}" + -Dhtmldir="${EPREFIX}/usr/share/doc/${P}/html" + $(meson_use jumbo-build) + $(meson_use sqlite) + $(meson_use protobuf) + $(meson_use doc extra-doc) + $(meson_use nls) + $(meson_use tools separate-tools) + $(meson_use security) + $(meson_use optimization normal-optimization) + $(meson_use strong-security) + $(meson_use strong-optimization) + $(meson_use debug debugging) + $(meson_use swap-remote) + $(meson_use prefix always-accept-keywords) + $(meson_use cpu_flags_x86_sse2 sse2) + $(meson_use dep dep-default) + $(meson_use required-use required-use-default) + $(meson_use src-uri src-uri-default) + $(usex usr-portage -Dportdir-default=/usr/portage '') + -Dzsh-completion="${EPREFIX}/usr/share/zsh/site-functions" + -Dportage-rootpath="${ROOTPATH}" + -Deprefix-default="${EPREFIX}" + ) + if use prefix; then + emesonarge+=( + -Deix-user= + -Deix-uid=-1 + ) + fi + meson_src_configure + else + local myconf=( + $(use_enable jumbo-build) + $(use_with sqlite) + $(use_with protobuf) + $(use_with doc extra-doc) + $(use_enable nls) + $(use_enable tools separate-tools) + $(use_enable security) + $(use_enable optimization) + $(use_enable strong-security) + $(use_enable strong-optimization) + $(use_enable debug debugging) + $(use_enable swap-remote) + $(use_with prefix always-accept-keywords) + $(use_with cpu_flags_x86_sse2 sse2) + $(use_with dep dep-default) + $(use_with required-use required-use-default) + $(use_with src-uri src-uri-default) + $(use_with usr-portage portdir-default /usr/portage) + --with-zsh-completion + --with-portage-rootpath="${ROOTPATH}" + --with-eprefix-default="${EPREFIX}" + ) + if use prefix; then + myconf+=( + --with-eix-user= + --with-eix-uid=-1 + ) + fi + econf "${myconf[@]}" + fi +} + +src_compile() { + if use meson; then + meson_src_compile + else + default + fi +} + +src_test() { + if use meson; then + meson_src_test + else + default + fi +} + +src_install() { + if use meson; then + meson_src_install + else + default + fi + dobashcomp bash/eix + dotmpfiles tmpfiles.d/eix.conf + use doc && dodoc src/output/eix.proto +} + +pkg_postinst() { + local obs="${EROOT}/var/cache/eix.previous" + if test -f "${obs}"; then + ewarn "Found obsolete ${obs}, please remove it" + fi + tmpfiles_process eix.conf +} + +pkg_postrm() { + if [ -z "${REPLACED_BY_VERSION}" ]; then + rm -rf -- "${EROOT}/var/cache/${PN}" + fi +} diff --git a/eclass/meson.eclass b/eclass/meson.eclass index bbb81236..12082c96 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -3,8 +3,8 @@ # @ECLASS: meson.eclass # @MAINTAINER: -# William Hubbs -# Mike Gilbert +# base-system@gentoo.org +# @SUPPORTED_EAPIS: 7 8 # @BLURB: common ebuild functions for meson-based packages # @DESCRIPTION: # This eclass contains the default phase functions for packages which @@ -46,12 +46,9 @@ fi if [[ -z ${_MESON_ECLASS} ]]; then _MESON_ECLASS=1 -[[ ${EAPI} == 6 ]] && inherit eapi7-ver inherit multiprocessing ninja-utils python-utils-r1 toolchain-funcs -EXPORT_FUNCTIONS src_configure src_compile src_test src_install - -_MESON_DEPEND=">=dev-build/meson-0.59.4 +_MESON_DEPEND=">=dev-build/meson-1.3.0 ${NINJA_DEPEND} dev-build/meson-format-array " @@ -63,11 +60,7 @@ _MESON_DEPEND=">=dev-build/meson-0.59.4 # their own DEPEND string. : ${MESON_AUTO_DEPEND:=yes} if [[ ${MESON_AUTO_DEPEND} != "no" ]] ; then - if [[ ${EAPI:-0} == [0123456] ]]; then - DEPEND=${_MESON_DEPEND} - else - BDEPEND=${_MESON_DEPEND} - fi + BDEPEND=${_MESON_DEPEND} fi __MESON_AUTO_DEPEND=${MESON_AUTO_DEPEND} # See top of eclass @@ -77,10 +70,16 @@ __MESON_AUTO_DEPEND=${MESON_AUTO_DEPEND} # See top of eclass # Build directory, location where all generated files should be placed. # If this isn't set, it defaults to ${WORKDIR}/${P}-build. +# @ECLASS_VARIABLE: MESON_VERBOSE +# @USER_VARIABLE +# @DESCRIPTION: +# Set to OFF to disable verbose messages during compilation +: "${MESON_VERBOSE:=ON}" + # @ECLASS_VARIABLE: EMESON_BUILDTYPE # @DESCRIPTION: # The buildtype value to pass to meson setup. -: ${EMESON_BUILDTYPE=plain} +: "${EMESON_BUILDTYPE=plain}" # @ECLASS_VARIABLE: EMESON_SOURCE # @DEFAULT_UNSET @@ -181,7 +180,7 @@ _meson_create_cross_file() { objc = $(_meson_env_array "$(tc-getPROG OBJC cc)") objcopy = $(_meson_env_array "$(tc-getOBJCOPY)") objcpp = $(_meson_env_array "$(tc-getPROG OBJCXX c++)") - pkgconfig = '$(tc-getPKG_CONFIG)' + pkg-config = '$(tc-getPKG_CONFIG)' strip = $(_meson_env_array "$(tc-getSTRIP)") windres = $(_meson_env_array "$(tc-getRC)") @@ -235,7 +234,7 @@ _meson_create_native_file() { objc = $(_meson_env_array "$(tc-getBUILD_PROG OBJC cc)") objcopy = $(_meson_env_array "$(tc-getBUILD_OBJCOPY)") objcpp = $(_meson_env_array "$(tc-getBUILD_PROG OBJCXX c++)") - pkgconfig = '$(tc-getBUILD_PKG_CONFIG)' + pkg-config = '$(tc-getBUILD_PKG_CONFIG)' strip = $(_meson_env_array "$(tc-getBUILD_STRIP)") windres = $(_meson_env_array "$(tc-getBUILD_PROG RC windres)") @@ -311,21 +310,21 @@ meson_src_configure() { local BUILD_PKG_CONFIG_PATH=${BUILD_PKG_CONFIG_PATH} if tc-is-cross-compiler; then - : ${BUILD_CFLAGS:=-O1 -pipe} - : ${BUILD_CXXFLAGS:=-O1 -pipe} - : ${BUILD_FCFLAGS:=-O1 -pipe} - : ${BUILD_OBJCFLAGS:=-O1 -pipe} - : ${BUILD_OBJCXXFLAGS:=-O1 -pipe} + : "${BUILD_CFLAGS:=-O1 -pipe}" + : "${BUILD_CXXFLAGS:=-O1 -pipe}" + : "${BUILD_FCFLAGS:=-O1 -pipe}" + : "${BUILD_OBJCFLAGS:=-O1 -pipe}" + : "${BUILD_OBJCXXFLAGS:=-O1 -pipe}" else - : ${BUILD_CFLAGS:=${CFLAGS}} - : ${BUILD_CPPFLAGS:=${CPPFLAGS}} - : ${BUILD_CXXFLAGS:=${CXXFLAGS}} - : ${BUILD_FCFLAGS:=${FCFLAGS}} - : ${BUILD_LDFLAGS:=${LDFLAGS}} - : ${BUILD_OBJCFLAGS:=${OBJCFLAGS}} - : ${BUILD_OBJCXXFLAGS:=${OBJCXXFLAGS}} - : ${BUILD_PKG_CONFIG_LIBDIR:=${PKG_CONFIG_LIBDIR}} - : ${BUILD_PKG_CONFIG_PATH:=${PKG_CONFIG_PATH}} + : "${BUILD_CFLAGS:=${CFLAGS}}" + : "${BUILD_CPPFLAGS:=${CPPFLAGS}}" + : "${BUILD_CXXFLAGS:=${CXXFLAGS}}" + : "${BUILD_FCFLAGS:=${FCFLAGS}}" + : "${BUILD_LDFLAGS:=${LDFLAGS}}" + : "${BUILD_OBJCFLAGS:=${OBJCFLAGS}}" + : "${BUILD_OBJCXXFLAGS:=${OBJCXXFLAGS}}" + : "${BUILD_PKG_CONFIG_LIBDIR:=${PKG_CONFIG_LIBDIR}}" + : "${BUILD_PKG_CONFIG_PATH:=${PKG_CONFIG_PATH}}" fi local mesonargs=( @@ -348,6 +347,10 @@ meson_src_configure() { # It's Gentoo policy to not have builds die on blanket -Werror, as it's # an upstream development matter. bug #754279. -Dwerror=false + + # Prevent projects from enabling LTO by default. In Gentoo, LTO is + # enabled via setting *FLAGS appropriately. + -Db_lto=false ) if [[ -n ${EMESON_BUILDTYPE} ]]; then @@ -408,12 +411,17 @@ meson_src_compile() { local mesoncompileargs=( -C "${BUILD_DIR}" - --jobs "$(makeopts_jobs "${MAKEOPTS}" 0)" - --load-average "$(makeopts_loadavg "${MAKEOPTS}" 0)" - --verbose - "$@" + --jobs "$(get_makeopts_jobs 0)" + --load-average "$(get_makeopts_loadavg 0)" ) + case ${MESON_VERBOSE} in + OFF) ;; + *) mesoncompileargs+=( --verbose ) ;; + esac + + mesoncompileargs+=( "$@" ) + set -- meson compile "${mesoncompileargs[@]}" echo "$@" >&2 "$@" || die "compile failed" @@ -427,6 +435,7 @@ meson_src_test() { debug-print-function ${FUNCNAME} "$@" local mesontestargs=( + --print-errorlogs -C "${BUILD_DIR}" --num-processes "$(makeopts_jobs "${MAKEOPTS}")" "$@" @@ -468,3 +477,5 @@ meson_src_install() { } fi + +EXPORT_FUNCTIONS src_configure src_compile src_test src_install diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index 8695b22d..fd81565e 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -29,7 +29,7 @@ app-misc/knapsack 7.3.1: A fast solver for the 0/1-knapsack problem with multipl app-misc/machine-learning-mv 1.3: Some machine learning experiments app-mobilephone/adb-sync 0_p20190101: Synchronize files between a PC and an Android device using ADB app-portage/changelog-gitrepo 1.1: Create ChangeLog data for gentoo repositories from git -app-portage/eix 0.36.7-r3 99999999: Search and query ebuilds +app-portage/eix 0.36.8 99999999: Search and query ebuilds app-portage/etcat 1.0.2 99999999: Updated version of an old Portage information extractor app-portage/find_cruft 5.2: find cruft files not managed by portage app-portage/logclean 18.4.2: Keep only (compressed) logs of installed packages and cleanup emerge.log -- cgit v1.2.3-65-gdbad