dev-lang/interprolog: rewrite with java-pkg-simple

Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: f5f48ba75d
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
This commit is contained in:
Volkmar W. Pogatzki
2024-06-11 18:23:00 +02:00
committed by Miroslav Šulc
parent 0e5fd3c978
commit ba29d0c5bc
2 changed files with 60 additions and 45 deletions

View File

@@ -1,45 +0,0 @@
<?xml version="1.0" ?><project default="jar" name="interprolog">
<!-- some properties -->
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="docs.dir" value="docs"/>
<property name="dist.dir" value="dist"/>
<property name="jarfile" value="${ant.project.name}.jar"/>
<property file="build.properties"/>
<!-- init -->
<target name="init">
<tstamp/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${docs.dir}"/>
</target>
<!-- compile everything -->
<target depends="init" name="compile">
<javac classpath="${gentoo.classpath}" deprecation="on" destdir="${build.dir}" encoding="ISO-8859-1" source="1.4" srcdir="${src.dir}" target="1.4"/>
<copy todir="${build.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<!-- build the jar file -->
<target depends="compile" name="jar">
<jar basedir="${build.dir}" jarfile="${dist.dir}/${jarfile}"/>
</target>
<!-- generate javadocs -->
<target depends="init" name="javadoc">
<javadoc classpath="${gentoo.classpath}" author="true" destdir="${docs.dir}" encoding="ISO-8859-1" packagenames="com.*" source="1.4" sourcepath="${src.dir}" use="true" version="true" windowtitle="${ant.project.name} API"/>
</target>
<!-- clean up -->
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${docs.dir}"/>
</target>
</project>

View File

@@ -0,0 +1,60 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
JAVA_PKG_IUSE="doc"
inherit java-pkg-2 java-pkg-simple
MY_P="${PN}$(ver_rs 1- '')"
DESCRIPTION="InterProlog is a Java front-end and enhancement for Prolog"
HOMEPAGE="https://declarativa.com/InterProlog/"
SRC_URI="https://declarativa.com/InterProlog/${MY_P}.zip"
S="${WORKDIR}"/${MY_P}
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
BDEPEND="app-arch/unzip"
DEPEND="
dev-java/junit:0
>=virtual/jdk-1.8:*
|| (
dev-lang/xsb
dev-lang/swi-prolog
dev-lang/yap )"
RDEPEND=">=virtual/jre-1.8:*"
HTML_DOCS=( INSTALL.htm faq.htm prologAPI.htm )
PATCHES=(
"${FILESDIR}"/${P}-java1.4.patch
"${FILESDIR}"/${P}-java17.patch
)
JAVA_CLASSPATH_EXTRA="junit"
JAVA_RESOURCE_DIRS="res"
JAVA_SRC_DIR="com"
src_prepare() {
default #780585
java-pkg-2_src_prepare
java-pkg_clean
rm -r htmldocs || die
mkdir res || die
find com -type f ! -name '*.java' \
| xargs cp --parents -t res || die
}
src_install() {
java-pkg-simple_src_install
if use doc ; then
dodoc -r images
dodoc PaperEPIA01.doc
fi
}