Cableswig version 20090521 - How to Download and Install on Mac OS X
Sunday the 22nd of November, 2009

    cableswig  most recent diff


    version 20090521

      View the most recent changes for the cableswig port at: cableswig.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for cableswig.
      The raw portfile for cableswig 20090521 is located here:
      http://cableswig.darwinports.com/dports/devel/cableswig/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/cableswig


      # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
      The cableswig Portfile 51907 2009-06-06 08:48:27Z toby macports.org $

      PortSystem 1.0

      Name: cableswig
      Version: 20090521
      # CableSwig is only available from cvs and there are no release tags, using date
      # of cvs checkout for the version number.

      Category: devel
      Maintainers: dweber openmaintainer

      Description: CableSwig creates interfaces to interpreted languages such as Tcl and Python.

      Long Description: CableSwig is used to create interfaces (i.e. wrappers) to interpreted languages such as Tcl and Python. It was created to produce wrappers for ITK because the toolkit uses C++ structures that SWIG cannot parse (deeply nested template instantiations). CableSwig is a combination tool that uses GCC_XML as the c++ parser. The input files are Cable style input files. The XML produced from the Cable/GCC_XML input files are then parsed and feed into a modified version of SWIG. SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. It is used to generate the language bindings to the target language. Currently, Tcl and Python are supported. CableSwig consists of four executables: 1) cswig - the main cable swig executable, that takes an xml file from gccxml as input. The xml file should be created from a cable config input file. This program is a modified version of the standard SWIG main. It uses CABLE libraries to parse the input XML from gccxml to create SWIG data structures describing the C++ code to be wrapped. 2) cableidx - a program to generate index files from gccxml xml files. The index files tell cswig what classes are wrapped in which libraries. This is important because swig needs to know if a class is not wrapped or wrapped in another module, and if it is wrapped which module it is wrapped in. 3) gccxml_cc1plus - A patched version of gcc that has the -fxml option to convert c++ into xml. 4) gccxml - ( www.gccxml.org) the front end program to gccxml_cc1plus. CableSwig was developed to support ITK, and has not been widely used elsewhere. Not all features of SWIG are currently accessible through CableSwig. Features known to be missing are: * Wrapping of public data members in structs and classes, no accessor routines are created, the original source must provide access methods.

      Homepage: http://www.itk.org/ITK/resources/CableSwig.html
      Platform: darwin

      fetch.type cvs
      cvs.root :pserver:anonymous public.kitware.com:/cvsroot/CableSwig
      cvs.module CableSwig
      cvs.date "21-May-2009"

      post-extract {
      move ${workpath}/CableSwig ${worksrcpath}
      }

      depends_build port:cmake port:gmake port:bison port:gawk

      # Use gmake and build in a separate directory from the source
      build.type gnu
      build.dir ${workpath}/cableswig-build

      configure {
      xinstall -d -m 755 ${build.dir}
      system "cd ${build.dir} && cmake ${configure.args} ${worksrcpath}"
      }

      configure.args-append -DBISON_YACC:FILEPATH=${prefix}/bin/bison -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -DCMAKE_SKIP_RPATH:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCSWIG_USE_SYSTEM_GCCXML:BOOL=OFF -DSWIG_BUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF

      if {[info exists universal_sysroot]} {
      configure.args-append -DCMAKE_OSX_SYSROOT=${universal_sysroot} }

      Variant: examples description "provide examples" {
      configure.args-delete -DSWIG_BUILD_EXAMPLES:BOOL=OFF
      configure.args-append -DSWIG_BUILD_EXAMPLES:BOOL=ON
      }

      Variant: testing description "provide testing" {
      configure.args-delete -DBUILD_TESTING:BOOL=OFF
      configure.args-append -DBUILD_TESTING:BOOL=ON
      }

      Variant: gccxml description "use port:gccxml" {
      depends_lib-append port:gccxml
      configure.args-delete -DCSWIG_USE_SYSTEM_GCCXML:BOOL=OFF
      configure.args-append -DCSWIG_USE_SYSTEM_GCCXML:BOOL=ON
      }


    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/cableswig
      % sudo port install cableswig
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching cableswig
      ---> Verifying checksum for cableswig
      ---> Extracting cableswig
      ---> Configuring cableswig
      ---> Building cableswig with target all
      ---> Staging cableswig into destroot
      ---> Installing cableswig
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using cableswig with these commands:
      %  man cableswig
      % apropos cableswig
      % which cableswig
      % locate cableswig

     Where to find more information:

    Darwin Ports



    Lightbox this page.