summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2020-06-20 10:16:41 -0400
committerAnthony G. Basile <blueness@gentoo.org>2020-06-20 10:17:03 -0400
commit0a6efbdeaf19538076fbc58822988acd48e69d53 (patch)
tree01b87de9c2e60d3f67192c44d8189c115f7bd848 /www-apps
parentdev-tcltk/togl: x86 stable (bug #724032) (diff)
downloadgentoo-0a6efbdeaf19538076fbc58822988acd48e69d53.tar.gz
gentoo-0a6efbdeaf19538076fbc58822988acd48e69d53.tar.bz2
gentoo-0a6efbdeaf19538076fbc58822988acd48e69d53.zip
www-apps/moodle: version bump to 3.9
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/moodle/Manifest1
-rw-r--r--www-apps/moodle/moodle-3.9.ebuild120
2 files changed, 121 insertions, 0 deletions
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest
index d1919e5e17f6..fc1fdc75580c 100644
--- a/www-apps/moodle/Manifest
+++ b/www-apps/moodle/Manifest
@@ -2,3 +2,4 @@ DIST moodle-3.5.12.tgz 46771916 BLAKE2B cb22c3a1548d2e01b309375ef3e422faa1a1603c
DIST moodle-3.6.10.tgz 47830177 BLAKE2B f28ce1b32cc4cec2eb256a9a3ad37f224e637e5e4720af4914dff80eec07cdfe738546545e9fc3db7a88517b0c10fc16a942515b3aa011d4d7588fbc2c26fffe SHA512 1ac374b1805f3a2be253279384f81c11d717eb6d9598c42490254912fe3720cba22c31525f3435785d270eda5a4340c79db43070973ebac3059549a322cfdbce
DIST moodle-3.7.6.tgz 45867618 BLAKE2B 901a0d953e1a3329c817c032610ad797a34458fa9716ab9dcb51775faebdd30593596694ed72cbb0b0a45bb19eeee69a373f4792edce3aa530b3aeeb3cb551a3 SHA512 eaf8eeed256e9a942a5003f24bdd56ec3378d02fd33a4807b06fe2df083c5fe343014bda19d49791d20d038dbc3bc2a86e20a2e2f9fc25b45b3c00d8728c6ff1
DIST moodle-3.8.3.tgz 53221103 BLAKE2B 7bf36c7affbe71eab027954e6690eb45137a49bad136511efe90f843de00d31b94071cac37a8ddc3f22565df960454047b42f5839ef58177b18d2737317b9c84 SHA512 d68f99717e7283f95a050d39879bffec8fe210f83d970fd5b14655be6546bf0848b75fd44bca3376b1bb7aba274c05a58b0b01d430cfbffebc02355c4a2b3759
+DIST moodle-3.9.tgz 56958303 BLAKE2B 81b4a2adab014d9e67d2a400592db56777dcecf7b16f7495f941472a8a49af74acd732d4198f2821910a1771995c85d998e1fe58ba4d6db7fc3dd4e1892cda41 SHA512 693a77fdd66ecfa9e1418e01c543d575aa8468b267de0a1dcfb6df369adc5b73223c959e57947cb56fafa94d269fbd36fd652ddf0b84ed8d5397702501a86e01
diff --git a/www-apps/moodle/moodle-3.9.ebuild b/www-apps/moodle/moodle-3.9.ebuild
new file mode 100644
index 000000000000..1012b291cbc9
--- /dev/null
+++ b/www-apps/moodle/moodle-3.9.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit webapp
+
+MY_BRANCH="stable$(ver_cut 1)$(ver_cut 2)"
+
+DESCRIPTION="The Moodle Course Management System"
+HOMEPAGE="https://moodle.org"
+SRC_URI="https://download.moodle.org/${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.2[${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
+}