Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 138619 | Differences between
and this patch

Collapse All | Expand All

(-)jmol-10.2.0-orig.build.xml (-321 / +4 lines)
Lines 28-36 Link Here
28
  <property name="applet.classes.dir" value="build/applet-classes" />
28
  <property name="applet.classes.dir" value="build/applet-classes" />
29
  <property name="apisio.classes.dir" value="build/apisio-classes" />
29
  <property name="apisio.classes.dir" value="build/apisio-classes" />
30
  <property name="tests.dir" value="build/unit.tests" />
30
  <property name="tests.dir" value="build/unit.tests" />
31
  <property name="javadoc.dir" value="javadoc" />
32
  <property name="docbook-xsl" value="docbook-xsl-1.69.0" />
33
  <property name="docbook-xml" value="docbook-xml-4.4" />
34
31
35
  <!-- you can set this by defining it in ~/.jmol.build.properties -->
32
  <!-- you can set this by defining it in ~/.jmol.build.properties -->
36
  <property name="keystore.name" value="Must be set by user." />
33
  <property name="keystore.name" value="Must be set by user." />
Lines 61-67 Link Here
61
58
62
  <target name="main" id="main" depends="init,jar,applet-jar"/>
59
  <target name="main" id="main" depends="init,jar,applet-jar"/>
63
  
60
  
64
  <target name="all" id="all" depends="doc,main"/>
61
  <target name="all" id="all" depends="main"/>
65
62
66
  <target name="init" id="init">
63
  <target name="init" id="init">
67
    <tstamp/>
64
    <tstamp/>
Lines 72-167 Link Here
72
  </target>
69
  </target>
73
70
74
  <target name="setup" id="setup">
71
  <target name="setup" id="setup">
75
    <condition property="docbook-xsl.uptodate">
76
      <and>
77
        <uptodate targetfile="build/${docbook-xsl}"
78
                  srcfile="doc/${docbook-xsl}.tar.gz" />
79
        <uptodate targetfile="build/${docbook-xsl}.timestamp"
80
                  srcfile="build/${docbook-xsl}" />
81
      </and>
82
    </condition>
83
84
    <condition property="docbook-xml.uptodate">
85
      <and>
86
        <uptodate targetfile="build/docbook-xml"
87
                  srcfile="doc/${docbook-xml}.zip" />
88
        <uptodate targetfile="build/docbook-xml.timestamp"
89
                  srcfile="build/docbook-xml" />
90
      </and>
91
    </condition>
92
93
    <condition property="jmolGuide.uptodate">
94
      <and>
95
        <uptodate targetfile="build/doc/JmolUserGuide/index.html">
96
          <srcfiles dir="doc/source"
97
                    includes="JmolGuide.docbook.xml, guide/*.docbook.xml"/>
98
        </uptodate>
99
        <uptodate targetfile="build/doc/JmolUserGuide_fr/index.html">
100
          <srcfiles dir="doc/source"
101
                    includes="JmolGuide_fr.docbook.xml, guide/*_fr.docbook.xml"/>
102
        </uptodate>
103
      </and>
104
    </condition>
105
106
    <condition property="jmolHistory.uptodate">
107
      <and>
108
        <uptodate targetfile="build/doc/JmolHistory/ChangeLog.html">
109
          <srcfiles dir="doc/source"
110
                    includes="JmolHistory.xml,JmolHistoryToHtml.xsl,history/changes.xml" />
111
        </uptodate>
112
        <uptodate targetfile="build/doc/JmolHistory/ChangeLog_fr.html">
113
          <srcfiles dir="doc/source"
114
                    includes="JmolHistory_fr.xml,JmolHistoryToHtml.xsl,history/changes_fr.xml" />
115
        </uptodate>
116
        <uptodate targetfile="build/doc/JmolHistory/ChangeLog_nl.html">
117
          <srcfiles dir="doc/source"
118
                    includes="JmolHistory_nl.xml,JmolHistoryToHtml.xsl,history/changes_nl.xml" />
119
        </uptodate>
120
      </and>
121
    </condition>
122
    
