lxr-0.9.8-r1.ebuild 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit perl-module webapp multilib eutils depend.apache
  5. DESCRIPTION="general purpose source code indexer and cross-referener with a web-based frontend"
  6. HOMEPAGE="https://sourceforge.net/projects/lxr"
  7. SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
  8. LICENSE="GPL-2"
  9. KEYWORDS="~amd64 ppc ~x86"
  10. IUSE="cvs mysql postgres"
  11. WEBAPP_MANUAL_SLOT="yes"
  12. SLOT="0"
  13. RDEPEND="dev-util/ctags
  14. dev-lang/perl
  15. dev-perl/DBI
  16. dev-perl/File-MMagic
  17. cvs? ( dev-vcs/rcs )
  18. postgres? ( dev-perl/DBD-Pg )
  19. mysql? ( dev-perl/DBD-mysql )"
  20. need_apache2
  21. pkg_setup() {
  22. webapp_pkg_setup
  23. }
  24. src_prepare() {
  25. epatch "${FILESDIR}/${PN}-0.9.8-initdb-mysql.patch"
  26. sed -i \
  27. -e 's|/usr/local/bin/swish-e|/usr/bin/swish-e|' \
  28. -e 's|/usr/bin/ctags|/usr/bin/exuberant-ctags|' \
  29. -e "s|'glimpse|#'glimpse|g" \
  30. -e "s:/path/to/lib:${VENDOR_LIB}:" \
  31. templates/lxr.conf || die "sed failed"
  32. sed -i \
  33. -e 's|Apache::Registry|ModPerl::PerlRun|' \
  34. .htaccess-apache1 || die "sed failed"
  35. sed -i \
  36. -e 's|require Local;|require LXR::Local;|' \
  37. -e 's|use Local;|use LXR::Local;|' \
  38. -e 's|package Local;|package LXR::Local;|' \
  39. Local.pm lib/LXR/Common.pm diff find ident search source || die "sed failed"
  40. }
  41. # prevent eclasses from overriding this
  42. src_compile() { :; }
  43. src_install() {
  44. perl_set_version
  45. webapp_src_preinst
  46. insinto "${VENDOR_LIB}"
  47. doins -r lib/LXR
  48. insinto "${VENDOR_LIB}"/LXR
  49. doins Local.pm
  50. dodoc BUGS CREDITS.txt ChangeLog HACKING INSTALL notes .htaccess* swish-e.conf
  51. exeinto "${MY_HTDOCSDIR}"
  52. doexe diff find genxref ident search source
  53. insinto "${MY_HTDOCSDIR}"
  54. doins .htaccess* templates/*
  55. webapp_configfile "${MY_HTDOCSDIR}"/lxr.conf "${MY_HTDOCSDIR}"/.htaccess-apache1
  56. webapp_sqlscript mysql initdb-mysql
  57. webapp_sqlscript postgresql initdb-postgres
  58. webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
  59. webapp_hook_script "${FILESDIR}"/reconfig
  60. webapp_src_install
  61. }
  62. pkg_postinst() {
  63. webapp_pkg_postinst
  64. }
  65. pkg_prerm() {
  66. webapp_pkg_prerm
  67. }