Ticket #43585: Portfile.diff

File Portfile.diff, 1.2 KB (added by lockhart (Thomas Lockhart), 10 years ago)

Patch to use configure variables for compilers and options. Use refactored patch files.

  • Portfile

    old new  
    55
    66name                terra
    77version             0.7
     8revision            1
    89
    910categories          gis science
    1011maintainers         gmail.com:tlockhart1976 openmaintainer
     
    2728                    sha256  22470e13e1f0659d23dbf7e0ecbfd8f6490bcd1d0a953537c1dfec18f4df3bd7
    2829
    2930depends_lib         port:freeglut
    30 depends_build-append  port:freeglut
    3131
    3232worksrcdir          ${name}
    3333patch.pre_args      -p1
    34 patchfiles          terra.patches
     34patchfiles          patch-compiler.diff patch-opengl.diff
    3535use_configure       no
    3636
     37post-patch {
     38    reinplace -E "s|^(CC =).*|\\1 ${configure.cc}|" ${worksrcpath}/Makefile
     39    reinplace -E "s|^(C\\+\\+ =).*|\\1 ${configure.cxx}|" ${worksrcpath}/Makefile
     40    reinplace -E "s|^(OPTFLAGS =)|\\1 ${configure.optflags}|" ${worksrcpath}/Makefile
     41    reinplace -E "s|^(ANIM =).*|\\1 ${prefix}|" ${worksrcpath}/Makefile
     42}
     43
    3744destroot {
    3845    xinstall -m 755 ${worksrcpath}/terra ${destroot}${prefix}/bin/terra
    3946    xinstall -m 755 ${worksrcpath}/xterra ${destroot}${prefix}/bin/xterra