123
    <condition property="jmolDevelopersGuide.uptodate">
124
      <and>
125
        <uptodate targetfile="build/doc/JmolDevelopersGuide.html">
126
          <srcfiles dir="doc/source"
127
                    includes="JmolDevelopersGuide.docbook.xml"/>
128
        </uptodate>
129
        <uptodate targetfile="build/doc/JmolDevelopersGuide_fr.html">
130
          <srcfiles dir="doc/source"
131
                    includes="JmolDevelopersGuide_fr.docbook.xml"/>
132
        </uptodate>
133
        <uptodate targetfile="build/doc/JmolDevelopersGuide_de.html">
134
          <srcfiles dir="doc/source"
135
                    includes="JmolDevelopersGuide_de.docbook.xml"/>
136
        </uptodate>
137
      </and>
138
    </condition>
139
140
    <condition property="jmolAppletGuide.uptodate">
141
      <and>
142
        <uptodate targetfile="build/doc/JmolAppletGuide.html">
143
          <srcfiles dir="doc/source"
144
                    includes="JmolAppletGuide.docbook.xml, applet/*.docbook.xml"/>
145
        </uptodate>
146
        <uptodate targetfile="build/doc/JmolAppletGuide_fr.html">
147
          <srcfiles dir="doc/source"
148
                    includes="JmolAppletGuide_fr.docbook.xml, applet/*_fr.docbook.xml"/>
149
        </uptodate>
150
        <uptodate targetfile="build/doc/JmolAppletGuide_de.html">
151
          <srcfiles dir="doc/source"
152
                    includes="JmolAppletGuide_de.docbook.xml"/>
153
        </uptodate>
154
      </and>
155
    </condition>
156
72
157
    <available classname="com.icl.saxon.StyleSheet"
158
               classpath="${lib.dir}/saxon.jar"
159
               property="xsl.available"/>
160
    <uptodate property="javadoc.uptodate" targetfile="${javadoc.dir}/index.html">
161
      <srcfiles dir="src" includes="**/*.java, **/*.html" />
162
    </uptodate>
163
    <available file="${keystore.name}" property="keystore.present" />
164
    <!-- Optional proxy settings (if defined) -->
165
    <condition property="proxyHost"
73
    <condition property="proxyHost"
166
               value="-Dhttp.proxyHost=${http.proxyHost}" >
74
               value="-Dhttp.proxyHost=${http.proxyHost}" >
167
      <not>
75
      <not>
Lines 326-347 Link Here
326
  </target>
234
  </target>
327
235
328
  <target name="jar" id="jar"
236
  <target name="jar" id="jar"
329
          depends="init,classes,jmolGuide,jmolHistory,jmolDevelopersGuide,libjars,main-i18n">
237
          depends="init,classes,libjars">
330
    <copy todir="${classes.dir}/org/openscience/jmol/Data/guide" >
331
      <fileset dir="build/doc/JmolUserGuide">
332
        <include name="**/*.html" />
333
      </fileset>
334
    </copy>
335
    <copy todir="${classes.dir}/org/openscience/jmol/Data/guide_fr" >
336
      <fileset dir="build/doc/JmolUserGuide_fr">
337
        <include name="**/*.html" />
338
      </fileset>
339
    </copy>
340
    <copy todir="${classes.dir}/org/openscience/jmol/Data" >
341
      <fileset dir="build/doc/JmolHistory">
342
        <include name="**/*.html" />
343
      </fileset>
344
    </copy>
345
    <jar destfile="JmolUnsigned.jar" manifest="manifest/application.txt">
238
    <jar destfile="JmolUnsigned.jar" manifest="manifest/application.txt">
346
      <fileset dir="${classes.dir}" >
239
      <fileset dir="${classes.dir}" >
347
        <exclude name="**/.*" />
240
        <exclude name="**/.*" />
Lines 447-453 Link Here
447
	<!-- note that this class is included in JmolApplet0.jar -->
340
	<!-- note that this class is included in JmolApplet0.jar -->
448
        <exclude name="org/jmol/api/JmolAppletInterface.class" />
341
        <exclude name="org/jmol/api/JmolAppletInterface.class" />
