Ticket #35823: Portfile.diff

File Portfile.diff, 4.3 KB (added by lockhart (Thomas Lockhart), 12 years ago)

Patch to select the proper version of python and to install into /opt/local/Library rather than into /opt/local/lib (the former is needed for python27, the latter for python24). Default to python-2.4 per Ryan.

  • Portfile

    old new  
    55
    66name                omniORB
    77version             4.1.6
    8 revision            0
     8revision            1
    99categories          devel
    1010platforms           darwin
    1111# executables are GPL, libs are LGPL
     
    2828patchfiles          src_tool_omniidl_cxx_cccp_config-darwin.h.diff \
    2929                    include_omniORB4_CORBA_sysdep.h.diff
    3030
    31 # Universal variant broken since 4.1.6
     31# The universal variant has been broken for several years (at least version 4.1.4)
    3232universal_variant   no
    3333
    34 configure.args      --with-omniORB-config="${prefix}/etc/omniORB.cfg" \
     34notes \
     35"To install omniORBpy use the port pyXX_omniORBpy
     36corresponding to the matching python variant selected here."
     37
     38configure.args      CC="${configure.cc}" \
     39                    CXX="${configure.cxx}" \
     40                    CCFLAGS="[get_canonical_archflags cc]" \
     41                    EXTRA_GCC_CXXFLAGS="[get_canonical_archflags cc]" \
     42                    --with-omniORB-config="${prefix}/etc/omniORB.cfg" \
    3543                    --with-omniNames-logdir="${prefix}/var"
     44configure.args-delete --disable-dependency-tracking
    3645
    3746if {$build_arch == "x86_64" && ${os.platform} == "darwin"} {
    3847    configure.args-append --build=${build_arch}-apple-${os.platform}${os.version}
    3948}
    4049
     50pre-patch {
     51    reinplace "s|-bind_at_load||g" \
     52        ${worksrcpath}/mk/beforeauto.mk.in
     53    ui_debug "archflags cc are [get_canonical_archflags cc]"
     54    ui_debug "archflags cxx are [get_canonical_archflags cxx]"
     55}
     56
    4157post-patch {
    42     reinplace "s|,prefix=\'\$PYTHON_PREFIX\'||g" ${worksrcpath}/configure
    43     reinplace "s|,prefix=\'\$PYTHON_EXEC_PREFIX\'||g" ${worksrcpath}/configure
     58    reinplace "s|\\(\$(CXXLINKOPTIONS)\\)|\\1 [get_canonical_archflags cc]|g" \
     59        ${worksrcpath}/mk/beforeauto.mk.in
     60
     61    reinplace "s|get_python_lib(0,\[^)\]*)|get_python_lib()|g" \
     62        ${worksrcpath}/configure
     63    reinplace "s|get_python_lib(1,\[^)\]*)|get_python_lib()|g" \
     64        ${worksrcpath}/configure
    4465    if {[variant_isset universal]} {
    45         system "cd ${worksrcpath} && ed - ./include/omniconfig.h.in < ${filespath}/include_omniconfig.h.in.ed"
     66#         system "cd ${worksrcpath} && ed - ./include/omniconfig.h.in < ${filespath}/include_omniconfig.h.in.ed"
    4667    }
    4768}
    4869
    4970if {[variant_isset universal]} {
    50     patchfiles-append mk_beforeauto.mk.in.diff
     71    # patchfiles-append mk_beforeauto.mk.in.diff
    5172    post-configure {
    52         system "cd ${worksrcpath} && ed - ./include/omniORB4/acconfig.h < ${filespath}/include_omniORB4_acconfig.h.ed"
     73#         system "cd ${worksrcpath} && ed - ./include/omniORB4/acconfig.h < ${filespath}/include_omniORB4_acconfig.h.ed"
    5374    }
    5475}
    5576
     77# Need an empty universal variant defined to get the correct set of -arch arguments
     78variant universal {}
     79
    5680variant ssl description {Enable SSL support} {
    5781    configure.args-append   --with-openssl
    5882    depends_lib-append      port:openssl
    5983}
    6084
    61 if { ![variant_isset python24] && ![variant_isset python25] && ![variant_isset python26] && ![variant_isset python27]} {
    62     default_variants        +python27
     85if {![variant_isset python24] && ![variant_isset python25] && ![variant_isset python26] && ![variant_isset python27]} {
     86    default_variants        +python24
    6387}
    6488
    6589variant python24 description {Enable python support with python 2.4} {
     90    notes-append "For this omniORB variant install py24-omniORBpy"
    6691    depends_lib-append      port:python24
    6792    configure.python        ${prefix}/bin/python2.4
    6893}
    6994
    7095variant python25 description {Enable python support with python 2.5} {
     96    notes-append "For this omniORB variant install py25-omniORBpy"
    7197    depends_lib-append      port:python25
    7298    configure.python        ${prefix}/bin/python2.5
    7399}
    74100
    75101variant python26 description {Enable python support with python 2.6} {
     102    notes-append "For this omniORB variant install py26-omniORBpy"
    76103    depends_lib-append      port:python26
    77104    configure.python        ${prefix}/bin/python2.6
    78105}
    79106
    80107variant python27 description {Enable python support with python 2.7} {
     108    notes-append "For this omniORB variant install py27-omniORBpy"
    81109    depends_lib-append      port:python27
    82110    configure.python        ${prefix}/bin/python2.7
    83111}