summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/3DKit/Makefile.common5
-rw-r--r--graphics/Cenon/Makefile3
-rw-r--r--graphics/ImageMagick/options.mk4
-rw-r--r--graphics/ImageViewer/Makefile3
-rw-r--r--graphics/Mesa/Makefile.common4
-rw-r--r--graphics/Mesa/version.mk75
-rw-r--r--graphics/MesaLib/builtin-imake.mk12
-rw-r--r--graphics/MesaLib/builtin.mk107
-rw-r--r--graphics/Ngraph/Makefile3
-rw-r--r--graphics/OpenRM/Makefile4
-rw-r--r--graphics/PanoTools/Makefile5
-rw-r--r--graphics/SDL_image/Makefile3
-rw-r--r--graphics/aalib-x11/Makefile5
-rw-r--r--graphics/aalib-x11/buildlink3.mk5
-rw-r--r--graphics/aqsis/Makefile4
-rw-r--r--graphics/autotrace/Makefile4
-rw-r--r--graphics/aview-x11/Makefile3
-rw-r--r--graphics/blender/Makefile3
-rw-r--r--graphics/cairo/Makefile3
-rw-r--r--graphics/cal3d-examples/Makefile4
-rw-r--r--graphics/claraocr/Makefile4
-rw-r--r--graphics/cqcam/Makefile3
-rw-r--r--graphics/dia/Makefile.common3
-rw-r--r--graphics/dvdview/Makefile4
-rw-r--r--graphics/dxsamples/Makefile3
-rw-r--r--graphics/eog2/Makefile3
-rw-r--r--graphics/feh/Makefile4
-rw-r--r--graphics/flphoto/Makefile3
-rw-r--r--graphics/fly/Makefile3
-rw-r--r--graphics/fnlib/Makefile3
-rw-r--r--graphics/freeglut/Makefile4
-rw-r--r--graphics/freetype-utils/Makefile4
-rw-r--r--graphics/freetype2/builtin-imake.mk12
-rw-r--r--graphics/freetype2/builtin.mk116
-rw-r--r--graphics/g2/Makefile4
-rw-r--r--graphics/gdk-pixbuf/Makefile.common3
-rw-r--r--graphics/gfract/Makefile3
-rw-r--r--graphics/gifsicle/Makefile4
-rw-r--r--graphics/gimageview/Makefile3
-rw-r--r--graphics/gimp/Makefile3
-rw-r--r--graphics/gimp1-base/Makefile3
-rw-r--r--graphics/gimp1-data/Makefile3
-rw-r--r--graphics/giram/Makefile3
-rw-r--r--graphics/gle/Makefile4
-rw-r--r--graphics/glitz/Makefile4
-rw-r--r--graphics/gliv/Makefile3
-rw-r--r--graphics/glu/Makefile7
-rw-r--r--graphics/glu/builtin-imake.mk12
-rw-r--r--graphics/glu/builtin.mk103
-rw-r--r--graphics/glut/Makefile10
-rw-r--r--graphics/glut/buildlink3.mk6
-rw-r--r--graphics/gnome2-pixmaps/Makefile5
-rw-r--r--graphics/gnuplot/Makefile4
-rw-r--r--graphics/graphviz/Makefile3
-rw-r--r--graphics/gri/Makefile4
-rw-r--r--graphics/gtkglext/Makefile3
-rw-r--r--graphics/gtksee/Makefile3
-rw-r--r--graphics/hp2xx/Makefile4
-rw-r--r--graphics/iGMT/Makefile5
-rw-r--r--graphics/imlib/Makefile3
-rw-r--r--graphics/imlib2/Makefile4
-rw-r--r--graphics/ivtools/Makefile5
-rw-r--r--graphics/lib3ds/Makefile4
-rw-r--r--graphics/libart2/Makefile4
-rw-r--r--graphics/libgdiplus/Makefile3
-rw-r--r--graphics/libggi/Makefile3
-rw-r--r--graphics/libggi/buildlink3.mk4
-rw-r--r--graphics/libgii/Makefile4
-rw-r--r--graphics/libgii/buildlink3.mk7
-rw-r--r--graphics/libgnomecanvas/Makefile3
-rw-r--r--graphics/librsvg/Makefile3
-rw-r--r--graphics/librsvg2/Makefile.common3
-rw-r--r--graphics/libvideogfx/Makefile4
-rw-r--r--graphics/libwmf/Makefile4
-rw-r--r--graphics/mgl/Makefile4
-rw-r--r--graphics/mpeg2codec/Makefile4
-rw-r--r--graphics/openexr/Makefile3
-rw-r--r--graphics/p5-Image-Imlib2/Makefile4
-rw-r--r--graphics/p5-PerlMagick/Makefile4
-rw-r--r--graphics/pgraf/Makefile5
-rw-r--r--graphics/ploticus-examples/Makefile5
-rw-r--r--graphics/ploticus/Makefile4
-rw-r--r--graphics/plotutils/Makefile4
-rw-r--r--graphics/povray/Makefile4
-rw-r--r--graphics/pstoedit/Makefile4
-rw-r--r--graphics/py-biggles/Makefile4
-rw-r--r--graphics/py-imagingtk/Makefile3
-rw-r--r--graphics/radiance/Makefile3
-rw-r--r--graphics/ruby-RMagick/Makefile4
-rw-r--r--graphics/ruby-imlib2/Makefile5
-rw-r--r--graphics/ruby-opengl/Makefile4
-rw-r--r--graphics/scigraphica/Makefile3
-rw-r--r--graphics/scrot/Makefile4
-rw-r--r--graphics/skencil/Makefile4
-rw-r--r--graphics/sodipodi/Makefile3
-rw-r--r--graphics/tuxpaint-config/Makefile3
-rw-r--r--graphics/urt/Makefile4
-rw-r--r--graphics/vcg/Makefile4
-rw-r--r--graphics/vtk/Makefile5
-rw-r--r--graphics/x11rec/Makefile4
-rw-r--r--graphics/xplot/Makefile4
-rw-r--r--graphics/xpm/Makefile9
-rw-r--r--graphics/xpm/buildlink3.mk7
-rw-r--r--graphics/xpm/builtin-imake.mk12
-rw-r--r--graphics/xpm/builtin.mk131
-rw-r--r--graphics/xsane/Makefile3
106 files changed, 518 insertions, 445 deletions
diff --git a/graphics/3DKit/Makefile.common b/graphics/3DKit/Makefile.common
index 2f48048ce1f..8bb477e9b3f 100644
--- a/graphics/3DKit/Makefile.common
+++ b/graphics/3DKit/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.8 2005/05/22 20:08:04 jlam Exp $
+# $NetBSD: Makefile.common,v 1.9 2005/06/01 18:02:53 jlam Exp $
#
DISTNAME= 3DKit-0.3.1r2
@@ -15,5 +15,6 @@ DESCR_SRC?= ${.CURDIR}/../../graphics/3DKit/DESCR
NO_CONFIGURE= YES
USE_TOOLS+= gmake
-USE_X11= YES
MAKEFILE= GNUmakefile
+
+.include "../../mk/x11.buildlink3.mk"
diff --git a/graphics/Cenon/Makefile b/graphics/Cenon/Makefile
index 995479945b8..591fec957e4 100644
--- a/graphics/Cenon/Makefile
+++ b/graphics/Cenon/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2005/05/05 05:59:17 rh Exp $
+# $NetBSD: Makefile,v 1.3 2005/06/01 18:02:53 jlam Exp $
#
DISTNAME= Cenon-3.67
@@ -11,7 +11,6 @@ HOMEPAGE= http://www.cenon.info/
COMMENT= Vector graphics / CAD / DTP program
WRKSRC= ${WRKDIR}/Cenon
-USE_X11= yes
NO_CONFIGURE= yes
post-install:
diff --git a/graphics/ImageMagick/options.mk b/graphics/ImageMagick/options.mk
index 87765944f7f..3cb56dce257 100644
--- a/graphics/ImageMagick/options.mk
+++ b/graphics/ImageMagick/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2005/05/31 10:01:36 dillo Exp $
+# $NetBSD: options.mk,v 1.3 2005/06/01 18:02:53 jlam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.ImageMagick
PKG_SUPPORTED_OPTIONS= x11
@@ -9,10 +9,10 @@ PKG_SUGGESTED_OPTIONS= x11
.if !empty(PKG_OPTIONS:Mx11)
BUILDLINK_DEPENDS.jasper+= jasper>=1.701.0
DEPENDS+= mpeg2codec-1.2:../../graphics/mpeg2codec
-USE_X11= YES
.include "../../graphics/jasper/buildlink3.mk"
.include "../../graphics/libwmf/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.else
CONFIGURE_ARGS+= --without-x
.endif
diff --git a/graphics/ImageViewer/Makefile b/graphics/ImageViewer/Makefile
index 00cf8da0881..f9e559472a3 100644
--- a/graphics/ImageViewer/Makefile
+++ b/graphics/ImageViewer/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile,v 1.16 2005/06/01 18:02:54 jlam Exp $
DISTNAME= ImageViewer-0.6.3
CATEGORIES= graphics gnustep
@@ -9,7 +9,6 @@ HOMEPAGE= http://www.nice.ch/~phip/softcorner.html
COMMENT= GNUstep image display application
NO_CONFIGURE= yes
-USE_X11= yes
.include "../../x11/gnustep-back/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
diff --git a/graphics/Mesa/Makefile.common b/graphics/Mesa/Makefile.common
index 71312cc03f6..d261b562f9f 100644
--- a/graphics/Mesa/Makefile.common
+++ b/graphics/Mesa/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.41 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile.common,v 1.42 2005/06/01 18:02:54 jlam Exp $
DISTNAME= MesaLib-${MESA_VERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
@@ -16,7 +16,6 @@ HOMEPAGE= http://www.mesa3d.org/
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_LIBTOOL= yes
-USE_X11= yes
BUILDING_MESA= yes
NO_CONFIGURE= yes
@@ -28,6 +27,7 @@ INSTALLATION_DIRS+= lib
.include "../../mk/compiler.mk"
.include "../../mk/bsd.prefs.mk"
+.include "../../mk/x11.buildlink3.mk"
# Mesa has proper support for Solaris and SunPro, use it.
.if ${OPSYS} == "SunOS"
diff --git a/graphics/Mesa/version.mk b/graphics/Mesa/version.mk
index ee9c85049e2..4ec62dfb63a 100644
--- a/graphics/Mesa/version.mk
+++ b/graphics/Mesa/version.mk
@@ -1,31 +1,16 @@
-# $NetBSD: version.mk,v 1.10 2005/04/30 02:16:12 jlam Exp $
+# $NetBSD: version.mk,v 1.11 2005/06/01 18:02:54 jlam Exp $
#
# This file computes the version number of the Mesa distributed with
-# XFree86 and stores it in ${_MESA_VERSION}.
+# XFree86 and stores it in ${BUILTIN_VERSION.Mesa}.
#
# NOTE: This file should only be used by the Mesa-related builtin.mk files.
#
-.if !defined(MESA_VERSION_MK)
-MESA_VERSION_MK= # defined
-.include "../../mk/bsd.prefs.mk"
+BUILTIN_FILES_VAR:= H_MESA
+BUILTIN_FILES.H_MESA= ${X11BASE}/include/GL/gl.h
+.include "../../mk/buildlink3/find-files.mk"
-_GL_GL_H= ${X11BASE}/include/GL/gl.h
-_MESA_GL_VERSIONS= 1.2 1.3 1.4 1.5
-.for _glvers_ in ${_MESA_GL_VERSIONS}
-. if !defined(_MESA_GL_VERSION_${_glvers_})
-_MESA_GL_VERSION_${_glvers_}?= no
-. if exists(${_GL_GL_H})
-_MESA_GL_VERSION_${_glvers_}!= \
- if ${GREP} "\#define[ ]*GL_VERSION_${_glvers_:S/./_/}[ ]*1" ${_GL_GL_H} >/dev/null 2>&1; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
-. endif
-MAKEFLAGS+= _MESA_GL_VERSION_${_glvers_}=${_MESA_GL_VERSION_${_glvers_}}
-. endif
-.endfor
+.if !defined(BUILTIN_VERSION.Mesa) && exists(${H_MESA})
#
# According to the Mesa documentation, for stable releases:
#
@@ -34,44 +19,12 @@ MAKEFLAGS+= _MESA_GL_VERSION_${_glvers_}=${_MESA_GL_VERSION_${_glvers_}}
# Mesa-4.0.4 implements OpenGL 1.3,
# Mesa-3.4.2 implements OpenGL 1.2.
#
-.if !empty(_MESA_GL_VERSION_1.5:M[yY][eE][sS])
-_MESA_VERSION?= 6.0
-.elif !empty(_MESA_GL_VERSION_1.4:M[yY][eE][sS])
-_MESA_VERSION?= 5.0
-.elif !empty(_MESA_GL_VERSION_1.3:M[yY][eE][sS])
-_MESA_VERSION?= 4.0.4
-.elif !empty(_MESA_GL_VERSION_1.2:M[yY][eE][sS])
-_MESA_VERSION?= 3.4.2
-.else
-_MESA_VERSION?= 0
+BUILTIN_VERSION.Mesa!= \
+ ${AWK} '/\#define[ ]*GL_VERSION_1_2/ { v = "3.4.2" } \
+ /\#define[ ]*GL_VERSION_1_3/ { v = "4.0.4" } \
+ /\#define[ ]*GL_VERSION_1_4/ { v = "5.0" } \
+ /\#define[ ]*GL_VERSION_1_5/ { v = "6.0" } \
+ END { printf "%s\n", v }' \
+ ${H_MESA}
.endif
-
-MESA_REQD?= 3.4.2
-
-# Distill the MESA_REQD list into a single _MESA_REQD value that is the
-# highest version of Mesa required.
-#
-_MESA_STRICTEST_REQD?= none
-. for _version_ in ${MESA_REQD}
-. for _pkg_ in Mesa-${_version_}
-. if ${_MESA_STRICTEST_REQD} == "none"
-_MESA_PKG_SATISFIES_DEP= yes
-. for _vers_ in ${MESA_REQD}
-. if !empty(_MESA_PKG_SATISFIES_DEP:M[yY][eE][sS])
-_MESA_PKG_SATISFIES_DEP!= \
- if ${PKG_ADMIN} pmatch 'Mesa>=${_vers_}' ${_pkg_}; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
-. endif
-. endfor
-. if !empty(_MESA_PKG_SATISFIES_DEP:M[yY][eE][sS])
-_MESA_STRICTEST_REQD= ${_version_}
-. endif
-. endif
-. endfor
-. endfor
-_MESA_REQD= ${_MESA_STRICTEST_REQD}
-
-.endif # MESA_VERSION_MK
+MAKEVARS+= BUILTIN_VERSION.Mesa
diff --git a/graphics/MesaLib/builtin-imake.mk b/graphics/MesaLib/builtin-imake.mk
new file mode 100644
index 00000000000..43855010f0a
--- /dev/null
+++ b/graphics/MesaLib/builtin-imake.mk
@@ -0,0 +1,12 @@
+XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:54 jlam Exp $
+
+/*
+ * Check the value of BuildGLXLibrary for the presence of
+ * MesaLib in the X11 distribution.
+ */
+builtin-test:
+#if BuildGLXLibrary
+ @echo yes
+#else
+ @echo no
+#endif
diff --git a/graphics/MesaLib/builtin.mk b/graphics/MesaLib/builtin.mk
index 1ed8a68b14a..75cd1ec51bf 100644
--- a/graphics/MesaLib/builtin.mk
+++ b/graphics/MesaLib/builtin.mk
@@ -1,61 +1,88 @@
-# $NetBSD: builtin.mk,v 1.4 2004/03/29 05:43:30 jlam Exp $
+# $NetBSD: builtin.mk,v 1.5 2005/06/01 18:02:54 jlam Exp $
-_GL_GLX_H= ${X11BASE}/include/GL/glx.h
-_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl
+BUILTIN_PKG:= MesaLib
-.include "../../graphics/Mesa/version.mk"
-BUILDLINK_DEPENDS.MesaLib+= MesaLib>=${_MESA_REQD}
+BUILTIN_FIND_FILES_VAR:= H_MESALIB
+BUILTIN_FIND_FILES.H_MESALIB= ${X11BASE}/include/GL/glx.h
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
.if !defined(IS_BUILTIN.MesaLib)
IS_BUILTIN.MesaLib= no
-. if exists(${_GL_GLX_H}) && exists(${_X11_TMPL})
+. if exists(${H_MESALIB})
+PKGSRC_USE_TOOLS+= imake # XXX
+IMAKE?= ${X11BASE}/bin/imake # XXX
+. if defined(IMAKE) && exists(${IMAKE})
IS_BUILTIN.MesaLib!= \
- if ${GREP} -q BuildGLXLibrary ${_X11_TMPL}; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
-. if !empty(IS_BUILTIN.MesaLib:M[yY][eE][sS])
-#
-# _MESA_VERSION is defined by Mesa/version.mk to be the version of the
-# Mesa software distributed with the built-in XFree86.
-#
-BUILTIN_PKG.MesaLib= MesaLib-${_MESA_VERSION}
-BUILDLINK_VARS+= BUILTIN_PKG.MesaLib
+ ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
+ -f ${BUILDLINK_PKGSRCDIR.MesaLib}/builtin-imake.mk \
+ -s - | \
+ ${MAKE} -f - builtin-test
. endif
. endif
-BUILDLINK_VARS+= IS_BUILTIN.MesaLib
-.endif # IS_BUILTIN.MesaLib
+.endif
+MAKEVARS+= IS_BUILTIN.MesaLib
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.MesaLib) && \
+ !empty(IS_BUILTIN.MesaLib:M[yY][eE][sS]) && \
+ exists(${H_MESALIB})
+. include "../../graphics/Mesa/version.mk"
+BUILTIN_PKG.MesaLib= MesaLib-${BUILTIN_VERSION.Mesa}
+.endif
+MAKEVARS+= BUILTIN_PKG.MesaLib
+
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
.if !defined(USE_BUILTIN.MesaLib)
-USE_BUILTIN.MesaLib?= ${IS_BUILTIN.MesaLib}
-
-. if defined(BUILTIN_PKG.MesaLib)
-USE_BUILTIN.MesaLib= yes
-. for _depend_ in ${BUILDLINK_DEPENDS.MesaLib}
-. if !empty(USE_BUILTIN.MesaLib:M[yY][eE][sS])
-USE_BUILTIN.MesaLib!= \
- if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.MesaLib}; then \
- ${ECHO} "yes"; \
+. if ${PREFER.MesaLib} == "pkgsrc"
+USE_BUILTIN.MesaLib= no
+. else
+USE_BUILTIN.MesaLib= ${IS_BUILTIN.MesaLib}
+. if defined(BUILTIN_PKG.MesaLib) && \
+ !empty(IS_BUILTIN.MesaLib:M[yY][eE][sS])
+USE_BUILTIN.MesaLib= yes
+. for _dep_ in ${BUILDLINK_DEPENDS.MesaLib}
+. if !empty(USE_BUILTIN.MesaLib:M[yY][eE][sS])
+USE_BUILTIN.MesaLib!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.MesaLib:Q}; then \
+ ${ECHO} yes; \
else \
- ${ECHO} "no"; \
+ ${ECHO} no; \
fi
-. endif
-. endfor
-. endif
-.endif # USE_BUILTIN.MesaLib
+. endif
+. endfor
+. endif
+. endif # PREFER.MesaLib
+.endif
+MAKEVARS+= USE_BUILTIN.MesaLib
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
CHECK_BUILTIN.MesaLib?= no
.if !empty(CHECK_BUILTIN.MesaLib:M[nN][oO])
-.if !empty(USE_BUILTIN.MesaLib:M[nN][oO])
+. if !empty(USE_BUILTIN.MesaLib:M[nN][oO])
BUILDLINK_DEPENDS.MesaLib+= MesaLib>=6.0
-.endif
+. endif
-.if !empty(USE_BUILTIN.MesaLib:M[yY][eE][sS])
+. if !empty(USE_BUILTIN.MesaLib:M[yY][eE][sS])
BUILDLINK_PREFIX.MesaLib= ${X11BASE}
-USE_X11= yes
-_MESA_REQD= ${_MESA_VERSION}
-.endif
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+. include "../../mk/x11.buildlink3.mk"
+. include "../../mk/x11.builtin.mk"
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+. endif
.endif # CHECK_BUILTIN.MesaLib
diff --git a/graphics/Ngraph/Makefile b/graphics/Ngraph/Makefile
index f49cae88380..c531819bef4 100644
--- a/graphics/Ngraph/Makefile
+++ b/graphics/Ngraph/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2005/05/22 20:08:04 jlam Exp $
+# $NetBSD: Makefile,v 1.17 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= Ngraph-6.3.30-src
@@ -15,7 +15,6 @@ COMMENT= The 2D graph and data analysis program
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-USE_X11= yes
USE_TOOLS+= gmake
PKGSRC_USE_TOOLS+= gtar
diff --git a/graphics/OpenRM/Makefile b/graphics/OpenRM/Makefile
index a47fac6cc56..8e4fe503d84 100644
--- a/graphics/OpenRM/Makefile
+++ b/graphics/OpenRM/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile,v 1.8 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= openrm-devel-1.5.2
@@ -11,7 +11,6 @@ MAINTAINER= root@garbled.net
HOMEPAGE= http://www.openrm.org/
COMMENT= The OpenRM Scene Graph API
-USE_X11= yes
WRKSRC= ${WRKDIR}/rm152
BUILD_TARGET= freebsd docs
MAKE_ENV+= AR=${AR} RM=${RM} CP=${CP} LN=${LN} ECHO_CMD=${ECHO} \
@@ -55,6 +54,7 @@ do-install:
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../graphics/Mesa/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../lang/perl5/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/PanoTools/Makefile b/graphics/PanoTools/Makefile
index 594aa4b0924..8f3b976ac52 100644
--- a/graphics/PanoTools/Makefile
+++ b/graphics/PanoTools/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile,v 1.14 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= PanoTools
@@ -15,7 +15,6 @@ ONLY_FOR_PLATFORM= Linux-*-i[3-6]86 NetBSD-*-i386
WRKSRC= ${WRKDIR}/PTLinux
USE_JAVA= run
-USE_X11= YES
NO_BUILD= YES
.include "../../mk/bsd.prefs.mk"
@@ -23,6 +22,8 @@ NO_BUILD= YES
PKG_JVM?= sun-jdk
PLIST_SUBST+= JAVA_HOME="${PKG_JAVA_HOME:C/^${PREFIX}\///}"
+.include "../../mk/x11.buildlink3.mk"
+
do-install:
${INSTALL_DATA} ${WRKSRC}/libpano12.so ${EMULDIR}/lib
${LN} -s ${EMULDIR}/lib/libpano12.so \
diff --git a/graphics/SDL_image/Makefile b/graphics/SDL_image/Makefile
index 63258ae80e9..c1266bd41f2 100644
--- a/graphics/SDL_image/Makefile
+++ b/graphics/SDL_image/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile,v 1.21 2005/06/01 18:02:54 jlam Exp $
DISTNAME= SDL_image-1.2.4
PKGREVISION= 1
@@ -14,7 +14,6 @@ CONFLICTS= SDL-image-[0-9]*
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_LIBTOOL= YES
-USE_X11= YES
GNU_CONFIGURE= YES
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
CONFIGURE_ARGS+= --enable-tif
diff --git a/graphics/aalib-x11/Makefile b/graphics/aalib-x11/Makefile
index 6ef9c564119..1d2e0b924b9 100644
--- a/graphics/aalib-x11/Makefile
+++ b/graphics/aalib-x11/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile,v 1.12 2005/06/01 18:02:54 jlam Exp $
PKGNAME= aalib-x11-${BASE_VERS}
CATEGORIES+= x11
@@ -7,7 +7,6 @@ COMMENT= ASCII Art library with X11 support
PKG_INSTALLATION_TYPES= overwrite pkgviews
-USE_X11= # defined
BUILD_TARGET= libaa-x11.la
INSTALL_TARGET= install-libLTLIBRARIES
@@ -19,6 +18,8 @@ INSTALLATION_DIRS= bin include lib
#
BUILDLINK_TRANSFORM+= l:aa:aa-x11
+.include "../../mk/x11.buildlink3.mk"
+
post-patch:
for file in ${WRKSRC}/src/Makefile.in; do \
${SED} -e "s,libaa\.la,libaa-x11.la,g" \
diff --git a/graphics/aalib-x11/buildlink3.mk b/graphics/aalib-x11/buildlink3.mk
index 0cdc02e5e2f..2c9b100ffb5 100644
--- a/graphics/aalib-x11/buildlink3.mk
+++ b/graphics/aalib-x11/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.5 2004/03/05 19:25:12 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.6 2005/06/01 18:02:54 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
AALIB_X11_BUILDLINK3_MK:= ${AALIB_X11_BUILDLINK3_MK}+
@@ -21,7 +21,8 @@ BUILDLINK_TRANSFORM+= l:aa:aa-x11
AALIB_CONFIG= ${BUILDLINK_PREFIX.aalib-x11}/bin/aalib-x11-config
CONFIGURE_ENV+= AALIB_CONFIG="${AALIB_CONFIG}"
MAKE_ENV+= AALIB_CONFIG="${AALIB_CONFIG}"
-
.endif # AALIB_X11_BUILDLINK3_MK
+.include "../../mk/x11.buildlink3.mk"
+
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/graphics/aqsis/Makefile b/graphics/aqsis/Makefile
index 78cdec18de8..ef4485a2255 100644
--- a/graphics/aqsis/Makefile
+++ b/graphics/aqsis/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2005/05/22 20:08:04 jlam Exp $
+# $NetBSD: Makefile,v 1.20 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= aqsis-0.6.4
@@ -14,7 +14,6 @@ GNU_CONFIGURE= yes
USE_LIBTOOL= yes
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
USE_TOOLS+= gmake
-USE_X11= yes
GCC_REQD+= 2.95.3
USE_LANGUAGES+= c c++
@@ -22,5 +21,6 @@ USE_LANGUAGES+= c c++
.include "../../devel/libargparse/buildlink3.mk"
.include "../../graphics/Mesa/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/autotrace/Makefile b/graphics/autotrace/Makefile
index fb870185979..e8103e73dd4 100644
--- a/graphics/autotrace/Makefile
+++ b/graphics/autotrace/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile,v 1.24 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= autotrace-0.31.1
@@ -10,11 +10,11 @@ MAINTAINER= rh@NetBSD.org
HOMEPAGE= http://autotrace.sourceforge.net/
COMMENT= Convert bitmap to vector graphics
-USE_X11= YES
GNU_CONFIGURE= YES
USE_LIBTOOL= YES
PKGCONFIG_OVERRIDE= autotrace.pc.in
.include "../../graphics/ImageMagick/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/aview-x11/Makefile b/graphics/aview-x11/Makefile
index ce03731d137..ee17d73fd73 100644
--- a/graphics/aview-x11/Makefile
+++ b/graphics/aview-x11/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile,v 1.12 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= aview-1.3.0rc1
@@ -19,7 +19,6 @@ WRKSRC= ${WRKDIR}/aview-1.3.0
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_PKGINSTALL= yes
-USE_X11= yes
.include "../../mk/bsd.prefs.mk"
diff --git a/graphics/blender/Makefile b/graphics/blender/Makefile
index 13ca63d9e75..2ed1e057880 100644
--- a/graphics/blender/Makefile
+++ b/graphics/blender/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2005/05/22 20:08:04 jlam Exp $
+# $NetBSD: Makefile,v 1.43 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= blender-2.36
@@ -15,7 +15,6 @@ BUILD_DEPENDS+= scons>=0.96:../../devel/scons
WRKSRC= ${WRKDIR}/blender
-USE_X11= YES
USE_TOOLS+= gmake
USE_LIBTOOL= YES
diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile
index f7affd303a8..e240104c560 100644
--- a/graphics/cairo/Makefile
+++ b/graphics/cairo/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile,v 1.17 2005/06/01 18:02:54 jlam Exp $
DISTNAME= cairo-0.4.0
CATEGORIES= graphics
@@ -10,7 +10,6 @@ COMMENT= Vector graphics library with cross-device output support
USE_LIBTOOL= yes
USE_PKGLOCALEDIR= yes
-USE_X11= yes
GNU_CONFIGURE= yes
PKGCONFIG_OVERRIDE+= cairo.pc.in
CONFIGURE_ARGS+= --disable-atsui
diff --git a/graphics/cal3d-examples/Makefile b/graphics/cal3d-examples/Makefile
index fcddfde5cb1..a35e8000722 100644
--- a/graphics/cal3d-examples/Makefile
+++ b/graphics/cal3d-examples/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2005/04/11 21:46:00 tv Exp $
+# $NetBSD: Makefile,v 1.6 2005/06/01 18:02:54 jlam Exp $
#
PKGNAME= cal3d-examples-${CAL3D_VERSION}
@@ -11,7 +11,6 @@ DISTFILES= TheCallyDemo-0.9.1b.zip \
COMMENT= Tools and demos for cal3d library
-USE_X11= YES
CONFIGURE_ARGS+= --with-cal3d=${PREFIX}
CONFIGURE_ARGS+= --with-glut=${PREFIX}
CONFIGURE_DIRS= ${WRKSRC}/examples/cally \
@@ -49,6 +48,7 @@ post-install:
.include "../../graphics/cal3d/buildlink3.mk"
.include "../../graphics/Mesa/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/automake.mk"
.include "../../mk/autoconf.mk"
diff --git a/graphics/claraocr/Makefile b/graphics/claraocr/Makefile
index 2cc9cd37ff8..1f1c8c6e2fb 100644
--- a/graphics/claraocr/Makefile
+++ b/graphics/claraocr/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2005/04/11 21:46:01 tv Exp $
+# $NetBSD: Makefile,v 1.6 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= clara-0.9.9
@@ -15,7 +15,6 @@ COMMENT= Optical Character Recognition (OCR) program for books
DEPENDS+= netpbm-[0-9]*:../../graphics/netpbm
-USE_X11= YES
REPLACE_PERL= clara.pl mkdoc.pl selthresh.pl
# install a example input file
@@ -23,4 +22,5 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/imre.pbm ${PREFIX}/share/doc/clara
.include "../../lang/perl5/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/cqcam/Makefile b/graphics/cqcam/Makefile
index 7834ac9e8e7..25bda779d8c 100644
--- a/graphics/cqcam/Makefile
+++ b/graphics/cqcam/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2005/04/11 21:46:01 tv Exp $
+# $NetBSD: Makefile,v 1.24 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= cqcam-0.45a
@@ -17,7 +17,6 @@ LICENSE= no-profit
HAS_CONFIGURE= YES
USE_LANGUAGES= c c++
-USE_X11= YES
CONFIGURE_ENV+= CAT=${CAT:Q} ECHO=${ECHO:Q} \
TCLCONFIG_SH=${TCLCONFIG_SH:Q}
diff --git a/graphics/dia/Makefile.common b/graphics/dia/Makefile.common
index 9334362ffe3..7721a928d31 100644
--- a/graphics/dia/Makefile.common
+++ b/graphics/dia/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.5 2005/05/22 20:08:04 jlam Exp $
+# $NetBSD: Makefile.common,v 1.6 2005/06/01 18:02:54 jlam Exp $
#
DISTNAME= dia-0.94
@@ -17,7 +17,6 @@ GNU_CONFIGURE= YES
USE_TOOLS+= gmake
USE_LIBTOOL= YES
USE_PKGLOCALEDIR= YES
-USE_X11= YES
CONFIGURE_ARGS+= --without-python
diff --git a/graphics/dvdview/Makefile b/graphics/dvdview/Makefile
index 02b23609333..bc5b057d25e 100644
--- a/graphics/dvdview/Makefile
+++ b/graphics/dvdview/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2005/05/22 20:08:04 jlam Exp $
+# $NetBSD: Makefile,v 1.14 2005/06/01 18:02:54 jlam Exp $
DISTNAME= dvdview-1.2.2
PKGREVISION= 2
@@ -11,7 +11,6 @@ COMMENT= Software only MPEG-1/2 video decoder
GNU_CONFIGURE= YES
USE_TOOLS+= gmake
-USE_X11= YES
.include "../../mk/bsd.prefs.mk"
@@ -27,4 +26,5 @@ post-install:
.include "../../graphics/libvideogfx/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/dxsamples/Makefile b/graphics/dxsamples/Makefile
index 1e3ac8fe592..0befc9316c7 100644
--- a/graphics/dxsamples/Makefile
+++ b/graphics/dxsamples/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2005/05/22 20:08:04 jlam Exp $
+# $NetBSD: Makefile,v 1.15 2005/06/01 18:02:54 jlam Exp $
DISTNAME= dxsamples-4.3.2
CATEGORIES= graphics
@@ -14,4 +14,5 @@ GNU_CONFIGURE= yes
USE_TOOLS+= gmake
USE_X11BASE= yes
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/eog2/Makefile b/graphics/eog2/Makefile
index 9fae5073de7..409aaeae935 100644
--- a/graphics/eog2/Makefile
+++ b/graphics/eog2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.41 2005/05/22 20:08:04 jlam Exp $
+# $NetBSD: Makefile,v 1.42 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= eog-2.10.0
@@ -13,7 +13,6 @@ COMMENT= Eye of GNOME: an image viewing and cataloging program
BUILD_USES_MSGFMT= YES
GNU_CONFIGURE= YES
-USE_X11= YES
USE_TOOLS+= gmake
USE_DIRS+= gnome2-1.5
USE_PKGLOCALEDIR= YES
diff --git a/graphics/feh/Makefile b/graphics/feh/Makefile
index 18ca076ad91..5059b20bec6 100644
--- a/graphics/feh/Makefile
+++ b/graphics/feh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2005/05/13 13:43:33 drochner Exp $
+# $NetBSD: Makefile,v 1.24 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= feh-1.3.2
@@ -12,7 +12,6 @@ COMMENT= Advanced image viewer
DEPENDS+= wget-[0-9]*:../../net/wget
GNU_CONFIGURE= YES
-USE_X11= YES
CONFIGURE_ARGS+= --program-transform-name=s,cam,feh_cam,
REPLACE_PERL= cam/cam
@@ -21,4 +20,5 @@ BUILDLINK_DEPENDS.giblib+= giblib>=1.2.4
BUILDLINK_DEPENDS.jpeg+= jpeg>=6bnb3 # includes jpegint.h
.include "../../devel/giblib/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/flphoto/Makefile b/graphics/flphoto/Makefile
index 2be197c672a..08190dd523c 100644
--- a/graphics/flphoto/Makefile
+++ b/graphics/flphoto/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2005/04/11 21:46:02 tv Exp $
+# $NetBSD: Makefile,v 1.3 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= flphoto-1.2-source
@@ -14,7 +14,6 @@ COMMENT= Image management and display program
WRKSRC= ${WRKDIR}/flphoto-1.2
USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
-USE_X11= yes
.include "../../x11/fltk/buildlink3.mk"
.include "../../graphics/jpeg/buildlink3.mk"
diff --git a/graphics/fly/Makefile b/graphics/fly/Makefile
index 30a2f1a11df..974650c7420 100644
--- a/graphics/fly/Makefile
+++ b/graphics/fly/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2005/04/11 21:46:02 tv Exp $
+# $NetBSD: Makefile,v 1.28 2005/06/01 18:02:55 jlam Exp $
DISTNAME= fly-1.6.5
PKGREVISION= 6
@@ -12,7 +12,6 @@ COMMENT= Command-file interface for creating and modifying PNG images
BUILD_DEPENDS+= gif2png>=2.4.2:../../graphics/gif2png
USE_PERL5= YES
-USE_X11= YES
REPLACE_PERL= examples/cgi-perl-example.pl \
examples/fly-tester.pl \
diff --git a/graphics/fnlib/Makefile b/graphics/fnlib/Makefile
index af4dfde24b5..e41d7911489 100644
--- a/graphics/fnlib/Makefile
+++ b/graphics/fnlib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2005/04/11 21:46:02 tv Exp $
+# $NetBSD: Makefile,v 1.30 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= fnlib-0.5
@@ -15,7 +15,6 @@ COMMENT= Color font rendering library for X11R6
DIST_SUBDIR= fnlib
USE_PKGINSTALL= YES
-USE_X11= YES
GNU_CONFIGURE= YES
USE_LIBTOOL= YES
diff --git a/graphics/freeglut/Makefile b/graphics/freeglut/Makefile
index 5b54bb41696..8faae31aee6 100644
--- a/graphics/freeglut/Makefile
+++ b/graphics/freeglut/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2005/04/11 21:46:02 tv Exp $
+# $NetBSD: Makefile,v 1.7 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= freeglut-2.2.0
@@ -15,8 +15,8 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-replace-glut
-USE_X11= yes
.include "../../graphics/MesaLib/buildlink3.mk"
.include "../../graphics/glu/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/freetype-utils/Makefile b/graphics/freetype-utils/Makefile
index 73bc196fe99..f75f54b6b6d 100644
--- a/graphics/freetype-utils/Makefile
+++ b/graphics/freetype-utils/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2004/12/03 15:14:59 wiz Exp $
+# $NetBSD: Makefile,v 1.16 2005/06/01 18:02:55 jlam Exp $
.include "../freetype-lib/Makefile.common"
@@ -8,12 +8,12 @@ COMMENT= Utilities for manipulating TrueType fonts
BUILDLINK_DEPENDS.freetype= freetype-lib>=${FT_VERS}
-USE_X11= # defined
CONFIGURE_ARGS+= --with-x
BUILD_TARGET= tttest
INSTALL_TARGET= install-tttest
.include "../../graphics/freetype-lib/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/freetype2/builtin-imake.mk b/graphics/freetype2/builtin-imake.mk
new file mode 100644
index 00000000000..cf72049efe4
--- /dev/null
+++ b/graphics/freetype2/builtin-imake.mk
@@ -0,0 +1,12 @@
+XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:55 jlam Exp $
+
+/*
+ * Check the value of BuildFreetype2Library for the presence of
+ * freetype2 in the X11 distribution.
+ */
+builtin-test:
+#if BuildFreetype2Library
+ @echo yes
+#else
+ @echo no
+#endif
diff --git a/graphics/freetype2/builtin.mk b/graphics/freetype2/builtin.mk
index dca9a8947c7..05736c9b7bd 100644
--- a/graphics/freetype2/builtin.mk
+++ b/graphics/freetype2/builtin.mk
@@ -1,66 +1,92 @@
-# $NetBSD: builtin.mk,v 1.2 2004/03/29 05:43:31 jlam Exp $
+# $NetBSD: builtin.mk,v 1.3 2005/06/01 18:02:55 jlam Exp $
-_FREETYPE2_FREETYPE_H= ${X11BASE}/include/freetype2/freetype/freetype.h
-_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl
+BUILTIN_PKG:= freetype2
+BUILTIN_FIND_FILES_VAR:= H_FREETYPE2
+BUILTIN_FIND_FILES.H_FREETYPE2= ${X11BASE}/include/freetype2/freetype/freetype.h
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
.if !defined(IS_BUILTIN.freetype2)
IS_BUILTIN.freetype2= no
-. if exists(${_FREETYPE2_FREETYPE_H}) && exists(${_X11_TMPL})
+. if exists(${H_FREETYPE2})
+PKGSRC_USE_TOOLS+= imake # XXX
+IMAKE?= ${X11BASE}/bin/imake # XXX
+. if defined(IMAKE) && exists(${IMAKE})
IS_BUILTIN.freetype2!= \
- if ${GREP} -q BuildFreetype2Library ${_X11_TMPL}; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
-. if !empty(IS_BUILTIN.freetype2:M[yY][eE][sS])
-#
-# Create an appropriate package name for the built-in freetype2 distributed
-# with the system. This package name can be used to check against
-# BUILDLINK_DEPENDS.<pkg> to see if we need to install the pkgsrc version
-# or if the built-in one is sufficient.
-#
-_FREETYPE2_MAJOR!= \
- ${AWK} '/\#define[ ]*FREETYPE_MAJOR/ { print $$3 }' ${_FREETYPE2_FREETYPE_H}
-_FREETYPE2_MINOR!= \
- ${AWK} '/\#define[ ]*FREETYPE_MINOR/ { print "."$$3 }' ${_FREETYPE2_FREETYPE_H}
-_FREETYPE2_PATCH!= \
- ${AWK} 'BEGIN { patch=0; } /\#define[ ]*FREETYPE_PATCH/ { patch=$$3; } END { print "."patch; }' ${_FREETYPE2_FREETYPE_H}
-_FREETYPE2_VERSION= ${_FREETYPE2_MAJOR}${_FREETYPE2_MINOR}${_FREETYPE2_PATCH}
-BUILTIN_PKG.freetype2= freetype2-${_FREETYPE2_VERSION}
-BUILDLINK_VARS+= BUILTIN_PKG.freetype2
+ ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
+ -f ${BUILDLINK_PKGSRCDIR.freetype2}/builtin-imake.mk \
+ -s - | \
+ ${MAKE} -f - builtin-test
. endif
. endif
-BUILDLINK_VARS+= IS_BUILTIN.freetype2
-.endif # IS_BUILTIN.freetype2
+.endif
+MAKEVARS+= IS_BUILTIN.freetype2
-.if !defined(USE_BUILTIN.freetype2)
-USE_BUILTIN.freetype2?= ${IS_BUILTIN.freetype2}
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.freetype2) && \
+ !empty(IS_BUILTIN.freetype2:M[yY][eE][sS]) && \
+ exists(${H_FREETYPE2})
+BUILTIN_VERSION.freetype2!= \
+ ${AWK} 'BEGIN { p = ".0" } \
+ /\#define[ ]*FREETYPE_MAJOR/ { M = $$3 } \
+ /\#define[ ]*FREETYPE_MINOR/ { m = "."$$3 } \
+ /\#define[ ]*FREETYPE_PATCH/ { p = "."$$3 } \
+ END { printf "%s%s%s\n", M, m, p }' \
+ ${H_FREETYPE2}
+BUILTIN_PKG.freetype2= freetype2-${BUILTIN_VERSION.freetype2}
+.endif
+MAKEVARS+= BUILTIN_PKG.freetype2
-. if defined(BUILTIN_PKG.freetype2)
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.freetype2)
+. if ${PREFER.freetype2} == "pkgsrc"
+USE_BUILTIN.freetype2= no
+. else
+USE_BUILTIN.freetype2= ${IS_BUILTIN.freetype2}
+. if defined(BUILTIN_PKG.freetype2) && \
+ !empty(IS_BUILTIN.freetype2:M[yY][eE][sS])
USE_BUILTIN.freetype2= yes
-. for _depend_ in ${BUILDLINK_DEPENDS.freetype2}
-. if !empty(USE_BUILTIN.freetype2:M[yY][eE][sS])
-USE_BUILTIN.freetype2!= \
- if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.freetype2}; then \
- ${ECHO} "yes"; \
+. for _dep_ in ${BUILDLINK_DEPENDS.freetype2}
+. if !empty(USE_BUILTIN.freetype2:M[yY][eE][sS])
+USE_BUILTIN.freetype2!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.freetype2:Q}; then \
+ ${ECHO} yes; \
else \
- ${ECHO} "no"; \
+ ${ECHO} no; \
fi
-. endif
-. endfor
-. endif
-.endif # USE_BUILTIN.freetype2
+. endif
+. endfor
+. endif
+. endif # PREFER.freetype2
+.endif
+MAKEVARS+= USE_BUILTIN.freetype2
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
CHECK_BUILTIN.freetype2?= no
.if !empty(CHECK_BUILTIN.freetype2:M[nN][oO])
-.if !empty(USE_BUILTIN.freetype2:M[nN][oO])
+. if !empty(USE_BUILTIN.freetype2:M[nN][oO])
BUILDLINK_DEPENDS.freetype2+= freetype2>=2.1.3
-.endif
+. endif
-.if !empty(USE_BUILTIN.freetype2:M[yY][eE][sS])
+. if !empty(USE_BUILTIN.freetype2:M[yY][eE][sS])
BUILDLINK_PREFIX.freetype2= ${X11BASE}
-USE_X11= yes
-.endif
+. include "../../mk/x11.buildlink3.mk"
+. include "../../mk/x11.builtin.mk"
+. endif
.endif # CHECK_BUILTIN.freetype2
diff --git a/graphics/g2/Makefile b/graphics/g2/Makefile
index 7d16ae3952a..8812812a6c2 100644
--- a/graphics/g2/Makefile
+++ b/graphics/g2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2005/04/11 21:46:02 tv Exp $
+# $NetBSD: Makefile,v 1.18 2005/06/01 18:02:55 jlam Exp $
DISTNAME= g2-0.49a
PKGREVISION= 3
@@ -10,7 +10,6 @@ HOMEPAGE= http://g2.sourceforge.net/
COMMENT= Powerful, easy to use 2D graphics library
GNU_CONFIGURE= yes
-USE_X11= yes
USE_LIBTOOL= yes
PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/G2/.packlist
@@ -29,5 +28,6 @@ post-install:
${PREFIX}/share/examples/g2
.include "../../graphics/gd/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/gdk-pixbuf/Makefile.common b/graphics/gdk-pixbuf/Makefile.common
index e7ad5e636c3..4e535115acc 100644
--- a/graphics/gdk-pixbuf/Makefile.common
+++ b/graphics/gdk-pixbuf/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.42 2005/05/22 20:51:45 jlam Exp $
+# $NetBSD: Makefile.common,v 1.43 2005/06/01 18:02:55 jlam Exp $
DISTNAME= gdk-pixbuf-${VER}.0
CATEGORIES= graphics devel
@@ -13,7 +13,6 @@ VER= 0.22
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_TOOLS+= gmake
-USE_X11= YES
USE_LIBTOOL= YES
GNU_CONFIGURE= YES
diff --git a/graphics/gfract/Makefile b/graphics/gfract/Makefile
index a424485c49d..9e188992cea 100644
--- a/graphics/gfract/Makefile
+++ b/graphics/gfract/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2005/05/22 20:08:05 jlam Exp $
+# $NetBSD: Makefile,v 1.22 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= gfract-0.30
@@ -10,7 +10,6 @@ MAINTAINER= ben@NetBSD.org
HOMEPAGE= http://www.cs.Helsinki.FI/u/salerma/gfract/
COMMENT= Gtk-based fractal program
-USE_X11= yes
USE_TOOLS+= gmake
BUILD_TARGET= gfract
diff --git a/graphics/gifsicle/Makefile b/graphics/gifsicle/Makefile
index a7c7f3bc200..91badade060 100644
--- a/graphics/gifsicle/Makefile
+++ b/graphics/gifsicle/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2005/04/11 21:46:03 tv Exp $
+# $NetBSD: Makefile,v 1.10 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= gifsicle-1.41
@@ -9,7 +9,7 @@ MAINTAINER= ben@wongs.net
HOMEPAGE= http://www.lcdf.org/~eddietwo/gifsicle/
COMMENT= Create, edit, and inspect GIFs from shell
-USE_X11= YES
GNU_CONFIGURE= YES
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/gimageview/Makefile b/graphics/gimageview/Makefile
index 1bb4c0a99ba..8cdccf2e1f8 100644
--- a/graphics/gimageview/Makefile
+++ b/graphics/gimageview/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37 2005/05/22 20:08:05 jlam Exp $
+# $NetBSD: Makefile,v 1.38 2005/06/01 18:02:55 jlam Exp $
DISTNAME= gimageview-0.2.27
CATEGORIES= graphics
@@ -14,7 +14,6 @@ USE_PKGLOCALEDIR= YES
USE_LIBTOOL= YES
GNU_CONFIGURE= YES
USE_TOOLS+= gmake
-USE_X11= YES
CONFIGURE_ARGS+= --disable-xinetest
CONFIGURE_ARGS+= --with-gtk2
diff --git a/graphics/gimp/Makefile b/graphics/gimp/Makefile
index 692f1442671..d18b2372785 100644
--- a/graphics/gimp/Makefile
+++ b/graphics/gimp/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.119 2005/05/22 20:08:05 jlam Exp $
+# $NetBSD: Makefile,v 1.120 2005/06/01 18:02:55 jlam Exp $
DISTNAME= gimp-2.2.7
CATEGORIES= graphics
@@ -21,7 +21,6 @@ USE_TOOLS+= gmake
USE_LIBTOOL= yes
USE_PKGINSTALL= yes
USE_PKGLOCALEDIR= yes
-USE_X11= yes
PKG_SYSCONFSUBDIR= gimp/2.0
diff --git a/graphics/gimp1-base/Makefile b/graphics/gimp1-base/Makefile
index 54904d50eda..d6bd4bc138c 100644
--- a/graphics/gimp1-base/Makefile
+++ b/graphics/gimp1-base/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2005/05/31 22:26:10 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= gimp-1.2.5
@@ -20,7 +20,6 @@ CONFLICTS+= gimp<=1.2.3 gimp>=2.0.0
USE_PKGINSTALL= YES
USE_PKGLOCALEDIR= YES
-USE_X11= YES
USE_TOOLS+= gmake
USE_LIBTOOL= YES
diff --git a/graphics/gimp1-data/Makefile b/graphics/gimp1-data/Makefile
index a213743b43f..1f07204facc 100644
--- a/graphics/gimp1-data/Makefile
+++ b/graphics/gimp1-data/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2005/04/11 21:46:03 tv Exp $
+# $NetBSD: Makefile,v 1.8 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= gimp-data-extras-1.2.0
@@ -16,7 +16,6 @@ COMMENT= GNU Image Manipulation Program (extra brushes and patterns)
CONFLICTS+= gimp<=1.2.3 gimp>=2.0.0
-USE_X11= YES
GNU_CONFIGURE= YES
.include "../../graphics/gimp1-base/buildlink3.mk"
diff --git a/graphics/giram/Makefile b/graphics/giram/Makefile
index 45b40535a30..f6c1b3fd1a1 100644
--- a/graphics/giram/Makefile
+++ b/graphics/giram/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.41 2005/05/22 20:08:05 jlam Exp $
+# $NetBSD: Makefile,v 1.42 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= giram-0.3.5
@@ -15,7 +15,6 @@ BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
USE_PKGLOCALEDIR= YES
USE_PKGINSTALL= YES
-USE_X11= YES
USE_TOOLS+= gmake
USE_LIBTOOL= YES
GNU_CONFIGURE= YES
diff --git a/graphics/gle/Makefile b/graphics/gle/Makefile
index 60378652585..68980f7229d 100644
--- a/graphics/gle/Makefile
+++ b/graphics/gle/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2005/04/11 21:46:03 tv Exp $
+# $NetBSD: Makefile,v 1.22 2005/06/01 18:02:55 jlam Exp $
#
DISTNAME= gle-3.1.0
@@ -15,10 +15,10 @@ COMMENT= GL subroutines for drawing tubing and extrusions
PKG_INSTALLATION_TYPES= overwrite pkgviews
-USE_X11= YES
GNU_CONFIGURE= YES
USE_LIBTOOL= YES
LIBS+= -lXext
.include "../../graphics/Mesa/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/glitz/Makefile b/graphics/glitz/Makefile
index 43e0be99bc9..b01a223f658 100644
--- a/graphics/glitz/Makefile
+++ b/graphics/glitz/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2005/04/11 21:46:03 tv Exp $
+# $NetBSD: Makefile,v 1.9 2005/06/01 18:02:55 jlam Exp $
DISTNAME= glitz-0.4.0
CATEGORIES= graphics
@@ -11,11 +11,11 @@ COMMENT= OpenGL 2D graphics library and a backend for gl output in cairo
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
PKGCONFIG_OVERRIDE= glitz-agl.pc.in glitz-glx.pc.in glitz.pc.in
-USE_X11= yes
LIBS.Darwin+= -lXext
.include "../../graphics/MesaLib/buildlink3.mk"
.include "../../x11/xextensions/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/gliv/Makefile b/graphics/gliv/Makefile
index cc03f08de18..c5028344b16 100644
--- a/graphics/gliv/Makefile
+++ b/graphics/gliv/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2005/05/22 20:08:05 jlam Exp $
+# $NetBSD: Makefile,v 1.8 2005/06/01 18:02:56 jlam Exp $
DISTNAME= gliv-1.9.1
CATEGORIES= graphics
@@ -13,7 +13,6 @@ BUILD_USES_MSGFMT= yes
USE_TOOLS+= gmake
USE_PKGLOCALEDIR= yes
-USE_X11= yes
GNU_CONFIGURE= yes
.include "../../converters/libiconv/buildlink3.mk"
diff --git a/graphics/glu/Makefile b/graphics/glu/Makefile
index 7d59d0594be..d8ea057d9a1 100644
--- a/graphics/glu/Makefile
+++ b/graphics/glu/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2005/02/23 13:04:47 grant Exp $
+# $NetBSD: Makefile,v 1.39 2005/06/01 18:02:56 jlam Exp $
PKGNAME= ${DISTNAME:C/MesaLib/glu/}
COMMENT= GLU polygon tessellation facility for Mesa
@@ -9,10 +9,12 @@ CONFLICTS+= Mesa<3.2.1
.include "../Mesa/Makefile.common"
USE_LANGUAGES= c c++
-MESA_REQD+= ${MESA_VERSION}
INSTLIBS= ${WRKSRC}/src/glu/sgi/libGLU.la
+BUILDLINK_DEPENDS.MesaLib+= MesaLib>=${MESA_VERSION}
+.include "../../graphics/MesaLib/buildlink3.mk"
+
pre-build:
cd ${WRKSRC} && ${RM} -fr src/mesa src/glut src/glw progs
@@ -24,5 +26,4 @@ do-install:
${INSTALL_DATA} $${hdr} ${PREFIX}/include/GL; \
done
-.include "../../graphics/MesaLib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/glu/builtin-imake.mk b/graphics/glu/builtin-imake.mk
new file mode 100644
index 00000000000..d4a66cae37c
--- /dev/null
+++ b/graphics/glu/builtin-imake.mk
@@ -0,0 +1,12 @@
+XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:56 jlam Exp $
+
+/*
+ * Check the value of BuildGLULibrary for the presence of
+ * glu in the X11 distribution.
+ */
+builtin-test:
+#if BuildGLULibrary
+ @echo yes
+#else
+ @echo no
+#endif
diff --git a/graphics/glu/builtin.mk b/graphics/glu/builtin.mk
index dd085aaf529..21bf86c4be4 100644
--- a/graphics/glu/builtin.mk
+++ b/graphics/glu/builtin.mk
@@ -1,65 +1,86 @@
-# $NetBSD: builtin.mk,v 1.3 2004/03/29 05:43:31 jlam Exp $
+# $NetBSD: builtin.mk,v 1.4 2005/06/01 18:02:56 jlam Exp $
-_GL_GLU_H= ${X11BASE}/include/GL/glu.h
-_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl
+BUILTIN_PKG:= glu
-.include "../../graphics/Mesa/version.mk"
-BUILDLINK_DEPENDS.glu+= glu>=${_MESA_REQD}
+BUILTIN_FIND_FILES_VAR:= H_GLU
+BUILTIN_FIND_FILES.H_GLU= ${X11BASE}/include/GL/glu.h
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
.if !defined(IS_BUILTIN.glu)
IS_BUILTIN.glu= no
-. if exists(${_GL_GLU_H}) && exists(${_X11_TMPL})
+. if exists(${H_GLU})
+PKGSRC_USE_TOOLS+= imake # XXX
+IMAKE?= ${X11BASE}/bin/imake # XXX
+. if defined(IMAKE) && exists(${IMAKE})
IS_BUILTIN.glu!= \
- if ${GREP} -q BuildGLULibrary ${_X11_TMPL}; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
-. if !empty(IS_BUILTIN.glu:M[yY][eE][sS])
-#
-# _MESA_VERSION is defined by Mesa/version.mk to be the version of the
-# Mesa software distributed with the built-in XFree86.
-#
-BUILTIN_PKG.glu= glu-${_MESA_VERSION}
-BUILDLINK_VARS+= BUILTIN_PKG.glu
+ ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
+ -f ${BUILDLINK_PKGSRCDIR.glu}/builtin-imake.mk \
+ -s - | \
+ ${MAKE} -f - builtin-test
. endif
. endif
-BUILDLINK_VARS+= IS_BUILTIN.glu
-.endif # IS_BUILTIN.glu
+.endif
+MAKEVARS+= IS_BUILTIN.glu
-.if defined(USE_BUILTIN.MesaLib) && !empty(USE_BUILTIN.MesaLib:M[nN][oO])
-USE_BUILTIN.glu= no
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.glu) && \
+ !empty(IS_BUILTIN.glu:M[yY][eE][sS]) && \
+ exists(${H_GLU})
+. include "../../graphics/Mesa/version.mk"
+BUILTIN_PKG.glu= glu-${BUILTIN_VERSION.Mesa}
.endif
+MAKEVARS+= BUILTIN_PKG.glu
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
.if !defined(USE_BUILTIN.glu)
-USE_BUILTIN.glu?= ${IS_BUILTIN.glu}
-
-. if defined(BUILTIN_PKG.glu)
+. if ${PREFER.glu} == "pkgsrc"
+USE_BUILTIN.glu= no
+. else
+USE_BUILTIN.glu= ${IS_BUILTIN.glu}
+. if defined(BUILTIN_PKG.glu) && \
+ !empty(IS_BUILTIN.glu:M[yY][eE][sS])
USE_BUILTIN.glu= yes
-. for _depend_ in ${BUILDLINK_DEPENDS.glu}
-. if !empty(USE_BUILTIN.glu:M[yY][eE][sS])
-USE_BUILTIN.glu!= \
- if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.glu}; then \
- ${ECHO} "yes"; \
+. for _dep_ in ${BUILDLINK_DEPENDS.glu}
+. if !empty(USE_BUILTIN.glu:M[yY][eE][sS])
+USE_BUILTIN.glu!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.glu:Q}; then \
+ ${ECHO} yes; \
else \
- ${ECHO} "no"; \
+ ${ECHO} no; \
fi
-. endif
-. endfor
-. endif
-.endif # USE_BUILTIN.glu
+. endif
+. endfor
+. endif
+. endif # PREFER.glu
+.endif
+MAKEVARS+= USE_BUILTIN.glu
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
CHECK_BUILTIN.glu?= no
.if !empty(CHECK_BUILTIN.glu:M[nN][oO])
-.if !empty(USE_BUILTIN.glu:M[nN][oO])
+. if !empty(USE_BUILTIN.glu:M[nN][oO])
BUILDLINK_DEPENDS.glu+= glu>=6.0
-.endif
+. endif
-.if !empty(USE_BUILTIN.glu:M[yY][eE][sS])
+. if !empty(USE_BUILTIN.glu:M[yY][eE][sS])
BUILDLINK_PREFIX.glu= ${X11BASE}
-USE_X11= yes
-_MESA_REQD= ${_MESA_VERSION}
-.endif
+. include "../../mk/x11.buildlink3.mk"
+. include "../../mk/x11.builtin.mk"
+. endif
.endif # CHECK_BUILTIN.glu
diff --git a/graphics/glut/Makefile b/graphics/glut/Makefile
index 4f4d72601a9..db10ca59f36 100644
--- a/graphics/glut/Makefile
+++ b/graphics/glut/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37 2005/02/24 06:36:18 veego Exp $
+# $NetBSD: Makefile,v 1.38 2005/06/01 18:02:56 jlam Exp $
PKGNAME= ${DISTNAME:S/MesaLib/glut/}
PKGREVISION= 2
@@ -9,10 +9,14 @@ CONFLICTS+= Mesa<3.2.1
.include "../Mesa/Makefile.common"
-MESA_REQD+= ${MESA_VERSION}
+BUILDLINK_DEPENDS.MesaLib+= MesaLib>=${MESA_VERSION}
+BUILDLINK_DEPENDS.glu+= glu>=${MESA_VERSION}
INSTLIBS= ${WRKSRC}/src/glut/glx/libglut.la
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../graphics/glu/buildlink3.mk"
+
pre-build:
cd ${WRKSRC} && ${RM} -fr src/mesa src/glu src/glw progs
@@ -24,6 +28,4 @@ do-install:
${INSTALL_DATA} $${hdr} ${PREFIX}/include/GL; \
done
-.include "../../graphics/MesaLib/buildlink3.mk"
-.include "../../graphics/glu/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/glut/buildlink3.mk b/graphics/glut/buildlink3.mk
index 5ead1230395..0080e158dd3 100644
--- a/graphics/glut/buildlink3.mk
+++ b/graphics/glut/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.8 2004/10/03 00:14:51 tv Exp $
+# $NetBSD: buildlink3.mk,v 1.9 2005/06/01 18:02:56 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
GLUT_BUILDLINK3_MK:= ${GLUT_BUILDLINK3_MK}+
@@ -11,13 +11,11 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nglut}
BUILDLINK_PACKAGES+= glut
.if !empty(GLUT_BUILDLINK3_MK:M+)
-BUILDLINK_DEPENDS.glut+= glut>=${_MESA_REQD}
+BUILDLINK_DEPENDS.glut+= glut>=3.4.2
BUILDLINK_RECOMMENDED.glut+= glut>=6.0.1nb1
BUILDLINK_PKGSRCDIR.glut?= ../../graphics/glut
.endif # GLUT_BUILDLINK3_MK
-MESA_REQD+= 6.0
-
.include "../../graphics/MesaLib/buildlink3.mk"
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/graphics/gnome2-pixmaps/Makefile b/graphics/gnome2-pixmaps/Makefile
index dbebd46c324..45d8f74b93c 100644
--- a/graphics/gnome2-pixmaps/Makefile
+++ b/graphics/gnome2-pixmaps/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2005/05/18 16:43:33 jmmv Exp $
+# $NetBSD: Makefile,v 1.26 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= gnome-desktop-2.10.1
@@ -21,12 +21,13 @@ CONFLICTS+= gnome-pixmaps-2.0.8
.endif
USE_DIRS+= xdg-1.1
-USE_X11= YES
NO_CONFIGURE= YES
NO_BUILD= YES
DSTDIR= ${PREFIX}/share/pixmaps
+.include "../../mk/x11.buildlink3.mk"
+
do-install:
cd ${WRKSRC}/pixmaps && \
for i in *.png *.xpm ; do \
diff --git a/graphics/gnuplot/Makefile b/graphics/gnuplot/Makefile
index ee4fc03acd7..0fdf697a36a 100644
--- a/graphics/gnuplot/Makefile
+++ b/graphics/gnuplot/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.31 2004/12/28 23:18:16 reed Exp $
+# $NetBSD: Makefile,v 1.32 2005/06/01 18:02:56 jlam Exp $
#
PKGREVISION= 2
@@ -7,9 +7,9 @@ CATEGORIES+= x11
CONFLICTS+= gnuplot-nox11-[0-9]*
-USE_X11= YES
.include "../../graphics/gnuplot/Makefile.common"
.include "../../graphics/plotutils/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/graphviz/Makefile b/graphics/graphviz/Makefile
index e18babe7b56..9f61001f3e6 100644
--- a/graphics/graphviz/Makefile
+++ b/graphics/graphviz/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2005/04/28 14:58:06 wiz Exp $
+# $NetBSD: Makefile,v 1.34 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= graphviz-2.2.1
@@ -17,7 +17,6 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
-USE_X11= yes
XAW_TYPE= standard
PKGCONFIG_OVERRIDE= */*.pc */*/*.pc
PKGCONFIG_OVERRIDE_STAGE= post-build
diff --git a/graphics/gri/Makefile b/graphics/gri/Makefile
index 9fbb5a3383f..a8859c16731 100644
--- a/graphics/gri/Makefile
+++ b/graphics/gri/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2005/05/22 20:08:06 jlam Exp $
+# $NetBSD: Makefile,v 1.20 2005/06/01 18:02:56 jlam Exp $
DISTNAME= gri-2.12.5
PKGREVISION= 1
@@ -13,7 +13,6 @@ COMMENT= Language for scientific graphics applications
BUILD_DEPENDS+= ImageMagick-[0-9]*:../../graphics/ImageMagick
GNU_CONFIGURE= yes
-USE_X11= yes
USE_TOOLS+= gmake
USE_PERL5= build
REPLACE_PERL= gri_merge gri_unpage
@@ -23,4 +22,5 @@ INFO_FILES= gri.info
.include "../../devel/netcdf/buildlink3.mk"
.include "../../mk/ghostscript.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/gtkglext/Makefile b/graphics/gtkglext/Makefile
index 97e6d1938f0..0a8745f81a4 100644
--- a/graphics/gtkglext/Makefile
+++ b/graphics/gtkglext/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2005/05/22 20:08:06 jlam Exp $
+# $NetBSD: Makefile,v 1.24 2005/06/01 18:02:56 jlam Exp $
DISTNAME= gtkglext-1.0.6
CATEGORIES= graphics
@@ -13,7 +13,6 @@ GNU_CONFIGURE= yes
USE_TOOLS+= gmake
USE_LIBTOOL= yes
USE_PERL5= build
-USE_X11= yes
PKGCONFIG_OVERRIDE= gdkglext.pc.in
PKGCONFIG_OVERRIDE+= gtkglext.pc.in
diff --git a/graphics/gtksee/Makefile b/graphics/gtksee/Makefile
index 5c0af15277c..8d65791fe00 100644
--- a/graphics/gtksee/Makefile
+++ b/graphics/gtksee/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2005/05/22 20:08:06 jlam Exp $
+# $NetBSD: Makefile,v 1.11 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= gtksee-0.5.6
@@ -13,7 +13,6 @@ COMMENT= Gtk-based image viewing and cataloging program
BUILD_USES_MSGFMT= YES
GNU_CONFIGURE= YES
-USE_X11= YES
USE_TOOLS+= gmake
USE_PKGLOCALEDIR= YES
diff --git a/graphics/hp2xx/Makefile b/graphics/hp2xx/Makefile
index e5becb6321e..4b0bf67f538 100644
--- a/graphics/hp2xx/Makefile
+++ b/graphics/hp2xx/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2005/04/11 21:46:04 tv Exp $
+# $NetBSD: Makefile,v 1.29 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= hp2xx-3.4.4
@@ -11,7 +11,6 @@ HOMEPAGE= http://www.gnu.org/software/hp2xx/hp2xx.html
COMMENT= HPGL converter and previewer
WRKSRC= ${WRKDIR}/${DISTNAME}/sources
-USE_X11= yes
USE_MAKEINFO= YES
INFO_FILES= hp2xx.info
@@ -21,4 +20,5 @@ post-extract:
.include "../../graphics/tiff/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../print/pdflib/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/iGMT/Makefile b/graphics/iGMT/Makefile
index 74269e8546d..e6bbfb9c950 100644
--- a/graphics/iGMT/Makefile
+++ b/graphics/iGMT/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2005/01/08 19:15:47 minskim Exp $
+# $NetBSD: Makefile,v 1.22 2005/06/01 18:02:56 jlam Exp $
DISTNAME= igmt_v1.2
PKGNAME= iGMT-1.2
@@ -18,12 +18,13 @@ DEPENDS+= ImageMagick>=5.3.9nb1:../../graphics/ImageMagick
WRKSRC= ${WRKDIR}/igmt_1.2
NO_BUILD= yes
-USE_X11= yes
GMT_PREFIX_DEFAULT= ${LOCALBASE}
EVAL_PREFIX+= GMT_PREFIX=GMT
EVAL_PREFIX+= TK_PREFIX=tk
+.include "../../mk/x11.buildlink3.mk"
+
do-configure:
for i in ${WRKSRC}/igmt ${WRKSRC}/igmt_configure.tcl; do \
${SED} -e 's:@PREFIX@:'${PREFIX}':g' \
diff --git a/graphics/imlib/Makefile b/graphics/imlib/Makefile
index 8001e51213b..16cd2687901 100644
--- a/graphics/imlib/Makefile
+++ b/graphics/imlib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.93 2005/05/22 20:08:06 jlam Exp $
+# $NetBSD: Makefile,v 1.94 2005/06/01 18:02:56 jlam Exp $
DISTNAME= imlib-1.9.15
PKGREVISION= 2
@@ -14,7 +14,6 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_TOOLS+= gmake
USE_LIBTOOL= yes
-USE_X11= yes
GNU_CONFIGURE= yes
PKGCONFIG_OVERRIDE= imlib.pc.in
UNLIMIT_RESOURCES= datasize
diff --git a/graphics/imlib2/Makefile b/graphics/imlib2/Makefile
index 7b6e2fd127e..7dd0d40631d 100644
--- a/graphics/imlib2/Makefile
+++ b/graphics/imlib2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2005/05/31 21:36:36 wiz Exp $
+# $NetBSD: Makefile,v 1.33 2005/06/01 18:02:56 jlam Exp $
DISTNAME= imlib2-1.2.0
PKGREVISION= 3
@@ -10,7 +10,6 @@ HOMEPAGE= http://www.enlightenment.org/pages/imlib2.html
COMMENT= Image manipulation library
USE_LIBTOOL= YES
-USE_X11= YES
GNU_CONFIGURE= YES
PKGCONFIG_OVERRIDE= imlib2.pc.in
@@ -27,5 +26,6 @@ LIBS.SunOS= -lm
.include "../../graphics/libungif/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/ivtools/Makefile b/graphics/ivtools/Makefile
index f14ffdc4a8a..fe5610a6bbf 100644
--- a/graphics/ivtools/Makefile
+++ b/graphics/ivtools/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2005/03/01 20:49:47 markd Exp $
+# $NetBSD: Makefile,v 1.11 2005/06/01 18:02:56 jlam Exp $
DISTNAME= ivtools-1.2.2
CATEGORIES= graphics
@@ -13,7 +13,8 @@ CONFLICTS+= dclock-*
WRKSRC= ${WRKDIR}/${PKGNAME:C/\.[0-9]$//}
GNU_CONFIGURE= YES
-USE_X11= YES
+
+.include "../../mk/x11.buildlink3.mk"
post-patch:
${RM} -f ${WRKSRC}/src/include/ivstd/strstream.h
diff --git a/graphics/lib3ds/Makefile b/graphics/lib3ds/Makefile
index 6511154dbdc..2732c5e15fa 100644
--- a/graphics/lib3ds/Makefile
+++ b/graphics/lib3ds/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2005/04/11 21:46:05 tv Exp $
+# $NetBSD: Makefile,v 1.10 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= lib3ds-1.2.0
@@ -11,10 +11,10 @@ HOMEPAGE= http://lib3ds.sourceforge.net/
COMMENT= 3D Studio File Format Library
GNU_CONFIGURE= YES
-USE_X11= YES
LDFLAGS+= -lm
.include "../../graphics/Mesa/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/libart2/Makefile b/graphics/libart2/Makefile
index 93b00ab97ad..311523a762f 100644
--- a/graphics/libart2/Makefile
+++ b/graphics/libart2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2005/04/11 21:46:05 tv Exp $
+# $NetBSD: Makefile,v 1.19 2005/06/01 18:02:56 jlam Exp $
DISTNAME= libart_lgpl-2.3.17
PKGNAME= ${DISTNAME:S/_lgpl/2/}
@@ -13,8 +13,8 @@ COMMENT= High-performance 2D graphics library
PKG_INSTALLATION_TYPES= overwrite pkgviews
GNU_CONFIGURE= YES
-USE_X11= YES
USE_LIBTOOL= YES
PKGCONFIG_OVERRIDE= libart-2.0.pc.in
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/libgdiplus/Makefile b/graphics/libgdiplus/Makefile
index 6d6e680ddbb..5a20fb40968 100644
--- a/graphics/libgdiplus/Makefile
+++ b/graphics/libgdiplus/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2005/05/22 20:08:06 jlam Exp $
+# $NetBSD: Makefile,v 1.17 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= libgdiplus-1.1.5
@@ -9,7 +9,6 @@ MAINTAINER= recht@NetBSD.org
HOMEPAGE= http://www.mono-project.com/
COMMENT= Implementation of the GDI+ API
-USE_X11= yes
USE_PKGLOCALEDIR= yes
USE_TOOLS+= gmake
USE_LIBTOOL= yes
diff --git a/graphics/libggi/Makefile b/graphics/libggi/Makefile
index 4831ce6d158..5031d41d32c 100644
--- a/graphics/libggi/Makefile
+++ b/graphics/libggi/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2005/04/18 15:54:18 wiz Exp $
+# $NetBSD: Makefile,v 1.36 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= libggi-2.1.1.src
@@ -15,7 +15,6 @@ COMMENT= General Graphics Interface library is a flexible drawing library
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
USE_PKGINSTALL= yes
-USE_X11= yes
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
diff --git a/graphics/libggi/buildlink3.mk b/graphics/libggi/buildlink3.mk
index d98dfdbf9ec..d478dd1b5a8 100644
--- a/graphics/libggi/buildlink3.mk
+++ b/graphics/libggi/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.4 2005/03/25 02:47:31 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.5 2005/06/01 18:02:56 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
LIBGGI_BUILDLINK3_MK:= ${LIBGGI_BUILDLINK3_MK}+
@@ -15,8 +15,6 @@ BUILDLINK_DEPENDS.libggi+= libggi>=2.1.0
BUILDLINK_PKGSRCDIR.libggi?= ../../graphics/libggi
.endif # LIBGGI_BUILDLINK3_MK
-USE_X11= yes
-
.include "../../devel/ncurses/buildlink3.mk"
.include "../../graphics/libgii/buildlink3.mk"
diff --git a/graphics/libgii/Makefile b/graphics/libgii/Makefile
index 8df1647d008..59f04fed764 100644
--- a/graphics/libgii/Makefile
+++ b/graphics/libgii/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2005/04/18 15:53:35 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2005/06/01 18:02:56 jlam Exp $
DISTNAME= libgii-0.9.1.src
PKGNAME= ${DISTNAME:S/.src//}
@@ -14,7 +14,6 @@ COMMENT= General Input Interface - API for all possible input sources
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
USE_PKGINSTALL= yes
-USE_X11= yes
USE_LIBTOOL= yes
TEST_TARGET= check
@@ -32,6 +31,7 @@ CONF_FILES+= ${EGDIR}/filter/mouse ${PKG_SYSCONFDIR}/filter/mouse
PTHREAD_OPTS+= native
.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.if empty(PTHREAD_TYPE:Mnative)
PLIST_SUBST+= GGTICK=""
diff --git a/graphics/libgii/buildlink3.mk b/graphics/libgii/buildlink3.mk
index 1f83f881e05..1df5fadd538 100644
--- a/graphics/libgii/buildlink3.mk
+++ b/graphics/libgii/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.3 2005/03/25 02:46:49 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.4 2005/06/01 18:02:56 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
LIBGII_BUILDLINK3_MK:= ${LIBGII_BUILDLINK3_MK}+
@@ -13,9 +13,8 @@ BUILDLINK_PACKAGES+= libgii
.if !empty(LIBGII_BUILDLINK3_MK:M+)
BUILDLINK_DEPENDS.libgii+= libgii>=0.9.0
BUILDLINK_PKGSRCDIR.libgii?= ../../graphics/libgii
-
-USE_X11= yes
-
.endif # LIBGII_BUILDLINK3_MK
+.include "../../mk/x11.buildlink3.mk"
+
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/graphics/libgnomecanvas/Makefile b/graphics/libgnomecanvas/Makefile
index 32d9fa3aa87..d4c1d9e68ad 100644
--- a/graphics/libgnomecanvas/Makefile
+++ b/graphics/libgnomecanvas/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2005/05/22 20:08:06 jlam Exp $
+# $NetBSD: Makefile,v 1.33 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= libgnomecanvas-2.10.0
@@ -15,7 +15,6 @@ BUILD_USES_MSGFMT= yes
GNU_CONFIGURE= yes
USE_PKGLOCALEDIR= yes
USE_TOOLS+= gmake
-USE_X11= yes
USE_LIBTOOL= yes
PKGCONFIG_OVERRIDE= libgnomecanvas/libgnomecanvas-2.0.pc.in
diff --git a/graphics/librsvg/Makefile b/graphics/librsvg/Makefile
index 379039dfa0c..b2e9077515e 100644
--- a/graphics/librsvg/Makefile
+++ b/graphics/librsvg/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2005/04/11 21:46:06 tv Exp $
+# $NetBSD: Makefile,v 1.20 2005/06/01 18:02:56 jlam Exp $
DISTNAME= librsvg-1.0.3
CATEGORIES= graphics gnome
@@ -10,7 +10,6 @@ HOMEPAGE= http://www.levien.com/svg/
COMMENT= Raph's SVG library
USE_LIBTOOL= yes
-USE_X11= yes
GNU_CONFIGURE= yes
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
diff --git a/graphics/librsvg2/Makefile.common b/graphics/librsvg2/Makefile.common
index ed1e08517f2..c00de5d7e11 100644
--- a/graphics/librsvg2/Makefile.common
+++ b/graphics/librsvg2/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.10 2005/04/11 21:46:06 tv Exp $
+# $NetBSD: Makefile.common,v 1.11 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= librsvg-2.9.5
@@ -13,7 +13,6 @@ COMMENT= SVG library for GNOME2
DISTINFO_FILE= ${.CURDIR}/../../graphics/librsvg2/distinfo
PATCHDIR= ${.CURDIR}/../../graphics/librsvg2/patches
-USE_X11= YES
USE_LIBTOOL= YES
GNU_CONFIGURE= YES
PKGCONFIG_OVERRIDE= librsvg-2.0.pc.in
diff --git a/graphics/libvideogfx/Makefile b/graphics/libvideogfx/Makefile
index 2a7dd0d640f..e4ac8850e4d 100644
--- a/graphics/libvideogfx/Makefile
+++ b/graphics/libvideogfx/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2005/04/11 21:46:06 tv Exp $
+# $NetBSD: Makefile,v 1.9 2005/06/01 18:02:56 jlam Exp $
#
DISTNAME= libvideogfx-1.0.3
@@ -15,8 +15,8 @@ COMMENT= C++ library for low-level video processing
USE_LANGUAGES= c++
USE_LIBTOOL= YES
GNU_CONFIGURE= YES
-USE_X11= yes
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/libwmf/Makefile b/graphics/libwmf/Makefile
index f14e690929f..a6dca29f5c0 100644
--- a/graphics/libwmf/Makefile
+++ b/graphics/libwmf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2005/04/20 15:42:11 drochner Exp $
+# $NetBSD: Makefile,v 1.55 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= libwmf-0.2.8.3
@@ -13,7 +13,6 @@ COMMENT= Library for reading and converting WMF (Windows Meta Files)
PKG_INSTALLATION_TYPES= overwrite pkgviews
GNU_CONFIGURE= YES
-USE_X11= YES
USE_LIBTOOL= YES
CONFIGURE_ARGS+= --disable-gd
CONFIGURE_ARGS+= --with-docdir=${PREFIX}/share/doc/html/libwmf
@@ -28,4 +27,5 @@ post-install:
.include "../../textproc/libxml2/buildlink3.mk"
#.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/mgl/Makefile b/graphics/mgl/Makefile
index 7d84eced5af..a27b344a08d 100644
--- a/graphics/mgl/Makefile
+++ b/graphics/mgl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2005/05/22 20:08:06 jlam Exp $
+# $NetBSD: Makefile,v 1.21 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= mgl2-alpha-020
@@ -14,7 +14,6 @@ COMMENT= Graphics library for NEC Mobilegear/PocketBSD, NetBSD/hpcmips
DEPENDS+= mglfonts>=0.1:../../fonts/mglfonts
USE_TOOLS+= gmake
-USE_X11= yes
MGLDOCS= im.doc mgl1.doc shlib.doc
MGL2DOCS= AppConvert.doc Build.doc CALIBRATE.doc CHANGES.doc \
@@ -108,4 +107,5 @@ post-install:
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/libungif/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/mpeg2codec/Makefile b/graphics/mpeg2codec/Makefile
index 8cf51b3b9e9..0c09d0484db 100644
--- a/graphics/mpeg2codec/Makefile
+++ b/graphics/mpeg2codec/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2005/04/11 21:46:06 tv Exp $
+# $NetBSD: Makefile,v 1.16 2005/06/01 18:02:57 jlam Exp $
DISTNAME= mpeg2vidcodec_v12
PKGNAME= mpeg2codec-1.2
@@ -16,6 +16,8 @@ USE_X11BASE= # defined
INSTALLATION_DIRS= bin
+.include "../../mk/x11.buildlink3.mk"
+
do-install:
${INSTALL_PROGRAM} \
${WRKSRC}/src/mpeg2dec/mpeg2decode \
diff --git a/graphics/openexr/Makefile b/graphics/openexr/Makefile
index 7e8e0d6799c..e2ca575942b 100644
--- a/graphics/openexr/Makefile
+++ b/graphics/openexr/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2005/05/22 20:08:07 jlam Exp $
+# $NetBSD: Makefile,v 1.6 2005/06/01 18:02:57 jlam Exp $
DISTNAME= OpenEXR-1.2.2
PKGNAME= openexr-1.2.2
@@ -11,7 +11,6 @@ COMMENT= High dynamic-range (HDR) image file format library and tools
USE_TOOLS+= gmake
USE_LIBTOOL= yes
-USE_X11= yes # for exrdisplay FLTK application
GNU_CONFIGURE= yes
PKGCONFIG_OVERRIDE= ${WRKSRC}/OpenExr.pc.in
TEST_TARGET= check
diff --git a/graphics/p5-Image-Imlib2/Makefile b/graphics/p5-Image-Imlib2/Makefile
index 4b06577e75d..827db979bf6 100644
--- a/graphics/p5-Image-Imlib2/Makefile
+++ b/graphics/p5-Image-Imlib2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2005/04/11 21:46:07 tv Exp $
+# $NetBSD: Makefile,v 1.13 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= Image-Imlib2-1.04
@@ -12,7 +12,6 @@ HOMEPAGE= http://theory.uwinnipeg.ca/CPAN/data/Image-Imlib2/
COMMENT= Interface to the Imlib2 image library
USE_PERL5= run
-USE_X11= YES
# versions before that contained a broken imlib2-config
BUILDLINK_DEPENDS.imlib2+= imlib2>=1.2.0nb2
@@ -22,5 +21,6 @@ PERL5_MODULE_TYPE= Module::Build
PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Image/Imlib2/.packlist
.include "../../graphics/imlib2/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/p5-PerlMagick/Makefile b/graphics/p5-PerlMagick/Makefile
index 4822f83ce7a..064c7892600 100644
--- a/graphics/p5-PerlMagick/Makefile
+++ b/graphics/p5-PerlMagick/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2005/04/11 21:46:07 tv Exp $
+# $NetBSD: Makefile,v 1.40 2005/06/01 18:02:57 jlam Exp $
.include "../../graphics/ImageMagick/Makefile.common"
@@ -23,7 +23,6 @@ PERL5_CONFIGURE= NO
PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/Image/Magick/.packlist
GNU_CONFIGURE= YES
-USE_X11= YES
PERL5_CONFIGURE_DIRS= ${WRKSRC}/PerlMagick
BUILD_DIRS= ${PERL5_CONFIGURE_DIRS}
@@ -34,5 +33,6 @@ CONFIGURE_ARGS+= --with-perl=${PERL5}
post-configure: perl5-configure
.include "../../graphics/ImageMagick/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/pgraf/Makefile b/graphics/pgraf/Makefile
index a9588432614..6a1ca31d553 100644
--- a/graphics/pgraf/Makefile
+++ b/graphics/pgraf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2005/04/11 21:46:07 tv Exp $
+# $NetBSD: Makefile,v 1.12 2005/06/01 18:02:57 jlam Exp $
DISTNAME= pgraf-20010131
CATEGORIES= graphics
@@ -8,11 +8,12 @@ MAINTAINER= tech-pkg@NetBSD.org
COMMENT= Portable graphics system
NO_SRC_ON_FTP= Already in MASTER_SITE_LOCAL
-USE_X11= YES
INSTALLATION_DIRS= bin include lib man/man1 man/man3 man/man5
CONFLICTS= pgp5-[0-9]* # Both have a `pgps' executable
+.include "../../mk/x11.buildlink3.mk"
+
post-install:
${INSTALL_DATA} ${WRKSRC}/include/pgraf.h ${PREFIX}/include
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pgraf
diff --git a/graphics/ploticus-examples/Makefile b/graphics/ploticus-examples/Makefile
index a9312c4d64c..2eff3acbbb2 100644
--- a/graphics/ploticus-examples/Makefile
+++ b/graphics/ploticus-examples/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2003/07/21 16:51:49 martti Exp $
+# $NetBSD: Makefile,v 1.4 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= plnode141
@@ -14,10 +14,11 @@ COMMENT= Examples for the ploticus data plotting suite
NO_CONFIGURE= YES
NO_BUILD= YES
-USE_X11= YES
DIST_SUBDIR= ${PKGNAME:S/-examples//}
EXDIR= ${PREFIX}/share/examples/ploticus
+.include "../../mk/x11.buildlink3.mk"
+
do-install:
${INSTALL_DATA_DIR} ${EXDIR}
.for dir in doc gallery tabgallery thumbnails thumbpng
diff --git a/graphics/ploticus/Makefile b/graphics/ploticus/Makefile
index 4ba610b4e0d..9f00a822c37 100644
--- a/graphics/ploticus/Makefile
+++ b/graphics/ploticus/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2005/05/02 17:58:00 drochner Exp $
+# $NetBSD: Makefile,v 1.30 2005/06/01 18:02:57 jlam Exp $
DISTNAME= pl231src
PKGNAME= ploticus-2.31pl4
@@ -10,7 +10,6 @@ HOMEPAGE= http://ploticus.sourceforge.net/
COMMENT= Versatile data visualization engine
WRKSRC= ${WRKDIR}/${DISTNAME}/src
-USE_X11= yes
NO_CONFIGURE= yes
BUILD_TARGET= ploticus
@@ -38,5 +37,6 @@ do-install:
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/plotutils/Makefile b/graphics/plotutils/Makefile
index e15ec14466f..ee5ea980de0 100644
--- a/graphics/plotutils/Makefile
+++ b/graphics/plotutils/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.34 2005/04/11 21:46:08 tv Exp $
+# $NetBSD: Makefile,v 1.35 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= plotutils-2.4.1
@@ -15,7 +15,6 @@ CONFLICTS+= plotutils-nox11-[0-9]*
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_LANGUAGES= c c++
-USE_X11= YES
INFO_FILES= plotutils.info
@@ -26,4 +25,5 @@ USE_LIBTOOL= YES
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig ${WRKSRC}/libxmi/ltconfig
.include "../../graphics/png/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/povray/Makefile b/graphics/povray/Makefile
index ceeeeb72f28..196eefd1fe5 100644
--- a/graphics/povray/Makefile
+++ b/graphics/povray/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2005/04/11 21:46:08 tv Exp $
+# $NetBSD: Makefile,v 1.27 2005/06/01 18:02:57 jlam Exp $
DISTNAME= povray-3.6.1
PKGREVISION= 1
@@ -15,7 +15,6 @@ LICENSE= povray-license
USE_LANGUAGES= c c++
USE_PKGINSTALL= YES
-USE_X11= YES
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --enable-strip
@@ -39,5 +38,6 @@ pre-install:
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/pstoedit/Makefile b/graphics/pstoedit/Makefile
index ef191e82fac..70a6a99aae9 100644
--- a/graphics/pstoedit/Makefile
+++ b/graphics/pstoedit/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2005/05/22 05:35:32 jlam Exp $
+# $NetBSD: Makefile,v 1.28 2005/06/01 18:02:57 jlam Exp $
DISTNAME= pstoedit_3_31
PKGNAME= pstoedit-3.31
@@ -16,7 +16,6 @@ NO_SRC_ON_CDROM= ${RESTRICTED}
NO_BIN_ON_CDROM= ${RESTRICTED}
WRKSRC= ${WRKDIR}/pstoedit_3.31/src
-USE_X11= yes
USE_LIBTOOL= yes
USE_LANGUAGES= c++
GNU_CONFIGURE= yes
@@ -46,5 +45,6 @@ post-install:
${INSTALL_DATA} ${DOCSRC}/readme.txt ${DOCDIR}
.include "../../graphics/plotutils/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/ghostscript.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/py-biggles/Makefile b/graphics/py-biggles/Makefile
index e6ac2524d01..423346bebb9 100644
--- a/graphics/py-biggles/Makefile
+++ b/graphics/py-biggles/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2005/04/11 21:46:08 tv Exp $
+# $NetBSD: Makefile,v 1.5 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= python-biggles-1.6.3
@@ -11,11 +11,11 @@ MAINTAINER= Kai.Puolamaki@iki.fi
HOMEPAGE= http://biggles.sourceforge.net/
COMMENT= Python module for creating 2D scientific plots
-USE_X11= yes
PYDISTUTILSPKG= yes
PYBINMODULE= yes
.include "../../lang/python/extension.mk"
.include "../../math/py-Numeric/buildlink3.mk"
.include "../../graphics/plotutils/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/py-imagingtk/Makefile b/graphics/py-imagingtk/Makefile
index 0edfb4b9cd2..f7237690832 100644
--- a/graphics/py-imagingtk/Makefile
+++ b/graphics/py-imagingtk/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2005/04/11 21:46:08 tv Exp $
+# $NetBSD: Makefile,v 1.15 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= Imaging-1.1.4
@@ -15,7 +15,6 @@ DIST_SUBDIR= python
PYDISTUTILSPKG= yes
BUILDLINK_DEPENDS.python20= python20>=2.0.1nb4
GNU_CONFIGURE= yes
-USE_X11= yes
PLIST_SUBST+= PYPKGPREFIX=${PYPKGPREFIX}
diff --git a/graphics/radiance/Makefile b/graphics/radiance/Makefile
index 3b0cb2d2bf8..1b3c0027d69 100644
--- a/graphics/radiance/Makefile
+++ b/graphics/radiance/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2005/04/11 21:46:09 tv Exp $
+# $NetBSD: Makefile,v 1.8 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= rad3R6P1
@@ -14,7 +14,6 @@ HOMEPAGE= http://www.radiance-online.org/
COMMENT= Physically-based, image-generating, backward raytracer
WRKSRC= ${WRKDIR}/ray
-USE_X11= YES
LICENSE= radiance-license
diff --git a/graphics/ruby-RMagick/Makefile b/graphics/ruby-RMagick/Makefile
index f612bdde009..6a445d9421e 100644
--- a/graphics/ruby-RMagick/Makefile
+++ b/graphics/ruby-RMagick/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2005/05/28 03:01:20 taca Exp $
+# $NetBSD: Makefile,v 1.5 2005/06/01 18:02:57 jlam Exp $
DISTNAME= RMagick-1.8.1
PKGNAME= ${RUBY_PKGPREFIX}-${DISTNAME}
@@ -13,7 +13,6 @@ RUBY_VERSION_SUPPORTED= 18 # build error with Ruby 1.6.8
RUBY_HAS_ARCHLIB= yes
GNU_CONFIGURE= yes
USE_GHOSTSCRIPT= build
-USE_X11= yes
CONFIGURE_ARGS+= --with-doc-dir=${RUBY_DOCDIR}/RMagick
CONFIGURE_ARGS+= --without-graphics-magick
@@ -24,6 +23,7 @@ post-install:
${PAX} -rw -pp -pm . ${RUBY_EXAMPLESDIR}/RMagick
.include "../../graphics/ImageMagick/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../lang/ruby/modules.mk"
.include "../../mk/ghostscript.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/ruby-imlib2/Makefile b/graphics/ruby-imlib2/Makefile
index 63b511f9b8a..08cf323e16e 100644
--- a/graphics/ruby-imlib2/Makefile
+++ b/graphics/ruby-imlib2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2005/06/01 03:36:47 taca Exp $
+# $NetBSD: Makefile,v 1.4 2005/06/01 18:02:57 jlam Exp $
DISTNAME= imlib2-ruby-${VER}
PKGNAME= ${RUBY_PKGPREFIX}-imlib2-${VER}
@@ -16,7 +16,6 @@ REPLACE_RUBY_DIRS= ${WRKSRC}/examples
RUBY_HAS_ARCHLIB= yes
RUBY_REQD= 1.8.0
USE_RUBY_EXTCONF= yes
-USE_X11= yes
INSTALL_TARGET= site-install
@@ -27,6 +26,8 @@ BUILDLINK_DEPENDS.imlib2+= imlib2>=1.2.0nb2
DOCS= AUTHORS COPYING ChangeLog README TODO
+.include "../../mk/x11.buildlink3.mk"
+
post-install:
${INSTALL_DATA_DIR} ${RUBY_EXAMPLESDIR}/imlib2
cd ${WRKSRC}/examples && ${PAX} -rw -pp -pm . ${RUBY_EXAMPLESDIR}/imlib2
diff --git a/graphics/ruby-opengl/Makefile b/graphics/ruby-opengl/Makefile
index 8cc07cf09e5..2d590e45eac 100644
--- a/graphics/ruby-opengl/Makefile
+++ b/graphics/ruby-opengl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2005/04/11 21:46:09 tv Exp $
+# $NetBSD: Makefile,v 1.21 2005/06/01 18:02:57 jlam Exp $
DISTNAME= rbogl-${VERSION}
PKGNAME= ${RUBY_PKGPREFIX}-opengl-${VERSION}
@@ -12,7 +12,6 @@ COMMENT= OpenGL/GLU/GLUT interface modules for Ruby
RUBY_HAS_ARCHLIB= yes
USE_RUBY_EXTCONF= yes
-USE_X11= yes
WRKSRC= ${WRKDIR}/opengl-${VERSION}
VERSION= 0.32f
INSTALL_TARGET= site-install
@@ -27,5 +26,6 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/README.EUC ${RUBY_DOCDIR}/opengl/README.ja
.include "../../graphics/Mesa/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../lang/ruby/modules.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/scigraphica/Makefile b/graphics/scigraphica/Makefile
index 62653efc092..9929cbcc520 100644
--- a/graphics/scigraphica/Makefile
+++ b/graphics/scigraphica/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2005/05/22 20:08:07 jlam Exp $
+# $NetBSD: Makefile,v 1.31 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= scigraphica-0.8.0
@@ -11,7 +11,6 @@ HOMEPAGE= http://scigraphica.sourceforge.net/
COMMENT= Data analysis and technical graphics
USE_DIRS+= gnome1-1.5
-USE_X11= YES
USE_TOOLS+= gmake
USE_GNU_READLINE= YES
diff --git a/graphics/scrot/Makefile b/graphics/scrot/Makefile
index 172273c4752..b8a8fd85650 100644
--- a/graphics/scrot/Makefile
+++ b/graphics/scrot/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2005/04/11 21:46:09 tv Exp $
+# $NetBSD: Makefile,v 1.16 2005/06/01 18:02:57 jlam Exp $
DISTNAME= scrot-0.8
PKGREVISION= 6
@@ -10,8 +10,8 @@ HOMEPAGE= http://linuxbrit.co.uk/scrot/
COMMENT= Commandline screen capture util like "import", but using imlib2
GNU_CONFIGURE= YES
-USE_X11= YES
.include "../../devel/giblib/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/skencil/Makefile b/graphics/skencil/Makefile
index 084be70ecac..32b10609591 100644
--- a/graphics/skencil/Makefile
+++ b/graphics/skencil/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2005/05/26 02:52:47 markd Exp $
+# $NetBSD: Makefile,v 1.6 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= skencil-0.6.16
@@ -10,8 +10,6 @@ MAINTAINER= uebayasi@NetBSD.org
HOMEPAGE= http://sketch.sourceforge.net/
COMMENT= Interactive drawing program
-USE_X11= YES
-
PYTHON_PATCH_SCRIPTS= sk2ppm.py sk2ps.py skconvert.py skencil.py skshow.py
SK_CONF_ARGS= --imaging-include=${BUILDLINK_PREFIX.pyimaging}/${PYINC}/PIL
SK_TKFLAGS= -L${BUILDLINK_PREFIX.tk}/lib -R${BUILDLINK_PREFIX.tk}/lib -ltk -ltcl
diff --git a/graphics/sodipodi/Makefile b/graphics/sodipodi/Makefile
index e7f9a6d0842..09df2ebfbba 100644
--- a/graphics/sodipodi/Makefile
+++ b/graphics/sodipodi/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2005/05/22 20:08:07 jlam Exp $
+# $NetBSD: Makefile,v 1.30 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= sodipodi-0.34
@@ -15,7 +15,6 @@ USE_DIRS+= gnome2-1.5
USE_PKGLOCALEDIR= YES
USE_TOOLS+= gmake
USE_LIBTOOL= YES
-USE_X11= YES
REPLACE_PERL= extensions/*.pl
diff --git a/graphics/tuxpaint-config/Makefile b/graphics/tuxpaint-config/Makefile
index 5525aa62e2b..c3fb5320c71 100644
--- a/graphics/tuxpaint-config/Makefile
+++ b/graphics/tuxpaint-config/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2005/05/22 20:08:07 jlam Exp $
+# $NetBSD: Makefile,v 1.5 2005/06/01 18:02:57 jlam Exp $
#
DISTNAME= tuxpaint-config-0.0.5
@@ -10,7 +10,6 @@ HOMEPAGE= ftp://ftp.sonic.net/pub/users/nbs/unix/x/tuxpaint/config/
COMMENT= Configuration program for tuxpaint
USE_TOOLS+= gmake
-USE_X11= YES
post-install:
-${FIND} ${PREFIX}/share/tuxpaint-config -name CVS -exec ${RM} -r {} \; 2>/dev/null
diff --git a/graphics/urt/Makefile b/graphics/urt/Makefile
index 34299ad56fa..8d6f1823c8a 100644
--- a/graphics/urt/Makefile
+++ b/graphics/urt/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2005/04/11 21:46:10 tv Exp $
+# $NetBSD: Makefile,v 1.39 2005/06/01 18:02:58 jlam Exp $
DISTNAME= urt
PKGNAME= urt-3.1b1
@@ -18,7 +18,6 @@ EXTRACT_ONLY= urt-3.1b.tar.Z
WRKSRC= ${WRKDIR}
USE_LIBTOOL= yes
-USE_X11= yes
CONFIGURE_SCRIPT=./Configure
CONFIGURE_ARGS= config/urt
HAS_CONFIGURE= yes
@@ -39,4 +38,5 @@ post-install:
${FIND} . -type f -exec ${CHMOD} 644 '{}' \;)
.include "../../graphics/netpbm/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/vcg/Makefile b/graphics/vcg/Makefile
index 3874c3e9168..d726593f023 100644
--- a/graphics/vcg/Makefile
+++ b/graphics/vcg/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2005/03/24 21:12:55 wiz Exp $
+# $NetBSD: Makefile,v 1.9 2005/06/01 18:02:58 jlam Exp $
DISTNAME= vcg.1.30.r3.17
PKGNAME= vcg-1.30
@@ -12,6 +12,8 @@ COMMENT= Visualization Tool for compiler graphs
WRKSRC= ${WRKDIR}/vcg.1.30
USE_X11BASE= yes
+.include "../../mk/x11.buildlink3.mk"
+
pre-patch:
@${MKDIR} ${WRKSRC}/preconf/X11ccNetBSD
@${CP} ${FILESDIR}/conf ${WRKSRC}/preconf/X11ccNetBSD
diff --git a/graphics/vtk/Makefile b/graphics/vtk/Makefile
index e987cf17ecf..882759c7f15 100644
--- a/graphics/vtk/Makefile
+++ b/graphics/vtk/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2004/10/03 00:14:58 tv Exp $
+# $NetBSD: Makefile,v 1.4 2005/06/01 18:02:58 jlam Exp $
#
PKGNAME= vtk-${VTKDIST_VERSION}
@@ -6,9 +6,8 @@ PKGREVISION= 1
COMMENT= Visualization toolkit
-USE_X11= yes
-
.include "../../graphics/MesaLib/buildlink3.mk"
.include "../../graphics/glu/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../graphics/vtk/Makefile.vtkdist"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/x11rec/Makefile b/graphics/x11rec/Makefile
index 889204d554e..9a2a6830734 100644
--- a/graphics/x11rec/Makefile
+++ b/graphics/x11rec/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2005/05/05 20:03:55 xtraeme Exp $
+# $NetBSD: Makefile,v 1.2 2005/06/01 18:02:58 jlam Exp $
#
DISTNAME= x11rec-0.3
@@ -11,7 +11,6 @@ COMMENT= Very ad hoc X11 recorder which create a movie
DEPENDS+= gifsicle-[0-9]*:../../graphics/gifsicle
-USE_X11= yes
NO_BUILD= yes
REPLACE_RUBY= x11rec
@@ -25,6 +24,7 @@ do-install:
${PREFIX}/share/doc/html/x11rec/index.html.ja
.include "../../graphics/ImageMagick/buildlink3.mk"
+.include "../../mk/x11.buildlink3.mk"
.include "../../lang/ruby/modules.mk"
SUBST_CLASSES+= toolpath
diff --git a/graphics/xplot/Makefile b/graphics/xplot/Makefile
index 84baed32ece..bf98424096f 100644
--- a/graphics/xplot/Makefile
+++ b/graphics/xplot/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2003/10/18 13:08:49 cjep Exp $
+# $NetBSD: Makefile,v 1.19 2005/06/01 18:02:58 jlam Exp $
DISTNAME= xplot-0.90.7.1
PKGREVISION= 1
@@ -16,6 +16,8 @@ DOCFILES= ANNOUNCE README README.tcp_plots
# demo.? removed from interim .7.1 version
# demo.0 demo.1 demo.2 demo.3 demo.4 demo.5 demo.6 demo.7
+.include "../../mk/x11.buildlink3.mk"
+
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/xplot
.for file in ${DOCFILES}
diff --git a/graphics/xpm/Makefile b/graphics/xpm/Makefile
index a471fcbb103..3d7ea9a63d2 100644
--- a/graphics/xpm/Makefile
+++ b/graphics/xpm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2005/04/11 21:46:10 tv Exp $
+# $NetBSD: Makefile,v 1.41 2005/06/01 18:02:58 jlam Exp $
DISTNAME= xpm-3.4k
PKGREVISION= 3
@@ -14,13 +14,6 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_IMAKE= # defined
-CHECK_BUILTIN.xpm= yes
-.include "builtin.mk"
-
-.if !empty(IS_BUILTIN.xpm:M[yY][eE][sS])
-PKG_SKIP_REASON= "${PKGBASE} is part of your X11 distribution"
-.endif
-
.if ${OPSYS} == "SunOS"
post-install:
cd ${PREFIX}/lib && \
diff --git a/graphics/xpm/buildlink3.mk b/graphics/xpm/buildlink3.mk
index a65009e8ee6..10cbdc9ebb2 100644
--- a/graphics/xpm/buildlink3.mk
+++ b/graphics/xpm/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.16 2004/09/16 15:09:01 minskim Exp $
+# $NetBSD: buildlink3.mk,v 1.17 2005/06/01 18:02:58 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
XPM_BUILDLINK3_MK:= ${XPM_BUILDLINK3_MK}+
@@ -14,9 +14,8 @@ BUILDLINK_PACKAGES+= xpm
BUILDLINK_DEPENDS.xpm+= xpm>=3.4k
BUILDLINK_RECOMMENDED.xpm?= xpm>=3.4knb2
BUILDLINK_PKGSRCDIR.xpm?= ../../graphics/xpm
-
-USE_X11= yes
-
.endif # XPM_BUILDLINK3_MK
+.include "../../mk/x11.buildlink3.mk"
+
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/graphics/xpm/builtin-imake.mk b/graphics/xpm/builtin-imake.mk
new file mode 100644
index 00000000000..b4ac4fdec4c
--- /dev/null
+++ b/graphics/xpm/builtin-imake.mk
@@ -0,0 +1,12 @@
+XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:58 jlam Exp $
+
+/*
+ * Check the value of NormalLibXpm for the presence of Xpm
+ * in the X11 distribution.
+ */
+builtin-test:
+#if NormalLibXpm
+ @echo yes
+#else
+ @echo no
+#endif
diff --git a/graphics/xpm/builtin.mk b/graphics/xpm/builtin.mk
index e6d3f83bc6c..5f81e3a1621 100644
--- a/graphics/xpm/builtin.mk
+++ b/graphics/xpm/builtin.mk
@@ -1,69 +1,100 @@
-# $NetBSD: builtin.mk,v 1.4 2004/05/20 11:25:57 grant Exp $
+# $NetBSD: builtin.mk,v 1.5 2005/06/01 18:02:58 jlam Exp $
-.include "../../mk/bsd.prefs.mk"
+BUILTIN_PKG:= xpm
-_X11_XPM_H= ${X11BASE}/include/X11/xpm.h
-_X11_TMPL= ${X11BASE}/lib/X11/config/X11.tmpl
+BUILTIN_FIND_FILES_VAR:= H_XPM
+BUILTIN_FIND_FILES.H_XPM= ${X11BASE}/include/X11/xpm.h
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
.if !defined(IS_BUILTIN.xpm)
-IS_BUILTIN.xpm= no
-. if exists(${_X11_XPM_H})
-. if !empty(X11BASE:M*openwin)
+IS_BUILTIN.xpm= no
+. if exists(${H_XPM})
+. if !empty(X11BASE:M*openwin) && exists(/usr/sbin/pkgchk)
IS_BUILTIN.xpm!= \
if /usr/sbin/pkgchk -l SUNWxwinc | ${GREP} -q xpm.h; then \
- ${ECHO} "yes"; \
+ ${ECHO} yes; \
else \
- ${ECHO} "no"; \
+ ${ECHO} no; \
fi
. elif ${OPSYS} == "IRIX"
-IS_BUILTIN.xpm= yes
-. elif exists(${_X11_TMPL})
-IS_BUILTIN.xpm!= \
- if ${GREP} -q NormalLibXpm ${_X11_TMPL}; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
+IS_BUILTIN.xpm= yes
. else
-IS_BUILTIN.xpm= no
+PKGSRC_USE_TOOLS+= imake # XXX
+IMAKE?= ${X11BASE}/bin/imake # XXX
+. if defined(IMAKE) && exists(${IMAKE})
+IS_BUILTIN.xpm!= \
+ ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
+ -f ${BUILDLINK_PKGSRCDIR.xpm}/builtin-imake.mk \
+ -s - | \
+ ${MAKE} -f - builtin-test
+. endif
. endif
. endif
-. if !empty(IS_BUILTIN.xpm:M[yY][eE][sS])
-#
-# Create an appropriate package name for the built-in xpm distributed
-# with the system. This package name can be used to check against
-# BUILDLINK_DEPENDS.<pkg> to see if we need to install the pkgsrc version
-# or if the built-in one is sufficient.
-#
-_XPM_MAJOR!= \
- ${AWK} '/\#define[ ]*XpmFormat/ { print $$3 }' ${_X11_XPM_H}
-_XPM_MINOR!= \
- ${AWK} '/\#define[ ]*XpmVersion/ { print "."$$3 }' ${_X11_XPM_H}
-_XPM_PATCH!= \
- ${AWK} 'BEGIN { split("abcdefghijklmnopqrstuvwxyz", alpha, "") } /\#define[ ]*XpmRevision/ { print alpha[$$3] }' ${_X11_XPM_H}
-_XPM_VERSION= ${_XPM_MAJOR}${_XPM_MINOR}${_XPM_PATCH}
-BUILTIN_PKG.xpm= xpm-${_XPM_VERSION}
-BUILDLINK_VARS+= BUILTIN_PKG.xpm
-. endif
-BUILDLINK_VARS+= IS_BUILTIN.xpm
-.endif # IS_BUILTIN.xpm
+.endif
+MAKEVARS+= IS_BUILTIN.xpm
-.if !defined(USE_BUILTIN.xpm)
-USE_BUILTIN.xpm?= ${IS_BUILTIN.xpm}
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.xpm) && \
+ !empty(IS_BUILTIN.xpm:M[yY][eE][sS]) && \
+ exists(${H_XPM})
+BUILTIN_VERSION.xpm!= \
+ ${AWK} 'BEGIN { split("abcdefghijklmnopqrstuvwxyz", alpha, ""); \
+ p = ".0" } \
+ /\#define[ ]*XpmFormat/ { M = $$3 } \
+ /\#define[ ]*XpmVersion/ { m = "."$$3 } \
+ /\#define[ ]*XpmRevision/ { p = alpha[$$3] } \
+ END { printf "%s%s%s\n", M, m, p }' \
+ ${H_XPM}
+BUILTIN_PKG.xpm= xpm-${BUILTIN_VERSION.xpm}
+.endif
+MAKEVARS+= BUILTIN_PKG.xpm
-. if defined(BUILTIN_PKG.xpm)
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.xpm)
+. if ${PREFER.xpm} == "pkgsrc"
+USE_BUILTIN.xpm= no
+. else
+USE_BUILTIN.xpm= ${IS_BUILTIN.xpm}
+. if defined(BUILTIN_PKG.xpm) && \
+ !empty(IS_BUILTIN.xpm:M[yY][eE][sS])
USE_BUILTIN.xpm= yes
-. if !empty(USE_BUILTIN.xpm:M[yY][eE][sS])
+. for _dep_ in ${BUILDLINK_DEPENDS.xpm}
+. if !empty(USE_BUILTIN.xpm:M[yY][eE][sS])
USE_BUILTIN.xpm!= \
- if ${PKG_ADMIN} pmatch 'xpm>=3.4' ${BUILTIN_PKG.xpm}; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.xpm:Q}; then \
+ ${ECHO} yes; \
+ else \
+ ${ECHO} no; \
+ fi
+. endif
+. endfor
. endif
-. endif
-.endif # USE_BUILTIN.xpm
+. endif # PREFER.xpm
+.endif
+MAKEVARS+= USE_BUILTIN.xpm
-.if !empty(USE_BUILTIN.xpm:M[yY][eE][sS])
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
+CHECK_BUILTIN.xpm?= no
+.if !empty(CHECK_BUILTIN.xpm:M[nN][oO])
+
+. if !empty(USE_BUILTIN.xpm:M[yY][eE][sS])
BUILDLINK_PREFIX.xpm= ${X11BASE}
-.endif
+. include "../../mk/x11.buildlink3.mk"
+. include "../../mk/x11.builtin.mk"
+. endif
+
+.endif # CHECK_BUILTIN.xpm
diff --git a/graphics/xsane/Makefile b/graphics/xsane/Makefile
index 2ef2620c31d..761681f3368 100644
--- a/graphics/xsane/Makefile
+++ b/graphics/xsane/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.51 2005/05/22 20:08:08 jlam Exp $
+# $NetBSD: Makefile,v 1.52 2005/06/01 18:02:58 jlam Exp $
DISTNAME= xsane-0.96
PKGREVISION= 1
@@ -21,7 +21,6 @@ BUILD_USES_MSGFMT= yes
USE_TOOLS+= gmake
USE_PKGLOCALEDIR= YES
-USE_X11= YES
GNU_CONFIGURE= YES
.include "../../devel/gettext-lib/buildlink3.mk"