summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2015-10-18 14:18:04 +0000
committerPatrice Clement <monsieurp@gentoo.org>2015-10-18 14:18:04 +0000
commit9613ea01347ed8b791c20863a030990c8be8900d (patch)
treec191ff79a21e2c6440842de5788fc6f6cd984e37 /net-p2p/i2p
parentapp-shells/pdmenu: Drop only the old ebuild as patch is still needed (diff)
downloadgentoo-9613ea01347ed8b791c20863a030990c8be8900d.tar.gz
gentoo-9613ea01347ed8b791c20863a030990c8be8900d.tar.bz2
gentoo-9613ea01347ed8b791c20863a030990c8be8900d.zip
net-p2p/i2p: Add missing dependencies and mend wrong paths in patch. Fixes bug 563372.
Package-Manager: portage-2.2.20.1 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'net-p2p/i2p')
-rw-r--r--net-p2p/i2p/files/i2p-0.9.22_fix-paths.patch69
-rw-r--r--net-p2p/i2p/i2p-0.9.22-r1.ebuild103
-rw-r--r--net-p2p/i2p/i2p-0.9.22.ebuild5
3 files changed, 121 insertions, 56 deletions
diff --git a/net-p2p/i2p/files/i2p-0.9.22_fix-paths.patch b/net-p2p/i2p/files/i2p-0.9.22_fix-paths.patch
index d1c207f10e96..e189016be081 100644
--- a/net-p2p/i2p/files/i2p-0.9.22_fix-paths.patch
+++ b/net-p2p/i2p/files/i2p-0.9.22_fix-paths.patch
@@ -61,17 +61,18 @@
# Having IPv6 enabled can cause problems with certain configurations. Changing the
# next value to true may help.
---- wrapper.config 2015-03-15 02:02:29.022408661 -0700
-+++ wrapper.config 2015-03-15 02:21:50.666238909 -0700
-@@ -60,13 +60,17 @@
+--- wrapper.config.orig 2015-10-18 13:31:29.410486000 +0000
++++ wrapper.config 2015-10-18 13:48:05.823486000 +0000
+@@ -60,13 +60,18 @@
# classes, or all the classes of i2p.jar, are in a different directory).
# Be sure there are no other duplicate classes.
#
-wrapper.java.classpath.1=$INSTALL_PATH/lib/*.jar
+wrapper.java.classpath.1=/usr/share/i2p/lib/*.jar
-+wrapper.java.classpath.2=/usr/share/jakarta-jstl/lib/*.jar
-+wrapper.java.classpath.3=/usr/share/java-service-wrapper/lib/*.jar
-+wrapper.java.classpath.4=/usr/share/bcprov/lib/*.jar
++wrapper.java.classpath.2=/usr/share/tomcat-jstl-impl/lib/*.jar
++wrapper.java.classpath.3=/usr/share/tomcat-jstl-spec/lib/*.jar
++wrapper.java.classpath.4=/usr/share/java-service-wrapper/lib/*.jar
++wrapper.java.classpath.5=/usr/share/bcprov-1.50/lib/*.jar
# uncomment this to use the system classpath as well (e.g. to get tools.jar)
# wrapper.java.classpath.2=%CLASSPATH%
@@ -84,54 +85,12 @@
# Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
wrapper.java.additional.auto_bits=TRUE
-@@ -76,7 +80,7 @@
+@@ -74,7 +79,7 @@
+ # Java Additional Parameters
+ # Numbers must be consecutive (except for stripquotes)
wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt
- wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true
- wrapper.java.additional.3=-Dorg.mortbay.xml.XmlParser.NotValidating=true
--wrapper.java.additional.4=-Di2p.dir.base="$INSTALL_PATH"
-+wrapper.java.additional.4=-Di2p.dir.base="/usr/share/i2p"
- wrapper.java.additional.4.stripquotes=TRUE
+-wrapper.java.additional.2=-Di2p.dir.base="$INSTALL_PATH"
++wrapper.java.additional.2=-Di2p.dir.base="/usr/share/i2p"
+ wrapper.java.additional.2.stripquotes=TRUE
- # On some IPv6 enabled systems, I2P and other network-enabled java applications
-@@ -96,11 +100,11 @@
- # wrapper.java.additional.7=-Dorg.mortbay.util.FileResource.checkAliases=false
- # PORTABLE installation:
- # uncomment the following
--#wrapper.java.additional.7=-Di2p.dir.pid="$INSTALL_PATH"
-+#wrapper.java.additional.7=-Di2p.dir.pid="/usr/share/i2p"
- #wrapper.java.additional.7.stripquotes=TRUE
--#wrapper.java.additional.8=-Di2p.dir.temp="$INSTALL_PATH"
-+#wrapper.java.additional.8=-Di2p.dir.temp="/usr/share/i2p"
- #wrapper.java.additional.8.stripquotes=TRUE
--#wrapper.java.additional.9=-Di2p.dir.config="$INSTALL_PATH"
-+#wrapper.java.additional.9=-Di2p.dir.config="/usr/share/i2p"
- #wrapper.java.additional.9.stripquotes=TRUE
- #
- # Uncomment this for better performance.
-@@ -147,7 +151,7 @@
- # PORTABLE installation:
- # Use the following instead. I2P will find the logfile here,
- # no need for a wrapper.java.additional line too.
--#wrapper.logfile=$INSTALL_PATH/wrapper.log
-+#wrapper.logfile=/usr/share/i2p/wrapper.log
-
- # Format of output for the log file.
- # The format consists of the tokens 'L' for log level, 'P' for prefix, 'D' for thread,
-@@ -220,7 +224,7 @@
- #wrapper.java.pidfile=$SYSTEM_java_io_tmpdir/routerjvm.pid
- # PORTABLE installation:
- # Use the following instead.
--#wrapper.java.pidfile=$INSTALL_PATH/routerjvm.pid
-+#wrapper.java.pidfile=/usr/share/i2p/routerjvm.pid
- # pid file for the service monitoring the JVM
- #
- # From i2prouter:
-@@ -238,7 +242,7 @@
- #wrapper.pidfile=$SYSTEM_java_io_tmpdir/i2p.pid
- # PORTABLE installation:
- # Use the following instead.
--#wrapper.pidfile=$INSTALL_PATH/i2p.pid
-+#wrapper.pidfile=/usr/share/i2p/i2p.pid
-
- #********************************************************************
- # Wrapper General Properties
+ # Prevent the JVM from exporting stats (and thereby causing hundreds of
diff --git a/net-p2p/i2p/i2p-0.9.22-r1.ebuild b/net-p2p/i2p/i2p-0.9.22-r1.ebuild
new file mode 100644
index 000000000000..879f6320e1ce
--- /dev/null
+++ b/net-p2p/i2p/i2p-0.9.22-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils java-pkg-2 java-ant-2 systemd user
+
+DESCRIPTION="A privacy-centric, anonymous network."
+HOMEPAGE="https://geti2p.net"
+SRC_URI="https://download.i2p2.de/releases/${PV}/i2psource_${PV}.tar.bz2"
+
+LICENSE="Apache-2.0 Artistic BSD CC-BY-2.5 CC-BY-3.0 CC-BY-SA-3.0 EPL-1.0 GPL-2 GPL-3 LGPL-2.1 LGPL-3 MIT public-domain WTFPL-2"
+SLOT="0"
+
+# Until the deps reach other arches
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+# dev-java/ant-core is automatically added due to java-ant-2.eclass
+CDEPEND="dev-java/jrobin:0
+ dev-java/slf4j-api:0
+ dev-java/java-service-wrapper:0"
+
+DEPEND="${CDEPEND}
+ dev-java/eclipse-ecj:*
+ dev-libs/gmp:*
+ nls? ( sys-devel/gettext )
+ >=virtual/jdk-1.6"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.6"
+
+EANT_BUILD_TARGET="pkg"
+EANT_GENTOO_CLASSPATH="java-service-wrapper,jrobin,slf4j-api"
+
+pkg_setup() {
+ enewgroup i2p
+ enewuser i2p -1 -1 /var/lib/i2p i2p -m
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ java-ant_rewrite-classpath
+}
+
+src_prepare() {
+ # We're on GNU/Linux, we don't need .exe files
+ echo "noExe=true" > override.properties
+ if ! use nls; then
+ echo "require.gettext=false" >> override.properties
+ fi
+}
+
+src_install() {
+ # Cd into pkg-temp.
+ cd "${S}/pkg-temp" || die
+
+ # Apply patch.
+ epatch "${FILESDIR}/${P}_fix-paths.patch"
+
+ # Using ${D} here results in an error. Docs say use $ROOT
+ i2p_home="${ROOT}/usr/share/i2p"
+
+ # This is ugly, but to satisfy all non-system .jar dependencies, jetty and
+ # systray4j would need to be packaged. The former would be too large a task
+ # for an unseasoned developer and systray4j hasn't been touched in over 10
+ # years. This seems to be the most pragmatic solution
+ java-pkg_jarinto "${i2p_home}/lib"
+ for i in BOB commons-el commons-logging i2p i2psnark i2ptunnel \
+ jasper-compiler jasper-runtime javax.servlet jbigi jetty* mstreaming org.mortbay.* router* \
+ sam standard streaming systray systray4j; do
+ java-pkg_dojar lib/${i}.jar
+ done
+
+ # Set up symlinks for binaries
+ dosym /usr/bin/wrapper ${i2p_home}/i2psvc
+ dosym ${i2p_home}/i2prouter /usr/bin/i2prouter
+ dosym ${i2p_home}/eepget /usr/bin/eepget
+
+ # Install main files and basic documentation
+ exeinto ${i2p_home}
+ insinto ${i2p_home}
+ #doins blocklist.txt hosts.txt *.config
+ doexe eepget i2prouter runplain.sh
+ dodoc history.txt INSTALL-headless.txt LICENSE.txt
+ doman man/*
+
+ # Install other directories
+ doins -r certificates docs eepsite geoip scripts
+ dodoc -r licenses
+ java-pkg_dowar webapps/*.war
+
+ # Install daemon files
+ newinitd "${FILESDIR}/i2p.initd" i2p
+ systemd_newunit "${FILESDIR}"/i2p.service i2p.service
+}
+
+pkg_postinst() {
+ elog "Custom configuration belongs in /var/lib/i2p/.i2p/ to avoid being overwritten."
+ elog "I2P can be configured through the web interface at http://localhost:7657/index.jsp"
+}
diff --git a/net-p2p/i2p/i2p-0.9.22.ebuild b/net-p2p/i2p/i2p-0.9.22.ebuild
index 879f6320e1ce..d5c00b67c5fb 100644
--- a/net-p2p/i2p/i2p-0.9.22.ebuild
+++ b/net-p2p/i2p/i2p-0.9.22.ebuild
@@ -19,7 +19,10 @@ IUSE="nls"
# dev-java/ant-core is automatically added due to java-ant-2.eclass
CDEPEND="dev-java/jrobin:0
+ dev-java/bcprov:1.50
dev-java/slf4j-api:0
+ dev-java/tomcat-jstl-impl:0
+ dev-java/tomcat-jstl-spec:0
dev-java/java-service-wrapper:0"
DEPEND="${CDEPEND}
@@ -32,7 +35,7 @@ RDEPEND="${CDEPEND}
>=virtual/jre-1.6"
EANT_BUILD_TARGET="pkg"
-EANT_GENTOO_CLASSPATH="java-service-wrapper,jrobin,slf4j-api"
+EANT_GENTOO_CLASSPATH="java-service-wrapper,jrobin,slf4j-api,tomcat-jstl-impl,tomcat-jstl-spec"
pkg_setup() {
enewgroup i2p