summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-08-01 21:40:19 +0000
committerjlam <jlam@pkgsrc.org>2006-08-01 21:40:19 +0000
commit396fe8e4c88f5a952574e3118cfdc3932d0bc247 (patch)
tree73431f86ad963ea226431316d9e99d95b7beb0c3 /graphics
parent74239163b54830b0c5ea219978322486b1ab12bb (diff)
downloadpkgsrc-396fe8e4c88f5a952574e3118cfdc3932d0bc247.tar.gz
Split Mesa/Makefile.common into Makefile.common and Makefile.lib.
The latter is used by packages that build libraries from the Mesa sources, while the former is only if the package builds from the Mesa sources. Modify the various Mesa packages to include the proper Makefile, and add some documentation to the Makefiles. As a side effect, this suppresses the "duplicate target" warning in graphics/glx-utils that was caused by having the same distfile listed in DISTFILES more than once.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/Mesa/Makefile.common68
-rw-r--r--graphics/Mesa/Makefile.lib52
-rw-r--r--graphics/MesaDemos/Makefile20
-rw-r--r--graphics/MesaLib/Makefile4
-rw-r--r--graphics/glu/Makefile8
-rw-r--r--graphics/glut/Makefile8
-rw-r--r--graphics/glx-utils/Makefile15
7 files changed, 95 insertions, 80 deletions
diff --git a/graphics/Mesa/Makefile.common b/graphics/Mesa/Makefile.common
index 72bca810b9e..33d1b0f2d7d 100644
--- a/graphics/Mesa/Makefile.common
+++ b/graphics/Mesa/Makefile.common
@@ -1,63 +1,29 @@
-# $NetBSD: Makefile.common,v 1.51 2006/07/06 14:12:31 markd Exp $
+# $NetBSD: Makefile.common,v 1.52 2006/08/01 21:40:19 jlam Exp $
+#
+# This Makefile fragment is included either directly or indirectly (through
+# Makefile.lib) by all packages that are built from the Mesa sources.
+#
-DISTNAME= MesaLib-${MESA_VERSION}
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
-DISTFILES+= ${DISTNAME:S/MesaLib/MesaGLUT/}${EXTRACT_SUFX}
-DISTFILES+= ${DISTNAME:S/MesaLib/MesaDemos/}${EXTRACT_SUFX}
-WRKSRC= ${WRKDIR}/${DISTNAME:S/Lib//}
+DISTNAME?= MesaLib-${MESA_VERSION}
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
EXTRACT_SUFX= .tar.bz2
-# When changing this version, please update distinfo in graphics/glx-utils
+# When changing this version, please run "make distinfo" in the following
+# package directories:
+#
+# graphics/MesaLib
+# graphics/MesaDemos
+# graphics/glx-utils
+#
MESA_VERSION= 6.4.2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.mesa3d.org/
-PKG_INSTALLATION_TYPES= overwrite pkgviews
+WRKSRC= ${WRKDIR}/Mesa-${MESA_VERSION}
+BUILDING_MESA= yes
+NO_CONFIGURE= yes
+DIST_SUBDIR= Mesa-${MESA_VERSION}
-USE_LANGUAGES= c c++
-USE_LIBTOOL= yes
-USE_TOOLS+= makedepend
-
-BUILDING_MESA= yes
-NO_CONFIGURE= yes
-DIST_SUBDIR= Mesa-${MESA_VERSION}
-PATCHDIR?= ${.CURDIR}/../MesaLib/patches
-DISTINFO_FILE?= ${.CURDIR}/../MesaLib/distinfo
-
-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"
-. if ${MACHINE_ARCH} == "sparc"
-. if !empty(PKGSRC_COMPILER:Msunpro)
-BUILD_TARGET= sunos5
-. else
-BUILD_TARGET= sunos5-gcc
-. endif
-. else # i386
-BUILD_TARGET= pkgsrc
-. endif
-.elif ${OPSYS} == "Interix"
-BUILD_TARGET= interix3
-.else
-BUILD_TARGET= pkgsrc
-.endif
-
-INSTLIBS?= ""
-
-pre-install:
- @if [ -n "${INSTLIBS}" ]; then \
- ${ECHO_MSG} "Installing libraries."; \
- ${INSTALL_LIB_DIR} ${PREFIX}/lib; \
- for lib in ${INSTLIBS}; do \
- ${LIBTOOL} --mode=install ${INSTALL_LIB} \
- $${lib} ${PREFIX}/lib; \
- done; \
- fi
diff --git a/graphics/Mesa/Makefile.lib b/graphics/Mesa/Makefile.lib
new file mode 100644
index 00000000000..4aeb06e573a
--- /dev/null
+++ b/graphics/Mesa/Makefile.lib
@@ -0,0 +1,52 @@
+# $NetBSD: Makefile.lib,v 1.1 2006/08/01 21:40:19 jlam Exp $
+#
+# This Makefile fragment is included by all packages that build libraries
+# from the Mesa sources.
+#
+
+.include "../../graphics/Mesa/Makefile.common"
+
+DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX}
+DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX}
+DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX}
+
+PKG_INSTALLATION_TYPES= overwrite pkgviews
+
+USE_LANGUAGES= c c++
+USE_LIBTOOL= yes
+USE_TOOLS+= makedepend
+
+PATCHDIR= ${.CURDIR}/../MesaLib/patches
+DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo
+
+INSTALLATION_DIRS+= lib
+
+.include "../../mk/compiler.mk"
+.include "../../mk/bsd.prefs.mk"
+
+# Mesa has proper support for Solaris and SunPro, use it.
+.if ${OPSYS} == "SunOS"
+. if ${MACHINE_ARCH} == "sparc"
+. if !empty(PKGSRC_COMPILER:Msunpro)
+BUILD_TARGET= sunos5
+. else
+BUILD_TARGET= sunos5-gcc
+. endif
+. else # i386
+BUILD_TARGET= pkgsrc
+. endif
+.elif ${OPSYS} == "Interix"
+BUILD_TARGET= interix3
+.else
+BUILD_TARGET= pkgsrc
+.endif
+
+.PHONY: Mesa-install-libs
+pre-install: Mesa-install-libs
+Mesa-install-libs:
+ @${TEST} -z ${INSTLIBS:M*:Q}"" || ${ECHO_MSG} "Installing libraries."
+ @for lib in "" ${INSTLIBS}; do \
+ ${TEST} -n "$$lib" || continue; \
+ ${LIBTOOL} --mode=install ${INSTALL_LIB} \
+ $$lib ${PREFIX}/lib; \
+ done
diff --git a/graphics/MesaDemos/Makefile b/graphics/MesaDemos/Makefile
index 78712c8031a..881bc5baa32 100644
--- a/graphics/MesaDemos/Makefile
+++ b/graphics/MesaDemos/Makefile
@@ -1,16 +1,21 @@
-# $NetBSD: Makefile,v 1.26 2006/02/09 12:27:42 adam Exp $
+# $NetBSD: Makefile,v 1.27 2006/08/01 21:40:19 jlam Exp $
PKGNAME= MesaDemos-${MESA_VERSION}
COMMENT= OpenGL examples and Demos
-PATCHDIR= ${.CURDIR}/patches
-DISTINFO_FILE= ${.CURDIR}/distinfo
+# We include Makefile.lib instead of Makefile.common since we actually
+# build the Mesa libraries as part of the build process, even though we
+# don't install them.
+#
+.include "../../graphics/Mesa/Makefile.lib"
-.include "../../graphics/Mesa/Makefile.common"
+PATCHDIR= ${.CURDIR}/patches
+DISTINFO_FILE= ${.CURDIR}/distinfo
-USE_LANGUAGES= c c++
-USE_TOOLS+= gmake
-MAKE_FLAGS+= LIB_DEP=""
+USE_TOOLS+= gmake
+MAKE_FLAGS+= LIB_DEP=""
+
+.include "../../graphics/Mesa/buildlink3.mk"
pre-build:
cd ${WRKSRC} && ${RM} -fr src
@@ -27,5 +32,4 @@ do-install:
-rw . ${PREFIX}/share/examples/${PKGNAME_NOREV}/${dir}
${CHMOD} -R a+rX ${PREFIX}/share/examples/${PKGNAME_NOREV}
-.include "../../graphics/Mesa/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile
index a110687bacc..c04dbed36a3 100644
--- a/graphics/MesaLib/Makefile
+++ b/graphics/MesaLib/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.49 2006/07/21 14:27:56 jlam Exp $
+# $NetBSD: Makefile,v 1.50 2006/08/01 21:40:20 jlam Exp $
PKGNAME= MesaLib-${MESA_VERSION}
PKGREVISION= 2
COMMENT= Graphics library similar to SGI's OpenGL
-.include "../../graphics/Mesa/Makefile.common"
+.include "../../graphics/Mesa/Makefile.lib"
INSTLIBS= ${WRKSRC}/src/mesa/libGL.la \
${WRKSRC}/src/glw/libGLw.la \
diff --git a/graphics/glu/Makefile b/graphics/glu/Makefile
index 7678e65ee00..86f76cb6240 100644
--- a/graphics/glu/Makefile
+++ b/graphics/glu/Makefile
@@ -1,14 +1,12 @@
-# $NetBSD: Makefile,v 1.46 2006/05/08 17:22:51 hira Exp $
+# $NetBSD: Makefile,v 1.47 2006/08/01 21:40:20 jlam Exp $
-PKGNAME= ${DISTNAME:C/MesaLib/glu/}
+PKGNAME= glu-${MESA_VERSION}
COMMENT= GLU polygon tessellation facility for Mesa
CONFLICTS+= Mesa-glx-[0-9]*
CONFLICTS+= Mesa<3.2.1
-USE_LANGUAGES= c c++
-
-.include "../../graphics/Mesa/Makefile.common"
+.include "../../graphics/Mesa/Makefile.lib"
INSTLIBS= ${WRKSRC}/src/glu/sgi/libGLU.la
diff --git a/graphics/glut/Makefile b/graphics/glut/Makefile
index 541b1291d98..94264deebc6 100644
--- a/graphics/glut/Makefile
+++ b/graphics/glut/Makefile
@@ -1,15 +1,15 @@
-# $NetBSD: Makefile,v 1.44 2006/04/06 06:22:02 reed Exp $
+# $NetBSD: Makefile,v 1.45 2006/08/01 21:40:20 jlam Exp $
-PKGNAME= ${DISTNAME:S/MesaLib/glut/}
+PKGNAME= glut-${MESA_VERSION}
COMMENT= GLUT Graphics library similar to SGI's OpenGL
CONFLICTS+= Mesa-glx-[0-9]*
CONFLICTS+= Mesa<3.2.1
-.include "../../graphics/Mesa/Makefile.common"
+.include "../../graphics/Mesa/Makefile.lib"
BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=${MESA_VERSION}
-BUILDLINK_API_DEPENDS.glu+= glu>=${MESA_VERSION}
+BUILDLINK_API_DEPENDS.glu+= glu>=${MESA_VERSION}
INSTLIBS= ${WRKSRC}/src/glut/glx/libglut.la
diff --git a/graphics/glx-utils/Makefile b/graphics/glx-utils/Makefile
index e20af30c414..ce0f59afa0f 100644
--- a/graphics/glx-utils/Makefile
+++ b/graphics/glx-utils/Makefile
@@ -1,19 +1,17 @@
-# $NetBSD: Makefile,v 1.1.1.1 2006/06/13 23:44:09 reed Exp $
+# $NetBSD: Makefile,v 1.2 2006/08/01 21:40:20 jlam Exp $
+DISTNAME= MesaDemos-${MESA_VERSION}
PKGNAME= glx-utils-${MESA_VERSION}
CATEGORIES= x11 graphics
COMMENT= OpenGL glxgears and glxinfo
-PATCHDIR= ${.CURDIR}/patches
-DISTINFO_FILE= ${.CURDIR}/distinfo
-
.include "../../graphics/Mesa/Makefile.common"
-DISTNAME= MesaDemos-${MESA_VERSION}
-WRKSRC= ${WRKDIR}/Mesa-${MESA_VERSION}
-USE_LANGUAGES= c c++
INSTALLATION_DIRS= bin
+.include "../../graphics/glu/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+
do-build:
cd ${WRKSRC}/progs/xdemos && \
${SETENV} ${MAKE_ENV} ${CC} -I../../include ${CFLAGS} \
@@ -28,7 +26,4 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/progs/xdemos/glxgears ${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/progs/xdemos/glxinfo ${PREFIX}/bin/
-.include "../../graphics/glu/buildlink3.mk"
-.include "../../graphics/MesaLib/buildlink3.mk"
-
.include "../../mk/bsd.pkg.mk"