kthakore has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks,

I am apprentice currently working on updating the SDL_perl module.

Here is my work so far: source
working Download of SDL_perlv2.1.3

The biggest obstacle right now is to provide a consistent cross platform Build. The reason is that the XS components need to be compiled on the host machine. However the SDL libraries and headers that we bind to are being difficult because they can be installed in varying ways. One potential solution I have seen is in a GSoC idea.

Here is the idea: perl + parrot NCI

How would NCI work for perl5 ? How would we even approach this? Any wisdom pertaining to the pros and cons of this idea? Where should we begin?

P.S. Here is our proposed roadmap

Replies are listed 'Best First'.
Re: Getting started with Perl NCI or XS?
by chromatic (Archbishop) on Aug 05, 2009 at 21:02 UTC

    Consider P5NCI as a proof of concept, not a finished work. The ideas at the interface level and the lowest implementation level work, but everything in between is less stable.

    It's reasonably easy to build a small XS generator which produces a stripped-down version of the NCI XS that SDL_perl needs. That may be the fastest approach. Another solution may be to use something like FFI, but there may be cross-platform questions there.

Re: Getting started with Perl NCI or XS?
by Anonymous Monk on Aug 06, 2009 at 03:49 UTC
      An Update.

      With discussion with chromatic, and other developers; I have come up with the following proposal/map: Please critique!

        v2.2.1
      • Create build scripts and instructions for packagers (Alien or otherwise)
      • Host binary for most platforms
      • Remove XS build from Build.PL and instead have it download binary XS and SDL dep binaries.
        v2.3.0
      • Have an alpha parrot parse that generates either pure XS or P5NCI
        v3.0 and beyond
      • Have parrot parser generate parrot NCI calls for perl 6