pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics Welcome to Mesa-7.0.3.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/216c78b54fe2
branches:  trunk
changeset: 541658:216c78b54fe2
user:      bjs <bjs%pkgsrc.org@localhost>
date:      Thu Apr 24 07:40:23 2008 +0000

description:
Welcome to Mesa-7.0.3.

Changes from 6.4.2 are (obviously) far too numerous to mention!  This
package brings with it support for the Direct Rendering Infrastructure
(DRI) on NetBSD-current; the kernel DRM was committed approximately
one year ago.  Patches for NetBSD 4.0 are available in the mailing list
archives (I think), but are _not supported_.

Developers and other interested parties are encouraged to read the TODO
file, as well as my remarks in options.mk.  There is still a significant
amount of work to be done.  Users of NetBSD/i386 (-current) shouldn't
have much trouble getting mainstream cards (Intel i915 and Radeon 9600-
R430 are by far the most tested) to work.

I have taken great pains to ensure that this works properly, but inevitably
there will be problems--especially on heretofore untested (read: non-x86)
hardware.  Your questions, comments, problem reports, and of course
bug fixes are welcome.

NOTE: There are currently problems (on NetBSD, at least) linking some
executables, e.g. compiz, due to unresolved symbols for libpthread
functions.  This is due to libX11's thread stubs, which should not
be enabled on NetBSD >= 2.0; see the TODO For more information
and the URL of an interim patch.

diffstat:

 graphics/Mesa/Makefile                           |    8 +-
 graphics/Mesa/Makefile.common                    |   20 +-
 graphics/Mesa/Makefile.lib                       |   82 ++++++-
 graphics/MesaLib/DESCR                           |    3 -
 graphics/MesaLib/Makefile                        |   82 +++++--
 graphics/MesaLib/PLIST                           |   27 ++-
 graphics/MesaLib/TODO                            |   47 ++++
 graphics/MesaLib/buildlink3.mk                   |   14 +-
 graphics/MesaLib/distinfo                        |   55 ++--
 graphics/MesaLib/dri.mk                          |   16 +
 graphics/MesaLib/files/configs/default           |   61 ++++++
 graphics/MesaLib/files/configs/interix3          |   12 +
 graphics/MesaLib/files/configs/pkgsrc            |   40 +++
 graphics/MesaLib/files/configs/pkgsrc-dri        |   40 +++
 graphics/MesaLib/files/configs/pkgsrc-dri-i386   |    9 +
 graphics/MesaLib/files/configs/pkgsrc-dri-x86_64 |    9 +
 graphics/MesaLib/files/configs/pkgsrc-i386       |    9 +
 graphics/MesaLib/files/configs/pkgsrc-indirect   |   39 +++
 graphics/MesaLib/files/configs/pkgsrc-x86_64     |    9 +
 graphics/MesaLib/files/configs/xcb-defs          |   15 +
 graphics/MesaLib/hacks.mk                        |   27 ++-
 graphics/MesaLib/options.mk                      |   79 +++++++
 graphics/MesaLib/patches/patch-aa                |    4 +-
 graphics/MesaLib/patches/patch-ab                |   35 ++-
 graphics/MesaLib/patches/patch-ac                |   40 ++-
 graphics/MesaLib/patches/patch-ad                |  176 ++++++++++++++--
 graphics/MesaLib/patches/patch-ae                |   50 +++-
 graphics/MesaLib/patches/patch-af                |   42 ++-
 graphics/MesaLib/patches/patch-ag                |   54 ++++-
 graphics/MesaLib/patches/patch-ah                |   65 +++--
 graphics/MesaLib/patches/patch-ai                |   75 ++++++-
 graphics/MesaLib/patches/patch-aj                |   46 ++--
 graphics/MesaLib/patches/patch-ak                |   35 +-
 graphics/MesaLib/patches/patch-al                |  231 +++++++++++-----------
 graphics/MesaLib/patches/patch-am                |   34 +--
 graphics/MesaLib/patches/patch-an                |   17 +
 graphics/MesaLib/patches/patch-ao                |   28 ++
 graphics/MesaLib/patches/patch-ap                |   63 ++++++
 graphics/MesaLib/patches/patch-aq                |   23 ++
 graphics/MesaLib/patches/patch-at                |   33 +++
 graphics/MesaLib/patches/patch-au                |   68 ++++++
 graphics/MesaLib/patches/patch-cb                |   19 +-
 graphics/glu/DESCR                               |   16 +-
 graphics/glu/Makefile                            |   18 +-
 graphics/glu/PLIST                               |    5 +-
 graphics/glu/buildlink3.mk                       |    5 +-
 graphics/glu/hacks.mk                            |    6 +
 graphics/glut/Makefile                           |   24 +-
 graphics/glut/PLIST                              |    5 +-
 graphics/glut/buildlink3.mk                      |    3 +-
 graphics/glut/hacks.mk                           |    6 +
 51 files changed, 1465 insertions(+), 464 deletions(-)

