source: trunk/dports/graphics/glew/Portfile

Last change on this file was 150712, checked in by jmr@…, 16 months ago

glew: update to 2.0.0

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# -*- 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
2# $Id: Portfile 150712 2016-07-27 12:11:04Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name               glew
7version            2.0.0
8categories         graphics devel
9platforms          darwin
10# some build scripts are GPL-2+ but we don't install them
11license            BSD MIT
12maintainers        jmr openmaintainer
13description        OpenGL Extension Wrangler Library
14long_description   The OpenGL Extension Wrangler Library (GLEW) is a \
15                   cross-platform C/C++ extension loading library. GLEW \
16                   provides efficient run-time mechanisms for determining \
17                   which OpenGL extensions are supported on the target \
18                   platform. OpenGL core and extension functionality is \
19                   exposed in a single header file.
20
21homepage           http://glew.sourceforge.net/
22master_sites       sourceforge:project/${name}/${name}/${version}/
23extract.suffix     .tgz
24checksums          md5 2a2cd7c98f13854d2fcddae0d2b20411 \
25                   sha1 6e15c84f7e1fad34cd3679f784a233744ddf048f \
26                   rmd160 f68e021a1fabc5aed7add62b2c37be1cfadfaa5d
27
28patchfiles         config_Makefile.darwin.patch
29
30post-patch {
31    reinplace "s:/usr/X11R6:${prefix}:g" ${worksrcpath}/config/Makefile.darwin
32}
33
34use_configure      no
35build.env          GLEW_PREFIX=${prefix} GLEW_DEST=${prefix}
36build.args         CC=${configure.cc} LD=${configure.cc} \
37                   POPT="${configure.optflags}" STRIP=
38destroot.env       GLEW_PREFIX=${prefix} GLEW_DEST=${prefix}
39destroot.target    install.all
40
41variant universal {
42    build.env-append ARFLAGS=crs
43}
44build.args-append CFLAGS.ARCH="[get_canonical_archflags cc]" \
45                  LDFLAGS.ARCH="[get_canonical_archflags ld]"
46
47variant x11 description {Build libGLEW for GLX rather than OpenGL.framework} {
48    depends_lib-append port:mesa
49    build.args-append GLEW_APPLE_GLX=1
50    destroot.args-append GLEW_APPLE_GLX=1
51}
52
53if {${os.subplatform} ne "macosx"} {
54    default_variants +x11
55}
56
57post-destroot {
58    if {![variant_isset x11]} {
59                reinplace "/Requires: glu/d" \
60                        ${destroot}${prefix}/lib/pkgconfig/glew.pc
61    }
62}
63
64livecheck.type     sourceforge
Note: See TracBrowser for help on using the repository browser.