source: trunk/dports/x11/mesa/Portfile

Last change on this file was 154230, checked in by jeremyhu@…, 9 months ago

mesa: Bump to 12.0.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 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 154230 2016-10-24 20:50:30Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           compiler_blacklist_versions 1.0
6
7name                mesa
8epoch               1
9version             12.0.1
10revision            1
11categories          x11 graphics
12maintainers         jeremyhu openmaintainer
13license             MIT
14license_noconflict  py26-libxml2 py27-libxml2
15description         Mesa 3D Graphics Library
16long_description    Mesa is an open-source implementation of the OpenGL specification, a system for rendering interactive 3D graphics.
17
18homepage            http://mesa3d.sourceforge.net/
19platforms           macosx darwin
20use_xz              yes
21master_sites        ftp://ftp.freedesktop.org/pub/mesa/${version}/
22fetch.use_epsv      no
23
24checksums           sha1    c1f84352bb02af837c9853981c985b000ba4f799 \
25                    rmd160  505d13d922a77dfe739bc3aca699f141ad248f6b \
26                    sha256  bab24fb79f78c876073527f515ed871fc9c81d816f66c8a0b051d8d653896389
27
28depends_build       port:pkgconfig \
29                    port:flex \
30                    port:bison \
31                    port:indent
32
33depends_lib         port:xorg-glproto \
34                    port:xorg-dri2proto \
35                    port:xorg-libxcb \
36                    port:xorg-libX11 \
37                    port:xorg-libXext \
38                    port:xorg-libXdamage \
39                    port:xorg-libXfixes \
40                    port:xorg-libXi \
41                    port:xorg-libXmu \
42                    port:xorg-libXxf86vm
43
44patch.pre_args      -p1
45patchfiles \
46    0001-mesa-Deal-with-size-differences-between-GLuint-and-G.patch \
47    0002-applegl-Provide-requirements-of-_SET_DrawBuffers.patch \
48    0003-glext.h-Add-missing-include-of-stddef.h-for-ptrdiff_.patch
49
50if {[string match *gcc* ${configure.compiler}]} {
51    # Older gcc fail to do -Werror=missing-prototypes correctly
52    # https://trac.macports.org/ticket/46827
53    patchfiles-append no-missing-prototypes-error.patch
54}
55
56use_autoreconf      yes
57autoreconf.args     -fvi
58
59configure.args \
60    --disable-silent-rules \
61    --disable-egl \
62    --disable-osmesa \
63    --with-gallium-drivers=
64
65configure.env-append \
66    INDENT=${prefix}/bin/gnuindent
67
68# This project is affected by a bug in Apple's gcc driver driver that I fixed in the apple-gcc42 port.
69# Use that or clang.
70compiler.blacklist gcc-3.3 gcc-4.0 gcc-4.2 llvm-gcc-4.2 {clang < 100}
71
72platform darwin {
73    if {${os.major} < 11} {
74        # https://bugs.freedesktop.org/show_bug.cgi?id=89088
75        configure.env-append INDENT=cat
76
77        patchfiles-append static-strndup.patch
78    }
79
80    if { ![file exists /usr/include/Xplugin.h] } {
81        # Xplugin.h is missing on Tiger
82        configure.cppflags-append -I${filespath}/include
83    }
84
85    pre-configure {
86        if { ![file exists /usr/lib/libXplugin.dylib] } {
87            ui_error "Detected a problem with your development environment.  Please work around it by executing:"
88            ui_error "sudo ln -s libXplugin.1.dylib /usr/lib/libXplugin.dylib"
89            return -code error "missing libXplugin.dylib"
90        }
91    }
92}
93
94configure.cppflags-delete -I${prefix}/include
95
96variant python26 conflicts python27 description {Use python 2.6} {
97    depends_build-append \
98        port:py26-libxml2
99    configure.env-append \
100        PYTHON2="${prefix}/bin/python2.6"
101}
102
103variant python27 conflicts python26 description {Use python 2.7} {
104    depends_build-append \
105        port:py27-libxml2
106    configure.env-append \
107        PYTHON2="${prefix}/bin/python2.7"
108}
109
110if {![variant_isset python26] && ![variant_isset python27]} {
111    default_variants-append +python27
112}
113
114variant osmesa description {enable OSMesa library} {
115    configure.args-delete --disable-osmesa
116    configure.args-append --enable-osmesa
117}
118default_variants-append +osmesa
119
120#variant openvg description {enable support for OpenVG API} {
121#    configure.args-delete --disable-egl --disable-openvg
122#    configure.args-append --enable-egl --enable-openvg
123#}
124#default_variants-append +openvg
125
126livecheck.type  regex
127livecheck.url   http://www.mesa3d.org/
128livecheck.regex {relnotes/([0-9.]+)\.html}
Note: See TracBrowser for help on using the repository browser.