pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics Split Mesa/Makefile.common into Makefile.comm...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/433ec8ed32ee
branches:  trunk
changeset: 516949:433ec8ed32ee
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Aug 01 21:40:19 2006 +0000

description:
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:

 graphics/Mesa/Makefile.common |  70 +++++++++++-------------------------------
 graphics/Mesa/Makefile.lib    |  52 +++++++++++++++++++++++++++++++
 graphics/MesaDemos/Makefile   |  20 +++++++----
 graphics/MesaLib/Makefile     |   4 +-
 graphics/glu/Makefile         |   8 +---
 graphics/glut/Makefile        |   8 ++--
 graphics/glx-utils/Makefile   |  17 +++------
 7 files changed, 97 insertions(+), 82 deletions(-)

diffs (275 lines):

diff -r cfded4cc7d40 -r 433ec8ed32ee graphics/Mesa/Makefile.common
--- a/graphics/Mesa/Makefile.common     Tue Aug 01 20:26:12 2006 +0000
+++ b/graphics/Mesa/Makefile.common     Tue Aug 01 21:40:19 2006 +0000
@@ -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@localhost
 HOMEPAGE=      http://www.mesa3d.org/
 
-PKG_INSTALLATION_TYPES=        overwrite pkgviews
-
-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"
+WRKSRC=                ${WRKDIR}/Mesa-${MESA_VERSION}
+BUILDING_MESA= yes
+NO_CONFIGURE=  yes
+DIST_SUBDIR=   Mesa-${MESA_VERSION}
 
-# 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
+.include "../../mk/x11.buildlink3.mk"
diff -r cfded4cc7d40 -r 433ec8ed32ee graphics/Mesa/Makefile.lib
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/Mesa/Makefile.lib        Tue Aug 01 21:40:19 2006 +0000
@@ -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 -r cfded4cc7d40 -r 433ec8ed32ee graphics/MesaDemos/Makefile
--- a/graphics/MesaDemos/Makefile       Tue Aug 01 20:26:12 2006 +0000
+++ b/graphics/MesaDemos/Makefile       Tue Aug 01 21:40:19 2006 +0000
@@ -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 @@
                -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 -r cfded4cc7d40 -r 433ec8ed32ee graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile Tue Aug 01 20:26:12 2006 +0000
+++ b/graphics/MesaLib/Makefile Tue Aug 01 21:40:19 2006 +0000
@@ -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 -r cfded4cc7d40 -r 433ec8ed32ee graphics/glu/Makefile
--- a/graphics/glu/Makefile     Tue Aug 01 20:26:12 2006 +0000
+++ b/graphics/glu/Makefile     Tue Aug 01 21:40:19 2006 +0000
@@ -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 -r cfded4cc7d40 -r 433ec8ed32ee graphics/glut/Makefile
--- a/graphics/glut/Makefile    Tue Aug 01 20:26:12 2006 +0000
+++ b/graphics/glut/Makefile    Tue Aug 01 21:40:19 2006 +0000
@@ -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 -r cfded4cc7d40 -r 433ec8ed32ee graphics/glx-utils/Makefile
--- a/graphics/glx-utils/Makefile       Tue Aug 01 20:26:12 2006 +0000
+++ b/graphics/glx-utils/Makefile       Tue Aug 01 21:40:19 2006 +0000
@@ -1,18 +1,16 @@
-# $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"
 
-.include "../../graphics/Mesa/Makefile.common"
-DISTNAME=      MesaDemos-${MESA_VERSION}
-WRKSRC=                ${WRKDIR}/Mesa-${MESA_VERSION}
+INSTALLATION_DIRS=     bin
 
-USE_LANGUAGES=         c c++
-INSTALLATION_DIRS=     bin
+.include "../../graphics/glu/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
 
 do-build:
        cd ${WRKSRC}/progs/xdemos && \
@@ -28,7 +26,4 @@
        ${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"



Home | Main Index | Thread Index | Old Index