On 08/23/2011 04:44 AM, Jussi Lehtola wrote:
$ ant -lib %{_datadir}/icedtea-web/plugin.jar doc main
doesn't work, it still fails in the same error.
There are two things that were causing problems. The spec file was
setting classpath to a directory, not a jar. Also, the build.xml file
was instructing ant to discard the classpath specified on the command line.
I have attached two patches (made against f16, and contain some extra
debugging commands). I started off a build using them:
https://koji.fedoraproject.org/koji/taskinfo?taskID=3296091
The build failed, but it managed to compile at least some of the java
code without the JSObject errors.
Cheers,
Omair
diff --git a/jmol.spec b/jmol.spec
index d651f23..62179b4 100644
--- a/jmol.spec
+++ b/jmol.spec
@@ -1,6 +1,6 @@
Name: jmol
Version: 12.0.48
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: An open-source Java viewer for chemical structures in 3D
Group: Applications/Engineering
License: LGPLv2+
@@ -15,6 +15,8 @@ Patch0: jmol-12.0.41-fedorabuild.patch
Patch1: jmol-12.0.41-jarlocation.patch
# Don't try to sign jars
Patch2: jmol-12.0.41-dontsign.patch
+# Dont ignore the system classpath
+Patch3: do-not-ignore-classpath.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -67,6 +69,7 @@ The documentation for %{name}.
%patch0 -p1 -b .fedorabuild
%patch1 -p1 -b .jarlocation
%patch2 -p1 -b .nosign
+%patch3 -p0
# Remove binaries
find -name '*.class' -exec rm -f '{}' \;
@@ -97,9 +100,10 @@ Categories=Education;Science;Chemistry;Physics;DataVisualization;
EOF
%build
-# Need to be able to find netscape.javascript.JSObject
-export CLASSPATH=%{_datadir}/icedtea-web
-ant doc main
+# Need to be able to find netscape.javascript.*classes
+PLUGIN_JAR=%{_datadir}/icedtea-web/plugin.jar
+jar tf $PLUGIN_JAR | grep JSObject
+ant --execdebug -lib $PLUGIN_JAR doc main
%install
rm -rf %{buildroot}
--- build.xml.orig 2011-08-23 13:30:34.000000000 -0400
+++ build.xml 2011-08-23 13:30:43.000000000 -0400
@@ -14,7 +14,6 @@
<!-- pull developer-specific settings from their home directory -->
<property file="${user.home}/.jmol.build.properties" />
<!-- compile options -->
- <property name="build.sysclasspath" value="ignore" />
<property name="build.compiler" value="javac1.5" />
<!-- for some reason, I can't get ant to use this ${java.version}
property as the value of the source parameter -->
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel