--- Mk/bsd.autotools.mk.orig 2011-03-05 19:47:50.000000000 +0300 +++ Mk/bsd.autotools.mk 2011-10-22 16:49:05.554654216 +0400 @@ -266,7 +266,11 @@ .if defined(_AUTOTOOL_libtool) || defined(_AUTOTOOL_libtoolize) LIBTOOL_VERSION= 2.4 +.if ${OSVERSION} >= 1000000 && !defined(NO_LIBTOOL_FIXED) +LIBTOOL_PORT= devel/libtool-fixed +.else LIBTOOL_PORT= devel/libtool +.endif . if defined(_AUTOTOOL_libtool) && ${_AUTOTOOL_libtool} == "yes" _AUTOTOOL_rule_libtool= yes @@ -302,7 +306,11 @@ LIBTOOLFILES?= ${CONFIGURE_SCRIPT} . endif +.if ${OSVERSION} >= 1000000 && !defined(NO_LIBTOOL_FIXED) +LIBTOOL_DEPENDS= libtool-fixed>=2.4:${PORTSDIR}/${LIBTOOL_PORT} +.else LIBTOOL_DEPENDS= libtool>=2.4:${PORTSDIR}/${LIBTOOL_PORT} +.endif BUILD_DEPENDS+= ${LIBTOOL_DEPENDS} .endif --- Mk/bsd.port.mk.orig 2011-10-22 13:54:06.687652117 +0400 +++ Mk/bsd.port.mk 2011-10-22 21:17:48.566690848 +0400 @@ -3667,10 +3667,29 @@ @${DO_NADA} .endif +.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) +# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. +run-autotools-fixup: +.if ${OSVERSION} >= 1000000 && !defined(NO_AUTOTOOLS_FIX) + test -d ${WRKSRC} && find ${WRKSRC} -type f \( -name config.libpath -o \ + -name config.rpath -o -name configure -o -name libtool.m4 \) \ + -exec ${SH} -c "for f in \"\$$@\"; do \ + mtime=\$$(date -r \$$(stat -f '%m' \$$f) '+%Y%m%d%H%M.%S'); \ + ${SED} -i '' -e 's|freebsd1\*)|freebsd1.\*)|g' \ + -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \ + -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \ + -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \ + -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \$$f; \ + touch -mt \$$mtime \$$f; shift; done" argv0 {} + || /usr/bin/true + +.ORDER: run-autotools run-autotools-fixup do-configure +.endif +.endif + # Configure .if !target(do-configure) -do-configure: +do-configure: run-autotools-fixup @if [ -f ${SCRIPTDIR}/configure ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/configure; \