summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-java/wsdl4j/wsdl4j-1.6.3.ebuild2
-rw-r--r--dev-util/meson/Manifest3
-rw-r--r--dev-util/meson/files/meson-0.61.4-fix-gtk-update-icon-cache-check.patch29
-rw-r--r--dev-util/meson/meson-0.60.3.ebuild101
-rw-r--r--dev-util/meson/meson-0.61.4-r2.ebuild111
-rw-r--r--dev-util/meson/meson-0.62.1.ebuild108
-rw-r--r--eclass/meson.eclass3
-rw-r--r--media-sound/wavpack/wavpack-5.5.0.ebuild2
-rw-r--r--www-apps/moodle/Manifest1
-rw-r--r--www-apps/moodle/moodle-4.0.2-r1.ebuild121
10 files changed, 126 insertions, 355 deletions
diff --git a/dev-java/wsdl4j/wsdl4j-1.6.3.ebuild b/dev-java/wsdl4j/wsdl4j-1.6.3.ebuild
index 3be69a6a39f3..6d6021edc701 100644
--- a/dev-java/wsdl4j/wsdl4j-1.6.3.ebuild
+++ b/dev-java/wsdl4j/wsdl4j-1.6.3.ebuild
@@ -14,7 +14,7 @@ SRC_URI="mirror://sourceforge/project/wsdl4j/WSDL4J/${PV}/wsdl4j-src-${PV}.zip"
LICENSE="CPL-1.0"
SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
+KEYWORDS="amd64 ~ppc64 x86"
DEPEND=">=virtual/jdk-1.8:*"
RDEPEND=">=virtual/jre-1.8:*"
diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest
index 115618ae4227..e6bd1e90d8fa 100644
--- a/dev-util/meson/Manifest
+++ b/dev-util/meson/Manifest
@@ -1,5 +1,2 @@
-DIST meson-0.60.3.tar.gz 2001124 BLAKE2B f66fb29d309f5dea9c0b1934e8b5dfc2b33586e06c6a2d616798d5724216035fe03a3f9b1c6976546d5d5c069734357d61a92aa43de01161cf1fe4297a1d1f2e SHA512 0aa6ef71c20cd899ebb0b202c6319e093e1df1c39fa58c94a1bb479efe630213272127346eab589948898d115d02d64f4bdffd892fbb9700884c1edf2dc6c6dc
-DIST meson-0.61.4.tar.gz 2014265 BLAKE2B 09e6630f8a1786143832007c929e652e743bbf11d1b55ffcf366dd127779f61e8fd4a8be5cb23fa6bc949938a3bd0222f19ad1fec883f0ca6ed8cd6d4bbd6aef SHA512 005f52c678016f3183d36b69254cceab16c682d2389ec9cae41889955a13cb643aea03f2247f3473cfeca9c4dd6c1cc8b9b8b9906dc324c08016c72380a5f195
-DIST meson-0.62.1.tar.gz 2034805 BLAKE2B 6370b6bf07e6e875f6a0cabbf6284f97c89a4653b62c4765f365fbf083e607853094aa37d5dc97042f086ca1db569b2f8dabd14b37f674615d3b9d267d3d0d0f SHA512 52d2d06c27275b824046164403908be8555faed33aef862940623cef3e4f84b4c9b8d461c291642e6ea2c0db30b2ec4a99f46bde5d54945a26c1dbeca219cc32
DIST meson-0.62.2.tar.gz 2038542 BLAKE2B 51446cd348f3e8681a61ebecf95f5aafcafd90654e3c86d87ee2b68239237bd889b667f3c6543faba7d4b98d7e0ed73d96c6a988913e5262d3b9611b80ff8db2 SHA512 4089588701f0f702eb3b794e0ede78b99f13ec7545d1a7470c7bfd6a857de59673684a543928dd578402578c53f38365a3a59e3e29022fd30a525353818a4195
DIST meson-0.63.0.tar.gz 2060688 BLAKE2B 763d35a6dee42d7ef61b00c472681042289f38737374178d43eb8e66c3abe38affd372fca7aea4f4c7cd52f25ad3754485f54f24ac5e453b7a58011397ddbbb8 SHA512 8d427261bb42d2bd1da7d4f7b5f53908044aa2cea6d020fb320b0ab9d9848e17cf28deb12ae6dc139807f9e377db0c8a546561e94301216b634bd77703f17cea
diff --git a/dev-util/meson/files/meson-0.61.4-fix-gtk-update-icon-cache-check.patch b/dev-util/meson/files/meson-0.61.4-fix-gtk-update-icon-cache-check.patch
deleted file mode 100644
index 7be12b7a98ac..000000000000
--- a/dev-util/meson/files/meson-0.61.4-fix-gtk-update-icon-cache-check.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://github.com/mesonbuild/meson/commit/dac212e1bba707b9ac67b48902d761ee7ca8fa04
-
-From dac212e1bba707b9ac67b48902d761ee7ca8fa04 Mon Sep 17 00:00:00 2001
-From: Antoine Jacoutot <ajacoutot@gnome.org>
-Date: Wed, 23 Mar 2022 22:15:11 +0100
-Subject: [PATCH] gnome module: properly fallback to gtk-update-icon-cache
-
-Commit a0cade8f introduced a typo and wrongly check for
-gtk4-update-icon-cache twice.
-If gtk4-update-icon-cache (gtk4) is not found, look for
-gtk-update-icon-cache (gtk3) instead.
----
- mesonbuild/modules/gnome.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
-index 673a781a41d..501be9ae4da 100644
---- a/mesonbuild/modules/gnome.py
-+++ b/mesonbuild/modules/gnome.py
-@@ -371,7 +371,7 @@ def post_install(self, state: 'ModuleState', args: T.List['TYPE_var'], kwargs: '
- prog = state.find_program('gtk4-update-icon-cache', required=False)
- found = isinstance(prog, build.Executable) or prog.found()
- if not found:
-- prog = state.find_program('gtk4-update-icon-cache')
-+ prog = state.find_program('gtk-update-icon-cache')
- icondir = os.path.join(datadir_abs, 'icons', 'hicolor')
- script = state.backend.get_executable_serialisation([prog, '-q', '-t', '-f', icondir])
- script.skip_if_destdir = True
-
diff --git a/dev-util/meson/meson-0.60.3.ebuild b/dev-util/meson/meson-0.60.3.ebuild
deleted file mode 100644
index 72eb2e56f912..000000000000
--- a/dev-util/meson/meson-0.60.3.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 2016-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-PYTHON_COMPAT=( python3_{8,9,10} )
-
-if [[ ${PV} = *9999* ]]; then
- EGIT_REPO_URI="https://github.com/mesonbuild/meson"
- inherit git-r3
-else
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
- 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"
-fi
-
-inherit distutils-r1 toolchain-funcs
-
-DESCRIPTION="Open source build system"
-HOMEPAGE="https://mesonbuild.com/"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- test? (
- dev-libs/glib:2
- dev-libs/gobject-introspection
- dev-util/ninja
- dev-vcs/git
- sys-libs/zlib[static-libs(+)]
- virtual/pkgconfig
- )
-"
-
-python_prepare_all() {
- local disable_unittests=(
- # ASAN and sandbox both want control over LD_PRELOAD
- # https://bugs.gentoo.org/673016
- -e 's/test_generate_gir_with_address_sanitizer/_&/'
-
- # ASAN is unsupported on some targets
- # https://bugs.gentoo.org/692822
- -e 's/test_pch_with_address_sanitizer/_&/'
-
- # https://github.com/mesonbuild/meson/issues/7203
- -e 's/test_templates/_&/'
-
- # Broken due to python2 wrapper
- -e 's/test_python_module/_&/'
- )
-
- sed -i "${disable_unittests[@]}" run_unittests.py || die
-
- # Broken due to python2 script created by python_wrapper_setup
- rm -r "test cases/frameworks/1 boost" || die
-
- distutils-r1_python_prepare_all
-}
-
-src_test() {
- tc-export PKG_CONFIG
- if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
- ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
- else
- # https://bugs.gentoo.org/687792
- unset PKG_CONFIG
- distutils-r1_src_test
- fi
-}
-
-python_test() {
- (
- # test_meson_installed
- unset PYTHONDONTWRITEBYTECODE
-
- # test_cross_file_system_paths
- unset XDG_DATA_HOME
-
- # 'test cases/unit/73 summary' expects 80 columns
- export COLUMNS=80
-
- # If JAVA_HOME is not set, meson looks for javac in PATH.
- # If javac is in /usr/bin, meson assumes /usr/include is a valid
- # JDK include path. Setting JAVA_HOME works around this broken
- # autodetection. If no JDK is installed, we should end up with an empty
- # value in JAVA_HOME, and the tests should get skipped.
- export JAVA_HOME=$(java-config -O 2>/dev/null)
-
- ${EPYTHON} -u run_tests.py
- ) || die "Testing failed with ${EPYTHON}"
-}
-
-python_install_all() {
- distutils-r1_python_install_all
-
- insinto /usr/share/vim/vimfiles
- doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
- insinto /usr/share/zsh/site-functions
- doins data/shell-completions/zsh/_meson
-}
diff --git a/dev-util/meson/meson-0.61.4-r2.ebuild b/dev-util/meson/meson-0.61.4-r2.ebuild
deleted file mode 100644
index 14d44511eeea..000000000000
--- a/dev-util/meson/meson-0.61.4-r2.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 2016-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8,9,10} )
-DISTUTILS_USE_PEP517=setuptools
-
-if [[ ${PV} = *9999* ]]; then
- EGIT_REPO_URI="https://github.com/mesonbuild/meson"
- inherit git-r3
-else
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
-fi
-
-inherit bash-completion-r1 distutils-r1 toolchain-funcs
-
-DESCRIPTION="Open source build system"
-HOMEPAGE="https://mesonbuild.com/"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- test? (
- dev-libs/glib:2
- dev-libs/gobject-introspection
- dev-util/ninja
- dev-vcs/git
- sys-libs/zlib[static-libs(+)]
- virtual/pkgconfig
- )
-"
-
-PATCHES=(
- "${FILESDIR}"/${P}-fix-gtk-update-icon-cache-check.patch
-)
-
-python_prepare_all() {
- local disable_unittests=(
- # ASAN and sandbox both want control over LD_PRELOAD
- # https://bugs.gentoo.org/673016
- -e 's/test_generate_gir_with_address_sanitizer/_&/'
-
- # ASAN is unsupported on some targets
- # https://bugs.gentoo.org/692822
- -e 's/test_pch_with_address_sanitizer/_&/'
-
- # https://github.com/mesonbuild/meson/issues/7203
- -e 's/test_templates/_&/'
-
- # Broken due to python2 wrapper
- -e 's/test_python_module/_&/'
- )
-
- sed -i "${disable_unittests[@]}" run_unittests.py || die
-
- # Broken due to python2 script created by python_wrapper_setup
- rm -r "test cases/frameworks/1 boost" || die
-
- distutils-r1_python_prepare_all
-}
-
-src_test() {
- tc-export PKG_CONFIG
- if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
- ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
- else
- # https://bugs.gentoo.org/687792
- unset PKG_CONFIG
- distutils-r1_src_test
- fi
-}
-
-python_test() {
- (
- # test_meson_installed
- unset PYTHONDONTWRITEBYTECODE
-
- # test_cross_file_system_paths
- unset XDG_DATA_HOME
-
- # 'test cases/unit/73 summary' expects 80 columns
- export COLUMNS=80
-
- # If JAVA_HOME is not set, meson looks for javac in PATH.
- # If javac is in /usr/bin, meson assumes /usr/include is a valid
- # JDK include path. Setting JAVA_HOME works around this broken
- # autodetection. If no JDK is installed, we should end up with an empty
- # value in JAVA_HOME, and the tests should get skipped.
- export JAVA_HOME=$(java-config -O 2>/dev/null)
-
- # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled.
- python3 run_tests.py
- ) || die "Testing failed with ${EPYTHON}"
-}
-
-python_install_all() {
- distutils-r1_python_install_all
-
- insinto /usr/share/vim/vimfiles
- doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
-
- insinto /usr/share/zsh/site-functions
- doins data/shell-completions/zsh/_meson
-
- dobashcomp data/shell-completions/bash/meson
-}
diff --git a/dev-util/meson/meson-0.62.1.ebuild b/dev-util/meson/meson-0.62.1.ebuild
deleted file mode 100644
index 9743e5a1839f..000000000000
--- a/dev-util/meson/meson-0.62.1.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2016-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8,9,10} )
-DISTUTILS_USE_PEP517=setuptools
-
-if [[ ${PV} = *9999* ]]; then
- EGIT_REPO_URI="https://github.com/mesonbuild/meson"
- inherit git-r3
-else
- SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
-fi
-
-inherit bash-completion-r1 distutils-r1 toolchain-funcs
-
-DESCRIPTION="Open source build system"
-HOMEPAGE="https://mesonbuild.com/"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- test? (
- dev-libs/glib:2
- dev-libs/gobject-introspection
- dev-util/ninja
- dev-vcs/git
- sys-libs/zlib[static-libs(+)]
- virtual/pkgconfig
- )
-"
-
-python_prepare_all() {
- local disable_unittests=(
- # ASAN and sandbox both want control over LD_PRELOAD
- # https://bugs.gentoo.org/673016
- -e 's/test_generate_gir_with_address_sanitizer/_&/'
-
- # ASAN is unsupported on some targets
- # https://bugs.gentoo.org/692822
- -e 's/test_pch_with_address_sanitizer/_&/'
-
- # https://github.com/mesonbuild/meson/issues/7203
- -e 's/test_templates/_&/'
-
- # Broken due to python2 wrapper
- -e 's/test_python_module/_&/'
- )
-
- sed -i "${disable_unittests[@]}" unittests/*.py || die
-
- # Broken due to python2 script created by python_wrapper_setup
- rm -r "test cases/frameworks/1 boost" || die
-
- distutils-r1_python_prepare_all
-}
-
-src_test() {
- tc-export PKG_CONFIG
- if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
- ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
- else
- distutils-r1_src_test
- fi
-}
-
-python_test() {
- (
- # test_meson_installed
- unset PYTHONDONTWRITEBYTECODE
-
- # https://bugs.gentoo.org/687792
- unset PKG_CONFIG
-
- # test_cross_file_system_paths
- unset XDG_DATA_HOME
-
- # 'test cases/unit/73 summary' expects 80 columns
- export COLUMNS=80
-
- # If JAVA_HOME is not set, meson looks for javac in PATH.
- # If javac is in /usr/bin, meson assumes /usr/include is a valid
- # JDK include path. Setting JAVA_HOME works around this broken
- # autodetection. If no JDK is installed, we should end up with an empty
- # value in JAVA_HOME, and the tests should get skipped.
- export JAVA_HOME=$(java-config -O 2>/dev/null)
-
- # Call python3 instead of EPYTHON to satisfy test_meson_uninstalled.
- python3 run_tests.py
- ) || die "Testing failed with ${EPYTHON}"
-}
-
-python_install_all() {
- distutils-r1_python_install_all
-
- insinto /usr/share/vim/vimfiles
- doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
-
- insinto /usr/share/zsh/site-functions
- doins data/shell-completions/zsh/_meson
-
- dobashcomp data/shell-completions/bash/meson
-}
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 7ba6501688b7..268e54448e5d 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -46,7 +46,7 @@ inherit multiprocessing ninja-utils python-utils-r1 toolchain-funcs
EXPORT_FUNCTIONS src_configure src_compile src_test src_install
-BDEPEND=">=dev-util/meson-0.59.4
+BDEPEND=">=dev-util/meson-0.62.2
${NINJA_DEPEND}
dev-util/meson-format-array
"
@@ -407,6 +407,7 @@ meson_src_test() {
debug-print-function ${FUNCNAME} "$@"
local mesontestargs=(
+ --print-errorlogs
-C "${BUILD_DIR}"
--num-processes "$(makeopts_jobs "${MAKEOPTS}")"
"$@"
diff --git a/media-sound/wavpack/wavpack-5.5.0.ebuild b/media-sound/wavpack/wavpack-5.5.0.ebuild
index 040ee68d227e..6f95a8507add 100644
--- a/media-sound/wavpack/wavpack-5.5.0.ebuild
+++ b/media-sound/wavpack/wavpack-5.5.0.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/dbry/WavPack/releases/download/${PV}/${P}.tar.xz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~x86-solaris"
RDEPEND=">=virtual/libiconv-0-r1"
DEPEND="${RDEPEND}"
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest
index 707534601b9a..94408feab15a 100644
--- a/www-apps/moodle/Manifest
+++ b/www-apps/moodle/Manifest
@@ -1,3 +1,4 @@
DIST moodle-3.11.8.tgz 60299874 BLAKE2B 315e22a3080b90cb946074c2c53a97ddfdb13f942a41e21d8f21e8520fa7442e85ec4485b5230dbdd1e2b8a8bc69371280c32f36d5819abe4e600eed18bb0ade SHA512 b866eb08d2744ec39eed3d1cd11b98b459785a72dabb2f5069fdea3a333146646bddea5dbb7765ee67d604501253371e8a02b38a7aa5b76dd1750aa8dc4f30b2
DIST moodle-3.9.15.tgz 56746257 BLAKE2B f912749d568ea20a432ca9312e4e689cd38462b6737377af01655fc7fe13b7345f34eb1651c70d6584675089694f78c66de0523dd3fcfa26228c1b5eedaafb8a SHA512 fc61f82455faa1d6fee5f3e99574c1d69c9e967e8f85dcbc06a53db4b3d57d56af37c1c4f90338d081e76e40a938902cce8787f9e14c959a1088d2b8936fd74c
+DIST moodle-4.0.2.tgz 61878566 BLAKE2B 6711f1a9d41b797bafd2ee7e5ceb0851bdec3c817c26af5c70cb030c7df65975bfec13306b995fe73431e77924e90cea59a64d6709f2f8f6d33e2dfbc9110f10 SHA512 f485c8b609a47de26406df5d19441da0b7762759b4b59eb06855a80495c6617f19f60d758541dba71c92a89df77f68db6e2026ee284bda8104fbfd1331eaf2a0
DIST moodle-4.0.tgz 61778671 BLAKE2B 426b0977d9c78055465fd752ea20a29c0f9c715cc513d3cb377f74e58cd3b3be01cafe93e2ba77222f097f2f13594ff645b5150d31b50493556b899587798400 SHA512 a104cfcc3616cb5d97382cf387ef13d89ea73e7b0a2f71f0bbd8cabc1df5828476091f0ab0a2e3f5962f4c8bb9d3019e3f226ec808fad670c5777cc87bd3d70c
diff --git a/www-apps/moodle/moodle-4.0.2-r1.ebuild b/www-apps/moodle/moodle-4.0.2-r1.ebuild
new file mode 100644
index 000000000000..db15d5ab03ce
--- /dev/null
+++ b/www-apps/moodle/moodle-4.0.2-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit webapp
+
+DESCRIPTION="The Moodle Course Management System"
+HOMEPAGE="https://moodle.org"
+
+MY_BRANCH="stable$(ver_cut 1)$(ver_cut 2)0"
+#SRC_URI="https://download.moodle.org/download.php/direct/stable400/moodle-4.0.tgz"
+SRC_URI="https://download.moodle.org/download.php/direct/${MY_BRANCH}/${P}.tgz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-3+"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+#SLOT empty due to webapp
+
+DB_FLAGS="mysqli?,mssql?,postgres?"
+DB_TYPES=${DB_FLAGS//\?/}
+DB_TYPES=${DB_TYPES//,/ }
+
+AUTHENTICATION_FLAGS="imap?,ldap?,odbc?"
+AUTHENTICATION_MODES=${AUTHENTICATION_FLAGS//\?/}
+AUTHENTICATION_MODES=${AUTHENTICATION_MODES//,/ }
+
+PHP_REQUIRED_FLAGS="ctype,curl,iconv,json(+),session,simplexml,xml,zip"
+PHP_OPTIONAL_FLAGS="gd,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS="${PHP_REQUIRED_FLAGS},${PHP_OPTIONAL_FLAGS}"
+
+IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
+
+# No forced dependency on
+# mssql? - lives on a windows server
+# mysql? ( virtual/mysql )
+# postgres? ( dev-db/postgresql-server-9* )
+# which may live on another server. These USE flags affect the configuration
+# file and the dependency on php. However other dbs are possible. See config.php
+# and the moodle documentation for other possibilities.
+DEPEND=""
+RDEPEND="
+ >=dev-lang/php-7.3[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS}]
+ virtual/httpd-php
+ virtual/cron"
+
+pkg_setup() {
+ webapp_pkg_setup
+
+ # How many dbs were selected? If one and only one, which one is it?
+ MYDB=""
+ DB_COUNT=0
+ for db in ${DB_TYPES}; do
+ if use ${db}; then
+ MYDB=${db}
+ DB_COUNT=$(($DB_COUNT+1))
+ fi
+ done
+
+ if [[ ${DB_COUNT} -eq 0 ]]; then
+ eerror
+ eerror "No database selected in your USE flags,"
+ eerror "You must select at least one."
+ eerror
+ die
+ fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn
+ fi
+}
+
+src_prepare() {
+ rm COPYING.txt
+ cp "${FILESDIR}"/config-r1.php config.php
+
+ # Moodle expect pgsql, not postgres
+ MYDB=${MYDB/postgres/pgsql}
+
+ if [[ ${DB_COUNT} -eq 1 ]] ; then
+ sed -i -e "s|mydb|${MYDB}|" config.php
+ fi
+
+ eapply_user
+}
+
+src_install() {
+ webapp_src_preinst
+
+ local MOODLEDATA="${MY_HOSTROOTDIR}"/moodle
+ dodir ${MOODLEDATA}
+ webapp_serverowned -R "${MOODLEDATA}"
+
+ local MOODLEROOT="${MY_HTDOCSDIR}"
+ insinto ${MOODLEROOT}
+ doins -r *
+
+ webapp_configfile "${MOODLEROOT}"/config.php
+
+ if [[ ${DB_COUNT} -eq 1 ]]; then
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+ else
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-nodb-en.txt
+ fi
+
+ webapp_src_install
+}
+
+pkg_postinst() {
+ einfo
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo
+}