Ticket #28678: Portfile.2.diff

File Portfile.2.diff, 1.1 KB (added by ci42, 14 years ago)

new proposal

  • Portfile

    old new  
    3333depends_lib         port:zlib \
    3434                    port:openssl
    3535
    36 universal_variant   no
    3736
    3837build.args-append   CC='${configure.cc} -arch ${build_arch}' CFLAGS=${configure.cflags} LDFLAGS=${configure.ldflags}
    3938
    4039post-extract {
    4140    reinplace s|\$\(INSTALLDIR\)|\$(DESTDIR)/${prefix}/bin|g ${worksrcpath}/src/makemake.tcl
    42     reinplace s|gcc|\$(CC)|g ${worksrcpath}/Makefile
    4341}
    4442
    4543configure {
    4644    system "cd ${worksrcpath}/src && tclsh ${worksrcpath}/src/makemake.tcl"
    4745}
    4846
     47post-configure {
     48    reinplace s|gcc|\$(CC)|g ${worksrcpath}/Makefile
     49}
     50
     51if {[variant_isset universal]} {
     52    set archflags ${configure.universal_cflags}
     53} else {
     54    set archflags ${configure.cc_archflags}
     55}
     56
     57build.args-append   CC="${configure.cc} ${archflags}" \
     58                    CFLAGS=${configure.cflags} \
     59                    LDFLAGS=${configure.ldflags}
     60
    4961livecheck.type      regex
    5062livecheck.url       ${homepage}/download.html
    5163livecheck.regex     ${name}-src-(\\d{14})${extract.suffix}