summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-03-09 13:55:56 +0000
committerAnthony G. Basile <blueness@gentoo.org>2013-03-09 13:55:56 +0000
commitfb5bce0992426192343d4da9e676f8c6c8aeace0 (patch)
tree08ddfebd36dce198eaf21d36ac3834dc4911f2a9 /www-apps/moodle
parentVersion bump (using autotools-utils); remove old. (diff)
downloadhistorical-fb5bce0992426192343d4da9e676f8c6c8aeace0.tar.gz
historical-fb5bce0992426192343d4da9e676f8c6c8aeace0.tar.bz2
historical-fb5bce0992426192343d4da9e676f8c6c8aeace0.zip
Version bumps
Package-Manager: portage-2.1.11.52/cvs/Linux x86_64 Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'www-apps/moodle')
-rw-r--r--www-apps/moodle/ChangeLog10
-rw-r--r--www-apps/moodle/Manifest34
-rw-r--r--www-apps/moodle/moodle-2.2.8.ebuild128
-rw-r--r--www-apps/moodle/moodle-2.3.5.ebuild128
-rw-r--r--www-apps/moodle/moodle-2.4.2.ebuild128
5 files changed, 413 insertions, 15 deletions
diff --git a/www-apps/moodle/ChangeLog b/www-apps/moodle/ChangeLog
index 3a0973fce71a..d7675d624bfd 100644
--- a/www-apps/moodle/ChangeLog
+++ b/www-apps/moodle/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for www-apps/moodle
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.37 2013/01/27 16:11:50 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.38 2013/03/09 13:55:32 blueness Exp $
+
+*moodle-2.4.2 (09 Mar 2013)
+*moodle-2.3.5 (09 Mar 2013)
+*moodle-2.2.8 (09 Mar 2013)
+
+ 09 Mar 2013; Anthony G. Basile <blueness@gentoo.org> +moodle-2.2.8.ebuild,
+ +moodle-2.3.5.ebuild, +moodle-2.4.2.ebuild:
+ Version bumps
27 Jan 2013; Anthony G. Basile <blueness@gentoo.org> -moodle-2.2.6.ebuild,
-moodle-2.3.3.ebuild, -moodle-2.4.ebuild:
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest
index bed853e3f487..112135941709 100644
--- a/www-apps/moodle/Manifest
+++ b/www-apps/moodle/Manifest
@@ -5,27 +5,33 @@ AUX config.php 718 SHA256 c62a37c0d81043ee4ca7fc4d7610d19dc2df426d556eb3285d7b1f
AUX postinstall-en.txt 6524 SHA256 dad8831abc23179ebcd2c2431f11d83346c142175c59da47cf5f913c928de667 SHA512 bb3e5187db6be49707801cfde15ebced065f2d4b8c1a04fef2f4ced0a67dab2440b8e79d110685056cad84647f8ebb587c697452df8e2b0eab07b015d01b92cf WHIRLPOOL 6ed4f9db76238db6e0a2afd98b8877a1de4e06311d77a6153bb9d8bbc559fd226190c7bf4a8053e35000fcb24babf154021a42d1b58ba92c3ee86bb5dfae1894
AUX postinstall-nodb-en.txt 171 SHA256 f39ff660a1cafbbd96ce18c46f056450ace04df5ac401eeccaf16441d54f3b6a SHA512 b0cf4787351f904caf06573c5bc50275b6a11361170b4006acc24224f44efde69cfe3a9b6340d6787c5805c605dc89f07072bf992b0ee255c97fba90e5d5617e WHIRLPOOL 3f91b917e8c92866d570c0af2dabbb11eb6bdf7d4cf3e9e8984649b5c147736f267156c490ab51fcd7fda9e7b3ac2ead8259231b20e74e349fb143ed44b08616
DIST moodle-2.2.7.tgz 24540389 SHA256 fccadf32667bdafde055251007e937633a5fd60fca6fe5dc8904fa60a52c1e15 SHA512 79968426077a153ddaaac0b5391d888e910b8cae515ec097aa4fa2c8b520c8f2336558bf376588913cbeeaf28a4840453ea5e2f3e1c4c7dd2fa0edddd7731b25 WHIRLPOOL 91a96de1a145a650e172a7c26bffd0c9bfd976eaf9d21072bb5c0c7b4d0c37997163705ad534be070e33bfa863bda5f191c1931aad4d3e618c4e65f8de2e9fc9
+DIST moodle-2.2.8.tgz 24547678 SHA256 f6be8ca677e13fce18390ffc112dd12d26c15a5e0cd09e78bb1a32b25ae272c7 SHA512 b03e6767f21f9c912e5be646ff3a6b92d4a4d076f0f195e4d532058726b030b136d9f9aee3134785be2b040d03c8a869742d1821ad4bbd700b6a84820b703b3d WHIRLPOOL aaee3ef0615a6e3dd71ad2d9bc02cd0aa0515c344a76055c12ce0ff91b2c765a26415b99a8cb92d8616b62b57fc0545f22506edffb545c51d305811ba999bc54
DIST moodle-2.3.4.tgz 28101505 SHA256 f3d6eb081956e9e22377a3112cf633ed8dc0ae5006e2b31bc4138d040fb32e5b SHA512 5fbf095da92fffd3c376e6a2fa48a523e9e143a65c71d9d2b149ca260889a372155c76c64fa7d202e2842ced46b7bbdf7c2b5c396ff3bb3fd464f0285234baca WHIRLPOOL f50cceef155128722b101cde7cb99d242f914b6ed3cc23b45e31b409aa137ebb1fc4fd9a0604971980dd7a012e761526c16a05b733ca28b7ddad8bb2589a77dd
+DIST moodle-2.3.5.tgz 28150921 SHA256 3f91b849098d1106724726e076a850aa14b5965d39a18a1897950db4506a291f SHA512 245e992b3f4ec3d3b5c4b78fc6d99b668a37e7fd5a84fa246564cc017ad89f824cbff1f4a4ffb68096f071e4943606be4705354a907f540eb4b26243c88b3989 WHIRLPOOL 0afc4850d579ebcf182e5175ca5376809c88b7158bdd3a5ae30bbfdd5f22b4de877b6b245f5758eeebd79f9cbe3f256b4af768320336f9ce2ffdbc85563be7a6
DIST moodle-2.4.1.tgz 30235452 SHA256 5ed86c9f57f05165f54d2c955ea3c20997d4c9deca4af00d4a6930c0527a8f21 SHA512 3aadd1a44517f3f64bede4b2f8aa22d7e7faf6b5ba74f4c4eeefc1d6c6b31bad8d2bdb54b0516ebd58a99d77e5d2785601d9d1fd0636a12f4452d9ed137ea206 WHIRLPOOL 4757f57a2e678d75a9ee4b372fb47fa9ae58bae8d0bc2dec327e6b6a6d4958ba983c3d37f7f58657e0f2783ee94ba4a11bf10b90a95f269fbde74eb3d5379cb7
+DIST moodle-2.4.2.tgz 30291908 SHA256 d96fd7709529c12c1351840eeb1e6685da051c54844aca222e09708f55491551 SHA512 17c85bee7be66a5c0aed62f378f3358753826a7df323846e351caf76979a6ce0e77952f43329f126b2343ba555cb0e7c2fea935d49c7a81aba5fc92b7ff27e9d WHIRLPOOL c89223231c4e3e416fed898cd2c230a5b9cbb1cca5cb3cebb863cc9f755e4a723b5f8fe08dc522ccb55909295df0581a3fdfa2aebcdb0af962c06e2b8c31169b
EBUILD moodle-2.2.7.ebuild 3375 SHA256 69a53ee16092d0b01813f723f9d20d3bef381c106fb31d320fd027d6dadbac6e SHA512 92126c772a21c7d25a7606d93a630040b1b79956c1a9f1603dfde24d929aa2e04dfe06ace2c88ec14297fc3463de7b499fbfbe293a0bb572d87e061ba711ba51 WHIRLPOOL 8d37a2489f4a783168e09584435a67759797ffdaed7723838616a60817414a48c9ab3877d00af450c1778831807192e815981b1132b397bb2a5be43f84382fa6
+EBUILD moodle-2.2.8.ebuild 3375 SHA256 3290eb3dcefb3c82892abe9cee5397487db939b65daf09ee0d11ac5c069c850d SHA512 148bdc57796d019aeeadd6f5883dae32226f3d9d002b97f2b52c15a791f5eb0a25a8eebf32de8e82b8d306af0db82d66a92fcb594fc20141cc43f29c62d5379d WHIRLPOOL 537bd4633c4df1f5f191d926d4fa23fce5889331eec161f5230413bf086639df2b2e683d8c26a51fa34f88100748b7c9028387d7520d346468133a95d600ef1b
EBUILD moodle-2.3.4.ebuild 3375 SHA256 ef491faade50dc4b79f3d39465e15dae3feeaf1f051a9852d231b3fdd9e4309a SHA512 e11c389121491aa6bc9a0059bd04c331ad28a39b68ce310c3e0e92aa4e95912bea66dafbb68f530ee179b56845558876e504b739f8776ebd213fe0fd35327122 WHIRLPOOL 4d33e4f78b504e4a5dbc2e19d30398f77a6762cbaf06995543592015433c0d53e3f389b3422e961f55ab2d1d4ce9b3a0a03e0061ebf7fe2fdca1a7afa1ec3e57
+EBUILD moodle-2.3.5.ebuild 3375 SHA256 970dba4e135123615912c26d9f1aac6e6c0b37e4c0847481fd183eb80e33e140 SHA512 3c03975549dfdb08b8350eca61e101361d435f5734d0a256ebe3cc36ac16af6769d937e76146d99663838242cfb30f850d7b11299326ad20eac967d8396228c6 WHIRLPOOL 93f758f14c652ba75f4264346a81f51f3c9243d659bf850f6281c8915b63b9a4f44dfab389736e6d23d34ca46d4137fa06701d61a6b45e779e8b001fe81286ed
EBUILD moodle-2.4.1.ebuild 3357 SHA256 5852320b191a43bc3c842a696af3ab7d13d69b281f9b26c37604c80f09dc073d SHA512 630d077d3de00e932d5fc747a51e83e0f21b0976dce1ff6c21a4f36e2439875e5e132852318593b76b63f071847e45c6dad4343c5113b898f2a95f8e1ba1a2ff WHIRLPOOL 5b4728cdf920a5938ab3f61c2dfeba9a8e7ba665d48a8df83c7571607fccb60b9b9437ea42c0e7af6c2083571676a393dde938445fe08a2d96ae300756046dea
-MISC ChangeLog 7858 SHA256 9d6dee6d0ff1ef3eba3e32b63e1639390d2e9a468ce9fb79b06918e3475ca630 SHA512 18c6366c57d9946b43fcbf2ea348ac3813da7c96a67412232c8c437936f14b1040d63a2bb733b0a696fb3f61015eeddedaacad7f3bcfed3d78806cb82fc69e5e WHIRLPOOL ad0a8d5743654a1e4381b770b94c353c5a86ce718b4056d01627f152c6619d3285e2cc30b52abc97ddaa655f3801f899930e11727e36784d7c288da75fd27f1e
+EBUILD moodle-2.4.2.ebuild 3357 SHA256 75f6ae7c7c3c4765ce088bd7e44b396e2d06a47d388440781a34c5faf895d1e9 SHA512 0bc09858a308a67cc541676f33137f13a417ec599a216a16a47a8b620a1259647eb8d1e1d31e3d361a61173a8ce0b9633c92556122d639d41e3746370cec36ac WHIRLPOOL 5d2dc20c7b32dcecb9ec39b9e31d0628da07ae5818e55fe9b016a2a596bc6ee5a289ae2e6f9c19d6a5af71fdb0645fbd8182737cd4fe670754688091e2fe3016
+MISC ChangeLog 8083 SHA256 86e9338471280c24ed85ff0a0d4668f002b205be5fecc4b0e063501970386ac0 SHA512 dede151fdff93e930d0349304ea7585d44fd5152f6da177cfc1388c030dcdf1b92b43d0e431c3f9bcd77ef4325ee4de363ae50e52eae77917a6cd448df1a8200 WHIRLPOOL 355796fceb18b998ab60c32ac759367d9d7c153865a8b747b87b113c209531b0cd625169732425d1ea5075421b99fc7e52372dc8c3dc973881845b03a368fdff
MISC metadata.xml 256 SHA256 8230894d717ea9f2e42f9c7de54671126820f89bf05ca96ec5f03842b12378e1 SHA512 b94120ce0ef0ab704cecc6b00d1e0460fe60159b4b7d2fedeefbc9e7b0917ead1637ba2cbe598c67cb9b86d7b0874603e555333f4bba1959e228d33a4cd1b2a5 WHIRLPOOL 8269d207868c3ea1efbf1aed77209b809488b66dc46d6304401435747aa527907fd37be2887d09e116409f1dd56f235d3812a6a7898d25701131a8305a6db5c9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQIcBAEBCAAGBQJRBVHNAAoJEJOE+m71LUu6lRgP/3xqA883Ha0jUbWBYd2k5mrn
-uTPFbytgrOkE3G9VjFzs8vk9+CG6fxUySVVpJgNFoaq4LXKf5oqmolkYdHKAY5p+
-tyoUxfCIgGzsmmcZdewIGijyNZbK6xYMTN/R4z4itto/aj8RE4IOq9P0V0bJnJyk
-m24FhGO0dCth6661YB3f1BlngACkkMcYrfKFyC6lMcyT3jeS47QQ/ZKvP4RKNOUw
-BICwJwDmNkMWkCRgjUVNhVVAjFHvo1o8HgOFokLih1uDPiEQsV65aYV++bVwPQnO
-fwNRLQNSFgDV9U19qFLoxoXvwl8OL4FfhH+i4qR+iLQxXVIZn8nQYgp+zkYafgAk
-TExXT7muyT4JxM60XerhehdVQHNxmKKi/AH4omIlhkLwpNZlskQc3aI561/IMdl4
-lTHScZIImOrguNguD2I7oKi+eoAAj7puo8aOInK6G6AEFnWyuhDZfk+twp2KWB4T
-5UCp/hLernRF303a5v7ynG+A4ygFCRdroDcDnOgjjWibH3HPTXZRCuhWTJn7RxKv
-K7+hghCk7UF7Fb5KpmlICznX0+M80ZLb+A0eNLyTIzgqTObeeiDAHsxWN8LDimrW
-WsrEV8usuByszfsMZx1SeXZFkVfaAGdW8/U9aJGUeU3XJDjrhBRJFUYGDzT8sdTp
-yfP6PyU/zqbnmrAJ/5px
-=Zbpm
+iQIcBAEBCAAGBQJROz9OAAoJEJOE+m71LUu6A6gP/j6ZliGJUbOX36gYIRi+IAdq
+K2+t4M3O4IsH8lREJN8QDIM5fZY7jZ0rk2auwgSMHCfxRrHFdmwTP2how5hm8Ipz
+kOqdLuP65uLzz+KxYkT04EfD1lPUajO/oj9Q9ZJFBGfk7BGvu+jVy3PVFCBKY7Do
+QvbikqBtVi/V2VczE5kzKL7b3qTIZXwbdwYp89HQTJXUOz3PROPqH60la5R3CXtj
+ku/UANAgZ6RUnJpgQDe6KAgUdJz/FvC4z990DC9IAQYIut+vieqRjzaZL/+hwdr2
+7DmMUfmX6NbCqdPTeYB9L1xDWq6TUyYKURXsGGobjNDHMQYMqtOx5zHLw5Dxj5uK
+cLPEjmz5TAEdaobjO8D3uRuacAFPazPbx1EsN3nAuZkSIfMnHvC13CBMcrVf8jx5
+PBBn83qe5cZu6I13YGkKb4To2kLzxFztnA++XHXhBdKyKwhFWuHimRFZXr2oRIWl
+lEqzVoUHAGP/U+OF8mlwjrNHK99MkhVj50SHhdND4EnWe/F7yPt/bbbpgiR627r6
+2nixWh9lteGbwsE/v6yDTGhvVmI6u9+tpsA+OG26ddvzLEIpAKsqe+i4udmeajmq
+bo/iREuc1KSlHHKeGhf9JAA24CE6PZsGs/KouJyQoJfiWqRZr3/TbiBb/HcnY6nr
+T57hBbvNxqRA38WrjfFX
+=B2DP
-----END PGP SIGNATURE-----
diff --git a/www-apps/moodle/moodle-2.2.8.ebuild b/www-apps/moodle/moodle-2.2.8.ebuild
new file mode 100644
index 000000000000..a34d912091d9
--- /dev/null
+++ b/www-apps/moodle/moodle-2.2.8.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.2.8.ebuild,v 1.1 2013/03/09 13:55:32 blueness Exp $
+
+EAPI="4"
+
+inherit versionator webapp
+
+AVC=( $(get_version_components) )
+MY_BRANCH="stable${AVC[0]}${AVC[1]}"
+
+DESCRIPTION="The Moodle Course Management System"
+HOMEPAGE="http://moodle.org"
+SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+#SLOT empty due to webapp
+
+DB_FLAGS="mysqli?,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_53="ctype,curl,iconv,json,session,simplexml,xml,zip"
+PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
+
+IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
+REQUIRED_USE="|| ( ${DB_TYPES} )"
+
+# No forced dependency on
+# mysql? ( virtual/mysql )
+# postgres? ( dev-db/postgresql-server-7* )
+# which may live on another server
+DEPEND=""
+RDEPEND="
+ =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
+ 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
+
+ # REQUIRED_USE above guarantees that ${DB_COUNT} cannot be zero
+ #if [[ ${DB_COUNT} -eq 0 ]]; then
+ # eerror
+ # eerror "\033[1;31m**************************************************\033[00m"
+ # eerror "No database selected in your USE flags,"
+ # eerror "You must select at least one."
+ # eerror "\033[1;31m**************************************************\033[00m"
+ # eerror
+ # die
+ #fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn
+ fi
+}
+
+src_prepare() {
+ rm COPYING.txt
+ cp "${FILESDIR}"/config.php .
+
+ # Moodle expect postgres7, not postgres
+ MYDB=${MYDB/postgres/postgres7}
+
+ # Moodle expects mysql, not mysqli
+ MYDB=${MYDB/mysqli/mysql}
+
+ if [[ ${DB_COUNT} -eq 1 ]] ; then
+ sed -i -e "s|mydb|${MYDB}|" config.php
+ fi
+}
+
+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 "\033[1;32m**************************************************\033[00m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[00m"
+ einfo
+}
diff --git a/www-apps/moodle/moodle-2.3.5.ebuild b/www-apps/moodle/moodle-2.3.5.ebuild
new file mode 100644
index 000000000000..4186eff09fb0
--- /dev/null
+++ b/www-apps/moodle/moodle-2.3.5.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.3.5.ebuild,v 1.1 2013/03/09 13:55:32 blueness Exp $
+
+EAPI="4"
+
+inherit versionator webapp
+
+AVC=( $(get_version_components) )
+MY_BRANCH="stable${AVC[0]}${AVC[1]}"
+
+DESCRIPTION="The Moodle Course Management System"
+HOMEPAGE="http://moodle.org"
+SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+#SLOT empty due to webapp
+
+DB_FLAGS="mysqli?,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_53="ctype,curl,iconv,json,session,simplexml,xml,zip"
+PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
+
+IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
+REQUIRED_USE="|| ( ${DB_TYPES} )"
+
+# No forced dependency on
+# mysql? ( virtual/mysql )
+# postgres? ( dev-db/postgresql-server-7* )
+# which may live on another server
+DEPEND=""
+RDEPEND="
+ =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
+ 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
+
+ # REQUIRED_USE above guarantees that ${DB_COUNT} cannot be zero
+ #if [[ ${DB_COUNT} -eq 0 ]]; then
+ # eerror
+ # eerror "\033[1;31m**************************************************\033[00m"
+ # eerror "No database selected in your USE flags,"
+ # eerror "You must select at least one."
+ # eerror "\033[1;31m**************************************************\033[00m"
+ # eerror
+ # die
+ #fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn
+ fi
+}
+
+src_prepare() {
+ rm COPYING.txt
+ cp "${FILESDIR}"/config.php .
+
+ # Moodle expect postgres7, not postgres
+ MYDB=${MYDB/postgres/postgres7}
+
+ # Moodle expects mysql, not mysqli
+ MYDB=${MYDB/mysqli/mysql}
+
+ if [[ ${DB_COUNT} -eq 1 ]] ; then
+ sed -i -e "s|mydb|${MYDB}|" config.php
+ fi
+}
+
+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 "\033[1;32m**************************************************\033[00m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[00m"
+ einfo
+}
diff --git a/www-apps/moodle/moodle-2.4.2.ebuild b/www-apps/moodle/moodle-2.4.2.ebuild
new file mode 100644
index 000000000000..2db46f708ce3
--- /dev/null
+++ b/www-apps/moodle/moodle-2.4.2.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.4.2.ebuild,v 1.1 2013/03/09 13:55:32 blueness Exp $
+
+EAPI="5"
+
+inherit versionator webapp
+
+AVC=( $(get_version_components) )
+MY_BRANCH="stable${AVC[0]}${AVC[1]}"
+
+DESCRIPTION="The Moodle Course Management System"
+HOMEPAGE="http://moodle.org"
+SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+#SLOT empty due to webapp
+
+DB_FLAGS="mysqli?,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"
+REQUIRED_USE="|| ( ${DB_TYPES} )"
+
+# No forced dependency on
+# mysql? ( virtual/mysql )
+# postgres? ( dev-db/postgresql-server-7* )
+# which may live on another server
+DEPEND=""
+RDEPEND="
+ =dev-lang/php-5.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
+
+ # REQUIRED_USE above guarantees that ${DB_COUNT} cannot be zero
+ #if [[ ${DB_COUNT} -eq 0 ]]; then
+ # eerror
+ # eerror "\033[1;31m**************************************************\033[00m"
+ # eerror "No database selected in your USE flags,"
+ # eerror "You must select at least one."
+ # eerror "\033[1;31m**************************************************\033[00m"
+ # eerror
+ # die
+ #fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn
+ fi
+}
+
+src_prepare() {
+ rm COPYING.txt
+ cp "${FILESDIR}"/config.php .
+
+ # Moodle expect postgres7, not postgres
+ MYDB=${MYDB/postgres/postgres7}
+
+ # Moodle expects mysql, not mysqli
+ MYDB=${MYDB/mysqli/mysql}
+
+ if [[ ${DB_COUNT} -eq 1 ]] ; then
+ sed -i -e "s|mydb|${MYDB}|" config.php
+ fi
+}
+
+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 "\033[1;32m**************************************************\033[00m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[00m"
+ einfo
+}