Index: Mk/bsd.gnome.mk =================================================================== --- Mk/bsd.gnome.mk (revision 331139) +++ Mk/bsd.gnome.mk (working copy) @@ -68,7 +68,7 @@ # # non-version specific components -_USE_GNOME_ALL= esound intlhack intltool introspection ltasneededhack lthack \ +_USE_GNOME_ALL= esound intlhack intltool introspection ltasneededhack \ ltverhack gnomehack referencehack gnomehier gnomemimedata \ gnomeprefix @@ -117,9 +117,6 @@ referencehack_PRE_PATCH= ${FIND} ${WRKSRC} -name "Makefile.in" -type f | ${XARGS} ${REINPLACE_CMD} -e \ "s|test \"\$$\$$installfiles\" = '\$$(srcdir)/html/\*'|:|" -lthack_PRE_PATCH= ${FIND} ${WRKSRC} -name "configure" -type f | ${XARGS} ${REINPLACE_CMD} -e \ - '/^LIBTOOL_DEPS="$$ac_aux_dir\/ltmain.sh"$$/s|$$|; $$ac_aux_dir/ltconfig $$LIBTOOL_DEPS;|' - GNOME_MTREE_FILE?= ${LOCALBASE}/etc/mtree/BSD.gnome.dist gnomehier_DETECT= ${GNOME_MTREE_FILE} gnomehier_RUN_DEPENDS= ${gnomehier_DETECT}:${PORTSDIR}/misc/gnomehier @@ -774,47 +771,27 @@ PLIST_SUB+= GTK2_VERSION="${GTK2_VERSION}" \ GTK3_VERSION="${GTK3_VERSION}" -# Then handle the ltverhack component (it has to be done here, because -# we rely on some bsd.autotools.mk variables, and bsd.autotools.mk is -# included in the post-makefile section). -.if defined(_AUTOTOOL_libtool) -lthacks_CONFIGURE_ENV= ac_cv_path_DOLT_BASH= -lthacks_PRE_PATCH= ${CP} -pf ${LTMAIN} ${WRKDIR}/gnome-ltmain.sh && \ - ${CP} -pf ${LIBTOOL} ${WRKDIR}/gnome-libtool && \ - for file in ${LIBTOOLFILES}; do \ - ${REINPLACE_CMD} -e \ - '/^ltmain=/!s|$$ac_aux_dir/ltmain\.sh|${LIBTOOLFLAGS} ${WRKDIR}/gnome-ltmain.sh|g; \ - /^LIBTOOL=/s|$$(top_builddir)/libtool|${WRKDIR}/gnome-libtool|g' \ - ${PATCH_WRKSRC}/$$file; \ - done; -.else -. if ${USE_GNOME:Mltverhack*}!="" || ${USE_GNOME:Mltasneededhack}!="" -IGNORE= cannot install: ${PORTNAME} uses the ltverhack and/or ltasneededhack GNOME components but does not use libtool -. endif -.endif - +# libtool bashing to get stable library version across releases .if ${USE_GNOME:Mltverhack\:*:C/^[^:]+:([^:]+).*/\1/}=="" ltverhack_LIB_VERSION= major=.`expr $$current - $$age` .else ltverhack_LIB_VERSION= major=".${USE_GNOME:Mltverhack\:*:C/^[^:]+:([^:]+).*/\1/}" .endif -ltverhack_PATCH_DEPENDS=${LIBTOOL_DEPENDS} -ltverhack_PRE_PATCH= for file in gnome-ltmain.sh gnome-libtool; do \ - if [ -f ${WRKDIR}/$$file ]; then \ - ${REINPLACE_CMD} -e \ - '/freebsd-elf)/,/;;/ s|major="\.$$current"|${ltverhack_LIB_VERSION}|; \ - /freebsd-elf)/,/;;/ s|versuffix="\.$$current"|versuffix="$$major"|' \ - ${WRKDIR}/$$file; \ - fi; \ - done +ltverhack_PRE_PATCH= for file in ltmain.sh libtool; do \ + if [ -f ${WRKSRC}/$$file ]; then \ + ${REINPLACE_CMD} -i.ltverhack -e \ + '/freebsd-elf)/,/;;/ s|major="\.$$current"|${ltverhack_LIB_VERSION}|; \ + /freebsd-elf)/,/;;/ s|versuffix="\.$$current"|versuffix="$$major"|' \ + ${WRKSRC}/$$file; \ + fi; \ + done -ltasneededhack_PATCH_DEPENDS=${LIBTOOL_DEPENDS} -ltasneededhack_PRE_PATCH= if [ -f ${WRKDIR}/gnome-libtool ]; then \ - ${REINPLACE_CMD} -e \ - '/^archive_cmds=/s/-shared/-shared -Wl,--as-needed/ ; \ - /^archive_expsym_cmds=/s/-shared/-shared -Wl,--as-needed/' \ - ${WRKDIR}/gnome-libtool; \ - fi +ltasneededhack_PRE_PATCH= if [ -f ${WRKSRC}/libtool ]; then \ + ${REINPLACE_CMD} -i.asneeded -e \ + '/^archive_cmds=/s/-shared/-shared -Wl,--as-needed/ ; \ + /^archive_expsym_cmds=/s/-shared/-shared -Wl,--as-needed/' \ + ${WRKSRC}/libtool; \ + fi # Set USE_CSTD for all ports that depend on glib12 .if defined(_USE_GNOME) && !empty(_USE_GNOME:Mglib12) @@ -824,11 +801,6 @@ # Then traverse through all components, check which of them # exist in ${_USE_GNOME} and set variables accordingly .ifdef _USE_GNOME -. if ${USE_GNOME:Mltverhack*}!= "" || ${USE_GNOME:Mltasneededhack}!= "" -GNOME_PRE_PATCH+= ${lthacks_PRE_PATCH} -CONFIGURE_ENV+= ${lthacks_CONFIGURE_ENV} -. endif - . for component in ${_USE_GNOME:O:u} . if defined(${component}_PATCH_DEPENDS) PATCH_DEPENDS+= ${${component}_PATCH_DEPENDS}