New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

source: trunk/dports/x11/mesa/Portfile @ 79456

Revision 79456, 5.1 KB checked in by jeremyhu@…, 4 years ago (diff)

mesa: Bump to 7.10.3

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
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$
3
4PortSystem          1.0
5
6name                mesa
7
8# Yes, it's a dated version. Newer versions of mesa don't work on darwin, so
9# we're stuck here for a while If you need a newer version, join the
10# xquartz-dev mailing list, and let us know why.
11
12version             7.10.3
13categories          x11 graphics
14maintainers         jeremyhu openmaintainer
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/
19distfiles           MesaLib-${version}.tar.bz2 \
20                    MesaGLUT-${version}.tar.bz2
21
22worksrcdir          Mesa-${version}
23platforms           macosx darwin
24use_bzip2           yes
25master_sites        http://www.buraphalinux.org/download/bls2.0/dvd_source/source/xorg/xserver/mesa/ \
26                    ftp://ftp.freedesktop.org/pub/mesa/${version}/
27checksums           MesaLib-7.10.3.tar.bz2 \
28                    rmd160  bd9800a0cf98560a4424742cac635b4c07a39647 \
29                    sha256  1e701fc839b872677ddca9ed8784d754c9da1fbeda98173980e06aa7df0e85c0 \
30                    MesaGLUT-7.10.3.tar.bz2 \
31                    rmd160  b3f166343210abbeabfc70ac3dba289ec5e34e96 \
32                    sha256  a18edbdda2d722103417c54008e78e5de84fbbcadd7a218f25d4bc59da8962f5
33
34depends_build \
35        bin:makedepend:makedepend \
36        bin:tclsh8.5:tcl
37
38depends_lib \
39        port:xorg-glproto \
40        port:xorg-dri2proto \
41        port:xorg-libXfixes \
42        port:xorg-libXi \
43        port:xorg-libXmu
44
45use_configure  no
46use_parallel_build yes
47
48patch.pre_args -p1
49patchfiles \
50        0001-apple-applegl_destroy_context-Pass-along-the-correct.patch
51
52build.target default
53build.args-append INSTALL_DIR=${prefix}
54destroot.args-append INSTALL_DIR=${prefix}
55
56# Ensure correct compilers are used in Makefiles.
57if {${os.platform} == "darwin" && ${os.major} == 9} {
58    # http://trac.macports.org/ticket/24345
59    configure.cc /usr/bin/gcc-4.2
60    configure.cxx /usr/bin/g++-4.2
61}
62
63variant universal {}
64if {[variant_isset universal]} {
65    set extra_cflags ${configure.universal_cflags}
66    set extra_ldflags ${configure.universal_ldflags}
67} else {
68    set extra_cflags ${configure.cc_archflags}
69    set extra_ldflags ${configure.ld_archflags}
70}
71
72if {$extra_cflags != ""} {
73    append build.args " " RC_CFLAGS="${extra_cflags}"
74}
75
76if { ![file exists /usr/include/Xplugin.h] } {
77        # Xplugin.h is missing on Tiger
78        configure.cppflags-append -I${filespath}/include
79}
80
81configure.cppflags-delete -I${prefix}/include
82build.args-append \
83    CC="${configure.cc} ${configure.cppflags}" \
84    CXX="${configure.cxx} ${configure.cppflags}"
85
86post-extract {
87        if {! [file exists "${worksrcpath}/configs/current"]} {
88                ln -s darwin ${worksrcpath}/configs/current
89        }
90}
91
92post-patch {
93        # Ensure correct compilers are used in mklib.
94        reinplace "s:LINK=\"g++\":LINK=\"${configure.cxx}\":"  ${worksrcpath}/bin/mklib
95        reinplace "s:LINK=\"cc\":LINK=\"${configure.cc}\":"    ${worksrcpath}/bin/mklib
96}
97
98pre-configure {
99        if { ![file exists /usr/lib/libXplugin.dylib] } {
100                ui_error "Detected a problem with your development environment.  Please work around it by executing:"
101                ui_error "sudo ln -s libXplugin.1.dylib /usr/lib/libXplugin.dylib"
102                return -code error "missing libXplugin.dylib"
103        }
104}
105
106variant iglx description {Install a libGL that uses your X11 server's indirect GLX path for rendering (the default is off which allows libGL to accelerate rendering using OpenGL.framework)} {
107    patchfiles-append mesa-7.10.2-iglx.patch
108}
109
110variant python26 conflicts python27 description {Use python 2.6} {
111    depends_build-append \
112        port:py26-libxml2
113    build.args-append \
114        PYTHON2="${prefix}/bin/python2.6"
115}
116
117variant python27 conflicts python26 description {Use python 2.7} {
118    depends_build-append \
119        port:py27-libxml2
120    build.args-append \
121        PYTHON2="${prefix}/bin/python2.7"
122}
123
124if {![variant_isset python26] && ![variant_isset python27]} {
125    default_variants +python27
126}
127
128platform darwin 8 {
129    patchfiles-append tiger-exports.patch
130
131    post-patch {
132        # These are being comented out to find out if they're still broken
133        # 6/6/2011
134        # http://trac.macports.org/ticket/24345
135        # http://trac.macports.org/ticket/24393
136        #reinplace "/SRC_DIRS/ s/gallium//" ${worksrcpath}/configs/darwin
137        #reinplace "/SRC_DIRS/ s/mesa//" ${worksrcpath}/configs/darwin
138
139        # libOSMesa fails on Tiger, too...
140        #reinplace "/DRIVER_DIRS/ s/osmesa//" ${worksrcpath}/configs/darwin
141
142        # http://trac.macports.org/ticket/24366
143        reinplace "s:-fno-strict-aliasing:-fno-strict-aliasing -fno-common:g" ${worksrcpath}/configs/darwin
144    }
145
146    post-activate {
147        if {[variant_isset hw_render]} {
148            ui_msg "In order to use OpenGL on Tiger, you need to use MacPorts' X11 server (xorg-server) rather than Apple's."
149        }
150    }
151}
152
153livecheck.type  regex
154livecheck.url   http://www.buraphalinux.org/download/bls1.4/dvd_source/source/x11/xserver/mesa/
155livecheck.regex "MesaLib-(\\d+\\.\[02468\](?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.