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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name libcudd |
---|
7 | version 2.5.0 |
---|
8 | categories devel |
---|
9 | maintainers bitchx.it:mij |
---|
10 | description An efficient library for manipulating decision diagrams |
---|
11 | long_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 | |
---|
17 | homepage http://vlsi.colorado.edu/~fabio/CUDD/ |
---|
18 | master_sites ftp://vlsi.colorado.edu/pub/ |
---|
19 | distname cudd-${version} |
---|
20 | checksums sha1 7d0d8b4b03f5c1819fe77a82f3b947421a72d629 |
---|
21 | platforms darwin |
---|
22 | |
---|
23 | use_configure no |
---|
24 | universal_variant yes |
---|
25 | |
---|
26 | pre-build { |
---|
27 | system "cd ${worksrcpath} && make distclean" |
---|
28 | system "cd ${worksrcpath}/obj && make distclean" |
---|
29 | } |
---|
30 | |
---|
31 | build.target build |
---|
32 | build.args CC="${configure.cc}" CFLAGS="${configure.cc_archflags}" \ |
---|
33 | CXX="${configure.cxx}" CXXFLAGS="${configure.cxx_archflags}" |
---|
34 | |
---|
35 | post-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 | |
---|
45 | destroot { |
---|
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 | |
---|
57 | notes " |
---|
58 | To 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 | " |
---|