summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-11-09 14:12:30 +0000
committerAnthony G. Basile <blueness@gentoo.org>2014-11-09 14:12:30 +0000
commit13cc97383b650e5ceed08b948e0f6d399302ded3 (patch)
tree890976e658cebf7ddeeaa263e2727eeb4df5e738 /www-apps/moodle
parentRemove old net-tools stuff (diff)
downloadhistorical-13cc97383b650e5ceed08b948e0f6d399302ded3.tar.gz
historical-13cc97383b650e5ceed08b948e0f6d399302ded3.tar.bz2
historical-13cc97383b650e5ceed08b948e0f6d399302ded3.zip
Version bumps
Package-Manager: portage-2.2.8-r2/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.5.9.ebuild128
-rw-r--r--www-apps/moodle/moodle-2.6.6.ebuild128
-rw-r--r--www-apps/moodle/moodle-2.7.3.ebuild128
5 files changed, 413 insertions, 15 deletions
diff --git a/www-apps/moodle/ChangeLog b/www-apps/moodle/ChangeLog
index e221616ebdb1..63583ce77e48 100644
--- a/www-apps/moodle/ChangeLog
+++ b/www-apps/moodle/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for www-apps/moodle
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.61 2014/09/07 11:03:44 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.62 2014/11/09 14:12:19 blueness Exp $
+
+*moodle-2.6.6 (09 Nov 2014)
+*moodle-2.5.9 (09 Nov 2014)
+*moodle-2.7.3 (09 Nov 2014)
+
+ 09 Nov 2014; Anthony G. Basile <blueness@gentoo.org> +moodle-2.5.9.ebuild,
+ +moodle-2.6.6.ebuild, +moodle-2.7.3.ebuild:
+ Version bumps
*moodle-2.7.2 (07 Sep 2014)
*moodle-2.5.8 (07 Sep 2014)
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest
index d8b7e614714a..bc05853d554b 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.5.8.tgz 32505816 SHA256 0ce54a49b6b0afb77628f0d35fea16848b9ecf3c1c20586cb96143e43b03215d SHA512 2858dbf76c3ca3f70ba72055f71548cd9364a696f421cde20de2eeb1e8338826e793356cafbc75cc19935751c6c8120e24a55252a3bcea958dd0dc491cd2cca1 WHIRLPOOL c2948eca1ad5531d72a79b5064d080763b8c34d2e4c9fdc047f1b85b27c8090bc913e6feebf7e550759f094cfae3ad15c8fd2b335a98b4dca81d1c7b35e8aa9e
+DIST moodle-2.5.9.tgz 32508492 SHA256 721de0bd4c6251858a3ad576861d3e0660d26cc7b14cb0fd95f74d2fcf522ad8 SHA512 946e3f1178ed2759e2bccdcd02607f77e10d9962b47b8f5d708d62d951c1ba8d2b3e89352ff5132ebae2215f35d55f795041b0a1b62bf54b91315af6217a7b64 WHIRLPOOL 9fbca9e603a50fdc278397c6d3d745949899df0d30aaa00edcd87823e668af7143048ce685df79f0f5135e3fca8c85f8f9b95781039586500b763e0e1da9c99a
DIST moodle-2.6.5.tgz 39457019 SHA256 be703909fb78666e7f3ddf140b56c33a23b9a10644d0d7436343b15920d24d7b SHA512 b9e9e9bbf9d843ce51839daef44c4fb740d0e51d307b32f7f6e4c5aad2c1ce09d300b67c5796c9b67111f922b61686035e90b3eed8331e39571b519b99df165f WHIRLPOOL c88e161e259c4784a424c36ae3e4418e23000ef91f3a76886b8c561b989963e5fe4197cc00d8f43e43ecad5bea3c874a2adacf52ba50e93babab25222263f83d
+DIST moodle-2.6.6.tgz 39481878 SHA256 cbc617b05f985d653e5b53cb7ac92226b04b48c09d8073f36793201cbcc2f552 SHA512 afb7fcf7d9c9efd09b3a282ee17456c25981620fb1c62f2059d418120178e9693f0847d59b56c02cc346eb76f8e2446fa7a6a74d1f70f14dc623c0e20a78decb WHIRLPOOL 270bbdf62f79b5f36e8c97cefd049ef6288d8a8173b486f93167c0826c304cb9b058e16d1ec8ab8f4e8f4d4b230b7153db53ad52f1714eed5c38c0e2f09adc46
DIST moodle-2.7.2.tgz 34850996 SHA256 ef1b8dcc2419378f990dc05d05091b001ef23c438f6bedcb62a76ae4f6f736d5 SHA512 772aa183ef238257eee6bf9a0c527ad75dbc999d161aa0ba1e4c14ec6b9484892104c376df77cf4805d9f41ec2d780d70b2dbc85a04f30565f55b79a8d72ef5e WHIRLPOOL 592a4eba96a3124861f8e350710f556b5a264988b95ae4e9e5682fd279a28eebb473f84e6f891d80607482ee6587998ae1c7ea1746ea3dc67048289c8b6e1889
+DIST moodle-2.7.3.tgz 34891141 SHA256 baaf5a323d44417c40fd4104378426c18c80cf17db19180f76b2e3c2b5a40dc9 SHA512 1d2c6c9dc885c8d0a0455c1bae9c4477272a9029bccda1862b87f2979512922c36a95aab4b193c5ce3119467bff89da8eb13b25ba2a196f4f61c5542a513879a WHIRLPOOL 747b3c06820d3a0204a99008c06f574ad4650602dd9d8de44b130fbec34bd8eea1eeaaa436b3117f6c592dbc3ae32d51f405b126ce66da7cd9a3abf4af5b4a5f
EBUILD moodle-2.5.8.ebuild 3359 SHA256 f53bdabe8275b4ecff930e827304675a2cfaaf84a57f8f725a8260018bff5d8e SHA512 a692ff1a147697125549d120295f826a7d41a26463f9cc79ef6f7676c8dec0cb4e39f5797e14a418940cda05d67568e1723a700020a4af40d7df7f20872657e1 WHIRLPOOL 4cff2e49f06e7d4b72a4fd0256ab9a0adcf0c6cbf23f5e1f2bd78927dddadb9c8b0d5ff230e3117aedd2a104f5d06608b1d7e2380b91cae32c9ee648b7b8774b
+EBUILD moodle-2.5.9.ebuild 3359 SHA256 793dfc256be226504700a03d3dca889b9045dc249e5775689c595e064eb0ae00 SHA512 18359213ac8ea0c99955dfce66d6c8bbbf16a04a49d409685d83739e4e4f0ac492e1a42311e7adf9effd7a06a67694905a7f8b72f356c983e8c9135e8280f40b WHIRLPOOL 7328a69552f454ebec13c116cba49843b12f7d9d20170885f28ffb2e33d52ac903139599ba1579840c5e179e183e10546f3371b585ca2fca06a5fa2e9050a51a
EBUILD moodle-2.6.5.ebuild 3359 SHA256 5e3f6b4e7a97922b3c7692adaae69f5a1a06eeec70a4d492f517a697121873e7 SHA512 9c06ac236124369cda6b679d5c84d0690218830cdae2c427b728b6aab0bcb7a0b1b512d1c9524492f4902eb8058fde96bf877913b527a2da5e3bb55008a128ac WHIRLPOOL 322b35139d693a1edfeb42d2b0975bd510107850f250121acfcc6294f9c456018d5bb7eab4195a832694de8462c25b273ea7ec224f250bc603ff49e862afb856
+EBUILD moodle-2.6.6.ebuild 3359 SHA256 bca236ae638cc876152d0485980b521023ee71566a7992b60d51c74f56e51ce9 SHA512 20ebf2bbccb64dda35e8f82da7ef81c5f295d8317aebbae5b0b8c0cd34c24ab672d1ebe8e23939c8f5e9abf5496a6ca1187b3aa773adab0ef2ef7f0838b78bed WHIRLPOOL c98c43385694adc1f6883a9d5a7dc920c5a55b35f19a23463cd71cd3dbe3fa371494a39657edf85d6a59ef901275c5187208bc4b8988e18b1375d766eb991678
EBUILD moodle-2.7.2.ebuild 3359 SHA256 58aa7c3ffcded2082be6f6bd0ca696c7780a2d7db8fa337449c0572b668fa3d8 SHA512 c9e9dc4df41217160f7e77a4d4fa92d892bf5c9c852fe2a576c9bf0c242f029758abd75b9a59cac4083fe90449cb3c3efd02a373d3f80ed55f333a2a79870bc1 WHIRLPOOL e432b2500476fcb68bd1b13a6dd00872444d7b16efd9002184a3845701919381b29fe0d3d3d3bc999996e0c2565bc38897f934c1773648116fe2c6dc64c66a77
-MISC ChangeLog 12895 SHA256 9a96e1ef478b6a9d36d11dadfe324abbfc47181a81287863f8f5243bf2c6f080 SHA512 72772cfd8e69179f658001a0887206e45a58d34bdd3c59f48a151cad7d2f309046c5e85a998695af6d96785367f6433e3069241d638b9dddead454ab20417c68 WHIRLPOOL 476f9fa9b9e9799ff6160cc2ac025730bcefe5e83784a93d75dc1958a1d34c6e5a005734a056254376b4e03e62e145909758834e9ee95417d150cd2cdad0f5f6
+EBUILD moodle-2.7.3.ebuild 3359 SHA256 3795902248cb4c8f5b983fef5f097a23af13975336d4bf9d582bce4687e8e7f0 SHA512 2bf4974f01509583f9a8e61e0b0a04bb5c8ed7c76233560028b8dbc68705be86f10e650a509872734e5afc758ecdc2b1a86156c7c94e1b19445551126b37020c WHIRLPOOL 57ea4c83a0129068c313e0c615a3e1b48bbc070dccec513f6ea08040830af262ccf972166e27d8143912d4d05ce1326b9bdf35667cae90278c7b25dd0377b9a7
+MISC ChangeLog 13120 SHA256 864efb5b14ab903f285602b3c779bde7b4418ae2ca3ccf95b56b346bce341a1f SHA512 a64e14327ff9b0ac9bbcbe1b66dfe592a6bbd5b0f405eda6a0149b788e5a080173cb85d87dcb758453afc6ddfee98b7e9459938fec726640ffc72849442907f7 WHIRLPOOL 523501e2349705e294da78d5dbda670ffaa003ba814011d0ef1edd28af8d34e7531be4dc3ae4fd30ae7ea40676d612e4f505f834ea916f0435d9c6f5f4de1798
MISC metadata.xml 256 SHA256 8230894d717ea9f2e42f9c7de54671126820f89bf05ca96ec5f03842b12378e1 SHA512 b94120ce0ef0ab704cecc6b00d1e0460fe60159b4b7d2fedeefbc9e7b0917ead1637ba2cbe598c67cb9b86d7b0874603e555333f4bba1959e228d33a4cd1b2a5 WHIRLPOOL 8269d207868c3ea1efbf1aed77209b809488b66dc46d6304401435747aa527907fd37be2887d09e116409f1dd56f235d3812a6a7898d25701131a8305a6db5c9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iQIcBAEBCAAGBQJUDDwnAAoJEJOE+m71LUu6ExIP/36KWR+tiEoBPRDLPv6B1S7N
-Erk9j9GYDK0smAWf9GNTTU7Qx56T/sx6H53HxYQKscUzvQk0r3Bmt/dCa+Qy+DaQ
-jW2Iht3Ull0+zdPHhs2KN18rijgU5ppP4OopIlIiRlfK1l4PZ3ManW2j4H5yOsOo
-IMCgcFuCBQwe3AE5nQFfTx3MzGf6YejKRjWG2z/n8Tw5tG6RakHIgWFXN5UGGQE/
-2VriIwp6JWzyuVy0cep+h2+HPYYNmkDyn1HxbNcICqlHxeAlnBSO4m6RcXwAjCe0
-+W42OW6PywH1d774+M/pEW+U35cpVY170b8aZDQihkWTfuU4gcHYqWUfJQxeR8Ux
-swrlNCmSc0xt0cyh0t6wv3Is1e8v09TA+FvADrmWstZ7RbLjlh3wdQOgNT/puslK
-Na07Wkxy5Kp+CqkBqfulXwvw7D3ARzGJ+U8lDd1Y4wd3QbksVo2c1bjl47Cs/MoF
-dg5rIWBRuoCmsfi2wA1NvGXqzkOPKGesaWDuLD5X56n0SuYfRBbckSemQyPASt02
-IAx3j2mOOJOa4oCiEXNX0sMz0h2mZjemRqh8OF2Kpdxq+sUDNdxb1z9vfj/GfnAG
-0LVXqqvi5gcibFUenZeqMN3o50EUgMRBSlrVst2gUdFSZ1Dg3F8uAC8mx8iP1mTN
-6Thrx9fVy3cbi3fi/gIJ
-=OwS7
+iQIcBAEBCAAGBQJUX3bGAAoJEJOE+m71LUu6T/EP/2/mTmKEml2Fvvg8pRrMg9IK
+hqrLXj7Mry1IR1ZlmSPnWBgsHqYKgKZgjOJuD2aVZpWeI3thzihpWJNVdn2zvGBq
+IRVm/vDei72uH1avq5K0Zcji5GmhVFof+/gJvwl2tKFvWXLXvaKfqaDCK/+NDq2/
+UWObrYirAHt+5JCMsPun/ooejXnYJIlQ0F4aprkoFWMcE6K6/P6z/gC0X/z+7hxD
+hvCkxrumwTwDeywGJkS8I8PLtYOJkOBYW9vnFQ73P5PAYq9a04LjDG2c+5FMlGsI
+VceGFtE1Bg0UC0ervURSa7GUInANtUPAtUttk70s1zJuNleYEXs0duTWzYVZZsZ0
+8qcPICfz2b17whmiFh7AaE0ffL6xtGQSFfUB9ohDvJdQ8nwVs2XzHflcb4BlPJj1
+4/tcbLGoGQZ6qoPe572p2bCSZLFd2sDueyY9cZhcZuBFEEkDXpkumaBwPNhH2epl
+3u8PuN0uRmuzCazrkPbr6cIYAdvu2TsmhJrqS1Uuz4lg9enPWzjBlX8lPCsi30ik
+xbvGfN7aVaDzR2X3an5rZvES6Ak/i+kYmuyb3QwhsogflZa8y3T9gN5KahVkwdW3
+0bAwMjdPyGwnawB432Cx2JrVsdeqVR3vVkLnvmiHSgki2sFl/4gNGU4DwdZFkNb5
++WJA5+nldwnR7FrYiqzi
+=SZJW
-----END PGP SIGNATURE-----
diff --git a/www-apps/moodle/moodle-2.5.9.ebuild b/www-apps/moodle/moodle-2.5.9.ebuild
new file mode 100644
index 000000000000..f0d87571f704
--- /dev/null
+++ b/www-apps/moodle/moodle-2.5.9.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.5.9.ebuild,v 1.1 2014/11/09 14:12:19 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.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
+}
diff --git a/www-apps/moodle/moodle-2.6.6.ebuild b/www-apps/moodle/moodle-2.6.6.ebuild
new file mode 100644
index 000000000000..39d8501df94b
--- /dev/null
+++ b/www-apps/moodle/moodle-2.6.6.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.6.6.ebuild,v 1.1 2014/11/09 14:12:19 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.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
+}
diff --git a/www-apps/moodle/moodle-2.7.3.ebuild b/www-apps/moodle/moodle-2.7.3.ebuild
new file mode 100644
index 000000000000..800573a5bfdf
--- /dev/null
+++ b/www-apps/moodle/moodle-2.7.3.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.7.3.ebuild,v 1.1 2014/11/09 14:12:19 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.4.4[${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
+}