The last release of libtool is 2.4.6, which is from 2015. We currently
have 2.4.2. I don't expect projects to actually require 2.4.6, but given
how old 2.4.6 is, some check for that version.

Given that libtool is not being developed, the one time pain of updating
to 2.4.6 might be worth it.

This is the first time I try to change anything in ports. What would be
the best way to test this?

Cheers,
Rafael

commit aa84897eb8840f32739b1d61fa5ae230ec8f232e
Author: Rafael Ávila de Espíndola <raf...@espindo.la>
Date:   Tue Sep 22 22:27:59 2020 -0700

    Update libtool
    
    Building sane-backends from git requires libtool 2.4.6. Given that
    libtool 2.4.6 was released in 2015, it seems better to update it in
    ports than try change sane-backends.
    
    Warning: There was quite a bit of cargo cult involved in this. For
    example, I have blindly update the patches and don't know if they are
    still relevant in 2.4.6.

diff --git devel/libtool/Makefile devel/libtool/Makefile
index 0ac0f7a7c0e..5df984bde20 100644
--- devel/libtool/Makefile
+++ devel/libtool/Makefile
@@ -3,7 +3,7 @@
 COMMENT-main=	generic shared library support script
 COMMENT-ltdl=	GNU libtool system independent dlopen wrapper
 
-VERSION=	2.4.2
+VERSION=	2.4.6
 DISTNAME=	libtool-${VERSION}
 PKGNAME-main=	${DISTNAME}
 PKGNAME-ltdl=	libltdl-${VERSION}
@@ -22,7 +22,8 @@ MAINTAINER=	Brad Smith <b...@comstyle.com>
 PERMIT_PACKAGE=	Yes
 
 AUTOCONF_VERSION= 2.67
-BUILD_DEPENDS=	${MODGNU_AUTOCONF_DEPENDS}
+AUTOMAKE_VERSION= 1.15
+BUILD_DEPENDS=	${MODGNU_AUTOCONF_DEPENDS} ${MODGNU_AUTOMAKE_DEPENDS} devel/m4
 
 MAKE_ENV+= ${_lt_libs}
 MAKE_FLAGS+= ${_lt_libs}
diff --git devel/libtool/distinfo devel/libtool/distinfo
index 3c3ff5143ee..051bc346304 100644
--- devel/libtool/distinfo
+++ devel/libtool/distinfo
@@ -1,2 +1,2 @@
-SHA256 (libtool-2.4.2.tar.gz) = s43kSGKphyk809jfrhxAnVFLbE55TryTZI/r+a/DiRg=
-SIZE (libtool-2.4.2.tar.gz) = 2632347
+SHA256 (libtool-2.4.6.tar.gz) = 471NXT0CWjbCHdavfqgYoq/NTfwepaF7OdeFS80MBuM=
+SIZE (libtool-2.4.6.tar.gz) = 1806697
diff --git devel/libtool/patches/patch-libltdl_config_ltmain_sh devel/libtool/patches/patch-build-aux_ltmain_sh
similarity index 77%
rename from devel/libtool/patches/patch-libltdl_config_ltmain_sh
rename to devel/libtool/patches/patch-build-aux_ltmain_sh
index 848d5a0278e..684c09fe360 100644
--- devel/libtool/patches/patch-libltdl_config_ltmain_sh
+++ devel/libtool/patches/patch-build-aux_ltmain_sh
@@ -1,9 +1,11 @@
-$OpenBSD: patch-libltdl_config_ltmain_sh,v 1.2 2011/11/01 16:07:31 jasper Exp $
---- libltdl/config/ltmain.sh.orig	Mon Oct 17 06:19:35 2011
-+++ libltdl/config/ltmain.sh	Sat Oct 29 07:05:47 2011
-@@ -2714,51 +2714,6 @@ func_mode_finish ()
+$OpenBSD$
+
+Index: build-aux/ltmain.sh
+--- build-aux/ltmain.sh.orig
++++ build-aux/ltmain.sh
+@@ -4033,51 +4033,6 @@ func_mode_finish ()
      # Exit here if they wanted silent mode.
-     $opt_silent && exit $EXIT_SUCCESS
+     $opt_quiet && exit $EXIT_SUCCESS
  
 -    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
 -      echo "----------------------------------------------------------------------"
