Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/Uses/libtool.mk
| Show All 19 Lines | |||||
| .if ${libtool_ARGS:Mbuild} | .if ${libtool_ARGS:Mbuild} | ||||
| BUILD_DEPENDS+= libtool:${PORTSDIR}/devel/libtool | BUILD_DEPENDS+= libtool:${PORTSDIR}/devel/libtool | ||||
| .endif | .endif | ||||
| .endif | .endif | ||||
| .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK) | .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK) | ||||
| _INCLUDE_USES_LIBTOOL_POST_MK= yes | _INCLUDE_USES_LIBTOOL_POST_MK= yes | ||||
| _USES_configure+= 480:patch-libtool | |||||
| patch-libtool: | patch-libtool: | ||||
| @${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \ | @${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \ | ||||
| -type f | while read i; do ${SED} -i.libtool.bak \ | -type f | while read i; do ${SED} -i.libtool.bak \ | ||||
| -e '/dragonfly\*/!s/^ *freebsd\*[ )]/dragonfly* | &/' \ | -e '/dragonfly\*/!s/^ *freebsd\*[ )]/dragonfly* | &/' \ | ||||
| -e '/gcc_dir=\\`/s/gcc /$$CC /' \ | -e '/gcc_dir=\\`/s/gcc /$$CC /' \ | ||||
| -e '/gcc_ver=\\`/s/gcc /$$CC /' \ | -e '/gcc_ver=\\`/s/gcc /$$CC /' \ | ||||
| -e '/link_all_deplibs[0-9A-Z_]*=/s/=unknown/=no/' \ | -e '/link_all_deplibs[0-9A-Z_]*=/s/=unknown/=no/' \ | ||||
| -e '/archive_expsym_cmds[0-9A-Z_]*=.$$CC.*-retain-/ { \ | -e '/archive_expsym_cmds[0-9A-Z_]*=.$$CC.*-retain-/ { \ | ||||
| Show All 25 Lines | -e '/freebsd-elf)/,+2 { \ | ||||
| /major=/s/=.*/=.$$(($$current - $$age))/; \ | /major=/s/=.*/=.$$(($$current - $$age))/; \ | ||||
| /versuffix=/s/=.*/="$$major.$$age.$$revision"/; }' \ | /versuffix=/s/=.*/="$$major.$$age.$$revision"/; }' \ | ||||
| -e '/if.*linkmode.*prog.*mode.*!= relink/s/if.*;/if :;/'\ | -e '/if.*linkmode.*prog.*mode.*!= relink/s/if.*;/if :;/'\ | ||||
| -e '/if.*prog.*linkmode.*relink !=.*mode/s/if.*;/if :;/'\ | -e '/if.*prog.*linkmode.*relink !=.*mode/s/if.*;/if :;/'\ | ||||
| -e '/if.*linkmode.*prog.*mode.* = relink/s/||.*;/;/' \ | -e '/if.*linkmode.*prog.*mode.* = relink/s/||.*;/;/' \ | ||||
| -e '/if.*prog.*linkmode.*relink = .*mode/s/||.*;/;/' \ | -e '/if.*prog.*linkmode.*relink = .*mode/s/||.*;/;/' \ | ||||
| -e 's/|-p|-pg|/|-B*|-fstack-protector*|-p|-pg|/' | -e 's/|-p|-pg|/|-B*|-fstack-protector*|-p|-pg|/' | ||||
| _USES_stage+= 790:patch-lafiles | |||||
| patch-lafiles: | patch-lafiles: | ||||
| .if ${libtool_ARGS:Mkeepla} | .if ${libtool_ARGS:Mkeepla} | ||||
| @${FIND} ${STAGEDIR} -type f -name '*.la' | \ | @${FIND} ${STAGEDIR} -type f -name '*.la' | \ | ||||
| ${XARGS} ${SED} -i '' -e "/dependency_libs=/s/=.*/=''/" | ${XARGS} ${SED} -i '' -e "/dependency_libs=/s/=.*/=''/" | ||||
| .else | .else | ||||
| @${FIND} ${STAGEDIR} -type l -exec ${SH} -c \ | @${FIND} ${STAGEDIR} -type l -exec ${SH} -c \ | ||||
| 'case `${REALPATH} -q "{}"` in \ | 'case `${REALPATH} -q "{}"` in \ | ||||
| *.la) ${ECHO_CMD} "{}" ;; esac' \; | \ | *.la) ${ECHO_CMD} "{}" ;; esac' \; | \ | ||||
| ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} | ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} | ||||
| @${FIND} ${STAGEDIR} -type f -name '*.la' | \ | @${FIND} ${STAGEDIR} -type f -name '*.la' | \ | ||||
| ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} | ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} | ||||
| .endif | .endif | ||||
| .endif | .endif | ||||