diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-06-30 16:53:24 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-06-30 16:53:24 +0000 |
commit | 809ce572a107af153637a6c46e7c649cd782aadc (patch) | |
tree | d30918501416ae7d6709e2b886ab37124f60a41f | |
parent | Add hunspell and toilet USE flags for rbot, remove unused snapshot USE flag, ... (diff) | |
download | gentoo-2-809ce572a107af153637a6c46e7c649cd782aadc.tar.gz gentoo-2-809ce572a107af153637a6c46e7c649cd782aadc.tar.bz2 gentoo-2-809ce572a107af153637a6c46e7c649cd782aadc.zip |
Updated live ebuild. Adds USE flags for toilet (figlet replacement) and hunspell (through ispell-compatibility interface -- use rbot-hunspell if you want full hunspell support). Configure the path to tools in the global configuration file rather than editing the plugins themselves. Set to run /bin/false when the tools are disabled.
(Portage version: 2.2_rc1/cvs/Linux 2.6.25-gentoo-r4 x86_64)
-rw-r--r-- | net-irc/rbot/ChangeLog | 12 | ||||
-rw-r--r-- | net-irc/rbot/metadata.xml | 37 | ||||
-rw-r--r-- | net-irc/rbot/rbot-9999-r10.ebuild (renamed from net-irc/rbot/rbot-9999-r9.ebuild) | 54 |
3 files changed, 74 insertions, 29 deletions
diff --git a/net-irc/rbot/ChangeLog b/net-irc/rbot/ChangeLog index b2b3a52fec84..f08c80d91af2 100644 --- a/net-irc/rbot/ChangeLog +++ b/net-irc/rbot/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-irc/rbot # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v 1.31 2008/06/23 15:46:00 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v 1.32 2008/06/30 16:53:24 flameeyes Exp $ + +*rbot-9999-r10 (30 Jun 2008) + + 30 Jun 2008; Diego Pettenò <flameeyes@gentoo.org> metadata.xml, + -rbot-9999-r9.ebuild, +rbot-9999-r10.ebuild: + Updated live ebuild. Adds USE flags for toilet (figlet replacement) and + hunspell (through ispell-compatibility interface -- use rbot-hunspell if + you want full hunspell support). Configure the path to tools in the global + configuration file rather than editing the plugins themselves. Set to run + /bin/false when the tools are disabled. *rbot-9999-r9 (23 Jun 2008) diff --git a/net-irc/rbot/metadata.xml b/net-irc/rbot/metadata.xml index 29eab6ab0522..bd801cd84a2f 100644 --- a/net-irc/rbot/metadata.xml +++ b/net-irc/rbot/metadata.xml @@ -6,11 +6,6 @@ <email>flameeyes@gentoo.org</email> </maintainer> <use> - <flag name="snapshot" restrict="=net-irc/rbot-9999"> - Name the generated Ruby Gem in a proper manner to be used for a - snapshot ebuild. The format used is 9998_pre followed by the SVN - checked out revision number. - </flag> <flag name="timezone"> Add dependency over <pkg>dev-ruby/tzinfo</pkg> to enable the "time" plugin for rbot. If the USE flag is disabled the plugin is also @@ -19,7 +14,14 @@ <flag name="aspell"> Use aspell instead of ispell in the "spell" plugin for rbot. The vanilla plugin uses ispell, but enabling this flag makes it use - the ispell interface for aspell instead. + the ispell interface from aspell instead. + </flag> + <flag name="hunspell"> + Use hunspell instead of ispell in the "spell" plugin for rbot. The + vanilla plugin uses ispell, but enabling this flag makes it use + the ispell interface from hunspell instead. It's overridden by the + aspell USE flag. For native hunspell support check the + rbot-hunspell plugin. </flag> <flag name="translator"> Add dependency over <pkg>dev-ruby/mechanize</pkg>, which is needed @@ -32,8 +34,8 @@ disabled the plugin is also disabled by default. </flag> <flag name="nls"> - Add dependency over <pkg>dev-ruby/ruby-gettext</pkg>, which is - needed for the translation of the bot's messages to work. + Build and install translation for the messages coming from the bot + and its plugins (through <pkg>dev-ruby/ruby-gettext</pkg>). </flag> <flag name="dict"> Add dependency over <pkg>dev-ruby/ruby-dict</pkg>, which is needed @@ -41,24 +43,31 @@ the plugin is also disabled by default. </flag> <flag name="figlet"> - Add dependency over <pkg>app-misc/figlet</pkg>, which is needed to - enable the "figlet" plugin for rbot. If the USE flag is disable - dthe plugin is also disabled by default. + Add dependency over <pkg>app-misc/figlet</pkg>, which is used by + the "figlet" plugin for rbot. If the USE flag is disabled the + plugin will be unable to use figlet; if toilet is also disabled, + the plugin will be disabled. + </flag> + <flag name="toilet"> + Add dependency over <pkg>app-misc/toilet</pkg>, which is used by + the "figlet" plugin for rbot. If the USE flag is disabled the + plugin will be unable to use toilet; if figlet is also disabled, + the plugin will be disabled. </flag> <flag name="fortune"> Add dependency over <pkg>games-misc/fortune-mod</pkg>, which is needed to enable the "fortune" plugin for rbot. If the USE flag is - disable dthe plugin is also disabled by default. + disabled the plugin is also disabled by default. </flag> <flag name="cal"> Add dependency over a package providing the /usr/bin/cal command, which is needed to enable the "cal" plugin for rbot. If the USE - flag is disable dthe plugin is also disabled by default. + flag is disabled the plugin is also disabled by default. </flag> <flag name="host"> Add dependency over <pkg>net-dns/bind-tools</pkg> (providing /usr/bin/host), which is needed to enable the "host" plugin for - rbot. If the USE flag is disable dthe plugin is also disabled by + rbot. If the USE flag is disabled the plugin is also disabled by default. </flag> </use> diff --git a/net-irc/rbot/rbot-9999-r9.ebuild b/net-irc/rbot/rbot-9999-r10.ebuild index aca7a4e6f24c..ac423ca34837 100644 --- a/net-irc/rbot/rbot-9999-r9.ebuild +++ b/net-irc/rbot/rbot-9999-r10.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/rbot-9999-r9.ebuild,v 1.1 2008/06/23 15:46:00 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/rbot-9999-r10.ebuild,v 1.1 2008/06/30 16:53:24 flameeyes Exp $ inherit ruby eutils @@ -13,7 +13,7 @@ LICENSE="as-is" SLOT="0" KEYWORDS="" IUSE="spell aspell timezone translator shorturl nls dict figlet - fortune cal host nls" + fortune cal host nls toilet hunspell" ILINGUAS="zh_CN zh_TW ru nl de fr it ja" for lang in $ILINGUAS; do @@ -25,13 +25,17 @@ RDEPEND=">=virtual/ruby-1.8 timezone? ( dev-ruby/tzinfo ) spell? ( aspell? ( app-text/aspell ) - !aspell? ( app-text/ispell ) + !aspell? ( + hunspell? ( app-text/hunspell ) + !hunspell? ( app-text/ispell ) + ) ) translator? ( dev-ruby/mechanize ) shorturl? ( dev-ruby/shorturl ) nls? ( dev-ruby/ruby-gettext ) dict? ( dev-ruby/ruby-dict ) figlet? ( app-misc/figlet ) + toilet? ( app-misc/toilet ) fortune? ( games-misc/fortune-mod ) cal? ( || ( sys-apps/util-linux sys-freebsd/freebsd-ubin ) ) host? ( net-dns/bind-tools ) @@ -55,8 +59,6 @@ src_unpack() { git_src_unpack cd "${S}" - sed -i -e "/s.version =/s:'.\+':'9999':" Rakefile \ - || die "Unable to fix Rakefile version." sed -i -e '/\$version=/s:".\+":"'9999'":' bin/rbot \ || die "Unable to fix rbot script version." } @@ -69,26 +71,47 @@ src_compile() { use $1 && return disable_rbot_plugin "$2" } + rbot_conf() { + echo "$1: $2" >> "${T}"/rbot.conf + } + use_rbot_conf_path() { + use "$1" \ + && rbot_conf "$2" "$3" \ + || rbot_conf "$2" /bin/false + } - if ! use spell; then - disable_rbot_plugin spell || die "Unable to disable spell plugin" + local spell_program="/usr/bin/ispell" + if use !spell; then + disable_rbot_plugin spell + spell_program="/bin/false" elif use aspell; then - # This is not officially supported, but as ispell is quite a - # bad piece of code, at least give an opportunity to use - # something that works a bit better. - sed -i -e 's:ispell:ispell-aspell:' \ - "${S}"/data/rbot/plugins/spell.rb \ - || die "Unable to replace ispell with aspell." + spell_program="/usr/bin/ispell-aspell" + elif use hunspell; then + spell_program="/usr/bin/hunspell -i" + fi + + rbot_conf spell.program "${spell_program}" + + if use !figlet && use !toilet; then + disable_rbot_plugin figlet fi + use_rbot_conf_path figlet figlet.path /usr/bin/figlet + use_rbot_conf_path toilet toilet.path /usr/bin/toilet + use_rbot_plugin timezone time use_rbot_plugin translator translator use_rbot_plugin shorturl shortenurls use_rbot_plugin dict dictclient - use_rbot_plugin figlet figlet + use_rbot_plugin fortune fortune + use_rbot_conf_path fortune fortune.path /usr/bin/fortune + use_rbot_plugin cal cal + use_rbot_conf_path cal cal.path /usr/bin/cal + use_rbot_plugin host host + use_rbot_conf_path host host.path /usr/bin/host local rbot_datadir="${D}"/usr/share/rbot @@ -140,6 +163,9 @@ src_install() { diropts -o rbot -g nobody -m 0700 keepdir /var/lib/rbot + insinto /etc + doins "${T}"/rbot.conf + newinitd "${FILESDIR}/rbot.init" rbot newconfd "${FILESDIR}/rbot.conf" rbot } |