# -*- 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 # $Id$ PortSystem 1.0 name glew version 1.10.0 revision 1 categories graphics devel platforms darwin # some build scripts are GPL-2+ but we don't install them license BSD MIT maintainers jmr openmaintainer description OpenGL Extension Wrangler Library long_description The OpenGL Extension Wrangler Library (GLEW) is a \ cross-platform C/C++ extension loading library. GLEW \ provides efficient run-time mechanisms for determining \ which OpenGL extensions are supported on the target \ platform. OpenGL core and extension functionality is \ exposed in a single header file. homepage http://glew.sourceforge.net/ master_sites sourceforge:project/${name}/${name}/${version}/ extract.suffix .tgz checksums md5 2f09e5e6cb1b9f3611bcac79bc9c2d5d \ sha1 f41b45ca4a630ad1d00b8b87c5f493781a380300 \ rmd160 cd9772b37e4f48fe2e25a55303eb89363ce91467 patchfiles config_Makefile.darwin.patch post-patch { reinplace "s:/usr/X11R6:${prefix}:g" ${worksrcpath}/config/Makefile.darwin } use_configure no build.env GLEW_DEST=${prefix} build.args CC=${configure.cc} LD=${configure.cc} \ STRIP= destroot.env GLEW_DEST=${destroot}${prefix} destroot.target install.all variant universal { patchfiles-append patch-Makefile.diff } build.args-append CFLAGS.ARCH="[get_canonical_archflags cc]" \ LDFLAGS.ARCH="[get_canonical_archflags ld]" variant x11 description {Build libGLEW for GLX rather than OpenGL.framework} { depends_lib-append port:mesa build.args-append GLEW_APPLE_GLX=1 destroot.args-append GLEW_APPLE_GLX=1 } if {${os.subplatform} ne "macosx"} { default_variants +x11 } post-destroot { reinplace "s|${destroot}||g" \ ${destroot}${prefix}/lib/pkgconfig/glew.pc \ ${destroot}${prefix}/lib/pkgconfig/glewmx.pc if {![variant_isset x11]} { reinplace "/Requires: glu/d" \ ${destroot}${prefix}/lib/pkgconfig/glew.pc \ ${destroot}${prefix}/lib/pkgconfig/glewmx.pc } } livecheck.type sourceforge