File manifold.spec of Package manifold
#
# spec file for package manifold
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: manifold
Version: 2025.1.22
Release: 0
Summary: A Java compiler plugin
License: Apache-2.0
Group: Development/Libraries/Java
URL: http://manifold.systems/
Source0: https://github.com/manifold-systems/%{name}/archive/refs/tags/v%{version}.tar.gz
Patch0: 00-snakeyaml-engine-v2.patch
Patch1: deepCopyValue.patch
Patch2: java17.patch
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: mvn(com.graphql-java:graphql-java)
BuildRequires: mvn(com.sparkjava:spark-core)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.antlr:antlr4-runtime)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
BuildRequires: mvn(org.jetbrains:annotations)
BuildRequires: mvn(org.mozilla:rhino)
BuildRequires: mvn(org.snakeyaml:snakeyaml-engine)
BuildConflicts: java >= 18
BuildConflicts: java-devel >= 18
BuildConflicts: java-headless >= 18
# Manifold is not buildable with the openj9 based openjdk
BuildConflicts: java-openj9
BuildConflicts: java-devel-openj9
BuildConflicts: java-openj9-headless
BuildArch: noarch
%description
Manifold is a Java compiler plugin, its features include Metaprogramming,
Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor,
and more.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q
%patch -P 0 -p1
#patch -P 1 -p1
%patch -P 2 -p1
%pom_disable_module %{name}-all
# Missing HakariCP dependency
%pom_disable_module %{name}-sql-rt %{name}-deps-parent
%pom_disable_module %{name}-sql-inproc-test %{name}-deps-parent
%pom_disable_module %{name}-sql %{name}-deps-parent
%pom_remove_plugin org.sonatype.central:central-publishing-maven-plugin
%pom_remove_plugin :maven-source-plugin
%pom_xpath_inject pom:pluginManagement/pom:plugins '
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>default-resources</id>
<phase>compile</phase>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>'
rm manifold-core-parent/manifold/src/main/java/manifold/internal/javac/*_8.java
#rm manifold-core-parent/manifold/src/main/resources/manifold/internal/javac/*.class
%pom_add_dep systems.manifold:manifold:\${project.version}:provided \
manifold-deps-parent/manifold-ext-rt \
manifold-deps-parent/manifold-tuple-rt \
manifold-deps-parent/manifold-json-rt \
manifold-deps-parent/manifold-csv-rt \
manifold-deps-parent/manifold-delegation-rt \
manifold-deps-parent/manifold-js-rt \
manifold-deps-parent/manifold-xml-rt \
manifold-deps-parent/manifold-params-rt \
manifold-deps-parent/manifold-props-rt \
manifold-deps-parent/manifold-templates-rt
%pom_disable_module manifold-csv manifold-deps-parent
%pom_disable_module manifold-csv-rt manifold-deps-parent
%pom_disable_module manifold-csv-test manifold-deps-parent
%pom_disable_module manifold-props-middle-test manifold-deps-parent
%pom_disable_module manifold-props-test manifold-deps-parent
%pom_disable_module manifold-science manifold-deps-parent
%pom_disable_module manifold-science-test manifold-deps-parent
%build
MAVEN_OPTS="-Xmx1g" \
%{mvn_build} -i -j -f -- \
-Prelease -Drelease=8 -Dsource=8
%install
%define manifold_artifact() \
if test -f %{1}/target/%{basename:%1}-%{version}.jar ; \
then \
%{mvn_artifact} %{1}/pom.xml %{1}/target/%{basename:%1}-%{version}.jar ; \
if test -d %{1}/target/reports/apidocs ; \
then \
cp -prf %{1}/target/reports/apidocs %{buildroot}%{_javadocdir}/%{basename:%1} ; \
echo %{_javadocdir}/%{basename:%1} >>.mfiles-javadoc ; \
fi \
else \
%{mvn_artifact} %{1}/pom.xml ; \
fi \
%{nil}
install -dm0755 %{buildroot}%{_javadocdir}
%manifold_artifact .
#%%manifold_artifact %%{name}-all
%manifold_artifact %{name}-core-parent
%manifold_artifact %{name}-core-parent/%{name}
%manifold_artifact %{name}-core-parent/%{name}-rt
%manifold_artifact %{name}-deps-parent
%manifold_artifact %{name}-deps-parent/%{name}-collections
%manifold_artifact %{name}-deps-parent/%{name}-collections-test
#manifold_artifact %{name}-deps-parent/%{name}-csv
#manifold_artifact %{name}-deps-parent/%{name}-csv-rt
#manifold_artifact %{name}-deps-parent/%{name}-csv-test
%manifold_artifact %{name}-deps-parent/%{name}-darkj
%manifold_artifact %{name}-deps-parent/%{name}-darkj-test
%manifold_artifact %{name}-deps-parent/%{name}-delegation
%manifold_artifact %{name}-deps-parent/%{name}-delegation-rt
%manifold_artifact %{name}-deps-parent/%{name}-delegation-test
%manifold_artifact %{name}-deps-parent/%{name}-exceptions
%manifold_artifact %{name}-deps-parent/%{name}-exceptions-test
%manifold_artifact %{name}-deps-parent/%{name}-ext
%manifold_artifact %{name}-deps-parent/%{name}-ext-middle-test
%manifold_artifact %{name}-deps-parent/%{name}-ext-producer-sample
%manifold_artifact %{name}-deps-parent/%{name}-ext-producer-sample-test
%manifold_artifact %{name}-deps-parent/%{name}-ext-rt
%manifold_artifact %{name}-deps-parent/%{name}-ext-test
%manifold_artifact %{name}-deps-parent/%{name}-graphql
%manifold_artifact %{name}-deps-parent/%{name}-graphql-rt
%manifold_artifact %{name}-deps-parent/%{name}-graphql-test
%manifold_artifact %{name}-deps-parent/%{name}-highjump
%manifold_artifact %{name}-deps-parent/%{name}-highjump-test
%manifold_artifact %{name}-deps-parent/%{name}-image
%manifold_artifact %{name}-deps-parent/%{name}-image-test
%manifold_artifact %{name}-deps-parent/%{name}-io
%manifold_artifact %{name}-deps-parent/%{name}-io-test
%manifold_artifact %{name}-deps-parent/%{name}-js
%manifold_artifact %{name}-deps-parent/%{name}-js-rt
%manifold_artifact %{name}-deps-parent/%{name}-js-test
%manifold_artifact %{name}-deps-parent/%{name}-json
%manifold_artifact %{name}-deps-parent/%{name}-json-rt
%manifold_artifact %{name}-deps-parent/%{name}-json-test
%manifold_artifact %{name}-deps-parent/%{name}-preprocessor
%manifold_artifact %{name}-deps-parent/%{name}-preprocessor-android-syms
%manifold_artifact %{name}-deps-parent/%{name}-preprocessor-test
%manifold_artifact %{name}-deps-parent/%{name}-properties
%manifold_artifact %{name}-deps-parent/%{name}-properties-test
%manifold_artifact %{name}-deps-parent/%{name}-props
#manifold_artifact %{name}-deps-parent/%{name}-props-middle-test
%manifold_artifact %{name}-deps-parent/%{name}-props-rt
#manifold_artifact %{name}-deps-parent/%{name}-props-test
#manifold_artifact %{name}-deps-parent/%{name}-science
#manifold_artifact %{name}-deps-parent/%{name}-science-test
%manifold_artifact %{name}-deps-parent/%{name}-strings
%manifold_artifact %{name}-deps-parent/%{name}-strings-test
%manifold_artifact %{name}-deps-parent/%{name}-strings-test-excl
%manifold_artifact %{name}-deps-parent/%{name}-templates
%manifold_artifact %{name}-deps-parent/%{name}-templates-rt
%manifold_artifact %{name}-deps-parent/%{name}-templates-test
%manifold_artifact %{name}-deps-parent/%{name}-test
%manifold_artifact %{name}-deps-parent/%{name}-text
%manifold_artifact %{name}-deps-parent/%{name}-text-test
%manifold_artifact %{name}-deps-parent/%{name}-tuple
%manifold_artifact %{name}-deps-parent/%{name}-tuple-rt
%manifold_artifact %{name}-deps-parent/%{name}-tuple-test
%manifold_artifact %{name}-deps-parent/%{name}-xml
%manifold_artifact %{name}-deps-parent/%{name}-xml-rt
%manifold_artifact %{name}-deps-parent/%{name}-xml-test
%manifold_artifact %{name}-deps-parent/%{name}-yaml
%manifold_artifact %{name}-deps-parent/%{name}-yaml-rt
%manifold_artifact %{name}-deps-parent/%{name}-yaml-test
%manifold_artifact %{name}-javadoc-agent
%manifold_artifact %{name}-util
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}*
%files -f .mfiles
%license LICENSE
%doc README.md authors.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog