Subject: Re: pkgsrc + RedHat 8.0 + "USE_LIBTOOL = YES"
To: None <tech-pkg@netbsd.org>
From: Sebastian <sebastian-p@gmx.net>
List: tech-pkg
Date: 02/19/2003 23:34:23
--Boundary-00=_vZAV+A5dkKyW/Ak
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

similar behavior here on my slackware-current box. 

i've made a small modifications to the
	${PKGSRC}/mk/buildlink2/bsd.buildlink2.mk 
file and one to the
	${PKGSRC}/mk/buildlink2/fake-la
script. now most of the things are working, but i consider my modifications as 
a tempory workaround
i don't even know if they break other things up ... you have been warned ;)


if you find out how to make things working without these mods, let me know

sebastian

--Boundary-00=_vZAV+A5dkKyW/Ak
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="bsd.buildlink2.mk-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="bsd.buildlink2.mk-patch"

--- bsd.buildlink2.mk	2003-02-19 23:01:03.000000000 +0100
+++ bsd.buildlink2.mk_foo	2003-02-18 18:15:07.000000000 +0100
@@ -177,6 +177,7 @@
 .endif
 	${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${BUILDLINK_DIR}/include
 	${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${BUILDLINK_DIR}/lib
+	${_PKG_SILENT}${_PKG_DEBUG}${LN} -s ${BUILDLINK_DIR}/lib ${BUILDLINK_DIR}/lib/.libs
 
 # Create the buildlink wrappers before any of the other buildlink targets
 # are run, as the wrapper may need to be used in some of those targets.

--Boundary-00=_vZAV+A5dkKyW/Ak
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="fake-la-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="fake-la-patch"

--- fake-la	2003-02-19 23:01:03.000000000 +0100
+++ fake-la_foo	2003-02-18 18:03:52.000000000 +0100
@@ -1,3 +1,4 @@
+#!/bin/sh
 #!@BUILDLINK_SHELL@
 #
 # $NetBSD: fake-la,v 1.4 2003/01/06 04:30:12 jlam Exp $
@@ -21,6 +22,7 @@
 libname=`${BASENAME} $reallib`
 tmpdir=${BUILDLINK_DIR}/.tmp
 
+
 if ${TEST} ! -f $tmpdir/inst/$libbase.la; then
 	case $libname in
 	*.so.[0-9]*)
@@ -33,11 +35,18 @@
 		version=`${ECHO} $libname | ${SED} -e "s/^[^.]*\.\([0-9]*\.[0-9]*\)\.dylib/\1/;s/\./:/g"`
 		;;
 	esac
+
+	if [ "x$libbase" = "x" ]; then
+	    exit 0
+	fi
+	
 	${MKDIR} $tmpdir/inst
 	cd $tmpdir
 	${ECHO} "static int i;" > nonempty.c	# create a nonempty input file
 	${LIBTOOL} --mode=compile ${CC} -c nonempty.c
-	${LIBTOOL} ${CC} -o $libbase.la nonempty.lo -rpath $tmpdir/inst -version-info $version
+	# workarond for linux
+	${LIBTOOL} ${CC} -o $libbase.la nonempty.lo -rpath $tmpdir/inst
+#	${LIBTOOL} ${CC} -o $libbase.la nonempty.lo -rpath $tmpdir/inst -version-info $version
 	${LIBTOOL} --mode=install ${CP} $libbase.la $tmpdir/inst >/dev/null
 
 	# Reset the ld.so cache as "libtool --mode=install" may have executed

--Boundary-00=_vZAV+A5dkKyW/Ak--