Ticket #42337: Portfile

File Portfile, 2.8 KB (added by vortexfive@…, 11 years ago)
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: Portfile 88247 2011-12-23 11:21:32Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                libcudd
7version             2.5.0
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 7d0d8b4b03f5c1819fe77a82f3b947421a72d629
21platforms           darwin
22
23use_configure       no
24universal_variant   yes
25
26pre-build {
27    system "cd ${worksrcpath} && make distclean"
28    system "cd ${worksrcpath}/obj && make distclean"
29}
30
31build.target        build
32build.args          CC="${configure.cc}" CFLAGS="${configure.cc_archflags}" \
33                    CXX="${configure.cxx}" CXXFLAGS="${configure.cxx_archflags}"
34
35post-build {
36    # generate dylib for C interface
37    exec /bin/sh -c "${configure.cc} ${configure.cc_archflags} -dynamiclib -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'`"
38
39    # compile the additional C++ interface
40    system "cd ${worksrcpath}/obj && make distclean && make [join ${build.args}]"
41    # generate dylib for C++ interface
42    exec /bin/sh -c "${configure.cxx} ${configure.cxx_archflags} -dynamiclib -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcuddobj.dylib -L${worksrcpath} -lcudd -o ${worksrcpath}/libcuddobj.dylib ${worksrcpath}/obj/cuddObj.o"
43}
44
45destroot {
46    # install header files
47    xinstall -m 755 -d ${destroot}${prefix}/include/cudd
48    xinstall -m 644 -W ${worksrcpath}/include cudd.h cuddInt.h cuddObj.hh \
49                    dddmp.h epd.h mtr.h st.h util.h \
50                ${destroot}${prefix}/include/cudd
51    # install libraries
52    xinstall -m 755 -d ${destroot}${prefix}/lib/cudd
53    xinstall -m 644 -W ${worksrcpath} libcudd.dylib libcuddobj.dylib ${destroot}${prefix}/lib/cudd
54    # TODO: install documentation ...
55}
56
57notes "
58To compile against the CUDD dynamic library, use\
59'-I${prefix}/include/cudd -L${prefix}/lib/cudd -lcudd' for the C interface, or\
60'-I${prefix}/include/cudd -L${prefix}/lib/cudd -lcudd -lcuddobj' for the C++ interface.
61"