[gentoo-dev] [PATCH v4] eclass/dune.eclass: fix dune-install function

2021-12-10 Thread Maciej Barć
Support EAPI 8 and drop support for EAPI 5.
Set DUNE_PKG_NAME to PN by default.
Move "Move docs to the appropriate place" block to dune-install
to make dune-install now handle a list of subpackages correctly.
Use ebegin and eend for dune calls instead of "|| die".
Thanks to ULM for bash fixes.

Signed-off-by: Maciej Barć 
---
 eclass/dune.eclass | 56 +-
 1 file changed, 35 insertions(+), 21 deletions(-)

diff --git a/eclass/dune.eclass b/eclass/dune.eclass
index 02a8a870e..69aad3692 100644
--- a/eclass/dune.eclass
+++ b/eclass/dune.eclass
@@ -8,7 +8,7 @@
 # ML 
 # @AUTHOR:
 # Rafael Kitover 
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 6 7 8
 # @BLURB: Provides functions for installing Dune packages.
 # @DESCRIPTION:
 # Provides dependencies on dDne and OCaml and default src_compile, src_test and
@@ -19,9 +19,10 @@
 # @DESCRIPTION:
 # Sets the actual Dune package name, if different from Gentoo package name.
 # Set before inheriting the eclass.
+: ${DUNE_PKG_NAME:-${PN}}
 
 case ${EAPI:-0} in
-   5|6|7) ;;
+   6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
 esac
 
@@ -32,7 +33,7 @@ EXPORT_FUNCTIONS src_compile src_test src_install
 
 RDEPEND=">=dev-lang/ocaml-4:=[ocamlopt?] dev-ml/dune:="
 case ${EAPI:-0} in
-   5|6)
+   6)
DEPEND="${RDEPEND} dev-ml/dune"
;;
*)
@@ -42,11 +43,15 @@ case ${EAPI:-0} in
 esac
 
 dune_src_compile() {
-   dune build @install --profile release || die
+   ebegin "Building"
+   dune build @install --profile release
+   eend $? || die
 }
 
 dune_src_test() {
-   dune runtest || die
+   ebegin "Testing"
+   dune runtest
+   eend $? || die
 }
 
 # @FUNCTION: dune-install
@@ -54,26 +59,35 @@ dune_src_test() {
 # @DESCRIPTION:
 # Installs the dune packages given as arguments. For each "${pkg}" element in
 # that list, "${pkg}.install" must be readable from "${PWD}/_build/default"
+#
+# Example use:
+# @CODE
+# dune-install menhir menhirLib menhirSdk
+# @CODE
 dune-install() {
+   local -a pkgs=( "${@}" )
+   [[ ${#pkgs[@]} -eq 0 ]] && pkgs=( "${DUNE_PKG_NAME}" )
+
+   local -a myduneopts=(
+   --prefix="${ED%/}/usr"
+   --libdir="${D%/}$(ocamlc -where)"
+   --mandir="${ED%/}/usr/share/man"
+   )
local pkg
-   for pkg ; do
-   dune install \
-   --prefix="${ED%/}/usr" \
-   --libdir="${D%/}$(ocamlc -where)" \
-   --mandir="${ED%/}/usr/share/man" \
-   "${pkg}" || die
+   for pkg in "${pkgs[@]}" ; do
+   ebegin "Installing ${pkg}"
+   dune install ${myduneopts[@]} ${pkg}
+   eend $? || die
+
+   # Move docs to the appropriate place.
+   if [ -d "${ED%/}/usr/doc/${pkg}" ] ; then
+   mkdir -p "${ED%/}/usr/share/doc/${PF}/" || die
+   mv "${ED%/}/usr/doc/${pkg}" 
"${ED%/}/usr/share/doc/${PF}/" || die
+   rm -rf "${ED%/}/usr/doc" || die
+   fi
done
 }
 
 dune_src_install() {
-   local pkg="${1:-${DUNE_PKG_NAME:-${PN}}}"
-
-   dune-install "${pkg}"
-
-   # Move docs to the appropriate place.
-   if [ -d "${ED%/}/usr/doc/${pkg}" ] ; then
-   mkdir -p "${ED%/}/usr/share/doc/${PF}/" || die
-   mv "${ED%/}/usr/doc/${pkg}/"* "${ED%/}/usr/share/doc/${PF}/" || 
die
-   rm -rf "${ED%/}/usr/doc" || die
-   fi
+   dune-install ${1:-${DUNE_PKG_NAME}}
 }
-- 
2.32.0




[gentoo-dev] Last rites: www-apache/mod_caucho

2021-12-10 Thread Jakov Smolić
# Volkmar W. Pogatzki  (2021-12-10)
# Package without consumers. Bug #828740.  Removal in 30 days.
www-apache/mod_caucho
-- 
Jakov



OpenPGP_signature
Description: OpenPGP digital signature


[gentoo-dev] Last rites: games-action/multimc

2021-12-10 Thread Andrew Ammerlaan

Andrew Ammerlaan  (2021-12-10)
As of MultiMC version 0.6.14 source built versions of MultiMC are no 
longer usable for anything but development. The sources have been 
de-branded and secret API keys and other required files are not included 
with the sources. Please use the official upstream binary packaged in 
games-action/multimc-bin instead. Removal in 30 days


games-action/multimc



[gentoo-dev] [PATCH] python-utils-r1.eclass: epytest, force color output to match NOCOLOR

2021-12-10 Thread Michał Górny
Force pytest color output on or off based on the presence and value
of NOCOLOR envvar.  This fixes inconsistent use of colors that largely
depended on upstream pytest settings.

Signed-off-by: Michał Górny 
---
 eclass/python-utils-r1.eclass | 12 
 1 file changed, 12 insertions(+)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 22e00c56815d..225f781cc31f 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1291,6 +1291,16 @@ epytest() {
 
_python_check_EPYTHON
 
+   local color
+   case ${NOCOLOR} in
+   true|yes)
+   color=no
+   ;;
+   *)
+   color=yes
+   ;;
+   esac
+
local args=(
# verbose progress reporting and tracebacks
-vv
@@ -1302,6 +1312,8 @@ epytest() {
# override filterwarnings=error, we do not really want -Werror
# for end users, as it tends to fail on new warnings from deps
-Wdefault
+   # override color output
+   "--color=${color}"
)
local x
for x in "${EPYTEST_DESELECT[@]}"; do
-- 
2.34.1