summaryrefslogtreecommitdiff
path: root/graphics/Mesa
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
commitdcba9d8f221a3690cd0f944dae6b28e39a8e4116 (patch)
tree73431f86ad963ea226431316d9e99d95b7beb0c3 /graphics/Mesa
parent766ab0f252f9c664f6058316b647a51d7b7e8807 (diff)
downloadpkgsrc-dcba9d8f221a3690cd0f944dae6b28e39a8e4116.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/Mesa')
-rw-r--r--graphics/Mesa/Makefile.common68
-rw-r--r--graphics/Mesa/Makefile.lib52
2 files changed, 69 insertions, 51 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