449
        <include name="org/jmol/applet/**" />
342
        <include name="org/jmol/applet/**" />
450
	<include name="org/jmol/i18n/**" />
451
	<include name="org/jmol/popup/**" />
343
	<include name="org/jmol/popup/**" />
452
      </fileset>
344
      </fileset>
453
    </jar>
345
    </jar>
Lines 484-494 Link Here
484
      </fileset>
376
      </fileset>
485
    </jar>
377
    </jar>
486
378
487
    <jar destfile="JmolApplet_i18n.jar" manifest="manifest/applet_i18n.txt" >
488
      <fileset dir="${applet.classes.dir}">
489
        <include name="org/jmol/translation/**" />
490
      </fileset>
491
    </jar>
492
379
493
    <!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
380
    <!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
494
    <!-- changes to this must be replicated below for the signed applet -->
381
    <!-- changes to this must be replicated below for the signed applet -->
Lines 508-514 Link Here
508
        <pathelement path="JmolApplet4.jar" />
395
        <pathelement path="JmolApplet4.jar" />
509
        <pathelement path="JmolApplet5.jar" />
396
        <pathelement path="JmolApplet5.jar" />
510
        <pathelement path="JmolApplet6.jar" />
397
        <pathelement path="JmolApplet6.jar" />
511
        <pathelement path="JmolApplet_i18n.jar" />
512
      </indexjars>
398
      </indexjars>
513
    </jar>
399
    </jar>
514
    <!-- changes to this must be replicated below for the signed applet -->
400
    <!-- changes to this must be replicated below for the signed applet -->
Lines 538-546 Link Here
538
    <signjar jar="JmolApplet6.jar" signedjar="JmolAppletSigned6.jar"
424
    <signjar jar="JmolApplet6.jar" signedjar="JmolAppletSigned6.jar"
539
             keystore="selfSignedCertificate/selfSignedCertificate.store"
425
             keystore="selfSignedCertificate/selfSignedCertificate.store"
540
             storepass="selfSignedCertificate" alias="selfSignedCertificate" />
426
             storepass="selfSignedCertificate" alias="selfSignedCertificate" />
541
    <signjar jar="JmolApplet_i18n.jar" signedjar="JmolAppletSigned_i18n.jar"
542
             keystore="selfSignedCertificate/selfSignedCertificate.store"
543
             storepass="selfSignedCertificate" alias="selfSignedCertificate" />
544
427
545
    <!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
428
    <!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
546
    <!-- this one must be treated specially because of jar indexing
429
    <!-- this one must be treated specially because of jar indexing
Lines 561-567 Link Here
561
        <pathelement path="JmolAppletSigned4.jar" />
444
        <pathelement path="JmolAppletSigned4.jar" />
562
        <pathelement path="JmolAppletSigned5.jar" />
445
        <pathelement path="JmolAppletSigned5.jar" />
563
        <pathelement path="JmolAppletSigned6.jar" />
446
        <pathelement path="JmolAppletSigned6.jar" />
564
        <pathelement path="JmolAppletSigned_i18n.jar" />
565
      </indexjars>
447
      </indexjars>
566
    </jar>
448
    </jar>
567
    <signjar jar="JmolAppletSigned0.jar"
449
    <signjar jar="JmolAppletSigned0.jar"
Lines 571-577 Link Here
571
  </target>
453
  </target>
572
454
573
  <target name="dist" id="dist"
455
  <target name="dist" id="dist"
574
          depends="doc,main-i18n,main,signed-applet">
456
          depends="main,signed-applet">
575
    <!-- first build binary distribution -->
457
    <!-- first build binary distribution -->
576
    <delete dir="build/dist/jmol-${version}"/>
458
    <delete dir="build/dist/jmol-${version}"/>
577
    <mkdir dir="build/dist/jmol-${version}"/>
459
    <mkdir dir="build/dist/jmol-${version}"/>
Lines 650-686 Link Here
650
      </fileset>
532
      </fileset>
651
    </copy>
533
    </copy>
652
534
653
    <copy todir="build/dist/jmol-${version}/doc" >
