Subject: aalib-x11 need curses?, SDL build failed, simple fix included here
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 11/01/2003 17:13:24
I was building devel/SDL on a Linux system and it failed with:

...
-L/usr/lib -Wl,-R/usr/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -lm -ldl
-L/usr/X11R6/lib -lX11 -lXext -L/usr/X11R6/lib -Wl,-rpath,/usr/X11R6/lib
-laa-x11 -lm -L/usr/X11R6/lib -lX11 -lncurses
grep:
//tmp/pkgsrc/devel/SDL/work.antelope/.buildlink/lib/libncurses.la:  No
such file or directory
sed: can't read
//tmp/pkgsrc/devel/SDL/work.antelope/.buildlink/lib/libncurses.la: No such
file or directory
libtool: link:
`//tmp/pkgsrc/devel/SDL/work.antelope/.buildlink/lib/libncurses.la' is not
a valid libtool archive
make[2]: *** [libSDL.la] Error 1


No ncurses was buildlinked.

So I tracked this down to its use by graphics/aalib-x11.

aalib and aalib-x11 don't have any use of ncurses buildlink2. But the
configure detected ncurses and enabled it and built it with it.

aalib has a configure option:

  --with-curses-driver=no/yes Used to disable/force curses driver

I think curses should be allowed by default.

It also has these curses options:
  --with-sunos-curses     Used to force SunOS 4.x curses
  --with-osf1-curses    Used to force OSF/1 curses
  --with-vcurses[=incdir] Used to force SysV curses
  --with-ncurses[=base-dir] Compile with ncurses/locate base dir

(It also has slang support too. Debian's uses slang and Gentoo Linux uses
ncurses and OpenBSD and FreeBSD don't depend on either. This could be an
option to be done later.)

I tested two ways. One with ncurses and one with ncurses disabled. (And
aalib-x11 and then SDL built fine both ways.) The two patches are below.

Can someone choose if ncurses is allowed?

If not, may I please commit the final patch (one line fix) at bottom of
this email? (And behaviour will stay the same as it is currently now.)

I posted this to tech-pkg to see if anyone else is interested or uses
aalib with ncurses support.

   Jeremy C. Reed
   http://bsd.reedmedia.net/

p.s. It seems useful to make sure the info files and many man pages to
install too.

With ncurses:

Index: graphics/aalib/Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/aalib/Makefile.common,v
retrieving revision 1.10
diff -b -u -r1.10 Makefile.common
--- graphics/aalib/Makefile.common	2003/10/26 06:50:10	1.10
+++ graphics/aalib/Makefile.common	2003/11/02 00:53:51
@@ -18,6 +18,8 @@
 USE_LIBTOOL=		YES
 LTCONFIG_OVERRIDE=	${WRKSRC}/ltconfig

+CONFIGURE_ARGS+=	--with-curses-driver=yes
+
 .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
 USE_PKGSRC_GCC=		# defined
 .endif
@@ -29,5 +31,7 @@
 		&& ${MV} $$f.patch $$f;					\
 	done
 .endif
+
+.include "../../devel/ncurses/buildlink2.mk"

 .include "../../mk/bsd.pkg.mk"
Index: graphics/aalib/buildlink2.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/aalib/buildlink2.mk,v
retrieving revision 1.3
diff -b -u -r1.3 buildlink2.mk
--- graphics/aalib/buildlink2.mk	2002/08/27 06:42:49	1.3
+++ graphics/aalib/buildlink2.mk	2003/11/02 00:53:51
@@ -12,6 +12,8 @@
 BUILDLINK_FILES.aalib=	include/aalib.h
 BUILDLINK_FILES.aalib+=	lib/libaa.*

+.include "../../devel/ncurses/buildlink2.mk"
+
 BUILDLINK_TARGETS+=	aalib-buildlink

 aalib-buildlink: _BUILDLINK_USE
Index: graphics/aalib-x11/buildlink2.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/aalib-x11/buildlink2.mk,v
retrieving revision 1.3
diff -b -u -r1.3 buildlink2.mk
--- graphics/aalib-x11/buildlink2.mk	2002/08/26 19:38:06	1.3
+++ graphics/aalib-x11/buildlink2.mk	2003/11/02 00:53:51
@@ -18,6 +18,8 @@
 CONFIGURE_ENV+=		AALIB_CONFIG="${AALIB_CONFIG}"
 MAKE_ENV+=		AALIB_CONFIG="${AALIB_CONFIG}"

+.include "../../devel/ncurses/buildlink2.mk"
+
 BUILDLINK_TARGETS+=	aalib-x11-buildlink

 aalib-x11-buildlink: _BUILDLINK_USE

-=-=-=-

And without ncurses:


Index: graphics/aalib/Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/aalib/Makefile.common,v
retrieving revision 1.10
diff -b -u -r1.10 Makefile.common
--- graphics/aalib/Makefile.common	2003/10/26 06:50:10	1.10
+++ graphics/aalib/Makefile.common	2003/11/02 01:10:07
@@ -18,6 +18,8 @@
 USE_LIBTOOL=		YES
 LTCONFIG_OVERRIDE=	${WRKSRC}/ltconfig

+CONFIGURE_ARGS+=	--with-curses-driver=no
+
 .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
 USE_PKGSRC_GCC=		# defined
 .endif