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 | |
---|
7 | PortSystem 1.0 |
---|
8 | |
---|
9 | name mesa702 |
---|
10 | version 7.0.2 |
---|
11 | categories x11 graphics |
---|
12 | maintainers 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 |
---|
15 | license MIT Permissive |
---|
16 | description Mesa 3D Graphics Library |
---|
17 | long_description Mesa is an open-source implementation of the OpenGL specification, a system for rendering interactive 3D graphics. |
---|
18 | |
---|
19 | homepage http://mesa3d.sourceforge.net/ |
---|
20 | distfiles MesaLib-${version}.tar.bz2 \ |
---|
21 | MesaGLUT-${version}.tar.bz2 |
---|
22 | |
---|
23 | worksrcdir Mesa-${version} |
---|
24 | platforms macosx darwin |
---|
25 | use_bzip2 yes |
---|
26 | master_sites http://downloads.sourceforge.net/project/mesa3d/MesaLib/${version}/ \ |
---|
27 | http://downloads.sourceforge.net/project/mesa3d/MesaGLUT/${version}/ |
---|
28 | |
---|
29 | checksums MesaLib-${version}.tar.bz2 \ |
---|
30 | rmd160 3d471062b60889baef48a1a4596de6e32e1530cf \ |
---|
31 | sha256 9d4707b556960f6aef14480f91fcd4f868720f64321947ab1b2fd20e85ce7f9e \ |
---|
32 | MesaGLUT-${version}.tar.bz2 \ |
---|
33 | rmd160 7d088ae0708c979d2dacccee9ced0b99a673412f \ |
---|
34 | sha256 fa31ca39f00ff92c7da59d9993d0eefb8d901eb8a519743942e523fde120eb6c |
---|
35 | |
---|
36 | depends_build bin:makedepend:makedepend \ |
---|
37 | bin:tclsh8.5:tcl |
---|
38 | |
---|
39 | depends_lib port:xorg-glproto \ |
---|
40 | port:xorg-dri2proto \ |
---|
41 | port:xorg-libXfixes \ |
---|
42 | port:xorg-libXi \ |
---|
43 | port:xorg-libXmu |
---|
44 | |
---|
45 | use_configure no |
---|
46 | use_parallel_build no |
---|
47 | |
---|
48 | # applying fix from later versions of Mesa to give correct install name to dylib files |
---|
49 | patchfiles patch-bin-mklib.diff \ |
---|
50 | patch-src-glu-sgi-Makefile.diff \ |
---|
51 | patch-src-mesa-Makefile.diff \ |
---|
52 | patch-src-glut-glx-Makefile.diff |
---|
53 | build.env INSTALL_LIB_DIR=${prefix}/lib/mesa702 |
---|
54 | |
---|
55 | build.target darwin darwin-static |
---|
56 | build.args-append INSTALL_DIR=${prefix} |
---|
57 | destroot.args-append INSTALL_DIR=${prefix} |
---|
58 | |
---|
59 | variant universal {} |
---|
60 | |
---|
61 | build.target darwin |
---|
62 | |
---|
63 | # avoid conflicts with files installed by port 'mesa' |
---|
64 | post-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 | |
---|
72 | variant 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 | |
---|
79 | variant 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 | |
---|
86 | if {![variant_isset python26] && ![variant_isset python27]} { |
---|
87 | default_variants +python27 |
---|
88 | } |
---|