654
      <fileset dir="doc">
655
        <exclude name="**/CVS"/>
656
      </fileset>
657
    </copy>
658
659
    <!-- remove if really obsolete - for now only uncommented -->
660
    <!-- <copy todir="build/dist/jmol-${version}/samples" >
661
      <fileset dir="samples">
662
        <exclude name="**/CVS"/>
663
      </fileset>
664
    </copy> -->
665
666
    <copy   file="build/doc/JmolDevelopersGuide.html"
667
            tofile="build/dist/jmol-${version}/doc/JmolDevelopersGuide.html" />
668
    <copy   file="build/doc/JmolHistory/ChangeLog.html"
669
            tofile="build/dist/jmol-${version}/ChangeLog.html" />
670
    <copy todir="build/dist/jmol-${version}/doc/JmolUserGuide">
671
      <fileset dir="build/doc/JmolUserGuide">
672
        <include name="**/*.html" />
673
      </fileset>
674
    </copy>
675
    <copy   file="build/doc/JmolAppletGuide.html"
676
            tofile="build/dist/jmol-${version}/doc/JmolAppletGuide.html" />
677
678
<!--
679
    zip distributions to not retain file permissions
680
    <zip zipfile="build/dist/jmol-${version}-full.zip" basedir="build/dist"
681
         includes="jmol-${version}/**" />
682
    -->
683
684
    <tar tarfile="build/dist/jmol-${version}-full.tar.gz"
535
    <tar tarfile="build/dist/jmol-${version}-full.tar.gz"
685
         compression="gzip" >
536
         compression="gzip" >
686
      <tarfileset dir="build/dist"
537
      <tarfileset dir="build/dist"
Lines 711-717 Link Here
711
      <fileset dir=".">
562
      <fileset dir=".">
712
        <include name="apisio.classes" />
563
        <include name="apisio.classes" />
713
        <include name="build.xml" />
564
        <include name="build.xml" />
714
        <include name="build-i18n.xml" />
715
      </fileset>
565
      </fileset>
716
    </copy>
566
    </copy>
717
567
Lines 801-807 Link Here
801
    </delete>
651
    </delete>
802
  </target>
652
  </target>
803
653
804
  <target name="spotless" id="spotless" depends="clean,spotless-i18n">
654
  <target name="spotless" id="spotless" depends="clean">
805
    <delete dir="build"/>
655
    <delete dir="build"/>
806
    <delete dir="${javadoc.dir}"/>
656
    <delete dir="${javadoc.dir}"/>
807
    <delete dir="packaging/rpm/dist"/>
657
    <delete dir="packaging/rpm/dist"/>
Lines 811-975 Link Here
811
    <java fork="true" jar="Jmol.jar" />
661
    <java fork="true" jar="Jmol.jar" />
812
  </target>
662
  </target>
813
663
814
  <!-- ********************************
815
       Documentation Targets
816
       ******************************** -->
817
  <target name="doc" id="doc"
818
          depends="jmolGuide,jmolDevelopersGuide,jmolAppletGuide,jmolHistory,javadoc"/>
819
  
820
  <target name="initdoc" depends="init,check.docbook-xml,check.docbook-xsl,check.xsl" />
821
  
822
  <target name="check.docbook-xsl" depends="setup" unless="docbook-xsl.uptodate" >
823
    <delete file="build/${docbook-xsl}.timestamp" />
824
    <delete dir="build/${docbook-xsl}" />
825
    <mkdir dir="build/${docbook-xsl}" />
826
    <untar src="doc/${docbook-xsl}.tar.gz" dest="build"
827
           compression="gzip" />
828
    <touch file="build/${docbook-xsl}.timestamp" />
829
  </target>
830
831
  <target name="check.docbook-xml" depends="setup" unless="docbook-xml.uptodate" >
832
    <delete file="build/docbook-xml.timestamp" />
833
    <delete dir="build/docbook-xml" />
834
    <mkdir dir="build/docbook-xml" />
835
    <unzip src="doc/${docbook-xml}.zip" dest="build/docbook-xml" />
836
    <touch file="build/docbook-xml.timestamp" />
