source: trunk/dports/graphics/cg-toolkit/Portfile

Last change on this file was 101644, checked in by blair@…, 5 years ago

cg-toolkit: delete files from Trace example to avoid rev-upgrade errors.

Could not open libtrace.dylib: Error opening or reading file (referenced from /Developer/NVIDIA/Cg/examples/Trace/Cg)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1# $Id: Portfile 101644 2013-01-16 03:40:52Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name            cg-toolkit
6version         3.1.2012.04
7revision        1
8set branch      [join [lrange [split ${version} .] 0 1] .]
9set year        [lindex [split ${version} .] 2]
10categories      graphics
11license         Restrictive
12maintainers     openmaintainer blair
13description     NVIDIA's Cg high-level shading language
14long_description \
15    Cg (short for C for Graphics) is a high-level shading language \
16    developed by Nvidia in close collaboration with Microsoft for \
17    programming vertex and pixel shaders.  It is very similar to \
18    Microsoft's HLSL.  Cg is based on the C programming language and \
19    although they share the same syntax, some features of C were \
20    modified and new data types were added to make Cg more suitable \
21    for programming graphics processing units.  This language is only \
22    suitable for GPU programming and is not a general programming \
23    language.  The Cg compiler outputs DirectX or OpenGL shader \
24    programs.
25
26homepage        https://developer.nvidia.com/cg-toolkit
27platforms       darwin
28supported_archs ppc i386 x86_64
29
30master_sites    http://developer.download.nvidia.com/cg/Cg_${branch}
31distname        Cg-${branch}_April${year}
32use_dmg         yes
33checksums       md5    9a8f7201f2b0149748814e012dff4aab \
34                sha1   106adb0926bc491012adc9cba1847b19a701c087 \
35                sha256 85c7a0de82252b703191fee5fe7b29f60d357924dc7b8ca59c2badeac7af407d
36
37use_configure   no
38build           {}
39
40destroot.violate_mtree  yes
41
42destroot {
43    set sharedir ${destroot}${prefix}/share/doc/${name}
44    set itemdir "${worksrcpath}/Cg-3.1.0013.app/Contents/Resources/Installer Items"
45    regsub -- {Installer Items} $itemdir {Installer\ Items} escaped_itemdir
46
47    xinstall -d -m 755 ${sharedir}
48    file copy ${itemdir}/License.rtf ${sharedir}
49    puts "$itemdir"
50    system "cd ${destroot} && /usr/bin/tar xfz ${escaped_itemdir}/NVIDIA_Cg.tgz"
51
52    # Delete all compiled objects and libraries in the Trace example
53    # directory to avoid this MacPorts install error:
54    #   Could not open libtrace.dylib: Error opening or reading file
55    #   (referenced from /Developer/NVIDIA/Cg/examples/Trace/Cg)
56    # Developers needing the Trace example can build it themselves.
57    system "make -C ${destroot}/Developer/NVIDIA/Cg/examples/Trace clean"
58}
Note: See TracBrowser for help on using the repository browser.