OpenBSD just has a dummy libresolv, that is used for some `legacy' programs
that expect to link against it. It doesn't contain anything useful...
Some configure stuff (kde for instance) detects the presence of libresolv,
and tries to link against it... And of course, libtool detects that there is
just a static library, and thus refuses to build shared modules using that
library...
The following patch fixes that.
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:16:43 -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-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:16:43 -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:16:43 -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