Index: head/Mk/Uses/libtool.mk =================================================================== --- head/Mk/Uses/libtool.mk (revision 457051) +++ head/Mk/Uses/libtool.mk (revision 457052) @@ -1,84 +1,84 @@ # $FreeBSD$ # # Bring libtool scripts up to date. # # Feature: libtool # Usage: USES=libtool or USES=libtool:args # Valid args: keepla Don't remove libtool libraries (*.la) from the stage # directory. Some ports need them at runtime (e.g. ports # that call lt_dlopen from libltdl). # build Add a build dependency on devel/libtool. This can # be used when a port does not generate its own libtool # script and relies on the system to provide one. # -# MAINTAINER: autotools@FreeBSD.org +# MAINTAINER: tijl@FreeBSD.org .if !defined(_INCLUDE_USES_LIBTOOL_MK) _INCLUDE_USES_LIBTOOL_MK= yes _USES_POST+= libtool .if ${libtool_ARGS:Mbuild} BUILD_DEPENDS+= libtool:devel/libtool .endif .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK) _INCLUDE_USES_LIBTOOL_POST_MK= yes _USES_configure+= 480:patch-libtool patch-libtool: @${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \ -type f | while read i; do ${SED} -i.libtool.bak \ -e '/dragonfly\*/!s/^ *freebsd\*[ )]/dragonfly* | &/' \ -e '/gcc_dir=\\`/s/gcc /$$CC /' \ -e '/gcc_ver=\\`/s/gcc /$$CC /' \ -e '/link_all_deplibs[0-9A-Z_]*=/s/=unknown/=no/' \ -e '/archive_expsym_cmds[0-9A-Z_]*=.$$CC.*-retain-/ { \ s/-retain-symbols-file/-version-script/; \ s/$$export_symbols/$$lib-ver/; \ s/$$CC/echo "{ global:" > $$lib-ver~ \ sed -e "s|$$|;|" < $$export_symbols >> $$lib-ver~ \ echo "local: *; };" >> $$lib-ver~&/; }' \ -e '/objformat=/s/echo aout/echo elf/' \ -e '/STRIP -V/s/"GNU strip"/"strip"/' \ -e "/freebsd-elf\\*)/,/;;/ { \ /deplibs_check_method=/s/=.*/=pass_all/; \ /library_names_spec=.*\\.so/ \ s/=.*/='\$$libname\$$release.so\$$versuffix \ \$$libname\$$release.so\$$major \$$libname.so' \ soname_spec='\$$libname\$$release.so\$$major'/; \ /library_names_spec=.*shared_ext/ \ s/=.*/='\$$libname\$$release\$$shared_ext\$$versuffix \ \$$libname\$$release\$$shared_ext\$$major \ \$$libname\$$shared_ext' \ soname_spec='\$$libname\$$release\$$shared_ext\$$major'/; \ }" $${i} && ${TOUCH} -mr $${i}.libtool.bak $${i}; done @${FIND} ${WRKDIR} -type f -name ltmain.sh | \ ${XARGS} ${REINPLACE_CMD} \ -e '/case $$version_type in/,+2 \ s/darwin|linux|/darwin|freebsd-elf|linux|/' \ -e '/freebsd-elf)/,+2 { \ /major=/s/=.*/=.$$(($$current - $$age))/; \ /versuffix=/s/=.*/="$$major.$$age.$$revision"/; }' \ -e '/if.*linkmode.*prog.*mode.*!= relink/s/if.*;/if :;/'\ -e '/if.*prog.*linkmode.*relink !=.*mode/s/if.*;/if :;/'\ -e '/if.*linkmode.*prog.*mode.* = relink/s/||.*;/;/' \ -e '/if.*prog.*linkmode.*relink = .*mode/s/||.*;/;/' \ -e 's/|-p|-pg|/|-B*|-fstack-protector*|-p|-pg|/' _USES_stage+= 790:patch-lafiles patch-lafiles: .if ${libtool_ARGS:Mkeepla} @${FIND} ${STAGEDIR} -type f -name '*.la' | \ ${XARGS} ${SED} -i '' -e "/dependency_libs=/s/=.*/=''/" .else @${FIND} ${STAGEDIR} -type l -exec ${SH} -c \ 'case `${REALPATH} -q "{}"` in \ *.la) ${ECHO_CMD} "{}" ;; esac' \; | \ ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} @${FIND} ${STAGEDIR} -type f -name '*.la' | \ ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} .endif .endif Index: head/Mk/bsd.autotools.mk =================================================================== --- head/Mk/bsd.autotools.mk (revision 457051) +++ head/Mk/bsd.autotools.mk (revision 457052) @@ -1,218 +1,218 @@ # $FreeBSD$ # # IMPORTANT NOTE: # Before making any changes to this file, contact portmgr to arrange # for an experimental ports run. # Untested commits will almost certainly break the tree, incur the # wrath of countless folks, and be unceremoniously backed out by # the maintainer and/or portmgr. -Autotools_Include_MAINTAINER= autotools@FreeBSD.org +Autotools_Include_MAINTAINER= tijl@FreeBSD.org #--------------------------------------------------------------------------- # USE_AUTOTOOLS= tool[:env] ... # # 'tool' can currently be one of the following: # autoconf, autoheader # automake, aclocal # # ':env' is used to specify that the environmental variables are needed # but the relevant tool should NOT be run as part of the # 'run-autotools' target # # In addition, these variables can be set in the port Makefile to be # passed to the relevant tools: # # AUTOMAKE_ARGS=... # - Extra arguments passed to automake during configure step # # ACLOCAL_ARGS=... # - Arguments passed to aclocal during configure step # # AUTOCONF_ARGS=... # - Extra arguments passed to autoconf during configure step # # AUTOHEADER_ARGS=... # - Extra arguments passed to autoheader during configure step # #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- # NO USER-SERVICABLE PARTS BEYOND THIS POINT. REALLY. WE MEAN IT. #--------------------------------------------------------------------------- # Known autotools components _AUTOTOOLS_ALL= autoconf autoheader \ automake aclocal #--------------------------------------------------------------------------- # Primary magic to break out the USE_AUTOTOOLS stanza into something # more useful, along with substantial error checking to prevent # foot-shooting #--------------------------------------------------------------------------- # Break out the stanza # _AUTOTOOLS_IMPL= .for stanza in ${USE_AUTOTOOLS} _AUTOTOOLS_IMPL+= ${stanza:C/^([^:]+).*/\1/} _AUTOTOOL_${stanza:C/^([^:]+).*/\1/}= ${stanza:C/^[^:]+:([^:]+)/\1/} .endfor # Verify each component, normalize # _AUTOTOOLS_NOCOMP= .for component in ${_AUTOTOOLS_IMPL} . if ${_AUTOTOOLS_ALL:M${component}}=="" _AUTOTOOLS_NOCOMP+= ${component} . endif . if ${_AUTOTOOL_${component}}==${component} _AUTOTOOL_${component}= yes . elsif ${_AUTOTOOL_${component}}!="env" && ${_AUTOTOOL_${component}}!="yes" _AUTOTOOLS_BADCOMP+= ${component}:${_AUTOTOOL_${component}} . endif .endfor .if !empty(_AUTOTOOLS_NOCOMP) IGNORE+= Unknown autotool: ${_AUTOTOOLS_NOCOMP:O:u} .endif # Check for anything other than 'yes' or 'env' # _AUTOTOOLS_BADCOMP= .for component in ${_AUTOTOOLS_IMPL} . if ${_AUTOTOOL_${component}}!="env" && ${_AUTOTOOL_${component}}!="yes" _AUTOTOOLS_BADCOMP+= ${component}:${_AUTOTOOL_${component}} . endif .endfor .if !empty(_AUTOTOOLS_BADCOMP) IGNORE+= Bad autotool stanza: ${_AUTOTOOLS_BADCOMP:O:u} .endif #--------------------------------------------------------------------------- # automake and aclocal #--------------------------------------------------------------------------- .if defined(_AUTOTOOL_aclocal) && ${_AUTOTOOL_aclocal} == "yes" _AUTOTOOL_automake?= env _AUTOTOOL_rule_aclocal= yes GNU_CONFIGURE= yes .endif .if defined(_AUTOTOOL_automake) AUTOMAKE_VERSION= 1.15 AUTOMAKE_APIVER= 1.15 AUTOMAKE_PORT= devel/automake . if ${_AUTOTOOL_automake} == "yes" _AUTOTOOL_rule_automake= yes GNU_CONFIGURE?= yes . endif .endif .if defined(AUTOMAKE_VERSION) AUTOMAKE= ${LOCALBASE}/bin/automake-${AUTOMAKE_VERSION} AUTOMAKE_DIR= ${LOCALBASE}/share/automake-${AUTOMAKE_VERSION} ACLOCAL= ${LOCALBASE}/bin/aclocal-${AUTOMAKE_VERSION} ACLOCAL_DIR= ${LOCALBASE}/share/aclocal-${AUTOMAKE_VERSION} . if defined(_AUTOTOOL_aclocal) ACLOCAL_ARGS?= --automake-acdir=${ACLOCAL_DIR} . endif AUTOMAKE_VARS= AUTOMAKE=${AUTOMAKE} \ AUTOMAKE_DIR=${AUTOMAKE_DIR} \ AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \ AUTOMAKE_APIVER=${AUTOMAKE_APIVER} \ ACLOCAL=${ACLOCAL} \ ACLOCAL_DIR=${ACLOCAL_DIR} AUTOMAKE_DEPENDS= ${AUTOMAKE}:${AUTOMAKE_PORT} BUILD_DEPENDS+= ${AUTOMAKE_DEPENDS} .endif #--------------------------------------------------------------------------- # autoconf and autoheader #--------------------------------------------------------------------------- .if defined(_AUTOTOOL_autoheader) && ${_AUTOTOOL_autoheader} == "yes" _AUTOTOOL_autoconf= yes _AUTOTOOL_rule_autoheader= yes GNU_CONFIGURE?= yes .endif .if defined(_AUTOTOOL_autoconf) AUTOCONF_VERSION= 2.69 AUTOCONF_PORT= devel/autoconf . if ${_AUTOTOOL_autoconf} == "yes" _AUTOTOOL_rule_autoconf= yes GNU_CONFIGURE?= yes . endif .endif .if defined(AUTOCONF_VERSION) AUTOCONF= ${LOCALBASE}/bin/autoconf-${AUTOCONF_VERSION} AUTOCONF_DIR= ${LOCALBASE}/share/autoconf-${AUTOCONF_VERSION} AUTOHEADER= ${LOCALBASE}/bin/autoheader-${AUTOCONF_VERSION} AUTOIFNAMES= ${LOCALBASE}/bin/ifnames-${AUTOCONF_VERSION} AUTOM4TE?= ${LOCALBASE}/bin/autom4te-${AUTOCONF_VERSION} AUTORECONF= ${LOCALBASE}/bin/autoreconf-${AUTOCONF_VERSION} AUTOSCAN= ${LOCALBASE}/bin/autoscan-${AUTOCONF_VERSION} AUTOUPDATE= ${LOCALBASE}/bin/autoupdate-${AUTOCONF_VERSION} AUTOCONF_VARS= AUTOCONF=${AUTOCONF} \ AUTOCONF_DIR=${AUTOCONF_DIR} \ AUTOHEADER=${AUTOHEADER} \ AUTOIFNAMES=${AUTOIFNAMES} \ AUTOM4TE=${AUTOM4TE} \ AUTORECONF=${AUTORECONF} \ AUTOSCAN=${AUTOSCAN} \ AUTOUPDATE=${AUTOUPDATE} \ AUTOCONF_VERSION=${AUTOCONF_VERSION} AUTOCONF_DEPENDS= ${AUTOCONF}:${AUTOCONF_PORT} BUILD_DEPENDS+= ${AUTOCONF_DEPENDS} .endif #--------------------------------------------------------------------------- # Add to the environment #--------------------------------------------------------------------------- AUTOTOOLS_VARS= ${AUTOMAKE_VARS} ${AUTOCONF_VARS} .if defined(AUTOTOOLS_VARS) && !empty(AUTOTOOLS_VARS) . for var in AUTOTOOLS CONFIGURE MAKE SCRIPTS ${var:tu}_ENV+= ${AUTOTOOLS_VARS} . endfor .endif #--------------------------------------------------------------------------- # Make targets #--------------------------------------------------------------------------- _USES_configure+=460:run-autotools-aclocal 461:run-autotools-autoconf \ 462:run-autotools-autoheader 463:run-autotools-automake .if defined(_AUTOTOOL_rule_aclocal) && !target(run-autotools-aclocal) run-autotools-aclocal: @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \ ${ACLOCAL_ARGS}) .endif .if defined(_AUTOTOOL_rule_autoconf) && !target(run-autotools-autoconf) run-autotools-autoconf: @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF} \ ${AUTOCONF_ARGS}) .endif .if defined(_AUTOTOOL_rule_automake) && !target(run-autotools-automake) run-autotools-automake: @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOMAKE} \ ${AUTOMAKE_ARGS}) .endif .if defined(_AUTOTOOL_rule_autoheader) && !target(run-autotools-autoheader) run-autotools-autoheader: @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOHEADER} \ ${AUTOHEADER_ARGS}) .endif