Opened 12 years ago

Last modified 12 years ago

#38803 new request

Request port of Stanford "rayshade"

Reported by: murrayeisenberg@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager), ryandesign (Ryan Carsten Schmidt)
Port: rayshade

Description

This is to request a port of the Rayshade application for creating ray-traced images. Source and other information is available at http://www-graphics.stanford.edu/~cek/rayshade/rayshade.html. The program is written in C, yacc, and lex. Although an OS X port is available from that site, it dates to 1992 and does not work on current or recent versions of OS X.

Attachments (2)

Portfile (1.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
patch-Configure.diff (1.8 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by cooljeanius (Eric Gallager)

1992? OS X wasn't even introduced yet at that point then...

comment:2 in reply to:  1 Changed 12 years ago by murrayeisenberg@…

Replying to egall@…:

1992? OS X wasn't even introduced yet at that point then...

Sorry, yes of course you're correct. I mean just Mac OS.

comment:3 Changed 12 years ago by cooljeanius (Eric Gallager)

Trying it out now... this interactive configure script is reminding me a lot of perl's...

comment:4 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:5 Changed 12 years ago by cooljeanius (Eric Gallager)

idk, after trying to build it, I think this might be just too old...

comment:6 in reply to:  description ; Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to murrayeisenberg@…:

Although an OS X port is available from that site, it dates to 1992 and does not work on current or recent versions of OS X.

A prerequisite for creating a MacPorts port for a program is that the program compiles on OS X. Work with the developers of rayshade to get it to compile on OS X. Once it does, we can create a port for it.

comment:7 in reply to:  6 Changed 12 years ago by cooljeanius (Eric Gallager)

Replying to ryandesign@…:

Work with the developers of rayshade to get it to compile on OS X. Once it does, we can create a port for it.

I doubt the original developers of it even exist any more, given that they haven't worked on it in 21 years...

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: Portfile added

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: patch-Configure.diff added

comment:8 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Keywords: graphics ray-tracing removed
Port: rayshade added
Version: 2.1.3

Precisely.

Anyway, here's the start of a Portfile.

I patched the Configure script to remove incorrect warnings and errors and to look in ${prefix} first so that our newer version of bison gets used. Actually I think bison is also used at runtime.

During configuration, it tries to use nm to figure out what's in the C library. It uses printf as its litmus test, and printf doesn't seem to be in OS X's C library—or nm isn't the right way to make that determination. If we can fix this it might help it find some other functions.

The configuration asks some questions I didn't know the answers to, like in which ways the compiler supports the void type or how many bits of randomness the random() function produces. (The random() manpage says all bits are random, but it returns a long; doesn't the size of a long vary based on the build architecture?) I left those answers at the defaults.

After configuration, it runs make depend, which generates a lot of warnings and one error, I believe because it uses cpp which doesn't understand some things in the system headers. Using $CC -E wouldn't encounter those errors but is not an option because rayshade needs to feed things to the C preprocessor via stdin and it seems that only cpp understands that.

Then the build fails with various errors like:

hf.c:470:1: error: static declaration of 'CreateHfTriangle' follows non-static declaration
hf.c:670:1: error: static declaration of 'GetQueuedTri' follows non-static declaration
extended.c:58:1: error: static declaration of 'ExtendedIntens' follows non-static declaration
fog.c:31:2: error: function declared in block scope cannot have 'static' storage class
texture.c:165:3: error: non-void function 'TextToUV' should return a value [-Wreturn-type]

And then finally:

/usr/include/strings.h:76:7: error: expected parameter declarator
/usr/include/strings.h:76:7: error: expected ')'
Note: See TracTickets for help on using tickets.