Ticket #12368: raceintospace.patch

File raceintospace.patch, 1.5 KB (added by simon@…, 17 years ago)

Patch for the Portfile to automatically download the datafile and set the configuration so raceintospace can be directly used.

  • Portfile

     
    1313
    1414homepage        http://raceintospace.sourceforge.net
    1515master_sites    sourceforge:raceintospace
    16 checksums       md5 e7987f9a26c61fc0fe50833fdd41ffa1
     16
     17set source_file ${distname}${extract.suffix}
     18set data_file ${name}-data-${version}${extract.suffix}
     19
     20checksums       \
     21  ${source_file} md5 e7987f9a26c61fc0fe50833fdd41ffa1 \
     22  ${source_file} sha1 abe71d9ee14254662fd671cb9a5479df298a934f \
     23  ${source_file} rmd160 d5cca12d65a8b6b998186c310bac51da0987f6ce \
     24  ${data_file} md5 618f3d68f6d2d49567b34e09c143221b \
     25  ${data_file} sha1 4d8866239be5319f6a77e276c42bac0b0f1ff764 \
     26  ${data_file} rmd160 2865debe15e60ee1870eee78e625a4b9e082b869
     27
     28distfiles ${source_file} ${data_file}
    1729
    1830depends_lib     bin:sdl-config:libsdl \
    1931                                                port:libogg \
    2032                                                port:libvorbis \
    2133                                                port:libtheora
    2234
    23 #configure.env LDFLAGS="-L$(prefix}/lib" CPPFLAGS="-I${prefix}/include"
    24 
     35post-destroot {
     36  # move the game data into the destroot directory:
     37  set share ${destroot}${prefix}/share/raceintospace
     38  file copy ${workpath}/audio ${share}/audio
     39  file copy ${workpath}/gamedata ${share}/gamedata
     40  file copy ${workpath}/images ${share}/images
     41  file copy ${workpath}/video ${share}/video
     42  # add the data directory to the config file to allow direct usage of the game
     43  system "mkdir -p ~/.raceintospace"
     44  system "echo 'datadir ${prefix}/share/raceintospace' >> ~/.raceintospace/config"
     45}