From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 681C2158021 for ; Mon, 17 Oct 2022 11:26:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 65311E0837; Mon, 17 Oct 2022 11:26:48 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 422E0E0101 for ; Mon, 17 Oct 2022 11:26:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CC39D340B28 for ; Mon, 17 Oct 2022 11:26:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2EE2F61F for ; Mon, 17 Oct 2022 11:26:45 +0000 (UTC) From: "Haelwenn Monnier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Haelwenn Monnier" Message-ID: <1665557589.d04ea1ecf1a757aade2b847c4b3144b09a75f00d.lanodan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: app-benchmarks/phoronix-test-suite/ X-VCS-Repository: repo/proj/guru X-VCS-Files: app-benchmarks/phoronix-test-suite/metadata.xml app-benchmarks/phoronix-test-suite/phoronix-test-suite-9999.ebuild X-VCS-Directories: app-benchmarks/phoronix-test-suite/ X-VCS-Committer: lanodan X-VCS-Committer-Name: Haelwenn Monnier X-VCS-Revision: d04ea1ecf1a757aade2b847c4b3144b09a75f00d X-VCS-Branch: master Date: Mon, 17 Oct 2022 11:26:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e81b925c-0ae4-4555-b163-b6a30d9f12b0 X-Archives-Hash: 3bc63c0f9edf2ee44c9c8be2149300f7 commit: d04ea1ecf1a757aade2b847c4b3144b09a75f00d Author: Vitaly Zdanevich ya ru> AuthorDate: Wed Oct 12 06:53:09 2022 +0000 Commit: Haelwenn Monnier hacktivis me> CommitDate: Wed Oct 12 06:53:09 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d04ea1ec app-benchmark/phoronix-test-suite: new package, add 9999 Signed-off-by: Vitaly Zdanevich ya.ru> app-benchmarks/phoronix-test-suite/metadata.xml | 10 ++ .../phoronix-test-suite-9999.ebuild | 128 +++++++++++++++++++++ 2 files changed, 138 insertions(+) diff --git a/app-benchmarks/phoronix-test-suite/metadata.xml b/app-benchmarks/phoronix-test-suite/metadata.xml new file mode 100644 index 000000000..f957cf2b7 --- /dev/null +++ b/app-benchmarks/phoronix-test-suite/metadata.xml @@ -0,0 +1,10 @@ + + + + + zdanevich.vitaly@ya.ru + Vitaly Zdanevich + + + + diff --git a/app-benchmarks/phoronix-test-suite/phoronix-test-suite-9999.ebuild b/app-benchmarks/phoronix-test-suite/phoronix-test-suite-9999.ebuild new file mode 100644 index 000000000..365ff5654 --- /dev/null +++ b/app-benchmarks/phoronix-test-suite/phoronix-test-suite-9999.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# shellcheck disable=SC2034 + +EAPI=8 + +inherit bash-completion-r1 xdg-utils + +DESCRIPTION="Phoronix's comprehensive, cross-platform testing and benchmark suite" +HOMEPAGE="http://www.phoronix-test-suite.com" + +LICENSE="GPL-3" +SLOT="0" + +EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" +EGIT3_STORE_DIR="${T}" +inherit git-r3 +SRC_URI="" +KEYWORDS="" + +IUSE="sdl" + +DEPEND="" +RDEPEND="${DEPEND} + app-arch/p7zip + media-libs/libpng + >=dev-lang/php-5.3[cli,curl,gd,posix,pcntl,sockets,ssl,truetype,xml,zip,zlib] + www-servers/apache + x11-base/xorg-server + sdl? ( + media-libs/libsdl + media-libs/sdl-net + media-libs/sdl-image + media-libs/libsdl2 + media-libs/sdl2-net + media-libs/sdl2-image + media-libs/sdl2-mixer + + )" + +check_php_config() +{ + local slot + for slot in $(eselect --brief php list cli); do + local php_dir="/etc/php/cli-${slot}" + + if [[ -f "${EROOT%}/${php_dir}/php.ini" ]]; then + dodir "${php_dir}" + cp -f "${EROOT%}/${php_dir}/php.ini" "${ED%}/${php_dir}/php.ini" \ + || die "cp failed: copy php.ini file" + sed -i -e 's|^allow_url_fopen .*|allow_url_fopen = On|g' "${ED%}/${php_dir}/php.ini" \ + || die "sed failed: modify php.ini file" + elif [[ "$(eselect php show cli)" == "${slot}" ]]; then + ewarn "${slot} does not have a php.ini file." + ewarn "${PN} needs the 'allow_url_fopen' option set to \"On\"" + ewarn "for downloading to work properly." + ewarn + else + elog "${slot} does not have a php.ini file." + elog "${PN} may need the 'allow_url_fopen' option set to \"On\"" + elog "for downloading to work properly if you switch to ${slot}" + elog + fi + done +} + +get_optional_dependencies() +{ + (($# == 1)) || die "${FUNCNAME[0]}(): invalid number of arguments: ${#} (1)" + + local -a array_package_names + local field_value ifield package_generic_name optional_packages_xmlline package_names installable_packages="" + local package_close_regexp="" \ + package_generic_name_regexp="^.*|.*$" \ + package_names_regexp="^.*|.*$" + + line=0 + while IFS=$'\n' read -r optional_packages_xmlline; do + if [[ "${optional_packages_xmlline}" =~ ${package_generic_name_regexp} ]]; then + package_generic_name="$(echo "${optional_packages_xmlline}" | sed -r "s@${package_generic_name_regexp}@@g")" + elif [[ "${optional_packages_xmlline}" =~ ${package_names_regexp} ]]; then + package_names="$(echo "${optional_packages_xmlline}" | sed -r -e "s@${package_names_regexp}@@g" -e 's@(^[[:blank:]]+|[[:blank:]]+$)$@@g' )" + ifield=0 + # shellcheck disable=SC2206 + array_package_names=( ${package_names} ) + for (( ifield=0 ; ifield < ${#array_package_names[@]} ; ++ifield )); do + field_value="${array_package_names[ifield]}" + [[ ${field_value} =~ ^.+/.+$ ]] || continue # skip invalid package atoms + + if ! has_version "${field_value}"; then + installable_packages="${installable_packages}${installable_packages:+ }${field_value}" + fi + done + elif [[ "${optional_packages_xmlline}" =~ ${package_close_regexp} && -n "${installable_packages}" ]]; then + ewarn " ${package_generic_name}: ${installable_packages}" + installable_packages="" + fi + done <<< "${1}" +} + +src_prepare() { + # BASH completion helper function "have" test is depreciated + sed -i -e '/^have phoronix-test-suite &&$/d' "${S}/pts-core/static/bash_completion" \ + || die "sed failed: remove PTS bash completion have test" + # Remove all dependency resolving shell scripts - security vulnerability + rm -rf "${S}/pts-core/external-test-dependencies/scripts" + eapply_user +} + +src_install() { + # Store the contents of this file - since it will be installed / deleted before we need it. + GENTOO_OPTIONAL_PKGS_XML="$(cat "${S}/pts-core/external-test-dependencies/xml/gentoo-packages.xml")" + newbashcomp pts-core/static/bash_completion "${PN}" + DESTDIR="${D}" "${S}/install-sh" "${EPREFIX%}/usr" + + # Fix the cli-php config for downloading to work. + check_php_config +} + +pkg_postinst() { + xdg_icon_cache_update + xdg_mimeinfo_database_update + + ewarn "${PN} has the following optional package dependencies:" + get_optional_dependencies "${GENTOO_OPTIONAL_PKGS_XML}" + unset -v GENTOO_OPTIONAL_PKGS_XML +}