Subject: gphoto2: conflict aalib vs. aalib-x11
To: None <tech-pkg@netbsd.org>
From: Berndt Josef Wulf <wulf@dingo.ping.net.au>
List: tech-pkg
Date: 07/17/2002 11:15:45
G'day,

There exists a conflict between the aalib vs. aalib-x11 library when
building gphoto2 with aalib-x11 package installed as they are mutually
exclusive. Building gphoto2 with the aalib-x11 package installed will
cause a runtime error due to missing path to the X11 libraries.

gphoto2 will build and run fine with both aalib-x11 and aalib. Currently,
the build process will fail if the aalib-x11 package is required and
installed by another package. There are only 3 packages that make use
of the aalib* libraries - namely,

	devel/SDL		- aalib-x11
	graphics/aview		- aalib-x11
	graphics/gphoto2 	- aalib

One possible solution to this problem is to let gphoto2 probe
for the aalib package, autoconfigure and include the correct
buildlink.mk files - see patch below:

--- Makefile.orig	Mon Jul 15 11:03:56 2002
+++ Makefile	Thu Jul 18 02:37:03 2002
@@ -31,12 +31,24 @@
 
 BUILDLINK_DEPENDS.libusb=   libusb>=0.1.5
 
+#
+# Use aalib-x11 if installed by another package
+# else use standard aalib package. 
+#
+AALIB=           pkg_info -e aalib-x11
+
+.if (!${AALIB:C/-.*$$//} == aalib-x11)
+.include "../../graphics/aalib-x11/buildlink.mk"
+.include "../../mk/x11.buildlink.mk"
+.else
+.include "../../graphics/aalib/buildlink.mk"
+.endif
+
 .include "../../converters/libiconv/buildlink.mk"
 .include "../../devel/cdk/buildlink.mk"
 .include "../../devel/gettext-lib/buildlink.mk"
 .include "../../devel/libusb/buildlink.mk"
 .include "../../devel/readline/buildlink.mk"
-.include "../../graphics/aalib/buildlink.mk"
 .include "../../graphics/libexif/buildlink.mk"
 .include "../../graphics/jpeg/buildlink.mk"
 .include "../../mk/bsd.pkg.mk"

The alternative is to have aalib probe for X11 and autoconfigure
itself to either include or exclude X11 support.

Any comments?

Many thanks in advance

cheerio Berndt
-- 
Name    : Berndt Josef Wulf            | +++ With BSD on Packet Radio +++
E-Mail  : wulf@ping.net.au             |    tfkiss, tnt, dpbox, wampes
ICQ     : 18196098                     |  VK5ABN, Nairne, South Australia 
URL     : http://www.ping.net.au/~wulf | MBOX : vk5abn@vk5abn.#lmr.#sa.au.oc
Sysinfo : DEC AXPpci33+, NetBSD-1.5    | BBS  : vk5abn.#lmr.#sa.aus.oc