summaryrefslogtreecommitdiff
path: root/www-apps/lxr
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /www-apps/lxr
reinit the tree, so we can have metadata
Diffstat (limited to 'www-apps/lxr')
-rw-r--r--www-apps/lxr/Manifest8
-rw-r--r--www-apps/lxr/files/lxr-0.9.8-initdb-mysql.patch13
-rw-r--r--www-apps/lxr/files/postinstall-en.txt44
-rw-r--r--www-apps/lxr/files/reconfig21
-rw-r--r--www-apps/lxr/lxr-0.9.8-r1.ebuild85
-rw-r--r--www-apps/lxr/metadata.xml11
6 files changed, 182 insertions, 0 deletions
diff --git a/www-apps/lxr/Manifest b/www-apps/lxr/Manifest
new file mode 100644
index 000000000000..7d33d9b0055b
--- /dev/null
+++ b/www-apps/lxr/Manifest
@@ -0,0 +1,8 @@
+AUX lxr-0.9.8-initdb-mysql.patch 484 SHA256 2ebeaaa9c10f2953b159fe99206a7eabf618cdc350e27d8ed52d56a4bc8d9241 SHA512 616a819fdd899bbac114dcebe42864f16e7b17e81f07be915ae36c9dfac4d621e960d5901a253d6e13d4e16440eb84702784b66ba1922a0cba72afea1f896da4 WHIRLPOOL bf6360342dc499178979f85d0dcbbb852a4d08a8d06e50f602ffacee49eea0f35dfa50350151d2db9730d2d976d02862ecb4e408042b1dac2146a62619375faa
+AUX postinstall-en.txt 1351 SHA256 1c5ccbde33bf200f727c53a87f67499328f140b64e8821e50065c872fe8b72f2 SHA512 4730fcc56b8a775d5922883906f9db8ead7a0f3beb8a46ceeb451f8ba273e823fbe328b227da72f39a9dfa926cd93b77c5d27c0d1ba2730afec0c570b1da0006 WHIRLPOOL 10b571d9605cd9b927ecfcc0383ae080b9604f6b1e59ce89deaa5331568a4b58380fb67d7b8391d967acc82e457701bf5e43706186d3e94fa8b2211895eb3e0a
+AUX reconfig 357 SHA256 395a8d5013e87e13e6701c8b1bbc889978cc92186ebe3569e2b1bee9f96b78a7 SHA512 b218ddf830fc1412ab95bd53377f07b76209b2dd7640654618e937355efd716f2374a0a18f97e8f92c06619f8aed6bbc311eb93541ebf088437e40250288f8cd WHIRLPOOL 0365b1faa0c266d8c3369eaaf2808ffd6ee55ef9dcc303a425a5a661b3eba239e2f807bbeecdf33a4ab35c26d87eea536e87f7c31ebc72f2f5ac15b68c228b2d
+DIST lxr-0.9.8.tgz 104246 SHA256 2caff9447cc2ef1f82d96ce5a2fc4a0358f2d12de52d73a91f29ae5119db4bf5 SHA512 2ee9965448edc63a35a3c9d51b2e22c142e5e0aed8e487a590ad3e8a9f840f94fbe38736fe139fb02941ab4e5c891821460b0f32b56a52bf295988c6ef432318 WHIRLPOOL e25bc692b08666402e8ef09b9f464811b7d49bbe7ca2597d35e3d9f3dbe2b4bb285ae52e748b86b11327f92a491863ede9030ba914f6f8e3a2251ea3f1b8859c
+EBUILD lxr-0.9.8-r1.ebuild 2076 SHA256 4fa9119a2675b53809c42b1faa260dbb375464b96de9b863ba45babefae288c1 SHA512 98affe97bfeddef0ae122190926595098f153bf1e669a42880b884f8c69452dde444143fc22996d42ef99ebc7ad7e32a859ee9071e6060274a38308acbd5e54c WHIRLPOOL 7d2fbe929606b3eb8c989ffc9ed8509dc552804b9eba34bc2637de0b7281f4bb923c5fc53f9da2dd025a16aeaa9221afd25d4e5c21b39513a38f645981d0076d
+MISC ChangeLog 2615 SHA256 26e41f38ca9c8b83b4dc3b8071a9fafb24ba8794f9cf6c6dd84ec6a4ffa90e47 SHA512 8040fa4a1ebcd34bd13f1058f8193d7a2b47a4feda1d36fa4ae4349e84beb9cbc2a3f2ae1cf75865ff442bad604a99ee7802b4389131ed888aa2aed97b342199 WHIRLPOOL 3813cd74c892c11940c69c0c7a2446c3aae96239d3c3abef9f413940afa5cf0ece66698f4d5da09a9c6e8c25cc69a276d24e5b568aedbcf6c5d8618c3e6d31c7
+MISC ChangeLog-2015 4430 SHA256 47049a2a339a6a3c89a6d7b7638bf122eafefa14bcc05cdb067cac07e60ad615 SHA512 eee027a241ed1634f874110d35dc9abb073d187dbb4c15ee1f234d81a3e47a618f811f017fbd7c1692358b1fbb4e4e6a7228c7f20f95e92821240e7c2683130b WHIRLPOOL f4e9a835548fb04a3b5ad19beadadc51c7ab5a41a8c182a0095e3cfcb7136fd935a062c6b2956de9d1cc0f8009b8afddfb5b1125ff86d2a9ad769a01eed18e9e
+MISC metadata.xml 323 SHA256 507b6903d5c7f71fd214c781a9699d545c2b17380389c343b4beb0925b01a47b SHA512 2010845b78056b6e51326ad0a3c8bd88152f20a2799ba14c4cbffb52374e5d81135a6972b6a16446f3c8ee456169dea9dc717d5aee452636d7012152991666c0 WHIRLPOOL 11fab9dfab5b56601cd9ceb6c753f030db7fe3cc767ac92538eb660413d7fadcd7f657cc50b8fc783e5d8c92670251a76bada87ecc32afcd28ef8603f1b7d47b
diff --git a/www-apps/lxr/files/lxr-0.9.8-initdb-mysql.patch b/www-apps/lxr/files/lxr-0.9.8-initdb-mysql.patch
new file mode 100644
index 000000000000..f28604683781
--- /dev/null
+++ b/www-apps/lxr/files/lxr-0.9.8-initdb-mysql.patch
@@ -0,0 +1,13 @@
+--- initdb-mysql 2004-07-20 11:31:24.000000000 -0400
++++ initdb-mysql.patched 2006-01-26 15:41:43.000000000 -0500
+@@ -34,8 +34,8 @@ create table lxr_indexes (
+
+ create table lxr_releases
+ (fileid int not null references lxr_files,
+- releaseid char(255) binary not null,
+- primary key (fileid,releaseid)
++ `releaseid` char(255) binary not null,
++ primary key (fileid,`releaseid`)
+ );
+
+ create table lxr_usage
diff --git a/www-apps/lxr/files/postinstall-en.txt b/www-apps/lxr/files/postinstall-en.txt
new file mode 100644
index 000000000000..07412c4da554
--- /dev/null
+++ b/www-apps/lxr/files/postinstall-en.txt
@@ -0,0 +1,44 @@
+0. Create a db for lxr:
+
+ MySQL: run mysql and read in the initdb file using:
+ \. ${MY_SQLSCRIPTSDIR}/mysql/${PVR}_create.sql
+
+ PostgreSQL:
+ createuser lxr
+ createdb -U lxr lxr
+ psql -U lxr lxr
+ \i ${MY_SQLSCRIPTSDIR}/postgresql/${PVR}_create.sql
+
+1. Edit ${MY_INSTALLDIR}/lxr.conf and set:
+ - db settings
+ - 'v'
+ - 'sourceroot'
+ - 'graphicfile'
+ - 'filetype'
+ - 'incprefix'
+
+2. If you want to use CVS, also set:
+ 'range' => sub { return
+ ($files->allreleases($LXR::Common::pathname),
+ $files->allrevisions($LXR::Common::pathname))
+ }, # deferred function call.
+
+ You should also set the default version retrieved to a version that really
+ does exist otherwise you will receive errors when generating your index.
+
+ A good value for the default version is head.
+ 'default' => 'head'
+ Set 'sourceroot' and 'sourcerootname'.
+
+3. If you want to use swish-e:
+ Create a directory for the swish index files to go in, and put the
+ path of this directory in the 'swishdir' variable.
+
+4. An .htaccess file has been installed into ${MY_INSTALLDIR}. Please note that
+you must take special care not to make lxr.conf visible to the world. If you
+are not using mod_perl, use .htaccess_cgi instead.
+
+5. Create the index:
+ ${MY_INSTALLDIR}/genxref --url http://${VHOST_HOSTNAME}${VHOST_APPDIR}
+
+6. Browse to http://${VHOST_HOSTNAME}${VHOST_APPDIR}/source
diff --git a/www-apps/lxr/files/reconfig b/www-apps/lxr/files/reconfig
new file mode 100644
index 000000000000..e9e2f47b3f69
--- /dev/null
+++ b/www-apps/lxr/files/reconfig
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+die() {
+ echo "#####"
+ echo "$@"
+ echo "#####"
+ exit 1
+}
+
+if [[ $1 == "install" ]] ; then
+ cd "${MY_INSTALLDIR}" || die
+ files="lxr.conf $(ls ._cfg*lxr.conf 2>/dev/null)"
+ sed -i \
+ -e "s|/lxr|${VHOST_APPDIR}|" \
+ -e "s|192.168.1.3/lxr|${VHOST_HOSTNAME}${VHOST_APPDIR}|" \
+ ${files} || die
+elif [[ $1 = "clean" ]] ; then
+ echo $1
+fi
+
+exit 0
diff --git a/www-apps/lxr/lxr-0.9.8-r1.ebuild b/www-apps/lxr/lxr-0.9.8-r1.ebuild
new file mode 100644
index 000000000000..69967becba38
--- /dev/null
+++ b/www-apps/lxr/lxr-0.9.8-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit perl-module webapp multilib eutils depend.apache
+
+DESCRIPTION="general purpose source code indexer and cross-referener with a web-based frontend"
+HOMEPAGE="https://sourceforge.net/projects/lxr"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ppc ~x86"
+IUSE="cvs mysql postgres"
+WEBAPP_MANUAL_SLOT="yes"
+SLOT="0"
+
+RDEPEND="dev-util/ctags
+ dev-lang/perl
+ dev-perl/DBI
+ dev-perl/File-MMagic
+ cvs? ( dev-vcs/rcs )
+ postgres? ( dev-perl/DBD-Pg )
+ mysql? ( dev-perl/DBD-mysql )"
+
+need_apache2
+
+pkg_setup() {
+ webapp_pkg_setup
+}
+
+src_prepare() {
+
+ epatch "${FILESDIR}/${PN}-0.9.8-initdb-mysql.patch"
+
+ sed -i \
+ -e 's|/usr/local/bin/swish-e|/usr/bin/swish-e|' \
+ -e 's|/usr/bin/ctags|/usr/bin/exuberant-ctags|' \
+ -e "s|'glimpse|#'glimpse|g" \
+ -e "s:/path/to/lib:${VENDOR_LIB}:" \
+ templates/lxr.conf || die "sed failed"
+ sed -i \
+ -e 's|Apache::Registry|ModPerl::PerlRun|' \
+ .htaccess-apache1 || die "sed failed"
+ sed -i \
+ -e 's|require Local;|require LXR::Local;|' \
+ -e 's|use Local;|use LXR::Local;|' \
+ -e 's|package Local;|package LXR::Local;|' \
+ Local.pm lib/LXR/Common.pm diff find ident search source || die "sed failed"
+}
+
+# prevent eclasses from overriding this
+src_compile() { :; }
+
+src_install() {
+ perl_set_version
+ webapp_src_preinst
+
+ insinto "${VENDOR_LIB}"
+ doins -r lib/LXR
+ insinto "${VENDOR_LIB}"/LXR
+ doins Local.pm
+
+ dodoc BUGS CREDITS.txt ChangeLog HACKING INSTALL notes .htaccess* swish-e.conf
+
+ exeinto "${MY_HTDOCSDIR}"
+ doexe diff find genxref ident search source
+ insinto "${MY_HTDOCSDIR}"
+ doins .htaccess* templates/*
+
+ webapp_configfile "${MY_HTDOCSDIR}"/lxr.conf "${MY_HTDOCSDIR}"/.htaccess-apache1
+ webapp_sqlscript mysql initdb-mysql
+ webapp_sqlscript postgresql initdb-postgres
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+ webapp_hook_script "${FILESDIR}"/reconfig
+ webapp_src_install
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+}
+
+pkg_prerm() {
+ webapp_pkg_prerm
+}
diff --git a/www-apps/lxr/metadata.xml b/www-apps/lxr/metadata.xml
new file mode 100644
index 000000000000..b1a40455a1f2
--- /dev/null
+++ b/www-apps/lxr/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>web-apps@gentoo.org</email>
+ <name>Gentoo Webapps</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lxr</remote-id>
+ </upstream>
+</pkgmetadata>