diffs (truncated from 3018 to 300 lines):

diff -r 92e3237f1601 -r 216c78b54fe2 graphics/Mesa/Makefile
--- a/graphics/Mesa/Makefile    Thu Apr 24 04:42:31 2008 +0000
+++ b/graphics/Mesa/Makefile    Thu Apr 24 07:40:23 2008 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.68 2007/10/25 22:00:45 jlam Exp $
+# $NetBSD: Makefile,v 1.69 2008/04/24 07:40:23 bjs Exp $
 
-PKGNAME=       Mesa-${MESA_VERSION}
+PKGNAME=       Mesa-${MESA_PKGVERSION}
 MASTER_SITES=  # empty
 DISTFILES=     # empty
 
@@ -9,10 +9,12 @@
 
 CONFLICTS=     Mesa-glx-[0-9]*
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 USE_LANGUAGES=         # empty
 NO_CHECKSUM=           yes
+NO_BUILD=              yes
 NO_CONFIGURE=          yes
-NO_BUILD=              yes
 EXTRACT_ONLY=          # empty
 PLIST_SRC=             # empty (meta-package)
 
diff -r 92e3237f1601 -r 216c78b54fe2 graphics/Mesa/Makefile.common
--- a/graphics/Mesa/Makefile.common     Thu Apr 24 04:42:31 2008 +0000
+++ b/graphics/Mesa/Makefile.common     Thu Apr 24 07:40:23 2008 +0000
@@ -1,13 +1,14 @@
-# $NetBSD: Makefile.common,v 1.57 2007/08/13 11:18:29 seb Exp $
+# $NetBSD: Makefile.common,v 1.58 2008/04/24 07:40:23 bjs Exp $
 #
 # This Makefile fragment is included either directly or indirectly (through
 # Makefile.lib) by all packages that are built from the Mesa sources.
 #
+# used by graphics/Mesa/Makefile.lib
 
 DISTNAME?=     MesaLib-${MESA_VERSION}
+EXTRACT_SUFX=  .tar.bz2
 CATEGORIES=    graphics
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
-EXTRACT_SUFX=  .tar.bz2
 
 # When changing this version, please run "make distinfo" in the following
 # package directories:
@@ -16,17 +17,18 @@
 #      graphics/MesaDemos
 #      graphics/glx-utils
 #
-MESA_VERSION=  6.4.2
+MESA_VERSION=          7.0.3
+MESA_PKGVERSION=       ${MESA_VERSION:S/-rc/rc/}
 
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      http://www.mesa3d.org/
+MAINTAINER=            bjs%NetBSD.org@localhost
+HOMEPAGE=              http://www.mesa3d.org/
 
 PKG_DESTDIR_SUPPORT=   user-destdir
 
-WRKSRC=                ${WRKDIR}/Mesa-${MESA_VERSION}
-BUILDING_MESA= yes
-NO_CONFIGURE=  yes
-DIST_SUBDIR=   Mesa-${MESA_VERSION}
+WRKSRC=                        ${WRKDIR}/Mesa-${MESA_VERSION}
+BUILDING_MESA=         yes
+NO_CONFIGURE=          yes
+DIST_SUBDIR=           Mesa-${MESA_VERSION}
 
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../x11/libXext/buildlink3.mk"
diff -r 92e3237f1601 -r 216c78b54fe2 graphics/Mesa/Makefile.lib
--- a/graphics/Mesa/Makefile.lib        Thu Apr 24 04:42:31 2008 +0000
+++ b/graphics/Mesa/Makefile.lib        Thu Apr 24 07:40:23 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.lib,v 1.6 2007/08/13 11:18:30 seb Exp $
+# $NetBSD: Makefile.lib,v 1.7 2008/04/24 07:40:23 bjs Exp $
 #
 # This Makefile fragment is included by all packages that build libraries
 # from the Mesa sources.
@@ -14,18 +14,43 @@
 
 USE_LANGUAGES=         c c++
 USE_LIBTOOL=           yes
-USE_TOOLS+=            makedepend
-MAKE_JOBS_SAFE=                no
+USE_TOOLS+=            gmake makedepend pkg-config
 
 PATCHDIR=              ${.CURDIR}/../MesaLib/patches
 DISTINFO_FILE=         ${.CURDIR}/../MesaLib/distinfo
 
