Ticket #12719: patch-Portfile.diff

File patch-Portfile.diff, 1.4 KB (added by cssdev, 17 years ago)

Configure with cmake and build the example binaries.

  • Portfile

     
    44
    55name            openjpeg
    66version         1.2
    7 revision        1
     7revision        2
    88categories      graphics
    99maintainers     nomaintainer
    1010description     Library for manipulating JPEG-2000 images
     
    1717platforms       darwin
    1818
    1919homepage        http://www.openjpeg.org/
    20 master_sites    ${homepage}/
     20master_sites    ${homepage}
    2121
    2222checksums               md5 4973c564c96683a921a7f6759906da4e
    2323distname        ${name}_v1_2
    24 
     24depends_lib     port:cmake
    2525worksrcdir      trunk
    2626
    27 post-patch {
    28     reinplace "s|/usr|${prefix}|" \
    29         ${worksrcpath}/Makefile.osx
    30     reinplace \
    31         "s|dynamiclib|dynamiclib -install_name ${prefix}/lib/libopenjpeg-2.1.2.0.dylib -compatibility_version 2.0.0 -current_version 2.1.2|" \
    32             ${worksrcpath}/Makefile.osx
    33 }
    34 
    35 use_configure   no
    36 
    37 build.target    osx
    38 destroot.target osxinstall
     27configure       { system "cd ${worksrcpath} && cmake ${configure.args} ${worksrcpath}" }
     28configure.args  -D BUILD_SHARED_LIBS:BOOL=ON \
     29                -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
     30                -D CMAKE_INSTALL_PREFIX:PATH=${prefix} \
     31                -D CMAKE_INSTALL_RPATH:PATH=${prefix} \
     32                -D CMAKE_INSTALL_NAME_DIR=${prefix} \
     33                -D BUILD_EXAMPLES:BOOL=ON