freebsd-ports/databases/cassandra3/files/patch-build.xml
Angelo Polo 81ab4a37d9 databases/cassandra3: Fix build
Add missing patches.

PR:		261220
2022-04-20 17:02:37 +02:00

134 lines
5.2 KiB
XML

--- build.xml.orig 2022-01-15 09:03:19 UTC
+++ build.xml
@@ -20,6 +20,8 @@
<property file="build.properties" />
<property file="build.properties.default" />
<property name="debuglevel" value="source,lines,vars"/>
+ <property name="pycmd" value="python"/>
+ <property name="rat.skip" value="true"/>
<!-- default version and SCM information -->
<property name="base.version" value="3.11.11"/>
@@ -74,14 +76,14 @@
<condition property="version" value="${base.version}">
<isset property="release"/>
</condition>
- <property name="version" value="${base.version}-SNAPSHOT"/>
+ <property name="version" value="${base.version}"/>
<property name="version.properties.dir"
value="${build.src.resources}/org/apache/cassandra/config/" />
<property name="final.name" value="${ant.project.name}-${version}"/>
<!-- details of what version of Maven ANT Tasks to fetch -->
<property name="maven-ant-tasks.version" value="2.1.3" />
- <property name="maven-ant-tasks.local" value="${user.home}/.m2/repository/org/apache/maven/maven-ant-tasks"/>
+ <property name="maven-ant-tasks.local" value="${localm2}/org/apache/maven/maven-ant-tasks"/>
<property name="maven-ant-tasks.url"
value="https://repo.maven.apache.org/maven2/org/apache/maven/maven-ant-tasks" />
<!-- details of how and which Maven repository we publish to -->
@@ -253,6 +255,7 @@
<target name="gen-doc" description="Generate documentation" depends="jar" unless="ant.gen-doc.skip">
<exec executable="make" osfamily="unix" dir="${doc.dir}">
<arg value="html"/>
+ <arg value="PYTHON_CMD=${pycmd}"/>
</exec>
<exec executable="cmd" osfamily="dos" dir="${doc.dir}">
<arg value="/c"/>
@@ -704,7 +707,7 @@
<target name="build" depends="resolver-retrieve-build,build-project" description="Compile Cassandra classes"/>
<target name="codecoverage" depends="jacoco-run,jacoco-report" description="Create code coverage report"/>
- <target depends="init,gen-cql3-grammar,generate-cql-html,generate-jflex-java,rat-check"
+ <target depends="init,gen-cql3-grammar,generate-cql-html,generate-jflex-java"
name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<!-- Order matters! -->
@@ -894,6 +897,88 @@
</jar>
</target>
+ <!-- FreeBSD for staging -->
+ <target name="freebsd-stage" depends="jar"
+ description="Create Cassandra directory structure for staging">
+ <mkdir dir="${dist.dir}"/>
+ <copy todir="${dist.dir}/lib">
+ <fileset dir="${build.lib}">
+ <exclude name="sigar*.jar"/>
+ <exclude name="sigar-bin/*"/>
+ <exclude name="snappy*.jar"/>
+ <exclude name="licenses/snappy*.txt"/>
+ </fileset>
+ <fileset dir="${build.dir}">
+ <include name="${final.name}.jar" />
+ <include name="${ant.project.name}-thrift-${version}.jar" />
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/bin">
+ <fileset dir="bin">
+ <exclude name="*.bat" />
+ <exclude name="*.ps1" />
+ <exclude name="*.orig" />
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/conf">
+ <fileset dir="conf">
+ <exclude name="*.ps1" />
+ <exclude name="*.orig" />
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/interface">
+ <fileset dir="interface">
+ <include name="**/*.thrift" />
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/pylib">
+ <fileset dir="pylib">
+ <include name="**" />
+ <exclude name="**/*.pyc" />
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/">
+ <fileset dir="${basedir}">
+ <include name="*.txt" />
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/tools/bin">
+ <fileset dir="${basedir}/tools/bin">
+ <exclude name="*.bat" />
+ <exclude name="*.ps1" />
+ <exclude name="*.orig" />
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/tools/">
+ <fileset dir="${basedir}/tools/">
+ <include name="*.yaml"/>
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/tools/lib">
+ <fileset dir="${build.dir}/tools/lib/">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="freebsd-stage-doc" depends="freebsd-stage,javadoc,gen-doc"
+ description="Create Cassandra directory structure for staging, including docs">
+ <copy todir="${dist.dir}/javadoc">
+ <fileset dir="${javadoc.dir}"/>
+ </copy>
+ <copy todir="${dist.dir}/doc">
+ <fileset dir="doc">
+ <include name="cql3/CQL.html" />
+ <include name="cql3/CQL.css" />
+ <include name="SASI.md" />
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/doc/html">
+ <fileset dir="doc" />
+ <globmapper from="build/html/*" to="*"/>
+ </copy>
+ </target>
+
<!-- creates release tarballs -->
<target name="artifacts" depends="jar,gen-doc,build-test,stress-build-test,sources-jar,javadoc-jar"
description="Create Cassandra release artifacts">