@@ -14,27 +16,27 @@ $OpenBSD: patch-libltdl_config_ltmain_sh,v 1.2 2011/11/01 16:07:31 jasper Exp $
 -      echo
 -      echo "If you ever happen to want to link against installed libraries"
 -      echo "in a given directory, LIBDIR, you must either use libtool, and"
--      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+-      echo "specify the full pathname of the library, or use the '-LLIBDIR'"
 -      echo "flag during linking and do at least one of the following:"
 -      if test -n "$shlibpath_var"; then
--	echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+-	echo "   - add LIBDIR to the '$shlibpath_var' environment variable"
 -	echo "     during execution"
 -      fi
 -      if test -n "$runpath_var"; then
--	echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+-	echo "   - add LIBDIR to the '$runpath_var' environment variable"
 -	echo "     during linking"
 -      fi
 -      if test -n "$hardcode_libdir_flag_spec"; then
 -	libdir=LIBDIR
 -	eval flag=\"$hardcode_libdir_flag_spec\"
 -
--	$ECHO "   - use the \`$flag' linker flag"
+-	$ECHO "   - use the '$flag' linker flag"
 -      fi
 -      if test -n "$admincmds"; then
 -	$ECHO "   - have your system administrator run these commands:$admincmds"
 -      fi
 -      if test -f /etc/ld.so.conf; then
--	echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+-	echo "   - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
 -      fi
 -      echo
 -
@@ -53,7 +55,7 @@ $OpenBSD: patch-libltdl_config_ltmain_sh,v 1.2 2011/11/01 16:07:31 jasper Exp $
      exit $EXIT_SUCCESS
  }
  
-@@ -2851,6 +2806,10 @@ func_mode_install ()
+@@ -4172,6 +4127,10 @@ func_mode_install ()
        fi
        func_append install_shared_prog " $func_quote_for_eval_result"
      done
@@ -64,25 +66,25 @@ $OpenBSD: patch-libltdl_config_ltmain_sh,v 1.2 2011/11/01 16:07:31 jasper Exp $
  
      test -z "$install_prog" && \
        func_fatal_help "you must specify an install program"
-@@ -2988,7 +2947,7 @@ func_mode_install ()
- 	  test -n "$relink_command" && srcname="$realname"T
+@@ -4309,7 +4268,7 @@ func_mode_install ()
+ 	  test -n "$relink_command" && srcname=${realname}T
  
  	  # Install the shared library and build the symlinks.
 -	  func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
 +	  func_show_eval "$install_shared_prog $extra_mode $dir/$srcname $destdir/$realname" \
  	      'exit $?'
- 	  tstripme="$stripme"
+ 	  tstripme=$stripme
  	  case $host_os in
-@@ -3025,7 +2984,7 @@ func_mode_install ()
+@@ -4353,7 +4312,7 @@ func_mode_install ()
  	func_basename "$file"
- 	name="$func_basename_result"
- 	instname="$dir/$name"i
+ 	name=$func_basename_result
+ 	instname=$dir/${name}i
 -	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
 +	func_show_eval "$install_prog $extra_mode $instname $destdir/$name" 'exit $?'
  
  	# Maybe install the static library, too.
  	test -n "$old_library" && func_append staticlibs " $dir/$old_library"
-@@ -3060,14 +3019,14 @@ func_mode_install ()
+@@ -4388,14 +4347,14 @@ func_mode_install ()
  
  	# Install the libtool object if requested.
  	test -n "$destfile" && \
@@ -90,7 +92,7 @@ $OpenBSD: patch-libltdl_config_ltmain_sh,v 1.2 2011/11/01 16:07:31 jasper Exp $
 +	  func_show_eval "$install_prog $extra_mode $file $destfile" 'exit $?'
  
  	# Install the old object if enabled.
- 	if test "$build_old_libs" = yes; then
+ 	if test yes = "$build_old_libs"; then
  	  # Deduce the name of the old-style object file.
  	  func_lo2o "$file"
  	  staticobj=$func_lo2o_result
@@ -99,7 +101,7 @@ $OpenBSD: patch-libltdl_config_ltmain_sh,v 1.2 2011/11/01 16:07:31 jasper Exp $
  	fi
  	exit $EXIT_SUCCESS
  	;;
-@@ -5660,6 +5619,7 @@ func_mode_link ()
+@@ -7075,6 +7034,7 @@ func_mode_link ()
  	func_append compiler_flags " $arg"
  	func_append compile_command " $arg"
  	func_append finalize_command " $arg"
