Ticket #30756: sqliteman-Portfile.diff

File sqliteman-Portfile.diff, 1.8 KB (added by tvb377@…, 13 years ago)

this patch uses makeicns instead of premade icns file

  • Portfile

    old new  
    66
    77name                sqliteman
    88version             1.2.2
     9revision            1
    910description         GUI tool for Sqlite3
    1011long_description        The best developer's and/or admin's GUI tool for Sqlite3 in the world. \
    1112                    No joking here (or just a bit only) - it contains the most complete \
     
    2425
    2526use_bzip2           yes
    2627
    27 depends_build-append port:cmake
     28depends_build-append port:cmake port:makeicns
    2829
    2930depends_lib-append  port:sqlite3    \
    3031                    port:qscintilla
     
    3435
    3536configure.cmd       cmake
    3637configure.pre_args  \
    37     -DCMAKE_INSTALL_PREFIX=${prefix} \
     38    -DCMAKE_INSTALL_PREFIX=${applications_dir}/sqliteman.app/Contents/Resources \
    3839    -DQSCINTILLA_INCLUDE_DIR:PATH=${qt_includes_dir}/Qsci
    3940configure.args      ${qt_cmake_defines}
     41
     42# create app bundle
     43pre-destroot {
     44    file mkdir -p ${destroot}${applications_dir}/sqliteman.app/Contents/Resources
     45    file mkdir -p ${destroot}${applications_dir}/sqliteman.app/Contents/MacOS
     46    file copy ${filespath}/PkgInfo ${destroot}${applications_dir}/sqliteman.app/Contents
     47    file copy ${filespath}/Info.plist ${destroot}${applications_dir}/sqliteman.app/Contents
     48    system "makeicns -in ${worksrcpath}/sqliteman/icons/sqliteman.png \
     49                     -out ${destroot}${applications_dir}/sqliteman.app/Contents/Resources/sqliteman.icns"
     50}
     51
     52# move binary into place
     53post-destroot {
     54    file rename ${destroot}${applications_dir}/sqliteman.app/Contents/Resources/bin/sqliteman \
     55                ${destroot}${applications_dir}/sqliteman.app/Contents/MacOS
     56    file delete ${destroot}${applications_dir}/sqliteman.app/Contents/Resources/bin
     57}