Ticket #26180: patch-Portfile.diff

File patch-Portfile.diff, 2.5 KB (added by pixilla (Bradley Giesbrecht), 14 years ago)

Uses makeicns to create BAFlag.app icon

  • Portfile

     
    44
    55name                bzflag
    66version             2.0.16
    7 revision            1
     7revision            2
    88categories          games
    99platforms           darwin
    1010maintainers         phw openmaintainer
     
    2222                                        rmd160  9156642183b9b33c6509737cd8e40f4ad612a657
    2323
    2424
    25 depends_lib         port:curl path:lib/pkgconfig/sdl.pc:libsdl port:c-ares
     25depends_lib         port:curl path:lib/pkgconfig/sdl.pc:libsdl port:c-ares port:makeicns
    2626
    2727configure.args      --mandir=${prefix}/share/man --libdir=${prefix}/lib/${name} \
    2828                    --includedir=${prefix}/include/${name} \
    2929                    --with-sdl-exec-prefix=${prefix}/ --disable-sdl-test \
    3030                    --without-x
    3131
     32post-destroot {
     33    set my_app BZFlag
     34    xinstall -d ${destroot}${applications_dir}/${my_app}.app/Contents/MacOS
     35    ln -s ${prefix}/bin/${name} ${destroot}${applications_dir}/${my_app}.app/Contents/MacOS/${my_app}
     36    xinstall -d ${destroot}${applications_dir}/${my_app}.app/Contents/Resources
     37    system "makeicns -in ${worksrcpath}/data/bzflag-256x256.png -out ${destroot}${applications_dir}/${my_app}.app/Contents/Resources/${my_app}.icns"
     38    system "echo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     39    system "echo '<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     40    system "echo '<plist version=\"1.0\">' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     41    system "echo '<dict>' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     42    system "echo '  <key>CFBundleExecutable</key>' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     43    system "echo '  <string>${my_app}</string>' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     44    system "echo '  <key>CFBundleIconFile</key>' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     45    system "echo '  <string>${my_app}.icns</string>' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     46    system "echo '</dict>' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     47    system "echo '</plist>' >> ${destroot}${applications_dir}/${my_app}.app/Contents/Info.plist"
     48}
     49
    3250platform darwin 10 {
    3351    patchfiles patch-include__bzfSDL.h patch-src__platform__SDLDisplay.cxx
    3452}