Ticket #16210: Portfile

File Portfile, 2.9 KB (added by mij@…, 16 years ago)

Portfile

Line 
1# -*- 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
2# $Id$
3
4PortSystem          1.0
5
6name                libcudd
7version             2.4.1
8categories          devel
9maintainers         bitchx.it:mij
10description         An efficient library for manipulating decision diagrams
11long_description    The CUDD package provides functions to manipulate Binary \
12                    Decision Diagrams (BDDs), Algebraic Decision Diagrams (ADDs), \
13                    and Zero-suppressed Binary Decision Diagrams (ZDDs). It's \
14                    been written by Fabio Somenzi at the University of Colorado, \
15                    Boulder.
16
17homepage            http://vlsi.colorado.edu/~fabio/CUDD/
18master_sites        ftp://vlsi.colorado.edu/pub/
19distname            cudd-${version}
20checksums           sha1 0a0894ff5a2798a73fcacf76d451777aa02919ce
21platforms           darwin
22
23# patch to:
24# Makefile: avoid compiler flags that cause errors, add C++ interface target
25patchfiles          patch-Makefile.diff patch-obj-cuddObj.cc.diff patch-obj-cuddObj.hh.diff patch-cudd-Makefile.diff patch-dddmp-Makefile.diff patch-epd-Makefile.diff patch-mtr-Makefile.diff patch-obj-Makefile.diff patch-st-Makefile.diff patch-util-Makefile.diff
26
27use_configure       no
28build.target        distclean
29build.target-append build
30
31post-build {
32    # generate dylib for C interface
33    exec /bin/sh -c "gcc -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcudd.dylib -o ${worksrcpath}/libcudd.dylib `find ${worksrcpath}/cudd ${worksrcpath}/dddmp ${worksrcpath}/epd ${worksrcpath}/mtr ${worksrcpath}/st ${worksrcpath}/util -name '*.o'`"
34
35    # compile the additional C++ interface
36    exec /bin/sh -c "cd ${worksrcpath}/obj && make distclean && make 1>/dev/null 2>/dev/null"
37    # generate dylib for C++ interface
38    exec /bin/sh -c "g++ -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcuddobj.dylib -L${worksrcpath} -lcudd -o ${worksrcpath}/libcuddobj.dylib ${worksrcpath}/obj/cuddObj.o"
39}
40
41destroot {
42    # install header files
43    xinstall -m 755 -d ${destroot}${prefix}/include/cudd
44    xinstall -m 644 -W ${worksrcpath}/include cudd.h cuddInt.h cuddObj.hh \
45                    dddmp.h epd.h mtr.h st.h util.h \
46                ${destroot}${prefix}/include/cudd
47    # install libraries
48    xinstall -m 755 -d ${destroot}${prefix}/lib/cudd
49    xinstall -m 644 -W ${worksrcpath} libcudd.dylib libcuddobj.dylib ${destroot}${prefix}/lib/cudd
50    # TODO: install documentation ...
51    # Print message on how to use the library
52    ui_msg          "\n=============\nThe CUDD library for the Mac is compiled dynamically as per Apple's recommendations.\nTo compile against it, use:\n\t'-I${prefix}/cudd -L${prefix}/cudd -lcudd' for the C interface\n\t'-I${prefix}/cudd -L${prefix}/cudd -lcudd -lcuddobj' for the C++ interface.\n============="
53}
54