-INSTALLATION_DIRS+=    lib
+COPTS?=                # empty
+COPTS+=                -prefer-pic     # Make sure to build PIC libraries.
+
+MAKE_ENV+=             MAKE=${GMAKE:Q}
+MAKE_ENV+=             COPTS=${COPTS:M*:Q}
+
+#.if ${X11_TYPE} == "modular"
+#.  if defined(PKG_BUILD_OPTIONS.libX11) && \
+#      !empty(PKG_BUILD_OPTIONS.libX11:Mxcb)
+#MAKE_ENV+=            USE_XCB=yes
+#.  endif
+#.endif
+
+#.if empty(MAKE_ENV:MUSE_XCB=*)
+MAKE_ENV+=             USE_XCB=no
+#.endif
 
 .include "../../mk/compiler.mk"
-.include "../../mk/bsd.prefs.mk"
 
-# Mesa has proper support for Solaris and SunPro, use it.
+MESA_HZ?=      100
+MAKE_ENV+=     MESA_HZ=${MESA_HZ:Q}
+.if ${OPSYS} == "NetBSD" && exists(/sbin/sysctl)
+tmphz=\
+       ${sysctl kern.clockrate || ${TRUE}\
+       :L:sh:ts,:S/,//gW:C/([^[0-9]]*)(=|[^ hz])*([^[0-9])//g:M[0-9]*}
+.  if !empty(tmphz) && (${tmphz} > 50) && (${tmphz} < 2001)
+MESA_HZ=       ${tmphz}
+.  endif
+.endif
+###
+### XXX do we still want this?
+###
 .if ${OPSYS} == "SunOS"
 .  if ${MACHINE_ARCH} == "sparc"
 .    if !empty(PKGSRC_COMPILER:Msunpro)
@@ -33,22 +58,41 @@
 .    else
 BUILD_TARGET=          sunos5-gcc
 .    endif
-.  else        # i386
-BUILD_TARGET=          pkgsrc
+.  else
+BUILD_TARGET?=         pkgsrc
 .  endif
 .elif ${OPSYS} == "Interix"
 BUILD_TARGET=          interix3
 .else
-BUILD_TARGET=          pkgsrc
+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;                         \
-               ${SETENV} ${MAKE_ENV}                                   \
-               ${LIBTOOL} --mode=install ${INSTALL_LIB}                \
-                       $$lib ${DESTDIR}${PREFIX}/lib;                  \
-       done
+RM_PATCH_BACKUP_DIRS=  docs src/mesa src/glut/glx \
+                       progs/demos progs/xdemos progs/glsl
+pre-patch:
+       @ for fn in ${RM_PATCH_BACKUP_DIRS}; do \
+               ${RM} -f ${WRKSRC}/$${fn}/*.orig; \
+        done
+
+post-patch:
+       ${CP} ${.CURDIR}/../MesaLib/files/configs/[a-z]* ${WRKSRC}/configs
+
+post-install: install-headers
+
+.PHONY: install-headers
+install-headers:
+       ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/GL
+.for hdr in ${MESA_HEADERS}
+       if [ -f ${WRKSRC}/include/GL/${hdr:Q} ]; then \
+           ${INSTALL_DATA} ${WRKSRC}/include/GL/${hdr:Q} \
+           ${DESTDIR}${PREFIX}/include/GL; \
+       fi;
+.endfor
+
+SUBST_CLASSES+=                 fix-paths
+SUBST_STAGE.fix-paths=          pre-configure
+SUBST_MESSAGE.fix-paths=        Fixing absolute paths.
+SUBST_FILES.fix-paths=          src/*.c
+SUBST_FILES.fix-paths+=         scripts/*.sh
+SUBST_SED.fix-paths=            -e 's,"/usr/local,"${PREFIX},g'
+SUBST_SED.fix-paths+=           -e 's,"/var/log,"${VARBASE}/log,g'
diff -r 92e3237f1601 -r 216c78b54fe2 graphics/MesaLib/DESCR
--- a/graphics/MesaLib/DESCR    Thu Apr 24 04:42:31 2008 +0000
+++ b/graphics/MesaLib/DESCR    Thu Apr 24 07:40:23 2008 +0000
@@ -3,6 +3,3 @@
 or state machine, it is being used with authorization from Silicon Graphics,
 Inc.  However, the author makes no claim that Mesa is in any way a
 compatible replacement for OpenGL or associated with Silicon Graphics, Inc.
-
-This is the GL part of the Mesa distribution for XFree86 versions below 4.0
-that do not include Mesa.
diff -r 92e3237f1601 -r 216c78b54fe2 graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile Thu Apr 24 04:42:31 2008 +0000
+++ b/graphics/MesaLib/Makefile Thu Apr 24 07:40:23 2008 +0000
@@ -1,25 +1,59 @@
-# $NetBSD: Makefile,v 1.56 2007/11/03 22:36:06 rillig Exp $
+# $NetBSD: Makefile,v 1.57 2008/04/24 07:40:24 bjs Exp $
+
+PKGNAME=       MesaLib-${MESA_PKGVERSION}
+COMMENT=       Graphics library similar to SGI's OpenGL
+
+MESA_HEADERS=  gl.h gl_mangle.h glext.h glx.h glxext.h \
+               glx_mangle.h osmesa.h xmesa.h xmesa_x.h \
+               xmesa_xf86.h
+
+PKG_DESTDIR_SUPPORT=   user-destdir
+
+BUILD_DEFS+=           MESA_HZ MESA_EXECMEM_HEAPSIZE
+
+.include "../../mk/bsd.prefs.mk"
+
+CFLAGS.NetBSD+=        -D_NETBSD_SOURCE
+
+.if (${MACHINE_ARCH} == "x86_64" || \
+    ${MACHINE_ARCH} == "sparc64" || \
+    ${MACHINE_ARCH} == "alpha")
+CFLAGS+=       -D__GLX_ALIGN64
+.endif
 
-PKGNAME=       MesaLib-${MESA_VERSION}
-PKGREVISION=   3
-COMMENT=       Graphics library similar to SGI's OpenGL
+.if !empty(MACHINE_ARCH:Mi386)
+###
+### This is taken from <sys/arch/i386/include/npx.h>.  If we don't override
+### it, the FPU control word will be restored to 0x037f.
+###
+### Also, see patch-aq about the libm functions required (float functions
+### such as floorf).  Proper configuration of this should be a goal of
+### the Mesa developers; alas, it obviously is not.
+###
+### XXX We need a reliable check for these functions.
+###
+#/* NetBSD uses IEEE double precision. */
+CFLAGS.NetBSD+=                -DDEFAULT_X86_FPU=0x127f
+###
+###
+#/* FreeBSD leaves some exceptions unmasked as well. */
+###
+CFLAGS.FreeBSD+=       -DDEFAULT_x86_FPU=0x1272
+.endif
+
+CFLAGS.FreeBSD+=       -DUSE_NATIVE_LIBM_FUNCS
+CFLAGS.Linux+=         -DUSE_NATIVE_LIBM_FUNCS
+CFLAGS.NetBSD+=                -DUSE_NATIVE_LIBM_FUNCS
+
+PLIST_VARS=            dri nodri
 
 .include "../../graphics/Mesa/Makefile.lib"
-
-INSTLIBS=      ${WRKSRC}/src/mesa/libGL.la \
-               ${WRKSRC}/src/glw/libGLw.la \
-               ${WRKSRC}/src/mesa/libOSMesa.la
-
-# The sparc asm included with Mesa does not build on sparc64
-.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "sparc64"
-CONFIGURE_ARGS+=       --disable-sparc
-.endif
-
+.include "options.mk"
 .include "../../mk/pthread.buildlink3.mk"
 
 .if !empty(MACHINE_PLATFORM:MNetBSD-[12].*)
-.include "../../devel/pthread-stublib/buildlink3.mk"
-PTHREAD_STUBLIB= "-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lpthstub"
+.  include "../../devel/pthread-stublib/buildlink3.mk"
+PTHREAD_STUBLIB= "-L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lpthstub"
 .else
 PTHREAD_STUBLIB= # provided by libc
 .endif
@@ -29,23 +63,17 @@
 MAKE_ENV+=     CROSS_COMPILING=yes
 .endif
 
-MAKE_JOBS_SAFE=                no
-
+RM_PATCH_BACKUP_DIRS=  docs src/mesa src/glut/glx \
+                       progs/demos progs/xdemos progs/glsl
 post-extract:
        ${CP} ${FILESDIR}/gen_matypes.awk ${WRKSRC}/src/mesa/x86
        ${CP} ${FILESDIR}/gen_matypes.sh ${WRKSRC}/src/mesa/x86
        ${CHMOD} a+x ${WRKSRC}/src/mesa/x86/gen_matypes.sh
+       for fn in ${RM_PATCH_BACKUP_DIRS}; do \
+               ${RM} -f ${WRKSRC}/$${fn}/*.orig; \
+       done
 
 pre-build:
        cd ${WRKSRC} && ${RM} -fr src/glu src/glut progs
 
-do-install:
-       ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/GL
-       cd ${WRKSRC}/include/GL; for hdr in                             \
-               gl.h gl_mangle.h glext.h glx.h glxext.h glx_mangle.h    \
-               osmesa.h xmesa.h xmesa_x.h xmesa_xf86.h;                \
-       do                                                              \
-               ${INSTALL_DATA} $${hdr} ${DESTDIR}${PREFIX}/include/GL; \



Home | Main Index | Thread Index | Old Index