Changeset 27199


Ignore:
Timestamp:
04/17/13 19:58:06 (8 years ago)
Author:
ak19
Message:

Adding targets for checking out and compiling imagemagick from source if the checkout.imagemagick.ext property has been activated in build.properties. These changes work in conjunction with the gnome-lib/CASCADE-MAKE.sh changes just committed which will source the devel.bash in the imagemagick src extension before continuing, since gnome-lib compilation is now thought to depend on imagemagick being present in the linux/mac environment, which may not always be the case. In the latter situation, the checkout.imagemagick.ext flag can be set to true, in which case build.xml will get and compile imagemagick and proceed to hopefully successfully compile gnome-lib thereafter and GS3 can then get compiled up properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r27185 r27199  
    226226  </condition>
    227227
    228   <!-- If building a release then we want to adjust environment variables so that the support library can be see during compilation -->
     228  <!-- If building a release then we want to adjust environment variables so that the support library can be seen during compilation -->
    229229  <if><bool><isset property="use.gnomelib.ext"/></bool>
    230230    <property name="gnome-lib-dir" value="${basedir}/ext/gnome-lib-minimal/${os.bin.dir}"/>
     
    22572257  <target name="prepare-gs2build" depends="init" if="collection.building.enabled" unless="gs2build.present">
    22582258    <antcall target="checkout-gs2build"/>
     2259    <antcall target="prepare-imagemagick"/> <!-- has to be done before calling prepare-gnome-lib -->
    22592260    <antcall target="prepare-gnome-lib"/>
    22602261    <antcall target="unzip-windows-packages"/>
     
    22712272      <arg value="-r"/><arg value="${branch.revision}"/>
    22722273    </exec>
     2274  </target>
     2275
     2276
     2277  <target name="prepare-imagemagick" depends="init" if="collection.building.enabled">
     2278    <if>
     2279      <bool>
     2280    <istrue value="${checkout.imagemagick.ext}"/>
     2281      </bool>
     2282
     2283      <antcall target="checkout-imagemagick"/>
     2284      <antcall target="compile-imagemagick"/>
     2285
     2286      <else>
     2287    <echo>**** Not preparing imagemagick:</echo>
     2288    <echo>property checkout.imagemagick.ext in build.properties was not set or was set to false</echo>
     2289      </else>
     2290    </if>
     2291  </target>
     2292
     2293  <target name="checkout-imagemagick" depends="init" if="collection.building.enabled" unless="nosvn.mode">
     2294   
     2295    <property name="imagemagick.src.dir" value="${gs2build.home}/ext/imagemagick"/>
     2296    <condition property="imagemagick.src.present">
     2297      <available file="${imagemagick.src.dir}" type="dir" />
     2298    </condition>
     2299
     2300    <if>
     2301      <bool>
     2302    <not><istrue value="${imagemagick.src.present}"/></not>
     2303      </bool>
     2304     
     2305      <echo>checking out imagemagick source into the extension area</echo>
     2306
     2307      <exec executable="svn">
     2308    <arg value="checkout"/>
     2309    <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/src"/>
     2310    <arg value="${imagemagick.src.dir}"/>
     2311      </exec>
     2312
     2313      <else>
     2314    <echo>imagemagick source code already exists at ${imagemagick.src.dir}</echo>
     2315      </else>
     2316    </if>
     2317  </target>
     2318
     2319 <!-- Compile up imagemagick src folder if: the checkout.imagemagick.ext flag is turned on, if the imagick source code exists and if hasn't already been compiled up, then compile it up. Later can check if a gs-specific binary version has been installed already, in which case compilation won't be necessary. -->
     2320  <target name="compile-imagemagick" if="checkout.imagemagick.ext">
     2321   
     2322    <property name="imagemagick.src.dir" value="${gs2build.home}/ext/imagemagick"/>
     2323    <property name="imagemagick.compiled.dir" value="${gs2build.home}/ext/imagemagick/${os.bin.dir}"/>
     2324
     2325    <condition property="imagemagick.src.present">
     2326      <available file="${imagemagick.src.dir}" type="dir" />
     2327    </condition>
     2328    <condition property="imagemagick.compiled.present">
     2329      <available file="${imagemagick.compiled.dir}" type="dir"/>
     2330    </condition>
     2331    <!--<condition property="imagemagick.bin.present">
     2332      <available file="${basedir}/wherever/the/imgmagick/binary/is/to/be/found" type="dir" />
     2333    </condition>-->
     2334
     2335    <if>
     2336      <bool>
     2337    <and>
     2338      <istrue value="${imagemagick.src.present}"/> <!-- imagemagick src code is present -->
     2339      <not><istrue value="${imagemagick.compiled.present}"/></not> <!-- imagemagick src not compiled yet, so no imagemagick/os subfolder yet -->
     2340      </and>
     2341      </bool>
     2342      <!-- then compile it. Only necessary for mac/linux, since windows has a stable working binary of imagemagick -->
     2343      <exec executable="/bin/bash" dir="${imagemagick.src.dir}" failonerror="true">
     2344        <arg value="CASCADE-MAKE.sh"/>
     2345      </exec> 
     2346    </if>
    22732347  </target>
    22742348
     
    23292403  </target>
    23302404
     2405
    23312406  <target name="checkout-gnome-lib" depends="init" if="collection.building.enabled" unless="nosvn.mode">
    2332     <echo>checking out gnome-lib extension</echo>
    2333     <exec executable="svn">
    2334       <arg value="checkout"/>
    2335       <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/src"/>
    2336       <arg value="${gs2build.home}/ext/gnome-lib"/>
    2337     </exec>
     2407
     2408    <property name="gnomelib.src.dir" value="${basedir}/gs2build/ext/gnome-lib"/>
     2409    <condition property="gnome.src.present">
     2410      <available file="${gnomelib.src.dir}" type="dir" />
     2411    </condition>
     2412
     2413    <if>
     2414      <bool>
     2415    <not><istrue value="${gnome.src.present}"/></not>
     2416      </bool>
     2417
     2418      <echo>checking out gnome-lib extension</echo>
     2419      <exec executable="svn">
     2420    <arg value="checkout"/>
     2421    <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/src"/>
     2422    <arg value="${gs2build.home}/ext/gnome-lib"/>
     2423      </exec>
     2424
     2425      <else>
     2426    <echo>gnomelib source code already exists at ${gnomelib.src.dir}</echo>
     2427      </else>
     2428    </if>
     2429
    23382430  </target>
    23392431
Note: See TracChangeset for help on using the changeset viewer.