@@ -107,27 +109,27 @@ $OpenBSD: patch-libltdl_config_ltmain_sh,v 1.2 2011/11/01 16:07:31 jasper Exp $
  	case "$new_inherited_linker_flags " in
  	    *" $arg "*) ;;
  	    * ) func_append new_inherited_linker_flags " $arg" ;;
-@@ -6167,6 +6127,7 @@ func_mode_link ()
+@@ -7611,6 +7571,7 @@ func_mode_link ()
  	    finalize_deplibs="$deplib $finalize_deplibs"
  	  else
  	    func_append compiler_flags " $deplib"
-+	    test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
- 	    if test "$linkmode" = lib ; then
++    	    test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ 	    if test lib = "$linkmode"; then
  		case "$new_inherited_linker_flags " in
  		    *" $deplib "*) ;;
-@@ -6697,7 +6658,7 @@ func_mode_link ()
+@@ -8140,7 +8101,7 @@ func_mode_link ()
  	  *)
- 	    if test "$installed" = no; then
+ 	    if test no = "$installed"; then
  	      func_append notinst_deplibs " $lib"
 -	      need_relink=yes
 +	      test -z "$DESTDIR" && need_relink=yes
  	    fi
  	    ;;
  	  esac
-@@ -7521,6 +7482,20 @@ func_mode_link ()
+@@ -9010,6 +8971,20 @@ func_mode_link ()
  	  major=
  	  versuffix=
- 	  verstring=""
+ 	  verstring=
 +	else
 +	  # XXX
 +	  tmp=`echo $libname|sed -e 's,+,_,g' -e 's,-,_,g' -e 's,\.,_,g'`
diff --git devel/libtool/patches/patch-doc_libtool_texi devel/libtool/patches/patch-doc_libtool_texi
index a6fd77281c6..2787889e70a 100644
--- devel/libtool/patches/patch-doc_libtool_texi
+++ devel/libtool/patches/patch-doc_libtool_texi
@@ -1,11 +1,12 @@
 $OpenBSD: patch-doc_libtool_texi,v 1.4 2011/09/22 21:10:19 jasper Exp $
---- doc/libtool.texi.orig	Wed Jun  8 11:04:53 2011
-+++ doc/libtool.texi	Wed Jun  8 11:05:44 2011
-@@ -11,16 +11,16 @@
- @set MAILLIST the Libtool mailing list @email{libtool@@gnu.org}
- @set objdir .libs
+Index: doc/libtool.texi
+--- doc/libtool.texi.orig
++++ doc/libtool.texi
+@@ -30,15 +30,15 @@ and with no Back-Cover Texts.  A copy of the license i
+ the section entitled ``GNU Free Documentation License''.
+ @end copying
  
--@dircategory GNU programming tools
+-@dircategory Software development
 +@dircategory Programming & development tools
  @direntry
  * Libtool: (libtool).           Generic shared library support script.
@@ -13,11 +14,10 @@ $OpenBSD: patch-doc_libtool_texi,v 1.4 2011/09/22 21:10:19 jasper Exp $
  
  @dircategory Individual utilities
  @direntry
--* libtool-invocation: (libtool)Invoking libtool.
-+* libtool-invocation: (libtool)	Invoking libtool.
-                                                 Running the @code{libtool} script.
--* libtoolize: (libtool)Invoking libtoolize.     Adding libtool support.
-+* libtoolize: (libtool)	Invoking libtoolize. Adding libtool support.
+-* libtool-invocation: (libtool)Invoking libtool. Running the @code{libtool} script.
+-* libtoolize: (libtool)Invoking libtoolize.      Adding libtool support.
++* libtool-invocation: (libtool)	Invoking libtool. Running the @code{libtool} script.
++* libtoolize: (libtool)	Invoking libtoolize.      Adding libtool support.
  @end direntry
  
- @ifnottex
+ @titlepage
diff --git devel/libtool/pkg/PLIST-ltdl devel/libtool/pkg/PLIST-ltdl
index f4ba7c94d6a..c470a14b909 100644
--- devel/libtool/pkg/PLIST-ltdl
+++ devel/libtool/pkg/PLIST-ltdl
@@ -10,41 +10,37 @@ lib/libltdl.la
 share/aclocal/
 share/aclocal/ltdl.m4
 share/libtool/
+share/libtool/COPYING.LIB
+share/libtool/Makefile.am
+share/libtool/Makefile.in
+share/libtool/README
+share/libtool/aclocal.m4
+share/libtool/config-h.in
+share/libtool/configure
+share/libtool/configure.ac
 share/libtool/libltdl/
