New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #38685 (new submission)

Opened 3 years ago

Last modified 3 years ago

New port: mojoshader

Reported by: egall@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: mojoshader


Came across this while reading Valve's GDC slides. It's a translator for changing HLSL to GLSL. Portfile is attached. It passes port -v lint --nitpick, port test (with the +tests variant; see #38208), and


Portfile (2.1 KB) - added by egall@… 3 years ago.
Portfile for mojoshader
Portfile.2 (1.7 KB) - added by egall@… 3 years ago.
Updated portfile

Change History

Changed 3 years ago by egall@…

Portfile for mojoshader

comment:1 Changed 3 years ago by ryandesign@…

I understand that you added a +tests variant because you need a dependency on perl, and MacPorts doesn't have depends_test yet. But it's weird that selecting the +tests variant ends up installing additional files; usually tests are just run at build time and do not affect what gets installed. Also, is MacPorts perl really required to run the tests, or would OS X perl in /usr/bin/perl work? If the latter, then maybe you can use that and get rid of the variant. Usually MacPorts prefers to avoid OS X dependencies, but for such ubiquitous utilities as perl (and sed and awk and grep) we make exceptions.

Also you don't need a foreach loop to install multiple files (if you're not going to be renaming them), so you can install the documentation files in a single line:

xinstall -W ${worksrcpath} -m 644 README.txt LICENSE.txt ${destroot}${prefix}/share/${name}

Also note the use of -m 644 so that documentation files don't get the execute bit.

Changed 3 years ago by egall@…

Updated portfile

comment:2 Changed 3 years ago by egall@…

I updated the portfile per your recommendations.

Note: See TracTickets for help on using tickets.