Ticket #41319: Portfile

File Portfile, 3.3 KB (added by dstrubbe (David Strubbe), 11 years ago)
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 88129 2011-12-20 06:35:07Z jeremyhu@macports.org $
3
4#Why do we need this old version of Mesa? Because port:xcrysden does not work with newer versions on MacOS.
5#Based on https://gist.github.com/danmichaelo/1658983
6
7PortSystem          1.0
8
9name                mesa702
10version             7.0.2
11categories          x11 graphics
12maintainers         gmail.com:dstrubbe
13# GLUT license isn't clear, but is intended to be a permissive license:
14# see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=131997#71
15license             MIT Permissive
16description         Mesa 3D Graphics Library
17long_description    Mesa is an open-source implementation of the OpenGL specification, a system for rendering interactive 3D graphics.
18 
19homepage            http://mesa3d.sourceforge.net/
20distfiles           MesaLib-${version}.tar.bz2 \
21                    MesaGLUT-${version}.tar.bz2
22 
23worksrcdir          Mesa-${version}
24platforms           macosx darwin
25use_bzip2           yes
26master_sites        http://downloads.sourceforge.net/project/mesa3d/MesaLib/${version}/ \
27                    http://downloads.sourceforge.net/project/mesa3d/MesaGLUT/${version}/
28
29checksums           MesaLib-${version}.tar.bz2 \
30                    rmd160  3d471062b60889baef48a1a4596de6e32e1530cf \
31                    sha256  9d4707b556960f6aef14480f91fcd4f868720f64321947ab1b2fd20e85ce7f9e \
32                    MesaGLUT-${version}.tar.bz2 \
33                    rmd160  7d088ae0708c979d2dacccee9ced0b99a673412f \
34                    sha256  fa31ca39f00ff92c7da59d9993d0eefb8d901eb8a519743942e523fde120eb6c
35
36depends_build       bin:makedepend:makedepend \
37                    bin:tclsh8.5:tcl
38 
39depends_lib         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 no
47
48# applying fix from later versions of Mesa to give correct install name to dylib files
49patchfiles          patch-bin-mklib.diff \
50                    patch-src-glu-sgi-Makefile.diff \
51                    patch-src-mesa-Makefile.diff \
52                    patch-src-glut-glx-Makefile.diff
53build.env           INSTALL_LIB_DIR=${prefix}/lib/mesa702
54
55build.target darwin darwin-static
56build.args-append    INSTALL_DIR=${prefix}
57destroot.args-append INSTALL_DIR=${prefix}
58 
59variant universal {}
60 
61build.target darwin
62 
63# avoid conflicts with files installed by port 'mesa'
64post-destroot {
65    foreach dir {include lib} {
66        move ${destroot}${prefix}/${dir} ${destroot}${prefix}/${dir}_mesa702
67        xinstall -d ${destroot}${prefix}/${dir}
68        move ${destroot}${prefix}/${dir}_mesa702 ${destroot}${prefix}/${dir}/mesa702
69    }
70}
71
72variant python26 conflicts python27 description {Use python 2.6} {
73    depends_build-append \
74        port:py26-libxml2
75    build.args-append \
76        PYTHON2="${prefix}/bin/python2.6"
77}
78 
79variant python27 conflicts python26 description {Use python 2.7} {
80    depends_build-append \
81        port:py27-libxml2
82    build.args-append \
83        PYTHON2="${prefix}/bin/python2.7"
84}
85 
86if {![variant_isset python26] && ![variant_isset python27]} {
87    default_variants +python27
88}