Ignore:
Timestamp:
Oct 7, 2015, 8:18:42 PM (3 years ago)
Author:
michaelld@…
Message:

python 1.0 PortGroup: when creating the requested subports, append Python to each; do not overwrite what was there before.

Location:
trunk/dports/_resources/port1.0/group
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/octave-1.0.tcl

    r133725 r141005  
    5858    worksrcdir                  ${octave.module}
    5959
     60    # depend on the Fortran compiler used to build octave
     61
     62    if {[catch {set installed [lindex [registry_active octave] 0]}]} {
     63        ui_msg "Warning in octave 1.0 PortGroup:"
     64        ui_msg "  Cannot find port 'octave' in the registry."
     65        ui_msg "  This should never happen!"
     66        ui_msg "  Continuing, and hoping for the best!"
     67    } else {
     68        set _variants [lindex ${installed} 3]
     69        set gcc1 [string first {gcc} ${_variants}]
     70        if {${gcc1} != -1} {
     71            # using +gccXY; retrieve that string
     72            set gcc [string range ${_variants} ${gcc1} [expr ${gcc1} + 4]]
     73        } else {
     74            # must be using +g95
     75            set gcc "g95"
     76        }
     77        #depends_lib-append port:${gcc}
     78    }
     79
    6080    # octave is not universal
    6181
     
    7797
    7898post-extract {
    79 
    8099    # rename the effective worksrcdir to always be ${octave.module}
    81100
     
    132151    # is always paired with the appropriate -Lpath statement.
    133152
     153    set GFORTRAN [glob ${prefix}/lib/libgcc/libgfortran*]
     154    set QUADMATH [glob ${prefix}/lib/libgcc/libquadmath*]
     155    set FLIBS [exec ${prefix}/bin/mkoctfile -p FLIBS | sed -e "s@-L\[^ \]* @@g" -e "s@-lgfortran@${GFORTRAN}@g" -e "s@-lquadmath@${QUADMATH}@g"]
     156    set FLIBS "-L${prefix}/lib/libgcc ${FLIBS}"
     157    set LAPACK_LIBS [exec ${prefix}/bin/mkoctfile -p LAPACK_LIBS | sed -e "s@-L\[^ \]* @@g" -e "s@-lgfortran@${GFORTRAN}@g" -e "s@-lquadmath@${QUADMATH}@g"]
     158    set LAPACK_LIBS "${FLIBS} ${LAPACK_LIBS}"
     159
     160    ui_msg "GFORTRAN is '${GFORTRAN}'"
     161    ui_msg "QUADMATH is '${QUADMATH}'"
     162    ui_msg "FLIBS is '${FLIBS}'"
     163    ui_msg "LAPACK_LIBS is '${LAPACK_LIBS}'"
     164
    134165    configure.env-append \
    135         LAPACK_LIBS='[exec ${prefix}/bin/mkoctfile -p FLIBS] \
    136                      [exec ${prefix}/bin/mkoctfile -p LAPACK_LIBS]'
     166        FLIBS='${FLIBS}' \
     167        LAPACK_LIBS='${LAPACK_LIBS}'
    137168
    138169    # In 10.8+, set the LC_CTYPE (locale) to "C" otherwise
     
    163194}
    164195
    165 post-deactivate {
    166     system "${prefix}/bin/octave -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg uninstall -nodeps ${octave.module}'"
    167     system "${prefix}/bin/octave -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg rebuild'"
     196pre-deactivate {
     197    ui_debug "${prefix}/bin/octave -V -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg uninstall -nodeps ${octave.module}'"
     198    system "${prefix}/bin/octave -V -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg uninstall -nodeps ${octave.module}'"
     199    ui_debug "${prefix}/bin/octave -V -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg rebuild'"
     200    system "${prefix}/bin/octave -V -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg rebuild'"
     201
     202    # remove cruft left behind; cruft sometimes happens ;)
     203    foreach global_dir {lib/octave/packages share/octave/packages} {
     204        if {![catch {set stk_dirs [glob ${prefix}/${global_dir}/${octave.module}*]}]} {
     205            foreach stk_dir ${stk_dirs} {
     206                ui_debug "removing cruft directory ${stk_dir}"
     207                file delete -force ${stk_dir}
     208            }
     209        }
     210    }
    168211}
    169212
    170213post-activate {
    171     system "${prefix}/bin/octave -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg install -verbose -global ${prefix}/share/octave/${octave.module}.tar.gz'"
    172     system "${prefix}/bin/octave -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg rebuild'"
    173 }
     214
     215    # remove cruft left behind; cruft sometimes happens ;)
     216    foreach global_dir {lib/octave/packages share/octave/packages} {
     217        if {![catch {set stk_dirs [glob ${prefix}/${global_dir}/${octave.module}*]}]} {
     218            foreach stk_dir ${stk_dirs} {
     219                ui_debug "removing cruft directory ${stk_dir}"
     220                file delete -force ${stk_dir}
     221            }
     222        }
     223    }
     224
     225    ui_debug "${prefix}/bin/octave -V -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg install -verbose -global ${prefix}/share/octave/${octave.module}.tar.gz'"
     226    system "${prefix}/bin/octave -V -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg install -verbose -global ${prefix}/share/octave/${octave.module}.tar.gz'"
     227    ui_debug "${prefix}/bin/octave -V -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg rebuild'"
     228    system "${prefix}/bin/octave -V -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg rebuild'"
     229}
  • trunk/dports/_resources/port1.0/group/python-1.0.tcl

    r137835 r141005  
    9797    if {[string match py-* $name]} {
    9898        foreach v [option $option] {
    99             subport py${v}[string trimleft $name py] { depends_lib port:python${v} }
     99            subport py${v}[string trimleft $name py] { depends_lib-append port:python${v} }
    100100        }
    101101        if {$subport eq $name || $subport eq ""} {
Note: See TracChangeset for help on using the changeset viewer.