Changes between Initial Version and Version 1 of Ticket #51516, comment 134


Ignore:
Timestamp:
Jun 3, 2024, 12:54:19 PM (5 weeks ago)
Author:
RJVB (René Bertin)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #51516, comment 134

    initial v1  
    3333    configure.ldflags-append \
    3434                    -Wl,-rpath,${thePrefix}/lib
     35    if {${os.platform} eq "darwin"} {
     36        set shext "dylib"
     37    } else {
     38        set shext "so"
     39    }
    3540    post-destroot {
    3641        foreach p [glob ${destroot}${thePrefix}/lib/pkgconfig/*.pc] {
    37             # we really should replace the -L/here -lfoo with /here/libfoo.? so
    38             # clever compilers/linkers cannot reorder the arguments and we can
    39             # build this port without build conflict on openssl(-dev)!!
    40             reinplace -q "s|Libs: |Libs: -Wl,-rpath,${thePrefix}/lib |g" ${p}
     42            reinplace -q "s|Libs: |Libs: -Wl,-rpath,\$\{libdir\} |g" ${p}
     43        }
     44        # also make certain no one can re-arrange the order of the linker command line
     45        # and -L and -l arguments cannot get separated causing the wrong libraries to be linked.
     46        foreach lib {crypto ssl tls} {
     47            reinplace "s|-L\$\{libdir\} -l${lib}|\$\{libdir\}/lib$lib.${shext}|g" \
     48                ${destroot}${thePrefix}/lib/pkgconfig/lib${lib}.pc
    4149        }
    4250    }