Ticket #17175: glew-universal.diff

File glew-universal.diff, 1.3 KB (added by arcata@…, 16 years ago)

Patch to enable universal variant on glew port

  • dports/graphics/glew/Portfile

     
    66name               glew
    77version            1.5.1
    88categories         graphics devel
    9 platforms          darwin
     9platforms          macosx
    1010maintainers        jmr openmaintainer
    1111description        OpenGL Extension Wrangler Library
    1212long_description   The OpenGL Extension Wrangler Library (GLEW) is a \
     
    2727build.env          GLEW_DEST=${prefix}
    2828destroot.env       GLEW_DEST=${destroot}${prefix}
    2929
     30variant universal {
     31        set archs {}
     32        foreach arch ${universal_archs} {
     33                set archs "${archs} -arch ${arch}"
     34        }
     35        build.env-append "CFLAGS_EXTRA=\"${archs}\" LDFLAGS_EXTRA=\"${archs}\""
     36}
     37
    3038pre-build {
    3139        # config.guess has CRLF line endings, which confuses sh
    3240        reinplace "s|\r||" ${worksrcpath}/config/config.guess
     41        # makefile variable names with "." can't be set from the environment
     42        reinplace "s|CFLAGS\.EXTRA|CFLAGS_EXTRA|" ${worksrcpath}/Makefile
     43        reinplace "s|LDFLAGS\.EXTRA|LDFLAGS_EXTRA|" ${worksrcpath}/Makefile
     44        # strip barfs on universal static libs
     45        reinplace "s|strip|true|" ${worksrcpath}/Makefile
    3346}
    3447
    3548# ugh, why is configure.cc not available in the build phase?