# -*- 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 PortSystem 1.0 PortGroup makefile 1.0 PortGroup muniversal 1.1 PortGroup compiler_blacklist_versions 1.0 name lrslib version 7.2 revision 3 categories math license GPL-2+ maintainers {@catap korins.ky:kirill} openmaintainer homepage http://cgm.cs.mcgill.ca/~avis/C/lrs.html description self-contained ANSI C implementation of the reverse search algorithm for vertex enumeration/convex hull problems long_description {*}${description} master_sites http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/ set distfile_version 0[string map {. ""} ${version}] distname ${name}-${distfile_version} checksums rmd160 8e07d8f6615472b9530ecbf763be0d1b541426d9 \ sha256 fc48754a1ded1d8445d40ecfbe3546e4f27d53aaee95dc2c8c0c79fb9cd532f0 \ size 496411 post-extract { # Extracted files do not have correct 'group' and 'other' permissions. fs-traverse item ${worksrcpath} { if {[file isfile ${item}]} { file attributes ${item} -permissions 0644 } if {[file isdirectory ${item}]} { file attributes ${item} -permissions 0755 } } move ${worksrcpath}/makefile ${worksrcpath}/Makefile } compiler.blacklist-append \ *gcc-3.* *gcc-4.* {clang < 500} patchfiles-append patch-override-CC.diff # Follow the instruction to build in 32bit mode on 32bit arch if { ${configure.build_arch} in [list i386 ppc] } { patchfiles-append \ patch-build-32bit-mode.diff } platform darwin { post-patch { # Use MacPorts prefix instead /usr/local reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/Makefile # Darwin requires different arguments to build dynamic libraries reinplace "s|-shared -Wl,-soname=|-dynamiclib -install_name ${prefix}/lib/|" ${worksrcpath}/Makefile # Darwin's install is a bit different than linux one reinplace {s|install -t $(DESTDIR)${prefix}/lib $(SHLIB)|install $(SHLIB) $(DESTDIR)${prefix}/lib|} ${worksrcpath}/Makefile reinplace {s|install -t $(DESTDIR)${prefix}/include/lrslib ${INSTALL_INCLUDES}|install ${INSTALL_INCLUDES} $(DESTDIR)${prefix}/include/lrslib|} ${worksrcpath}/Makefile } } makefile.prefix_name prefix depends_lib-append port:gmp build.env-append SONAME=liblrs.1.dylib \ SHLIB=liblrs.${version}.dylib \ SHLINK=liblrs.dylib build.target single all-shared destroot.env-append {*}${build.env} post-destroot { foreach f {lrs1 lrs2 lrsmp redund redund1 redund2} { file copy ${worksrcpath}/$f ${destroot}${prefix}/bin } xinstall -m 755 -d ${destroot}${prefix}/libexec/${name} move ${destroot}${prefix}/bin ${destroot}${prefix}/libexec/${name} } notes " The ${name} binary files are now installed into ${prefix}/libexec/${name}/bin " livecheck.type regex livecheck.version ${distfile_version} livecheck.url http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/ livecheck.regex "${name}-(\[\\da-z]+)"