diff options
author | Thomas Sachau <tommy@gentoo.org> | 2019-03-17 14:09:57 +0100 |
---|---|---|
committer | Thomas Sachau <tommy@gentoo.org> | 2019-03-17 14:10:32 +0100 |
commit | a8920b39da93922d27ae9cef808bf50c089da543 (patch) | |
tree | d4bad8b04e04a1b93b1ccc9e3b9ba44f4ecc2232 /net-p2p/freenet | |
parent | media-gfx/hugin: Drop 2016.2.0, 2017.0 (diff) | |
download | gentoo-a8920b39da93922d27ae9cef808bf50c089da543.tar.gz gentoo-a8920b39da93922d27ae9cef808bf50c089da543.tar.bz2 gentoo-a8920b39da93922d27ae9cef808bf50c089da543.zip |
net-p2p/freenet: Version bump
Package-Manager: Portage-2.3.62, Repoman-2.3.12
RepoMan-Options: --force
Signed-off-by: Thomas Sachau <tommy@gentoo.org>
Diffstat (limited to 'net-p2p/freenet')
-rw-r--r-- | net-p2p/freenet/Manifest | 1 | ||||
-rw-r--r-- | net-p2p/freenet/files/0.7.5_p1483-ext.patch | 22 | ||||
-rw-r--r-- | net-p2p/freenet/files/build-clean.xml | 421 | ||||
-rw-r--r-- | net-p2p/freenet/files/build.properties | 95 | ||||
-rw-r--r-- | net-p2p/freenet/freenet-0.7.5_p1483.ebuild | 165 |
5 files changed, 704 insertions, 0 deletions
diff --git a/net-p2p/freenet/Manifest b/net-p2p/freenet/Manifest index f79179c52659..f1f51c4439ba 100644 --- a/net-p2p/freenet/Manifest +++ b/net-p2p/freenet/Manifest @@ -1,5 +1,6 @@ DIST freenet-0.7.5_p1478.zip 5082260 BLAKE2B 4f08b5eff361b0666647f67152fb9709d35ca6c5996a0ac1e899de16510d2f25afb89c8af150a4f9d0785da25ff5db2e80fc2e851e0c42c763b72952d456bde1 SHA512 4147ef68e9c61a7d90c378cd9a3896933c4b931c31caf95107d1e188b4bf51d187381200d262fc1adaf939be7b0ea0eec9f795a09c897c1d20765325ac5faf03 DIST freenet-0.7.5_p1480.zip 5099654 BLAKE2B cdbe32e90f61f664c0aff8dea81a68a46ced7ba5aef3068243d99a1b189597dfc4126c6e83c0fd4de547d6d076939c601ed3d3f8ec4fa6d4a5dd5d6ef5322069 SHA512 8e6c11014554cba0591f5f98a6af22660643a2d62c46fb003ec16d1dd3643178300081bef78083d87608c012f232f46f71fdd201d031248bf28e91899f71547e +DIST freenet-0.7.5_p1483.zip 5548445 BLAKE2B 275e9d86d5d2aff94c227d774ce8853a0aeefb8963d6365f684e5e9b07ee4ba3779908d35e0b2ca92fc980c4199a1d29be73cce476c9e3d2f237734e4f9a35e7 SHA512 6c959c0ece7faaa07cd3c228cd2de7c15063ccd30f91b45b180d4d79e0060c5c156470d03eb421418ccd207931f9737e1a63b8be639b348cb0d15dacca89e4cc DIST freenet-ant-1.7.1.jar 1327167 BLAKE2B 408ec04ef6be58490bc6be200bd2ae1946aa4e22a9e01c9ef00351316f7ec0e23b055ed0907c16eaf5a60d153d3b96e4c447884df752e13d16520b3360581895 SHA512 2c84378d995fed0630169fffab020bde89c3edb7b3bc1e14e2251ed71be684dc2520fdeed8bae382de362984e25a31dcd59326ef8735f8066166c1e8d98ca408 DIST seednodes-0.7.5_p1480.zip 24935 BLAKE2B 2a297cb7e429a3db06882b703241d420fd7225192afd500f2ff5a3521b1a53c4d62fc2d5b4c0a6ed4d62fa3cd4da64a42da04459dea81701d98faf36b4642eb8 SHA512 cde40562156627818e3384cb8ca29ac02cc52eb9e02c3b0627d7786b4b7deace79b3a840f61c551a25f4d771190558fb277b3f63a71994c30c7b28a2c2f85497 DIST seednodes-20160521.fref.bz2 13751 BLAKE2B f464eb99fcefd690867246b1a77175230ac1cc9e037f3dc465d56ad70d293df78f990cfd75e6be64c26d77f2bc7bfa0bbdedd9d1720a4afa658ed3c381139eb1 SHA512 3530ac6bf9de886930bb403c2d2ec27102d5dc6904582ee69987e369dbfaf7170aadbc02b95836ff43fef2531fb06087a494b426662cd5529c87316590fd2686 diff --git a/net-p2p/freenet/files/0.7.5_p1483-ext.patch b/net-p2p/freenet/files/0.7.5_p1483-ext.patch new file mode 100644 index 000000000000..5b778dd619f4 --- /dev/null +++ b/net-p2p/freenet/files/0.7.5_p1483-ext.patch @@ -0,0 +1,22 @@ +--- src/freenet/node/NodeStarter.java 2019-03-17 12:44:12.000000000 +0100 ++++ src/freenet/node/NodeStarter.java.new 2019-03-17 12:58:51.000000000 +0100 +@@ -51,8 +51,8 @@ + public static final String extRevisionNumber; + + static { +- extBuildNumber = ExtVersion.extBuildNumber(); +- extRevisionNumber = ExtVersion.extRevisionNumber(); ++ extBuildNumber = 29; ++ extRevisionNumber = ""; + } + + private FreenetFilePersistentConfig cfg; +@@ -109,7 +109,7 @@ + System.out.println("Usage: $ java freenet.node.Node <configFile>"); + return Integer.valueOf(-1); + } +- String builtWithMessage = "freenet.jar built with freenet-ext.jar Build #" + ExtVersion.buildNumber + " r" + ExtVersion.cvsRevision+" running with ext build "+extBuildNumber+" r" + extRevisionNumber; ++ String builtWithMessage = "freenet.jar built with freenet-ext.jar Build #" + extBuildNumber +" running with ext build "+extBuildNumber; + Logger.normal(this, builtWithMessage); + System.out.println(builtWithMessage); + diff --git a/net-p2p/freenet/files/build-clean.xml b/net-p2p/freenet/files/build-clean.xml new file mode 100644 index 000000000000..89698df2675f --- /dev/null +++ b/net-p2p/freenet/files/build-clean.xml @@ -0,0 +1,421 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="freenet" default="package" basedir="."> + <description> +Freenet is free software that lets you publish and retrieve information without +fear of censorship. To achieve this, the network is entirely decentralized, and +all actions are anonymous. Without anonymity, there can never be true freedom +of speech, and without decentralization the network would be vulnerable to attack. + +This file is to build Freenet entirely from source. The builder is responsible +for satisfying all library dependencies, e.g. via override.properties. Package +maintainers may prefer to use this instead of build.xml. + </description> + + <!-- =================================================================== --> + <!-- Global properties --> + <!-- =================================================================== --> + + <!-- user overrides (properties are immutable, so set overrides first) --> + <property file="override.properties"/> + <property file="build.properties"/> + <property file="dependencies.properties"/> + + <property name="version.src" value="freenet/node/Version.java" /> + <property name="version.make" value="freenet/node/Version.class" /> + + <path id="lib.path"> + <fileset dir="${lib.contrib.dir}" includes="${lib.contrib.jars}"/> + <fileset dir="${lib.dir}" includes="${lib.jars}"/> + <fileset dir="/usr/share/java" includes="${lib.jars}" erroronmissingdir="false"/> + </path> + <path id="libtest.path"> + <path refid="lib.path"/> + <fileset dir="${lib.dir}" includes="${libtest.jars}"/> + <fileset dir="/usr/share/java" includes="${libtest.jars}" erroronmissingdir="false"/> + <pathelement path="${main.make}"/> + <pathelement path="${test.make}"/> + </path> + + <property name="gjs.dst" value="${main.src}/freenet/clients/http/staticfiles/freenetjs"/> + <property name="gjs.dir" value="generator/js"/> + <path id="gjs.lib.path"> + <fileset dir="${gjs.dir}" includes="lib/*.jar"/> + <pathelement location="${gjs.dir}/war/WEB-INF/classes"/> + <fileset dir="${lib.dir}" includes="${gjs.lib.jars}"/> + </path> + + <path id="pmd.classpath"> + <fileset dir="${pmd.dir}" erroronmissingdir="false" includes="lib/*.jar"/> + </path> + + <property environment="env"/> + <property name="keystore" value="${env.jarsignerStoreLocation}"/> + <property name="keystore_alias" value="${env.jarsignerAlias}"/> + <property name="keystore_pass" value="${env.jarsignerStorePassword}"/> + <property name="key_pass" value="${env.jarsignerCodeSigningKeyPassword}"/> + + <property name="jar.dst" value="${main.dst}/freenet.jar"/> + + <assertions><enable/></assertions> + + <!-- set version string based on git-describe --> + <exec executable="git" failifexecutionfails="false" + errorProperty="git.errror" outputproperty="git.describe" resultproperty="git.result"> + <arg value="describe" /> + <arg value="--always" /> + <arg value="--abbrev=4" /> + <arg value="--dirty" /> + </exec> + <condition property="git.revision" value="${git.describe}" else="@unknown@"> + <and> + <equals arg1="${git.result}" arg2="0" /> + <isset property="git.describe" /> + </and> + </condition> + + <!-- =================================================================== --> + <!-- Miscellaneous --> + <!-- =================================================================== --> + + <target name="dist" depends="clean-all, all" description="clean-build everything"/> + + <target name="sign" description="Sign the distribution" depends="package"> + <echo message="Signing the distribution"/> + <signjar jar="${jar.dst}" strict="false" tsaurl="http://timestamp.comodoca.com/rfc3161" alias="${keystore_alias}" keystore="${keystore}" storepass="${keystore_pass}" keypass="${key_pass}" sigalg="SHA256withRSA" digestalg="SHA-256"/> + <!-- TODO: Should have strict="true", but it was introduced in Java 7, which we cannot yet require. --> + <verifyjar jar="${jar.dst}" alias="${keystore_alias}" keystore="${keystore}" storepass="${keystore_pass}" keypass="${key_pass}"/> + </target> + + <target name="all" depends="package, doc, findbugs, pmd, cpd" description="build everything, incl. docs, GWT js"/> + + <target name="clean-all" depends="clean, clean-doc, clean-gjs" description="clean all build products, incl. docs, GWT js"/> + + <target name="help" description="display help on parameters"> + <echo message="For main build targets, see `ant -p`"/> + <echo message=""/> + <echo message="Test parameters (-Dtest.PARAM=true)"/> + <echo message=" skip Skip all tests"/> + <echo message=" verbose Report additional information"/> + <echo message=" benchmark Run benchmark tests"/> + <echo message=" extensive Run extensive tests"/> + <echo message=""/> + <echo message="Misc parameters (-DPARAM=VALUE)"/> + <echo message=" javac.args Command line arguments to pass to javac"/> + <echo message=""/> + </target> + + <target name="findbugs" depends="package" unless="${findbugs.skip}"> + <antcall target="libdep-findbugs"/> + <echo message="Running Findbugs"/> + <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.path}"/> + + <findbugs home="${findbugs.dir}" + output="xml" + outputFile="${test.dst}/findbugs.xml" + warningsProperty="findbugs.module.warnings" + failOnError="true" + jvmargs="-Xmx1536m -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=128m" > + <auxClasspath refid="lib.path" /> + <sourcePath path="${main.src}" /> + <class location="${jar.dst}" /> + </findbugs> + </target> + + <target name="pmd" depends="package" unless="${pmd.skip}"> + <antcall target="libdep-pmd"/> + <echo message="Running PMD"/> + <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath"/> + <pmd rulesetfiles="rulesets/java/design.xml" encoding="utf-8"> + <formatter type="xml" toFile="${test.dst}/pmd.xml"/> + <fileset dir="${main.src}"> + <include name="**/*.java"/> + </fileset> + </pmd> + </target> + + <target name="cpd" depends="package" unless="${cpd.skip}"> + <antcall target="libdep-cpd"/> + <echo message="Running CPD"/> + <taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="pmd.classpath"/> + <cpd minimumTokenCount="100" format="xml" outputFile="${test.dst}/cpd.xml"> + <fileset dir="${main.src}"> + <include name="**/*.java"/> + </fileset> + </cpd> + </target> + + <target name="debug"> + <echoproperties/> + </target> + + <!-- =================================================================== --> + <!-- Library dependencies --> + <!-- =================================================================== --> + + <!-- + currently we only check for the most common cases of missing libraries. + this does result in less clear error messages for more obscure setups, e.g. + if you have debian's gwt-dev.jar but not commons-collections3.jar. however, + to cover all scenarios would be a pain. + --> + + <target name="env"> + <available property="lib.contrib.present" classname="freenet.node.ExtVersion" classpathref="lib.path"/> + <available property="lib.bouncycastle.present" classname="org.bouncycastle.crypto.signers.HMacDSAKCalculator" classpathref="lib.path"/> + <available property="lib.junit.present" classname="org.junit.runners.JUnit4" classpathref="libtest.path"/> + <available property="lib.hamcrest.present" classname="org.hamcrest.SelfDescribing" classpathref="libtest.path"/> + <available property="lib.findbugs.present" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.path}"/> + <available property="lib.pmd.present" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath"/> + <available property="lib.cpd.present" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="pmd.classpath"/> + <available property="gjs.lib.gwt-user.present" classname="com.google.gwt.user.client.Window" classpathref="gjs.lib.path"/> + <available property="gjs.lib.gwt-dev.present" classname="com.google.gwt.dev.About" classpathref="gjs.lib.path"/> + <condition property="gjs.lib.gwt.present"> + <and> + <isset property="gjs.lib.gwt-user.present"/> + <isset property="gjs.lib.gwt-dev.present"/> + </and> + </condition> + </target> + + <target name="libdep-ext" depends="env" unless="lib.contrib.present"> + <fail message="freenet-ext not available"/> + </target> + + <target name="libdep-bc" depends="env" unless="lib.bouncycastle.present"> + <fail message="Bouncycastle not available (or not recent enough); try https://www.bouncycastle.org/download/${bc.jar}"/> + </target> + + <target name="libdep-junit" depends="env" unless="lib.junit.present"> + <fail message="JUnit4 not available"/> + </target> + + <target name="libdep-hamcrest" depends="env" unless="lib.hamcrest.present"> + <fail message="Hamcrest-core not available"/> + </target> + + <target name="libdep-findbugs" depends="env" unless="lib.findbugs.present"> + <fail message="findbugs not available"/> + </target> + + <target name="libdep-pmd" depends="env" unless="lib.pmd.present"> + <fail message="PMD not available"/> + </target> + + <target name="libdep-cpd" depends="env" unless="lib.cpd.present"> + <fail message="CPD not available"/> + </target> + + <target name="libdep-gwt-user" depends="env" unless="gjs.lib.gwt-user.present"> + <fail message="GWT-user not present"/> + </target> + + <target name="libdep-gwt-dev" depends="env" unless="gjs.lib.gwt-dev.present"> + <fail message="GWT-dev not present"/> + </target> + + <!-- =================================================================== --> + <!-- Standard build --> + <!-- =================================================================== --> + + <target name="init"> + <mkdir dir="${main.make}"/> + <mkdir dir="${main.dst}"/> + <mkdir dir="${test.make}"/> + <mkdir dir="${test.dst}"/> + </target> + + <target name="dep" depends="ensure-ext, ensure-bc, ensure-gjs"/> + + <target name="check-version-file"> + <uptodate property="version.uptodate" + targetfile="${main.make}/${version.src}" + srcfile="${main.src}/${version.src}"/> + </target> + + <target name="build-version-file" depends="check-version-file" unless="version.uptodate"> + <!-- Create the Version file with patched revision number in ${main.make} --> + <copy file="${main.src}/${version.src}" tofile="${main.make}/${version.src}" overwrite="true" /> + <delete file="${main.make}/${version.make}" quiet="true" /> + <replace file="${main.make}/${version.src}"> + <replacefilter token="@custom@" value="${git.revision}"/> + </replace> + <echo message="Updated build version to ${git.revision} in ${main.make}/${version.src}"/> + </target> + + <target name="build" depends="init, dep, build-version-file"> + <!-- Create the time stamp --> + <tstamp/> + <!-- Create the build directory structure used by compile --> + <javac srcdir="${main.src}" destdir="${main.make}" debug="on" source="1.7" target="1.7" includeAntRuntime="false" encoding="UTF-8"> + <compilerarg line="${javac.args}"/> + <classpath refid="lib.path"/> + <!-- tell javac to find Version.java in ${main.make}, not ${main.src} --> + <sourcepath><pathelement path="${main.make}"/></sourcepath> + <!-- following a very temporary list of files to be build --> + <include name="**/*.java"/> + <exclude name="**/package-info.java"/> + <exclude name="${version.src}"/> + </javac> + + <!-- Force compile of Version.java in case compile of ${main.src} didn't trigger it --> + <javac srcdir="${main.make}" destdir="${main.make}" debug="on" source="1.7" target="1.7" includeAntRuntime="false" encoding="UTF-8"> + <compilerarg line="${javac.args}"/> + <classpath refid="lib.path"/> + <include name="${version.src}"/> + </javac> + + <!-- Copy web interface static files to the build dir --> + <copy todir="${main.make}/freenet/clients/http/staticfiles"> + <fileset dir="${main.src}/freenet/clients/http/staticfiles"/> + </copy> + <!-- Copy translation files to the build dir --> + <copy todir="${main.make}/freenet/l10n"> + <fileset dir="${main.src}/freenet/l10n"> + <include name="freenet.l10n.*.properties"/> + <include name="iso-*.tab"/> + </fileset> + </copy> + <!-- Copy the dependencies.properties file --> + <copy todir="${main.make}" file="dependencies.properties"/> + </target> + + <target name="package-only" depends="build"> + <property name="lib.contrib.loc" location="${lib.contrib.dir}" /> + <property name="lib.loc" location="${lib.dir}" /> + <pathconvert property="lib.jars.package" refid="lib.path" pathsep=" "> + <map from="${lib.contrib.loc}/" to=""/> + <map from="${lib.loc}/" to=""/> + </pathconvert> + <jar jarfile="${jar.dst}" basedir="${main.make}"> + <manifest> + <attribute name="Permissions" value="all-permissions"/> + <attribute name="Application-Name" value="Freenet REference Daemon"/> + + <attribute name="Required-Ext-Version" value="29"/> + <attribute name="Recommended-Ext-Version" value="29"/> + <section name="common"> + <attribute name="Specification-Title" value="Freenet"/> + <attribute name="Specification-Version" value="0.7.5"/> + <attribute name="Specification-Vendor" value="freenetproject.org"/> + <attribute name="Implementation-Title" value="Freenet"/> + <attribute name="Implementation-Version" value="0.7.5 ${git.revision}"/> + <attribute name="Implementation-Vendor" value="freenetproject.org"/> + </section> + </manifest> + <exclude name="${version.src}"/> + </jar> + </target> + + <target name="package" depends="unit, package-only" description="build standard binary packages (Freenet daemon)"/> + + <target name="unit-build" depends="build" unless="${test.skip}"> + <antcall target="libdep-junit"/> + <antcall target="libdep-hamcrest"/> + <javac srcdir="${test.src}" destdir="${test.make}" debug="on" source="1.7" target="1.7" includeAntRuntime="false" encoding="UTF-8"> + <compilerarg line="${javac.args}"/> + <classpath refid="libtest.path"/> + <include name="**/*.java"/> + <exclude name="*.java"/> + </javac> + <copy todir="${test.make}/freenet/client/filter/png" overwrite="true"> + <fileset dir="${test.src}/freenet/client/filter/png"/> + </copy> + <copy todir="${test.make}/freenet/client/filter/bmp" overwrite="true"> + <fileset dir="${test.src}/freenet/client/filter/bmp"/> + </copy> + <copy todir="${test.make}/freenet/client/filter/mp3" overwrite="true"> + <fileset dir="${test.src}/freenet/client/filter/mp3"/> + </copy> + <copy todir="${test.make}/freenet/client/filter/gif" overwrite="true"> + <fileset dir="${test.src}/freenet/client/filter/gif"/> + </copy> + <copy todir="${test.make}/freenet/crypt/ciphers/rijndael-gladman-test-data" overwrite="true"> + <fileset dir="${test.src}/freenet/crypt/ciphers/rijndael-gladman-test-data"/> + </copy> + <copy todir="${test.make}/freenet/l10n" overwrite="true"> + <fileset dir="${test.src}/freenet/l10n" includes="*.properties"/> + </copy> + </target> + + <target name="unit" depends="unit-build" unless="${test.skip}"> + <junit printsummary="yes" haltonfailure="${test.haltonfailure}" logfailedtests="yes" showoutput="yes" filtertrace="no" fork="on" forkmode="perTest" maxmemory="256m" dir="${test.dst}"> + <classpath refid="libtest.path"/> + <formatter type="plain" usefile="false"/> + <formatter type="xml" if="${test.xml_output}"/> + <formatter classname="org.apache.tools.ant.taskdefs.optional.junit.TearDownOnVmCrash" usefile="false"/> + <test if="test.class" name="${test.class}" todir="${test.dst}"/> + <batchtest unless="test.class" fork="yes" todir="${test.dst}"> + <fileset dir="${test.make}" includes="**/*Test.class"/> + </batchtest> + <sysproperty key="test.verbose" value="${test.verbose}"/> + <sysproperty key="test.benchmark" value="${test.benchmark}"/> + <sysproperty key="test.extensive" value="${test.extensive}"/> + <!-- TODO source needs to be edited too; the old variables were "benchmark" and "extensiveTesting" --> + <assertions><enable/></assertions> + </junit> + </target> + + <target name="clean" description="clean standard build products"> + <delete dir="${main.make}"/> + <delete dir="${main.dst}"/> + <delete dir="${test.make}"/> + <delete dir="${test.dst}"/> + </target> + + <!-- =================================================================== --> + <!-- Dependencies (contrib, ie. freenet-ext.jar) --> + <!-- =================================================================== --> + + <target name="ensure-ext" depends="libdep-ext"> + <!-- clean build does nothing, since this is external library. --> + </target> + + <target name="ensure-bc" depends="libdep-bc"> + <!-- clean build does nothing, since this is external library. --> + </target> + + <!-- =================================================================== --> + <!-- Generate GWT code --> + <!-- =================================================================== --> + + <target name="env-gjs"> + <available property="gjs.present" file="${gjs.dst}" type="dir"/> + </target> + + <target name="ensure-gjs" depends="env-gjs" unless="gjs.present"> + <antcall target="build-gjs"/> + </target> + + <target name="build-gjs" depends="libdep-gwt-user, libdep-gwt-dev"> + <ant antfile="build.xml" dir="${gjs.dir}"> + <reference refid="gjs.lib.path" torefid="project.class.path"/> + </ant> + </target> + + <target name="clean-gjs"> + <ant antfile="build.xml" dir="${gjs.dir}" target="deleteGenerated"/> + </target> + + <!-- =================================================================== --> + <!-- Documentation --> + <!-- =================================================================== --> + + <target name="init-doc" unless="${doc.skip}"> + <mkdir dir="${doc.api}"/> + </target> + + <target name="javadoc" depends="init-doc, dep" unless="${doc.skip}"> + <javadoc classpathref="lib.path" sourcepath="${main.src}" destdir="${doc.api}" use="true"> + <link href="http://docs.oracle.com/javase/6/docs/api/"/> + </javadoc> + </target> + + <target name="doc" depends="javadoc" description="build documentation"> + <!-- currently freenet has no other documentation apart from javadocs --> + </target> + + <target name="clean-doc" unless="${doc.skip}"> + <delete dir="${doc.api}"/> + </target> + +</project> diff --git a/net-p2p/freenet/files/build.properties b/net-p2p/freenet/files/build.properties new file mode 100644 index 000000000000..21fecf30c803 --- /dev/null +++ b/net-p2p/freenet/files/build.properties @@ -0,0 +1,95 @@ +## +# Properties you can set to affect the build process. +# +# This file contains default values that are checked-in to version control. +# +# End users should not edit this file to set machine-specific properties; +# instead, create a new file called override.properties and set them there. +# + +################################################################################ +## build files/directories + +main.src=src +main.make=build/main +main.dst=dist + +test.src=test +test.make=build/test +test.dst=run + +doc.src=doc +doc.dst=javadoc +doc.api=javadoc + +################################################################################ +## external dependencies + +# dir for common library jars +lib.dir = lib + +# dir for freenet library jars (aka freenet-ext or "contrib" jars) +lib.contrib.dir = lib/freenet +## if you use the git submodule in ./contrib (legacy-27 branch) +## by running `git submodule init && git submodule update` +## contrib.ant is needed for the old legacy layout +#lib.contrib.dir = contrib/freenet_ext +#contrib.ant = ${lib.contrib.dir}/build.xml +## if you clone the contrib package separately (master branch) +#lib.contrib.dir = ../contrib/freenet-ext/dist + +# dir that freenet library jars will be installed to, relative to freenet.jar +lib.contrib.dir.rel = freenet + +# jars from ${lib.dir} to use +bc.jar = bcprov-jdk15on-154.jar +lib.jars = ${bc.jar} +#lib.jars = wrapper.jar db-je.jar bdb-je.jar commons-compress.jar + +# jars from ${lib.dir} to use, for tests +libtest.jars = junit4.jar hamcrest-core.jar + +# jars from ${lib.contrib.dir} to use +lib.contrib.jars = freenet-ext.jar bitcollider-core.jar db4o.jar lzmajio.jar mantissa.jar \ + wrapper.jar db-je.jar bdb-je.jar commons-compress.jar + +# jars from ${lib.dir} to use, for compiling GWT javascript +gjs.lib.jars = null +#gjs.lib.jars = gwt-dev-linux.jar gwt-dev-windows.jar gwt-dev.jar gwt-user.jar \ +# commons-collections3.jar ant.jar eclipse-ecj.jar + +findbugs.dir = findbugs +findbugs.path = ${findbugs.dir}/lib/findbugs-ant.jar + +pmd.dir = +################################################################################ +## build tool options + +# Javac +javac.args=-Xlint -Xlint:-deprecation + +# Test properties +test.skip=false +test.verbose=false +test.benchmark=false +test.extensive=false +test.xml_output=true +test.haltonfailure=yes + +# select a single test to run +#test.class= + +# Build javadoc +doc.skip=false + +# Run findbugs +findbugs.skip=false +pmd.skip=false +cpd.skip=false + +################################################################################ +## misc options + +# Hack around property expansion not featured in ant <= 1.7.1 +# see http://ant.apache.org/manual/properties.html#if+unless +true=true diff --git a/net-p2p/freenet/freenet-0.7.5_p1483.ebuild b/net-p2p/freenet/freenet-0.7.5_p1483.ebuild new file mode 100644 index 000000000000..104ad58ab195 --- /dev/null +++ b/net-p2p/freenet/freenet-0.7.5_p1483.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DATE=20160521 +JAVA_PKG_IUSE="doc source" + +inherit eutils java-pkg-2 java-ant-2 multilib systemd user + +DESCRIPTION="An encrypted network without censorship" +HOMEPAGE="https://freenetproject.org/" +# https://github.com/${PN}/seedrefs/archive/build0${PV#*p}.zip -> seednodes-${PV}.zip +SRC_URI=" + https://github.com/${PN}/fred/archive/build0${PV#*p}.zip -> ${P}.zip + https://github.com/${PN}/seedrefs/archive/build01480.zip -> seednodes-0.7.5_p1480.zip + mirror://gentoo/freenet-ant-1.7.1.jar" + +LICENSE="GPL-2+ GPL-2 MIT BSD-2 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +CDEPEND="dev-java/bcprov:1.54 + dev-java/commons-compress:0 + dev-java/fec:0 + dev-java/java-service-wrapper:0 + dev-java/jbitcollider-core:0 + dev-java/jna:0 + dev-java/lzma:0 + dev-java/lzmajio:0 + dev-java/mersennetwister:0" + +DEPEND=" + app-arch/unzip + >=virtual/jdk-1.7 + ${CDEPEND} + test? ( + dev-java/junit:0 + dev-java/ant-junit:0 + ) + dev-java/ant-core:0" + +RDEPEND=" + >=virtual/jre-1.7 + net-libs/nativebiginteger:0 + ${CDEPEND}" + +PDEPEND="net-libs/NativeThread:0" + +JAVA_PKG_BSFIX_NAME+=" build-clean.xml" +JAVA_ANT_REWRITE_CLASSPATH="yes" +JAVA_ANT_CLASSPATH_TAGS+=" javadoc" +JAVA_ANT_ENCODING="utf8" + +EANT_BUILD_TARGET="package" +EANT_TEST_TARGET="unit" +EANT_BUILD_XML="build-clean.xml" +EANT_GENTOO_CLASSPATH="bcprov-1.54,commons-compress,fec,java-service-wrapper,jbitcollider-core,jna,lzma,lzmajio,mersennetwister" +EANT_EXTRA_ARGS="-Dsuppress.gjs=true -Dlib.contrib.present=true -Dlib.bouncycastle.present=true -Dlib.junit.present=true -Dtest.skip=true" + +S="${WORKDIR}/fred-build0${PV#*p}" + +RESTRICT="test" # they're broken in the last release. + +MY_PATCHES=( + "${FILESDIR}"/0.7.5_p1483-ext.patch + "${FILESDIR}/"0.7.5_p1475-remove-git.patch +) + +pkg_setup() { + has_version dev-java/icedtea[cacao] && { + ewarn "dev-java/icedtea was built with cacao USE flag." + ewarn "freenet may compile with it, but it will refuse to run." + ewarn "Please remerge dev-java/icedtea without cacao USE flag," + ewarn "if you plan to use it for running freenet." + } + java-pkg-2_pkg_setup + enewgroup freenet + enewuser freenet -1 -1 /var/freenet freenet +} + +src_unpack() { +# unpack ${P}.zip seednodes-${PV}.zip + unpack ${P}.zip seednodes-0.7.5_p1480.zip +} + +src_prepare() { +# cat "${WORKDIR}"/seedrefs-build0${PV#*p}/* > "${S}"/seednodes.fref + cat "${WORKDIR}"/seedrefs-build01480/* > "${S}"/seednodes.fref + cp "${FILESDIR}"/freenet-0.7.5_p1474-wrapper.conf freenet-wrapper.conf || die + cp "${FILESDIR}"/run.sh-20090501 run.sh || die + cp "${FILESDIR}"/build-clean.xml build-clean.xml || die + cp "${FILESDIR}"/build.properties build.properties || die + + epatch "${MY_PATCHES[@]}" + + sed -i -e "s:=/usr/lib:=/usr/$(get_libdir):g" \ + freenet-wrapper.conf || die "sed failed" + + echo "wrapper.java.classpath.1=/usr/share/freenet/lib/freenet.jar" >> freenet-wrapper.conf || die + + local i=2 pkg jars jar + local ifs_original=${IFS} + IFS="," + for pkg in ${EANT_GENTOO_CLASSPATH} ; do + jars="$(java-pkg_getjars ${pkg})" + for jar in ${jars} ; do + echo "wrapper.java.classpath.$((i++))=${jar}" >> freenet-wrapper.conf || die + done + done + IFS=${ifs_original} + echo "wrapper.java.classpath.$((i++))=/usr/share/freenet/lib/ant.jar" >> freenet-wrapper.conf || die + + cp "${DISTDIR}"/freenet-ant-1.7.1.jar lib/ant.jar || die + eapply_user +} + +EANT_TEST_EXTRA_ARGS="-Dtest.skip=false" + +src_test() { + java-pkg-2_src_test +} + +src_install() { + java-pkg_dojar dist/freenet.jar + java-pkg_newjar "${DISTDIR}"/freenet-ant-1.7.1.jar ant.jar + + if has_version =sys-apps/baselayout-2*; then + doinitd "${FILESDIR}"/freenet + else + newinitd "${FILESDIR}"/freenet.old freenet + fi + + systemd_dounit "${FILESDIR}"/freenet.service + + dodoc AUTHORS + newdoc README.md README + insinto /etc + doins freenet-wrapper.conf + insinto /var/freenet + doins run.sh seednodes.fref + fperms +x /var/freenet/run.sh + dosym java-service-wrapper/libwrapper.so /usr/$(get_libdir)/libwrapper.so + use doc && java-pkg_dojavadoc javadoc + use source && java-pkg_dosrc src +} + +pkg_postinst() { + elog " " + elog "1. Start freenet with /etc/init.d/freenet start." + elog "2. Open localhost:8888 in your browser for the web interface." + #workaround for previously existing freenet user + [[ $(stat --format="%U" /var/freenet) == "freenet" ]] || chown \ + freenet:freenet /var/freenet +} + +pkg_postrm() { + if ! [[ -e /usr/share/freenet/lib/freenet.jar ]] ; then + elog " " + elog "If you dont want to use freenet any more" + elog "and dont want to keep your identity/other stuff" + elog "remember to do 'rm -rf /var/freenet' to remove everything" + fi +} |