On Thu, Dec 15, 2005 at 07:46:41PM +0100, Marc Espie wrote:
> Yet another patch, this one pedantic, and mixed with the other one,
> since I don't want to bump the package twice.
> 
> I've patched configure directly, since patching libtool.m4 makes things
> a bit awkward to regenerate (patch to libtool.m4 attached).
> 
> On OpenBSD, the ld.so path is /usr/lib, and never includes /lib. Thus,
> do not put /lib there... this is more correct, and removes some useless
> tests...

Personally I really don't like this patch. This just covers up broken configure
scripts. libtool is bad enough as it is nevermind adding more disgusting
hacks to it. I won't reject this going into our own local tree but it
should not be put into libtool upstream no matter what.
 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/libtool/Makefile,v
> retrieving revision 1.45
> diff -u -p -r1.45 Makefile
> --- Makefile  12 Dec 2005 15:15:16 -0000      1.45
> +++ Makefile  15 Dec 2005 18:45:34 -0000
> @@ -6,7 +6,7 @@ COMMENT-ltdl= "GNU libtool system indepe
>  
>  VERSION=     1.5.20
>  DISTNAME=    libtool-${VERSION}
> -PKGNAME=     ${DISTNAME}p2
> +PKGNAME=     ${DISTNAME}p3
>  PKGNAME-ltdl=        libltdl-${VERSION}p1
>  CATEGORIES=  devel
>  MASTER_SITES=        ${MASTER_SITE_GNU:=libtool/}
> Index: patches/patch-configure
> ===================================================================
> RCS file: patches/patch-configure
> diff -N patches/patch-configure
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-configure   15 Dec 2005 18:45:34 -0000
> @@ -0,0 +1,11 @@
> +$OpenBSD$
> +--- configure.orig   Thu Dec 15 19:34:34 2005
> ++++ configure        Thu Dec 15 19:34:56 2005
> +@@ -8646,6 +8646,7 @@ nto-qnx*)
> + 
> + openbsd*)
> +   version_type=sunos
> ++  sys_lib_dlsearch_path_spec="/usr/lib"
> +   need_lib_prefix=no
> +   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
> +   case $host_os in
> Index: patches/patch-libltdl_ltmain_sh
> ===================================================================
> RCS file: /cvs/ports/devel/libtool/patches/patch-libltdl_ltmain_sh,v
> retrieving revision 1.14
> diff -u -p -r1.14 patch-libltdl_ltmain_sh
> --- patches/patch-libltdl_ltmain_sh   12 Dec 2005 15:15:16 -0000      1.14
> +++ patches/patch-libltdl_ltmain_sh   15 Dec 2005 18:45:34 -0000
> @@ -1,6 +1,6 @@
>  $OpenBSD: patch-libltdl_ltmain_sh,v 1.14 2005/12/12 15:15:16 espie Exp $
>  --- libltdl/ltmain.sh.orig   Wed Aug 31 20:55:39 2005
> -+++ libltdl/ltmain.sh        Wed Dec  7 09:44:14 2005
> ++++ libltdl/ltmain.sh        Thu Dec 15 19:10:15 2005
>  @@ -352,6 +352,8 @@ func_extract_archives ()
>   # Darwin sucks
>   eval std_shrext=\"$shrext_cmds\"
> @@ -57,7 +57,21 @@ $OpenBSD: patch-libltdl_ltmain_sh,v 1.14
>       break
>       ;;
>         esac
> -@@ -1984,6 +2001,17 @@ EOF
> +@@ -1503,6 +1520,13 @@ EOF
> +        continue
> +        ;;
> +      esac
> ++    elif test "X$arg" = "X-lresolv"; then
> ++     case $host in
> ++     *-*-openbsd*)
> ++       # dummy library, no shared version
> ++       continue
> ++       ;;
> ++     esac
> +     fi
> +     deplibs="$deplibs $arg"
> +     continue
> +@@ -1984,6 +2008,17 @@ EOF
>       ;;
>       esac
>       for pass in $passes; do
> @@ -75,7 +89,7 @@ $OpenBSD: patch-libltdl_ltmain_sh,v 1.14
>         if test "$linkmode,$pass" = "lib,link" ||
>        test "$linkmode,$pass" = "prog,scan"; then
>       libs="$deplibs"
> -@@ -2245,20 +2273,20 @@ EOF
> +@@ -2245,20 +2280,20 @@ EOF
>           # It is a libtool convenience library, so add in its objects.
>           convenience="$convenience $ladir/$objdir/$old_library"
>           old_convenience="$old_convenience $ladir/$objdir/$old_library"
> @@ -106,7 +120,7 @@ $OpenBSD: patch-libltdl_ltmain_sh,v 1.14
>         continue
>       fi # $pass = conv
>   
> -@@ -2445,8 +2473,12 @@ EOF
> +@@ -2445,8 +2480,12 @@ EOF
>       fi
>   
>       link_static=no # Whether the deplib will be linked statically
> @@ -120,7 +134,7 @@ $OpenBSD: patch-libltdl_ltmain_sh,v 1.14
>         if test "$installed" = no; then
>           notinst_deplibs="$notinst_deplibs $lib"
>           need_relink=yes
> -@@ -2644,7 +2676,7 @@ EOF
> +@@ -2644,7 +2683,7 @@ EOF
>           add_dir=
>           add=
>           # Finalize command for both is simple: just hardcode it.
> @@ -129,7 +143,7 @@ $OpenBSD: patch-libltdl_ltmain_sh,v 1.14
>             add="$libdir/$linklib"
>           elif test "$hardcode_minus_L" = yes; then
>             add_dir="-L$libdir"
> -@@ -5932,40 +5964,6 @@ relink_command=\"$relink_command\""
> +@@ -5932,40 +5971,6 @@ relink_command=\"$relink_command\""
>       # Exit here if they wanted silent mode.
>       test "$show" = : && exit $EXIT_SUCCESS
>   
> @@ -170,7 +184,7 @@ $OpenBSD: patch-libltdl_ltmain_sh,v 1.14
>       exit $EXIT_SUCCESS
>       ;;
>   
> -@@ -6516,12 +6514,11 @@ exit $?
> +@@ -6516,12 +6521,11 @@ exit $?
>   # configuration.  But we'll never go from static-only to shared-only.
>   
>   # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
> Index: patches/patch-ltmain_in
> ===================================================================
> RCS file: /cvs/ports/devel/libtool/patches/patch-ltmain_in,v
> retrieving revision 1.14
> diff -u -p -r1.14 patch-ltmain_in
> --- patches/patch-ltmain_in   12 Dec 2005 15:15:16 -0000      1.14
> +++ patches/patch-ltmain_in   15 Dec 2005 18:45:34 -0000
> @@ -1,6 +1,6 @@
>  $OpenBSD: patch-ltmain_in,v 1.14 2005/12/12 15:15:16 espie Exp $
>  --- ltmain.in.orig   Wed Aug 31 20:25:28 2005
> -+++ ltmain.in        Wed Dec  7 09:43:10 2005
> ++++ ltmain.in        Thu Dec 15 19:09:43 2005
>  @@ -352,6 +352,8 @@ func_extract_archives ()
>   # Darwin sucks
>   eval std_shrext=\"$shrext_cmds\"
> @@ -57,7 +57,21 @@ $OpenBSD: patch-ltmain_in,v 1.14 2005/12
>       break
>       ;;
>         esac
> -@@ -1984,6 +2001,17 @@ EOF
> +@@ -1503,6 +1520,13 @@ EOF
> +        continue
> +        ;;
> +      esac
> ++    elif test "X$arg" = "X-lresolv"; then
> ++     case $host in
> ++     *-*-openbsd*)
> ++       # dummy library, no shared version
> ++       continue
> ++       ;;
> ++     esac
> +     fi
> +     deplibs="$deplibs $arg"
> +     continue
> +@@ -1984,6 +2008,17 @@ EOF
>       ;;
>       esac
>       for pass in $passes; do
> @@ -75,7 +89,7 @@ $OpenBSD: patch-ltmain_in,v 1.14 2005/12
>         if test "$linkmode,$pass" = "lib,link" ||
>        test "$linkmode,$pass" = "prog,scan"; then
>       libs="$deplibs"
> -@@ -2245,20 +2273,20 @@ EOF
> +@@ -2245,20 +2280,20 @@ EOF
>           # It is a libtool convenience library, so add in its objects.
>           convenience="$convenience $ladir/$objdir/$old_library"
>           old_convenience="$old_convenience $ladir/$objdir/$old_library"
> @@ -106,7 +120,7 @@ $OpenBSD: patch-ltmain_in,v 1.14 2005/12
>         continue
>       fi # $pass = conv
>   
> -@@ -2445,8 +2473,12 @@ EOF
> +@@ -2445,8 +2480,12 @@ EOF
>       fi
>   
>       link_static=no # Whether the deplib will be linked statically
> @@ -120,7 +134,7 @@ $OpenBSD: patch-ltmain_in,v 1.14 2005/12
>         if test "$installed" = no; then
>           notinst_deplibs="$notinst_deplibs $lib"
>           need_relink=yes
> -@@ -2644,7 +2676,7 @@ EOF
> +@@ -2644,7 +2683,7 @@ EOF
>           add_dir=
>           add=
>           # Finalize command for both is simple: just hardcode it.
> @@ -129,7 +143,7 @@ $OpenBSD: patch-ltmain_in,v 1.14 2005/12
>             add="$libdir/$linklib"
>           elif test "$hardcode_minus_L" = yes; then
>             add_dir="-L$libdir"
> -@@ -5932,40 +5964,6 @@ relink_command=\"$relink_command\""
> +@@ -5932,40 +5971,6 @@ relink_command=\"$relink_command\""
>       # Exit here if they wanted silent mode.
>       test "$show" = : && exit $EXIT_SUCCESS
>   
> @@ -170,7 +184,7 @@ $OpenBSD: patch-ltmain_in,v 1.14 2005/12
>       exit $EXIT_SUCCESS
>       ;;
>   
> -@@ -6516,12 +6514,11 @@ exit $?
> +@@ -6516,12 +6521,11 @@ exit $?
>   # configuration.  But we'll never go from static-only to shared-only.
>   
>   # ### BEGIN LIBTOOL TAG CONFIG: disable-shared

Content-Description: pedantic.diff
> --- libtool.m4.orig   Thu Dec 15 19:45:40 2005
> +++ libtool.m4        Thu Dec 15 19:46:01 2005
> @@ -1580,6 +1580,7 @@ nto-qnx*)
>  
>  openbsd*)
>    version_type=sunos
> +  sys_lib_dlsearch_path_spec="/usr/lib"
>    need_lib_prefix=no
>    # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
>    case $host_os in

Reply via email to