summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron>2000-08-23 22:22:53 +0000
committertron <tron>2000-08-23 22:22:53 +0000
commitb735b13875cb70c66b6ea714e5270b631b195051 (patch)
treead93b20a686c9ff7d76ae5265461cff5a90fea43
parentf270dd9a1d6f450ae837107d73f8ae083cf946c6 (diff)
downloadpkgsrc-b735b13875cb70c66b6ea714e5270b631b195051.tar.gz
Add support for new variable "USE_XPM" for packages which use the Xpm
library. It will use the include Xpm library on systems with XFree86 4.0 or newer and the package on systems with XFree86 3.3.6 and older.
-rw-r--r--mk/bsd.pkg.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index d91201633e6..17a803dc083 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.548 2000/08/21 09:41:07 tron Exp $
+# $NetBSD: bsd.pkg.mk,v 1.549 2000/08/23 22:22:53 tron Exp $
#
# This file is in the public domain.
#
@@ -733,6 +733,20 @@ DEPENDS+= ${LESSTIF_DEPENDS}
.endif
.endif
+# Check if we got Xpm distributed with XFree86 4.0 or newer or if we
+# need to use the package.
+.if defined(USE_XPM)
+.if exists(${X11BASE}/include/X11/xpm.h)
+__BUILTIN_XPM!= ${EGREP} -c NormalLibXpm ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE}
+.if (${__BUILTIN_XPM} == "0")
+DEPENDS+= xpm-3.4k:../../graphics/xpm
+.endif
+.undef __BUILTIN_XPM
+.else
+DEPENDS+= xpm-3.4k:../../graphics/xpm
+.endif
+.endif
+
# Popular master sites
MASTER_SITE_XCONTRIB+= \
ftp://crl.dec.com/pub/X11/contrib/ \