837
  </target>
838
839
  <target name="check.xsl" depends="setup" unless="xsl.available" >
840
    <echo message="XSLT class 'com.icl.saxon.StyleSheet' not found." />
841
    <echo message="Note that the documentation is NOT generated now." />
842
  </target>
843
844
  <target name="javadoc" depends="initdoc" unless="javadoc.uptodate">
845
    <mkdir dir="${javadoc.dir}"/>
846
    <javadoc destdir="${javadoc.dir}" sourcepath="src"
847
             private="true"
848
             packagenames="org.openscience.*,org.jmol.*">
849
      <classpath refid="project.class.path" />
850
    </javadoc>
851
  </target>
852
853
  <target name="jmolGuide" id="jmolGuide" depends="initdoc"
854
          unless="jmolGuide.uptodate" >
855
    <echo message="Generating user's guide" />
856
    <mkdir dir="build/doc/JmolUserGuide" />
857
    <java fork="true" dir="build/doc/JmolUserGuide"
858
          classname="com.icl.saxon.StyleSheet"
859
          classpath="${lib.dir}/saxon.jar" >
860
      <jvmarg value="${proxyHost}" />
861
      <jvmarg value="${proxyPort}" />
862
      <arg value="../../../doc/source/JmolGuide.docbook.xml" />
863
      <arg value="../../${docbook-xsl}/html/chunk.xsl" />
864
    </java>
865
    <echo message="Generating user's guide (fr)" />
866
    <mkdir dir="build/doc/JmolUserGuide_fr" />
867
    <java fork="true" dir="build/doc/JmolUserGuide_fr"
868
          classname="com.icl.saxon.StyleSheet"
869
          classpath="${lib.dir}/saxon.jar" >
870
      <jvmarg value="${proxyHost}" />
871
      <jvmarg value="${proxyPort}" />
872
      <arg value="../../../doc/source/JmolGuide_fr.docbook.xml" />
873
      <arg value="../../${docbook-xsl}/html/chunk.xsl" />
874
    </java>
875
  </target>
876
877
  <target name="jmolHistory" id="jmolHistory"
878
          depends="initdoc" unless="jmolHistory.uptodate" >
879
    <echo message="Generating history of changes" />
880
    <mkdir dir="build/doc/JmolHistory" />
881
    <java fork="true" dir="build/doc/JmolHistory"
882
          classname="com.icl.saxon.StyleSheet"
883
          classpath="${lib.dir}/saxon.jar" >
884
      <arg value="-o" />
885
      <arg value="ChangeLog.html" />
886
      <arg value="../../../doc/source/JmolHistory.xml" />
887
      <arg value="../../../doc/source/JmolHistoryToHtml.xsl" />
888
    </java>
889
    <echo message="Generating history of changes (fr)" />
890
    <java fork="true" dir="build/doc/JmolHistory"
891
          classname="com.icl.saxon.StyleSheet"
892
          classpath="${lib.dir}/saxon.jar" >
893
      <arg value="-o" />
894
      <arg value="ChangeLog_fr.html" />
895
      <arg value="../../../doc/source/JmolHistory_fr.xml" />
896
      <arg value="../../../doc/source/JmolHistoryToHtml.xsl" />
897
      <arg value="lang=fr" />
898
    </java>
899
    <echo message="Generating history of changes (nl)" />
900
    <java fork="true" dir="build/doc/JmolHistory"
901
          classname="com.icl.saxon.StyleSheet"
902
          classpath="${lib.dir}/saxon.jar" >
903
      <arg value="-o" />
904
      <arg value="ChangeLog_nl.html" />
905
      <arg value="../../../doc/source/JmolHistory_nl.xml" />
906
      <arg value="../../../doc/source/JmolHistoryToHtml.xsl" />
907
      <arg value="lang=nl" />
908
    </java>
909
  </target>
910
911
  <target name="jmolDevelopersGuide" id="jmolDevelopersGuide"
912
          depends="initdoc" unless="jmolDevelopersGuide.uptodate" >
913
    <echo message="Generating developer's guide" />
