diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2008-02-04 08:24:04 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2008-02-04 08:24:04 +0000 |
commit | fc92b0a8af1088f7b0a740e8617e42626e88e64e (patch) | |
tree | b1be50286776921eb288d56dac7144bec0678f6f /www-apps/mod_survey | |
parent | fixed QA issues and added additional tools via use flag (diff) | |
download | gentoo-2-fc92b0a8af1088f7b0a740e8617e42626e88e64e.tar.gz gentoo-2-fc92b0a8af1088f7b0a740e8617e42626e88e64e.tar.bz2 gentoo-2-fc92b0a8af1088f7b0a740e8617e42626e88e64e.zip |
merge from webapps overlay wrt #208584
(Portage version: 2.1.4)
Diffstat (limited to 'www-apps/mod_survey')
-rw-r--r-- | www-apps/mod_survey/ChangeLog | 11 | ||||
-rw-r--r-- | www-apps/mod_survey/mod_survey-3.2.4.ebuild | 92 |
2 files changed, 55 insertions, 48 deletions
diff --git a/www-apps/mod_survey/ChangeLog b/www-apps/mod_survey/ChangeLog index ae970bf2c18d..a361f3b12b80 100644 --- a/www-apps/mod_survey/ChangeLog +++ b/www-apps/mod_survey/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for www-apps/mod_survey -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/mod_survey/ChangeLog,v 1.3 2007/07/29 17:30:56 phreak Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/mod_survey/ChangeLog,v 1.4 2008/02/04 08:24:04 hollow Exp $ + + 04 Feb 2008; Benedikt Böhm <hollow@gentoo.org> mod_survey-3.2.4.ebuild: + merge from webapps overlay wrt #208584 + + 02 Feb 2008; Jakub Moc <jakub@gentoo.org> mod_survey-3.2.4.ebuild: + Nuke unneeded apache dependency already implied by mod_perl for Bug 208584. + Fix LINGUAS handling, fix dosed, fix quoting, ebuild clean-up. 29 Jul 2007; Christian Heim <phreak@gentoo.org> mod_survey-3.2.4.ebuild: Fixing the DEPEND/RDEPEND for the move of net-www/apache to diff --git a/www-apps/mod_survey/mod_survey-3.2.4.ebuild b/www-apps/mod_survey/mod_survey-3.2.4.ebuild index 86ff9b4592ce..490c690ea658 100644 --- a/www-apps/mod_survey/mod_survey-3.2.4.ebuild +++ b/www-apps/mod_survey/mod_survey-3.2.4.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/mod_survey/mod_survey-3.2.4.ebuild,v 1.3 2007/07/29 17:30:56 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apps/mod_survey/mod_survey-3.2.4.ebuild,v 1.4 2008/02/04 08:24:04 hollow Exp $ inherit webapp @@ -10,53 +10,65 @@ SLOT="0" DESCRIPTION="XML-defined web questionnaires as a plug-in module using Apache." HOMEPAGE="http://www.modsurvey.org" KEYWORDS="~amd64 ~ppc ~x86" - IUSE="doc mysql nls postgres" + +# Note: sw is invalid LINGUAS value, it should be sv instead. +# commented out since I have zero interested in sed-ing the code +# for this screw-up. +LANGS="en de fr it" # sv +for i in ${LANGS} ; do + IUSE="${IUSE} linguas_${i}" +done + MY_PN=${PN/_/} MY_PV=${PV/_/-} S=${WORKDIR}/${PN} SRC_URI="http://www.modsurvey.org/download/tarballs/${MY_PN}-${MY_PV}.tgz -doc? ( http://www.modsurvey.org/download/tarballs/${MY_PN}-docs-${MY_PV}.tgz )" + doc? ( http://www.modsurvey.org/download/tarballs/${MY_PN}-docs-${MY_PV}.tgz )" DEPEND=">=dev-lang/perl-5.6.1" RDEPEND="${DEPEND} - >=www-servers/apache-2 >=www-apache/mod_perl-1.99 + >=www-apache/mod_perl-1.99 postgres? ( >=dev-perl/DBI-1.38 dev-perl/DBD-Pg ) mysql? ( >=dev-perl/DBI-1.38 dev-perl/DBD-mysql ) >=virtual/perl-CGI-3.0.0" LICENSE="GPL-2" pkg_setup() { - webapp_pkg_setup - - # stolen from app-admin/webalizer - # USE=nls has no real meaning if LINGUAS isn't set - if use nls && [[ -z "${LINGUAS}" ]] ; then - ewarn "you must set LINGUAS in /etc/make.conf" - ewarn "if you want to USE=nls" - die "please either set LINGUAS or do not use nls" + # unfortunatly, this program only allows for one lang, so only the first + # supported entry in LINGUAS is used + if use nls ; then + for i in ${LINGUAS} ; do + if has linguas_${i} ${IUSE} ; then + if use linguas_${i} ; then + locallang="${i}" + ewarn "Due to the limitations of this package, it will be built" + ewarn "only with ${i} LINGUAS support. If this is not what" + ewarn "you intended, please place the language you desire" + ewarn "as _first_ in the list of LINGUAS in /etc/make.conf" + ewarn + break + fi + else + einfo "LINGUAS=${i} is not supported by ${P}" + shift + fi + done fi + if [[ -z ${locallang} ]] ; then + use nls && ewarn "None of ${LINGUAS} supported, sorry. Will use English." + locallang="en" + fi + webapp_pkg_setup } src_unpack() { unpack ${A} cd "${S}" rm -f docs/LICENSE.txt + sed "s|\$lang = \"en\"|\$lang = \"${locallang}\"|" -i installer.pl sed -i "s|/usr/local/mod_survey/|${D}/usr/lib/mod_survey/|g" installer.pl use doc && unpack ${MY_PN}-docs-${PV}.tgz - - # unfortunatly, this program only allows for one lang, so only the first - # entry in LINGUAS is used - if use nls ; then - local locallang - if ! grep -q ${LINGUAS:0:2} ${FILESDIR}/language-list.txt ; then - ewarn "Language ${LINGUAS:0:2} is not supported, using English" - else - elog "Using language ${LINGUAS:0:2}" - locallang="$(grep ^${LINGUAS:0:2} ${FILESDIR}/language-list.txt)" - sed "s|\$lang = \"en\"|\$lang = \"${locallang}\"|" -i installer.pl - fi - fi } src_install() { @@ -69,28 +81,16 @@ src_install() { dodoc README.txt docs/* perl installer.pl < /dev/null > /dev/null 2>&1 - dosed /usr/lib/mod_survey/survey.conf - sed -i "s|/usr/lib/mod_survey/data/|/var/lib/mod_survey/data/|" ${D}/usr/lib/mod_survey/survey.conf - mv ${D}/usr/lib/mod_survey/survey.conf ${D}/${MY_HOSTROOTDIR}/${PN} + dosed "s|/usr/lib/mod_survey/data/|/var/lib/mod_survey/data/|" /usr/lib/mod_survey/survey.conf + + mv "${D}"/usr/lib/mod_survey/survey.conf "${D}"/${MY_HOSTROOTDIR}/${PN} + rm -rf "${D}"/usr/lib/mod_survey/webroot "${D}"/usr/lib/mod_survey/data - rm -rf ${D}/usr/lib/mod_survey/webroot ${D}/usr/lib/mod_survey/data - cp -R webroot/* ${D}/${MY_HTDOCSDIR} + cp -R webroot/* "${D}"/${MY_HTDOCSDIR} - webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt - webapp_hook_script ${FILESDIR}/reconfig + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + webapp_hook_script "${FILESDIR}"/reconfig webapp_src_install - fowners apache:apache /var/lib/mod_survey/data -} -pkg_postinst(){ - if [[ ${#LINGUAS} -gt 2 ]] && use nls ; then - ewarn - ewarn "You have more than one language in LINGUAS" - ewarn "Due to the limitations of this package, it was built" - ewarn "only with ${LINGUAS:0:2} support. If this is not what" - ewarn "you intended, please place the language you desire" - ewarn "_first_ in the list of LINGUAS in /etc/make.conf" - ewarn - fi - webapp_pkg_postinst + fowners apache:apache /var/lib/mod_survey/data } |