Ticket #34889: py27-cairo.patch

File py27-cairo.patch, 3.3 KB (added by g5pw (Aljaž Srebrnič), 11 years ago)
  • Portfile

     
    55
    66name            py27-cairo
    77set my_name     py2cairo
    8 version         1.8.10
    9 revision        2
     8version         1.10.0
    109categories      python x11
    1110license         {LGPL-2.1 MPL-1.1}
    1211platforms       darwin
     
    1413description     Pycairo is set of Python bindings for the cairo graphics library
    1514
    1615long_description \
    17     ${description}
     16                ${description}
    1817
    1918homepage        http://cairographics.org/pycairo/
    2019master_sites    http://cairographics.org/releases/
    2120distname        ${my_name}-${version}
    22 worksrcdir         pycairo-${version}
     21use_bzip2           yes
    2322
    24 checksums           md5     87421a6a70304120555ba7ba238f3dc3 \
    25                     sha1    6bb0b3e0249bce9fc0480aadad0c602d32f26ec1 \
    26                     rmd160  932e19f2f582bdf5735bdc92720b76edfb0a0c8e
     23checksums       rmd160  ce75db9af32ef1a3e90f6aaa649cbb2493a941a4 \
     24                sha256  d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431
    2725
    2826depends_build   port:pkgconfig
    2927depends_lib     port:python27 \
    3028                path:lib/pkgconfig/cairo.pc:cairo \
    3129                port:libpng
    3230
    33 # depends_test
    34 depends_build-append port:py27-numpy
    35 
    36 configure.python    ${prefix}/bin/python2.7
     31patchfiles      src_wpscript.diff
    3732
    3833set python_prefix  ${frameworks_dir}/Python.framework/Versions/2.7
    39 configure.pre_args-delete  --prefix=${prefix}
    40 configure.pre_args-append  --prefix=${python_prefix}
    41 configure.args-append      --includedir=${python_prefix}/include/python2.7
     34
     35configure.python \
     36                ${python_prefix}/bin/python2.7
     37
     38#use supported build procedure
     39configure.cmd   ${configure.python} ./waf configure
     40
     41configure.pre_args-append \
     42                --exec-prefix=${python_prefix}
     43
     44build.cmd       ${configure.python} ./waf
     45build.target    build
     46
     47destroot.cmd    ${build.cmd}
     48destroot.destdir --destdir=${destroot}
    4249
    4350platform darwin 9 {
    4451    post-patch {
     
    5360        ${destroot}${docdir}
    5461}
    5562
    56 depends_build-append port:py27-py
    57 test.run         yes
    58 test.cmd         "cd test && py.test-2.7"
    59 test.target     
     63variant test description {Build and run tests} {
     64    depends_build-append \
     65                port:py27-py \
     66                port:py27-numpy
     67    test.run    yes
     68    test.cmd    "cd test && py.test-2.7"
     69    test.target     
     70}
     71
     72variant quartz conflicts x11 {}
     73variant x11 conflicts quartz {}
     74if {![variant_isset x11] && ![variant_isset quartz]} {
     75    default_variants +x11
     76}
    6077
    6178livecheck.type   regex
    6279livecheck.url    http://cairographics.org/releases/
    63 livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
     80livecheck.regex  "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
  • files/src_wpscript.diff

     
     1--- src/wscript 2012-11-28 16:24:51.000000000 +0100
     2+++ src/wscript.new     2012-11-28 16:25:08.000000000 +0100
     3@@ -35,7 +35,7 @@
     4     )
     5 
     6   # C API
     7-  ctx.install_files(os.path.join(ctx.env['PREFIX'], 'include', 'pycairo'),
     8+  ctx.install_files(os.path.join(ctx.env['EXEC_PREFIX'], 'include', 'pycairo'),
     9                     'pycairo.h')
     10 
     11   # how to strip binaries ?