# -*- 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 haskell_cabal 1.0 PortGroup pure 1.0 pure.setup pure-gen 0.25 revision 1 categories-append devel maintainers {ryandesign @ryandesign} {gmail.com:aggraef @agraef} license BSD description a Pure C bindings generator long_description ${name} is ${description}. checksums rmd160 9d8a102b502a307f7286d14e2251cec1588583b8 \ sha256 a81ab15ae01396f5554b09257d887c761471389734388ef06802b621521526db \ size 186315 installs_libs no depends_build-append \ port:alex \ port:happy \ port:pkgconfig # PG haskell_cabal sets these; also dependencies of pure depends_lib-delete port:gmp depends_lib-delete port:libiconv # pure-gen uses gcc at runtime to parse C headers but the # -fdirectives-only option it needs is only available in gcc 4.3 and up. variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc6 gcc12 description {Use gcc43 for runtime C header parsing} { depends_run-append path:bin/gcc-mp-4.3:gcc43 global gcc_version set gcc_version 4.3 } variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 gcc48 gcc49 gcc6 gcc12 description {Use gcc44 for runtime C header parsing} { depends_run-append path:bin/gcc-mp-4.4:gcc44 global gcc_version set gcc_version 4.4 } variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 gcc48 gcc49 gcc6 gcc12 description {Use gcc45 for runtime C header parsing} { depends_run-append path:bin/gcc-mp-4.5:gcc45 global gcc_version set gcc_version 4.5 } variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 gcc48 gcc49 gcc6 gcc12 description {Use gcc46 for runtime C header parsing} { depends_run-append path:bin/gcc-mp-4.6:gcc46 global gcc_version set gcc_version 4.6 } variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 gcc48 gcc49 gcc6 gcc12 description {Use gcc47 for runtime C header parsing} { depends_run-append path:bin/gcc-mp-4.7:gcc47 global gcc_version set gcc_version 4.7 } variant gcc48 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 gcc49 gcc6 gcc12 description {Use gcc48 for runtime C header parsing} { depends_run-append path:bin/gcc-mp-4.8:gcc48 global gcc_version set gcc_version 4.8 } variant gcc49 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 gcc6 gcc12 description {Use gcc49 for runtime C header parsing} { depends_run-append path:bin/gcc-mp-4.9:gcc49 global gcc_version set gcc_version 4.9 } variant gcc6 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc12 description {Use gcc6 for runtime C header parsing} { depends_run-append path:bin/gcc-mp-6:gcc6 global gcc_version set gcc_version 6 } variant gcc12 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc6 description {Use gcc12 for runtime C header parsing} { depends_run-append path:bin/gcc-mp-12:gcc12 global gcc_version set gcc_version 12 } if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset gcc48] && ![variant_isset gcc49]} { if {${os.platform} eq "darwin" && ${os.major} < 9} { # gcc44 doesn't build for me on Tiger default_variants +gcc43 } else { # gcc12 should work fine on all recent macOS versions. default_variants +gcc12 } } patchfiles-append patch-Makefile.diff post-patch { reinplace "s|@gcc@|${prefix}/bin/gcc-mp-${gcc_version}|g" \ ${worksrcpath}/pure-gen.pure # cabal version 3.8.1.0 reinplace "s|@CABAL_UPDATE_CMD@|${haskell_cabal.bin} ${haskell_cabal.global_flags} update|g" \ ${worksrcpath}/Makefile reinplace "s|@CABAL_BUILD_CMD@|${haskell_cabal.bin} ${haskell_cabal.global_flags} v1-build [haskell_cabal.build_getjobsarg]|g" \ ${worksrcpath}/Makefile reinplace "s|@CABAL_INSTALL_CMD@|${haskell_cabal.bin} ${haskell_cabal.global_flags} v1-install [haskell_cabal.build_getjobsarg]|g" \ ${worksrcpath}/Makefile } # this is HOME in ./Makefile haskell_cabal.cabal_root \ ${worksrcpath}/cabal # undo PG haskell_cabal/pure conflicts build.type "default" build.cmd [portbuild::build_getmaketype] build.target maintainer-build build.pre_args [portbuild::build_getargs] build.args build.post_args destroot.cmd ${build.cmd} destroot.target install destroot.pre_args [portdestroot::destroot_getargs] destroot.args destroot.post_args ${destroot.destdir} build.args-append LIBRARY_PATH=${prefix}/lib