www-apps/moodle: bump to 4.5.13, 5.0.9; add 5.2.2

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
Anthony G. Basile
2026-08-11 12:45:57 +00:00
parent b5daa923ab
commit a092d78288
4 changed files with 127 additions and 2 deletions

View File

@@ -1,2 +1,3 @@
DIST moodle-4.5.12.tgz 75100554 BLAKE2B 1205e34223f928bc7fc84f75dfaf2adeeff26b03b1ddee8d77e7c37d9247baa5a69df1d356b04fc3ce8046bef3efc2f2a7f8318f7f82457eeebf10d55389f49a SHA512 e5ede9820e9fd526dae084bbea75c1675796335f362087a6a1e28a4e2c08c659cab8a03752ba3a4f44d7c86560786221f91bad024d6a0d04b6dc15552b4e3c93
DIST moodle-5.0.8.tgz 74997485 BLAKE2B bc1a491519da0d1433f7e9ad0f2db6d6f0757e89ee1f578be8acb231dc544b08607eb9f7ad7d310576237582826acbb99d780948d000a4dcfbd4b84b9efbff57 SHA512 21d81745b4112e30a903bce1f11b3aef02019ee85894db495becf269b913bf30e8dbeaa362413188bbab1338e9e13763eca1b11dddb25fb8c670660748d09b2c
DIST moodle-4.5.13.tgz 75119513 BLAKE2B 850ba00c787b0f307cd363f99c3f965b283dcdbf0fd0f53e122354cc18195b55ba7b3ef42a1a023adc22d4b6de2337e9903f14cb8686106ec66d8c25ef94f316 SHA512 8940d48d5c5231036a8700cb228743f27f6e3c7bf963b81494953d6b4ac9f06ccdb0c6bd3b6875207afdc1635e3e3702ba30b041fab5ffdb7e2e9a4bc4f33f4b
DIST moodle-5.0.9.tgz 75000754 BLAKE2B 474357a320e06444ce6d87b07fb250fb2be8dd2410c358c387d93915bddf16bc63bfe563c4a1a147791aa3669378288b558900997516d2de95d6d2e7308d8146 SHA512 01a6a7f41d36db44e1585759d3617ff2b5e5aac38e0cc44452a986d19da9b811b3441c6cbb4846feb3558377863c59104668c17dd48197692e2dc252c2c50e90
DIST moodle-5.2.2.tgz 89751760 BLAKE2B 6321821a36c49d26502373923f124c9795f5ddd53ce58d056e616bf7ae57e19acb24953329d14dcc41499284fa56628a044f3a5644212fa711fa5460f0ad2fc5 SHA512 bccea5b38a2f5e715a8a77d4e9802251f320167e29648f94a100ab52d1f89c2b76f343876c23db8a18884308775dd4920413482f7fe18a05ba35669839bd337c

View File

@@ -0,0 +1,124 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
inherit webapp
DESCRIPTION="The Moodle Course Management System"
HOMEPAGE="https://moodle.org"
MY_BRANCH="stable$(ver_cut 1)0$(ver_cut 2)"
SRC_URI="https://download.moodle.org/download.php/direct/${MY_BRANCH}/${P}.tgz"
S="${WORKDIR}/${PN}"
LICENSE="GPL-3+"
KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
#SLOT empty due to webapp
# Turn off mysqli unti mysql-8.4 is unmasked
#DB_FLAGS="mysqli?,mssql?,postgres?"
DB_FLAGS="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,sodium,xml,zip"
PHP_OPTIONAL_FLAGS="gd,intl,soap,ssl,tokenizer"
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:8.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
}