Ticket #61282: Portfile.diff

File Portfile.diff, 1.6 KB (added by jmroot (Joshua Root), 4 years ago)
  • lang/python39/Portfile

    diff --git a/lang/python39/Portfile b/lang/python39/Portfile
    index c29043490b3..e823480da46 100644
    a b patchfiles patch-setup.py.diff \ 
    3232                    patch-configure.diff \
    3333                    patch-Lib-ctypes-macholib-dyld.py.diff \
    3434                    patch-libedit.diff \
    35                     patch-configure-xcode4bug.diff
     35                    patch-configure-xcode4bug.diff \
     36                    sysconfig.py.diff
    3637
    3738if {${os.platform} eq "darwin" && ${os.major} < 10} {
    3839    # work around no copyfile and/or pthread_threadid_np on older systems
    platform darwin { 
    118119        # work for dependents that incorrectly use this variable to find out
    119120        # how to link against python (see ticket #15099); instead we mirror
    120121        # the behavior of `python-config --ldflags` here.
    121         system -W ${buildlibdir} "awk -F : \
    122             \"/'LINKFORSHARED'/ {printf \\\"%s: '-L${framewdir}/lib/python${branch}/${confdir}\
    123             -lpython${branch} -ldl -framework CoreFoundation',\\n\\\", \\\$1; getline; next} {print}\"\
    124             _sysconfigdata__darwin_darwin.py > _sysconfigdata__darwin_darwin.py.new"
    125         file rename -force ${buildlibdir}/_sysconfigdata__darwin_darwin.py.new \
     122        set lfs_pattern {^([[:space:]]*'LINKFORSHARED':).*}
     123        set lfs_replacement "\\1 '-L${framewdir}/lib/python${branch}/${confdir} -lpython${branch} -ldl -framework CoreFoundation',"
     124        reinplace -E s|${lfs_pattern}|${lfs_replacement}| \
    126125            ${buildlibdir}/_sysconfigdata__darwin_darwin.py
    127126
    128127        # remove -arch flags from the config