914
    <java fork="true" dir="build/doc"
915
          classname="com.icl.saxon.StyleSheet"
916
          classpath="${lib.dir}/saxon.jar" >
917
      <arg value="-o" />
918
      <arg value="JmolDevelopersGuide.html" />
919
      <arg value="../../doc/source/JmolDevelopersGuide.docbook.xml" />
920
      <arg value="../${docbook-xsl}/html/docbook.xsl" />
921
    </java>
922
    <echo message="Generating developer's guide (fr)" />
923
    <java fork="true" dir="build/doc"
924
          classname="com.icl.saxon.StyleSheet"
925
          classpath="${lib.dir}/saxon.jar" >
926
      <arg value="-o" />
927
      <arg value="JmolDevelopersGuide_fr.html" />
928
      <arg value="../../doc/source/JmolDevelopersGuide_fr.docbook.xml" />
929
      <arg value="../${docbook-xsl}/html/docbook.xsl" />
930
    </java>
931
    <echo message="Generating developer's guide (de)" />
932
    <java fork="true" dir="build/doc"
933
          classname="com.icl.saxon.StyleSheet"
934
          classpath="${lib.dir}/saxon.jar" >
935
      <arg value="-o" />
936
      <arg value="JmolDevelopersGuide_de.html" />
937
      <arg value="../../doc/source/JmolDevelopersGuide_de.docbook.xml" />
938
      <arg value="../${docbook-xsl}/html/docbook.xsl" />
939
    </java>
940
  </target>
941
942
  <target name="jmolAppletGuide" id="jmolAppletGuide" depends="initdoc"
943
          unless="jmolAppletGuide.uptodate" >
944
    <echo message="Generating applet guide" />
945
    <java fork="true" dir="build/doc"
946
          classname="com.icl.saxon.StyleSheet"
947
          classpath="${lib.dir}/saxon.jar" >
948
      <arg value="-o" />
949
      <arg value="JmolAppletGuide.html" />
950
      <arg value="../../doc/source/JmolAppletGuide.docbook.xml" />
951
      <arg value="../${docbook-xsl}/html/docbook.xsl" />
952
    </java>
953
    <echo message="Generating applet guide (fr)" />
954
    <java fork="true" dir="build/doc"
955
          classname="com.icl.saxon.StyleSheet"
956
          classpath="${lib.dir}/saxon.jar" >
957
      <arg value="-o" />
958
      <arg value="JmolAppletGuide_fr.html" />
959
      <arg value="../../doc/source/JmolAppletGuide_fr.docbook.xml" />
960
      <arg value="../${docbook-xsl}/html/docbook.xsl" />
961
    </java>
962
    <echo message="Generating applet guide (de)" />
963
    <java fork="true" dir="build/doc"
964
          classname="com.icl.saxon.StyleSheet"
965
          classpath="${lib.dir}/saxon.jar" >
966
      <arg value="-o" />
967
      <arg value="JmolAppletGuide_de.html" />
968
      <arg value="../../doc/source/JmolAppletGuide_de.docbook.xml" />
969
      <arg value="../${docbook-xsl}/html/docbook.xsl" />
970
    </java>
971
  </target>
972
973
  <target name="test" id="test" depends="main,compile-tests">
664
  <target name="test" id="test" depends="main,compile-tests">
974
    <junit printsummary="yes" haltonfailure="yes">
665
    <junit printsummary="yes" haltonfailure="yes">
975
      <classpath>
666
      <classpath>
Lines 998-1009 Link Here
998
    <jar destfile="Tests.jar" basedir="${test-classes.dir}" />
689
    <jar destfile="Tests.jar" basedir="${test-classes.dir}" />
999
  </target>
690
  </target>
1000
691
1001
  <!-- i18n stuff -->
1002
  <target name="main-i18n" depends="classes">
1003
    <ant antfile="build-i18n.xml" target="main-i18n"/>
1004
  </target>
1005
  <target name="spotless-i18n">
1006
    <ant antfile="build-i18n.xml" target="spotless-i18n"/>
1007
  </target>
1008
1009
</project>
692
</project>

Return to bug 138619