Subject: libtoolification question: .lai not created
To: None <tech-pkg@NetBSD.org>
From: Thomas Klausner <wiz@NetBSD.org>
List: tech-pkg
Date: 10/13/2005 20:33:51
--1sNVjLsmu1MXqwQ/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi!

I was trying to libtoolize devel/libmimedir.
Building works fine, but installation fails with
libtool --mode=install /usr/bin/install -c -o root -g wheel -m 555 libmimedir.la /usr/pkg/lib/libmimedir.la
/usr/bin/install -c -o root -g wheel -m 555 .libs/libmimedir.lai /usr/pkg/lib/libmimedir.la
install: .libs/libmimedir.lai: stat: No such file or directory
*** Error code 1

Can someone take a look at the attached patch and tell me
what I'm doing wrong?

Thanks,
 Thomas

--1sNVjLsmu1MXqwQ/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="libmimedir.patch"

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/libmimedir/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- Makefile	13 Oct 2005 15:15:28 -0000	1.1.1.1
+++ Makefile	13 Oct 2005 18:25:39 -0000
@@ -2,6 +2,7 @@
 #
 
 DISTNAME=		libmimedir-0.4
+PKGREVISION=		1
 CATEGORIES=		devel
 MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=synce/}
 
@@ -10,5 +11,6 @@
 COMMENT=		MIME Directory Profile parser library (RFC 2425)
 
 GNU_CONFIGURE=		yes
+USE_LIBTOOL=		yes
 
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/devel/libmimedir/PLIST,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 PLIST
--- PLIST	13 Oct 2005 15:15:28 -0000	1.1.1.1
+++ PLIST	13 Oct 2005 18:25:39 -0000
@@ -1,3 +1,3 @@
 @comment $NetBSD: PLIST,v 1.1.1.1 2005/10/13 15:15:28 wiz Exp $
 include/libmimedir.h
-lib/libmimedir.a
+lib/libmimedir.la
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/libmimedir/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo	13 Oct 2005 15:15:28 -0000	1.1.1.1
+++ distinfo	13 Oct 2005 18:25:39 -0000
@@ -3,3 +3,4 @@
 SHA1 (libmimedir-0.4.tar.gz) = 7fd4eb92f48a30b2067d5d265458981f61b03630
 RMD160 (libmimedir-0.4.tar.gz) = d6dd6aa74858990c1029c93aefae20fc890ce7ad
 Size (libmimedir-0.4.tar.gz) = 65883 bytes
+SHA1 (patch-aa) = 52a8d28e531211cd55365cbffdc43bde3acd1119
Index: patches/patch-aa
===================================================================
RCS file: patches/patch-aa
diff -N patches/patch-aa
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-aa	13 Oct 2005 18:25:39 -0000
@@ -0,0 +1,54 @@
+$NetBSD$
+
+--- Makefile.in.orig	2005-03-04 07:35:50.000000000 +0100
++++ Makefile.in
+@@ -13,20 +13,19 @@ YACC= @YACC@
+ LEX= @LEX@
+ INSTALL= @INSTALL@
+ RANLIB= @RANLIB@
+-LIBS= -L. -lmimedir
++LIBS= -L. libmimedir.la
+ 
+-OBJS= dirlex.o dirsynt.o parse.o get.o dup.o free.o memmem.o add.o count.o del.o
++OBJS= dirlex.lo dirsynt.lo parse.lo get.lo dup.lo free.lo memmem.lo add.lo count.lo del.lo
+ 
+ TESTS = test
+ 
+-all: libmimedir.a $(TESTS)
++all: libmimedir.la $(TESTS)
+ 
+-libmimedir.a: ${OBJS}
+-	ar rc libmimedir.a ${OBJS}
+-	$(RANLIB) libmimedir.a
++libmimedir.la: ${OBJS}
++	libtool --mode=link ${CC} ${CFLAGS} -o libmimedir.la ${OBJS}
+ 
+-test: test.o libmimedir.a
+-	${CC} ${CFLAGS} -o test test.o ${LIBS}
++test: test.o libmimedir.la
++	libtool --mode=link ${CC} ${CFLAGS} ${LDFLAGS} -o test test.o ${LIBS}
+ 
+ dirsynt.c dirsynt.h: dirsynt.y
+ 	${YACC} -p_mdir_ -d dirsynt.y
+@@ -37,17 +36,17 @@ dirlex.c: dirlex.l dirsynt.h
+ 	${LEX} -Cem -odirlex.c -P_mdir_ dirlex.l
+ 
+ .SUFFIXES:
+-.SUFFIXES: .c .o
++.SUFFIXES: .c .o .lo
+ 
+-.c.o:
+-	${CC} ${CFLAGS} -o $@ -c $<
++.c.lo:
++	libtool --mode=compile ${CC} ${CFLAGS} -o $@ -c $<
+ 
+ check: all
+ 	./test
+ 
+ install: all
+ 	${INSTALL} -m 444 libmimedir.h ${includedir}
+-	${INSTALL} -m 444 libmimedir.a ${libdir}
++	libtool --mode=install ${BSD_INSTALL_LIB} libmimedir.la ${libdir}/libmimedir.la
+ 
+ clean:
+ 	rm -f *.o *.a *.core

--1sNVjLsmu1MXqwQ/--