-share/libtool/libltdl/COPYING.LIB
-share/libtool/libltdl/Makefile.am
-share/libtool/libltdl/Makefile.in
-share/libtool/libltdl/Makefile.inc
-share/libtool/libltdl/README
-share/libtool/libltdl/aclocal.m4
-share/libtool/libltdl/argz.c
-share/libtool/libltdl/argz_.h
-share/libtool/libltdl/config-h.in
-share/libtool/libltdl/configure
-share/libtool/libltdl/configure.ac
-share/libtool/libltdl/libltdl/
-share/libtool/libltdl/libltdl/lt__alloc.h
-share/libtool/libltdl/libltdl/lt__dirent.h
-share/libtool/libltdl/libltdl/lt__glibc.h
-share/libtool/libltdl/libltdl/lt__private.h
-share/libtool/libltdl/libltdl/lt__strl.h
-share/libtool/libltdl/libltdl/lt_dlloader.h
-share/libtool/libltdl/libltdl/lt_error.h
-share/libtool/libltdl/libltdl/lt_system.h
-share/libtool/libltdl/libltdl/slist.h
-share/libtool/libltdl/loaders/
-share/libtool/libltdl/loaders/dld_link.c
-share/libtool/libltdl/loaders/dlopen.c
-share/libtool/libltdl/loaders/dyld.c
-share/libtool/libltdl/loaders/load_add_on.c
-share/libtool/libltdl/loaders/loadlibrary.c
-share/libtool/libltdl/loaders/preopen.c
-share/libtool/libltdl/loaders/shl_load.c
-share/libtool/libltdl/lt__alloc.c
-share/libtool/libltdl/lt__dirent.c
-share/libtool/libltdl/lt__strl.c
-share/libtool/libltdl/lt_dlloader.c
-share/libtool/libltdl/lt_error.c
-share/libtool/libltdl/ltdl.c
-share/libtool/libltdl/ltdl.h
-share/libtool/libltdl/slist.c
+share/libtool/libltdl/lt__alloc.h
+share/libtool/libltdl/lt__dirent.h
+share/libtool/libltdl/lt__glibc.h
+share/libtool/libltdl/lt__private.h
+share/libtool/libltdl/lt__strl.h
+share/libtool/libltdl/lt_dlloader.h
+share/libtool/libltdl/lt_error.h
+share/libtool/libltdl/lt_system.h
+share/libtool/libltdl/slist.h
+share/libtool/loaders/
+share/libtool/loaders/dld_link.c
+share/libtool/loaders/dlopen.c
+share/libtool/loaders/dyld.c
+share/libtool/loaders/load_add_on.c
+share/libtool/loaders/loadlibrary.c
+share/libtool/loaders/preopen.c
+share/libtool/loaders/shl_load.c
+share/libtool/lt__alloc.c
+share/libtool/lt__dirent.c
+share/libtool/lt__strl.c
+share/libtool/lt_dlloader.c
+share/libtool/lt_error.c
+share/libtool/ltdl.c
+share/libtool/ltdl.h
+share/libtool/slist.c
diff --git devel/libtool/pkg/PLIST-main devel/libtool/pkg/PLIST-main
index 2ac3d85823e..66ded31a4fd 100644
--- devel/libtool/pkg/PLIST-main
+++ devel/libtool/pkg/PLIST-main
@@ -5,17 +5,17 @@ bin/libtoolize
 @info info/libtool.info
 @man man/man1/libtool.1
 @man man/man1/libtoolize.1
-share/aclocal/argz.m4
+share/aclocal/ltargz.m4
 share/aclocal/libtool.m4
 share/aclocal/ltoptions.m4
 share/aclocal/ltsugar.m4
 share/aclocal/ltversion.m4
 share/aclocal/lt~obsolete.m4
-share/libtool/config/
-share/libtool/config/compile
-share/libtool/config/config.guess
-share/libtool/config/config.sub
-share/libtool/config/depcomp
-share/libtool/config/install-sh
-share/libtool/config/ltmain.sh
-share/libtool/config/missing
+share/libtool/build-aux/
+share/libtool/build-aux/compile
+share/libtool/build-aux/config.guess
+share/libtool/build-aux/config.sub
+share/libtool/build-aux/depcomp
+share/libtool/build-aux/install-sh
+share/libtool/build-aux/ltmain.sh
+share/libtool/build-aux/missing

Reply via email to