Ticket #38685: Portfile

File Portfile, 2.1 KB (added by cooljeanius (Eric Gallager), 11 years ago)

Portfile for mojoshader

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
5PortGroup           cmake 1.0
6
7name                mojoshader
8categories          games graphics devel
9platforms           darwin
10maintainers         gwmail.gwu.edu:egall openmaintainer
11license             zlib
12
13description         MojoShader is a library to work with Direct3D shaders on alternate \
14                    3D APIs and non-Windows platforms.
15
16long_description    ${description} The primary motivation is moving shaders to OpenGL \
17                    languages on the fly. The developer deals with profiles that \
18                    represent various target languages, such as GLSL.
19
20homepage            http://icculus.org/${name}/
21
22fetch.type          hg
23hg.url              http://hg.icculus.org/icculus/${name}/
24hg.tag              3de60f597ebd
25version             1125
26
27depends_build-append \
28                    port:re2c \
29                    port:lemon
30depends_lib-append  port:libsdl
31
32# Making a variant for this until ticket #38208 is resolved.
33variant tests description {Build unit tests} {
34    depends_build-append \
35                    port:perl5
36    test.run        yes
37}
38
39destroot {
40    xinstall ${worksrcpath}/lib${name}.a ${destroot}${prefix}/lib
41    xinstall ${worksrcpath}/${name}-compiler ${destroot}${prefix}/bin
42    # Add a prefix to binaries with names that look like they might conflict
43    foreach generic_bin {lemon finderrors glcaps bestprofile availableprofiles} {
44        xinstall ${worksrcpath}/${generic_bin} ${destroot}${prefix}/bin/${name}-${generic_bin}
45    }
46    if {[variant_isset tests]} {
47        foreach test_bin {testparse testoutput} {
48            xinstall ${worksrcpath}/${test_bin} ${destroot}${prefix}/bin/${name}-${test_bin}
49        }
50    }
51    eval xinstall [glob ${worksrcpath}/*.h] ${destroot}${prefix}/include
52    xinstall -d ${destroot}${prefix}/share/${name}
53    foreach doc {README.txt LICENSE.txt} {
54        xinstall ${worksrcpath}/${doc} ${destroot}${prefix}/share/${name}
55    }
56}