Add Mesa-7.0.3rc2, which is nearly done -- it just needs to be tested on

a lot of platforms.  MesaLib with dri builds for me fine on
NetBSD current, and so does glu--glut there is a tiny problem
that I'm too tired to find now.

The *entire* build is libtoolized (even some parts that we don't touch
yet).  One interesting result of this is that libtool's locking seems
to make it MAKE_JOBS_SAFE once again (requires gmake now, that's another
reason).  I took pains to ensure that
everything builds correctly (cross-compiling needs to be verified
and quite possibly fixed, though).  Please let me know if you
find a problem.

TODO: fix various issues (obviously), mostly correctness, consistency
and such (save for glut).
-- MesaDemos (no way I am touching that right now!).  I do not think
that this should be required for an import, personally.
-- Bundle required headers from each package and create another one
exclusively for them.  This will allow patching/updating headers
without having to rebuild binaries if we do not need to, and I
think it's cleaner than what we do now.
-- Split glw into another package?  Maybe.
-- builtin.mk stuff for dri ?
-- We also should discuss switching to freeglut by default.  Yeah,
   there aren't too many commits to it these days.  However, this is
   way better than glut, which has been effectively dead for years.
This commit is contained in:
Blair Sadewitz 2008-02-26 06:47:36 +00:00 committed by Thomas Klausner
parent ea8e2905d1
commit 178e145852
45 changed files with 2425 additions and 0 deletions

8
MesaLib/DESCR Normal file
View file

@ -0,0 +1,8 @@
MesaLib is a 3-D graphics library with an API which is very similar to
that of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax
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.

57
MesaLib/Makefile Normal file
View file

@ -0,0 +1,57 @@
# $NetBSD: Makefile,v 1.3 2008/02/26 06:47:36 bsadewitz Exp $
PKGNAME= MesaLib-${MESA_PKGVERSION}
COMMENT= Graphics library similar to SGI's OpenGL
.include "../../wip/Mesa/Makefile.lib"
INSTLIBS= ${WRKSRC}/src/mesa/libGL.la \
${WRKSRC}/src/glw/libGLw.la
.include "options.mk"
.if empty(PKG_OPTIONS:Mdri)
INSTLIBS+= ${WRKSRC}/src/mesa/libOSMesa.la
.endif
.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"
.else
PTHREAD_STUBLIB= # provided by libc
.endif
PKGSRC_MAKE_ENV+= PTHREAD_STUBLIB=${PTHREAD_STUBLIB}
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
MAKE_ENV+= CROSS_COMPILING=yes
.endif
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
.if 0
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; \
done
.endif
.include "../../mk/bsd.pkg.mk"

51
MesaLib/PLIST Normal file
View file

@ -0,0 +1,51 @@
@comment $NetBSD: PLIST,v 1.3 2008/02/26 06:47:36 bsadewitz Exp $
include/GL/GLwDrawA.h
include/GL/GLwDrawAP.h
include/GL/GLwMDrawA.h
include/GL/GLwMDrawAP.h
include/GL/amesa.h
include/GL/dmesa.h
include/GL/fxmesa.h
include/GL/ggimesa.h
include/GL/gl.h
include/GL/gl_mangle.h
include/GL/glext.h
include/GL/glfbdev.h
include/GL/glu.h
include/GL/glu_mangle.h
include/GL/glut.h
include/GL/glutf90.h
include/GL/glx.h
include/GL/glx_mangle.h
include/GL/glxext.h
include/GL/mesa_wgl.h
include/GL/mglmesa.h
include/GL/osmesa.h
include/GL/svgamesa.h
include/GL/uglglutshapes.h
include/GL/uglmesa.h
include/GL/vms_x_fix.h
include/GL/wmesa.h
include/GL/xmesa.h
include/GL/xmesa_x.h
include/GL/xmesa_xf86.h
lib/libGL.la
lib/libGLw.la
lib/modules/dri/i810_dri.la
lib/modules/dri/i915_dri.la
lib/modules/dri/i965_dri.la
lib/modules/dri/mach64_dri.la
lib/modules/dri/mga_dri.la
lib/modules/dri/r128_dri.la
lib/modules/dri/r200_dri.la
lib/modules/dri/r300_dri.la
lib/modules/dri/radeon_dri.la
lib/modules/dri/savage_dri.la
lib/modules/dri/sis_dri.la
lib/modules/dri/tdfx_dri.la
lib/modules/dri/unichrome_dri.la
lib/pkgconfig/gl.pc
lib/pkgconfig/glw.pc
@dirrm lib/modules/dri
@dirrm lib/modules
@dirrm include/GL

41
MesaLib/buildlink3.mk Normal file
View file

@ -0,0 +1,41 @@
# $NetBSD: buildlink3.mk,v 1.3 2008/02/26 06:47:36 bsadewitz Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
MESALIB_BUILDLINK3_MK:= ${MESALIB_BUILDLINK3_MK}+
.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+= MesaLib
.endif
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:NMesaLib}
BUILDLINK_PACKAGES+= MesaLib
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}MesaLib
.if !empty(MESALIB_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=3.4.2
BUILDLINK_ABI_DEPENDS.MesaLib+= MesaLib>=6.4.1nb1
BUILDLINK_PKGSRCDIR.MesaLib?= ../../wip/MesaLib
.include "../../mk/bsd.fast.prefs.mk"
# See <http://developer.apple.com/qa/qa2007/qa1567.html>.
.if !empty(MACHINE_PLATFORM:MDarwin-[9].*-*)
BUILDLINK_LDFLAGS.MesaLib+= -Wl,-dylib_file -Wl,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
.endif
pkgbase:= MesaLib
.include "../../mk/pkg-build-options.mk"
.if !empty(PKG_BUILD_OPTIONS.MesaLib:Mdri)
. include "../../wip/MesaLib/dri.mk"
.endif
.endif # MESALIB_BUILDLINK3_MK
.if !empty(MACHINE_PLATFORM:MNetBSD-[12].*)
.include "../../devel/pthread-stublib/buildlink3.mk"
.endif
.include "../../x11/libXext/buildlink3.mk"
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

85
MesaLib/builtin.mk Normal file
View file

@ -0,0 +1,85 @@
# $NetBSD: builtin.mk,v 1.3 2008/02/26 06:47:36 bsadewitz Exp $
BUILTIN_PKG:= MesaLib
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 empty(H_MESALIB:M__nonexistent__)
BUILTIN_IMAKE_CHECK:= MesaLib:BuildGLXLibrary
. include "../../mk/buildlink3/imake-check.mk"
IS_BUILTIN.MesaLib= ${BUILTIN_IMAKE_CHECK.MesaLib}
. endif
.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]) && \
empty(H_MESALIB:M__nonexistent__)
. include "../../wip/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)
. 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_API_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; \
fi
. 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])
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
. include "../../mk/pthread.buildlink3.mk"
. include "../../mk/pthread.builtin.mk"
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
. endif
. if !empty(USE_BUILTIN.MesaLib:M[yY][eE][sS])
BUILDLINK_PREFIX.MesaLib= ${X11BASE}
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
. include "../../mk/x11.buildlink3.mk"
. include "../../mk/x11.builtin.mk"
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
. endif
.endif # CHECK_BUILTIN.MesaLib

29
MesaLib/distinfo Normal file
View file

@ -0,0 +1,29 @@
$NetBSD: distinfo,v 1.3 2008/02/26 06:47:36 bsadewitz Exp $
SHA1 (Mesa-7.0.3-rc2/MesaDemos-7.0.3-rc2.tar.gz) = 4b37c831a602724c22e65e3d830ecb36cb8ebb6a
RMD160 (Mesa-7.0.3-rc2/MesaDemos-7.0.3-rc2.tar.gz) = b97c8f56914176ae2f777ebcefde1149265c60c4
Size (Mesa-7.0.3-rc2/MesaDemos-7.0.3-rc2.tar.gz) = 1656468 bytes
SHA1 (Mesa-7.0.3-rc2/MesaGLUT-7.0.3-rc2.tar.gz) = 968bfe815cbda255a0355873b025b2d53e5cd8cd
RMD160 (Mesa-7.0.3-rc2/MesaGLUT-7.0.3-rc2.tar.gz) = 6754944d3efc039a006d9ed471c5302628ecd182
Size (Mesa-7.0.3-rc2/MesaGLUT-7.0.3-rc2.tar.gz) = 477810 bytes
SHA1 (Mesa-7.0.3-rc2/MesaLib-7.0.3-rc2.tar.gz) = f02b72a514295d54a9a4730f9a9c6920519d03ca
RMD160 (Mesa-7.0.3-rc2/MesaLib-7.0.3-rc2.tar.gz) = d6d94019eee3aae8b94693d58aba7ba0843a8616
Size (Mesa-7.0.3-rc2/MesaLib-7.0.3-rc2.tar.gz) = 4476164 bytes
SHA1 (patch-aa) = 6db543357cfe41fe1ab1fc16d823ff61d3e8646b
SHA1 (patch-ab) = 65786aec0cd85e1ab81f9668240da20bba09878c
SHA1 (patch-ac) = ed3ec49ea2aacf231bbcb38093f3dc01a0cb2468
SHA1 (patch-ad) = 37ee2785fd0136d7fdbd19cc986e9031300782cb
SHA1 (patch-ae) = 2fb4e6809dc7afa5d4be7ea65457ef4d08d0e3c3
SHA1 (patch-af) = dfc069679a77c66785fa3ba0c276df537d51bfe8
SHA1 (patch-ag) = b046f35e733ae7e8d97f06fb91788cc70b53b8ce
SHA1 (patch-ah) = f455a9d4027a8969d9338860f3bc5e74b560f561
SHA1 (patch-ai) = 72ed7e341427110e2a4c813b68e7776046e28f04
SHA1 (patch-aj) = 124bcd7b8e55113a0cdfd017dcf250d5c29aed68
SHA1 (patch-ak) = 74a1ffa426de7720a771c1d94aecb7bde17fd26c
SHA1 (patch-al) = b734af278352de120b704025ff2e9ac127e5ec7f
SHA1 (patch-am) = 744f13b6a2fc79746bcacecf11461e78de7bf1ef
SHA1 (patch-an) = ab1a5606226198b25e43920a48d0985b69f865c2
SHA1 (patch-ao) = d5086862fb820c2f79966a41712ce056fdc25f44
SHA1 (patch-at) = 1d58e86dfb052b41b3e6b1266f161c4f3adb237a
SHA1 (patch-au) = 6ce0d6236e5fb9f53db3bcb388b328ab0e132907
SHA1 (patch-cb) = 35fac1854877361a60293daf9a5a1f88a64d5b00

16
MesaLib/dri.mk Normal file
View file

@ -0,0 +1,16 @@
# $NetBSD: dri.mk,v 1.1 2008/02/26 06:47:36 bsadewitz Exp $
#
# Currently, this is for convenience only.
#
.if !defined(DRI_MK)
DRI_MK= # defined
. include "../../textproc/expat/buildlink3.mk"
. include "../../x11/glproto/buildlink3.mk"
. include "../../x11/libXdamage/buildlink3.mk"
. include "../../x11/libXfixes/buildlink3.mk"
. include "../../x11/libdrm/buildlink3.mk"
. include "../../x11/libXxf86vm/buildlink3.mk"
. include "../../x11/xf86driproto/buildlink3.mk"
. include "../../x11/xf86vidmodeproto/buildlink3.mk"
.endif

View file

@ -0,0 +1,61 @@
# $NetBSD: default,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
CONFIG_NAME = default
# Version info
MESA_MAJOR= 7
MESA_MINOR= 0
MESA_TINY= 3
GLU_CFLAGS= # defined
MKLIB_OPTIONS=
MKDEP= makedepend
MKDEP_OPTIONS= -fdepend
INSTALL?= $(TOP)/bin/minstall
# Python and flags (generally only needed by the developers)
PYTHON2= $(PYTHONBIN)
PYTHON_FLAGS= -t -O -O
GL_LIB= GL
GLU_LIB= GLU
GLUT_LIB= glut
GLW_LIB= GLw
OSMESA_LIB= OSMesa
GL_LIB_NAME?= lib$(GL_LIB).so
GLU_LIB_NAME?= lib$(GLU_LIB).so
GLUT_LIB_NAME?= lib$(GLUT_LIB).so
GLW_LIB_NAME?= lib$(GLW_LIB).so
OSMESA_LIB_NAME?= lib$(OSMESA_LIB).so
ASM_SOURCES?= # defined
GLW_SOURCES?= GLwDrawA.c
LIB_DIR= lib
SRC_DIRS= mesa glu glut/glx glw
GLU_DIRS= sgi
DRIVER_DIRS= x11 osmesa
PROGRAM_DIRS= demos redbook samples glsl xdemos
EXTRA_LIB_PATH?= # defined
GL_LIB_DEPS=\
$(EXTRA_LIB_PATH) -lX11 -lXext -lm $(PTHREAD_STUBLIB)
OSMESA_LIB_DEPS=\
-L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS=\
-L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS=\
-L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) \
$(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS=\
-L$(TOP)/$(LIB_DIR) -l$(GL_LIB) \
$(EXTRA_LIB_PATH) -lXt -lX11
APP_LIB_DEPS=\
-lm
INSTALL_DIR?= $(PREFIX)
DRI_DRIVER_INSTALL_DIR?= $(PREFIX)/lib/dri
DRI_DRIVER_SEARCH_DIR?= $(LOCALBASE)/lib/dri

View file

@ -0,0 +1,12 @@
# $NetBSD: interix3,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
#
# Configuration for Interix 3.x
include $(TOP)/configs/default
CONFIG_NAME = pkgsrc
# Compiler and flags
CFLAGS+= -DUSE_XSHM_HDRONLY -DPTHREADS
APP_LIB_DEPS = -L$(LIB_DIR) -L${PREFIX}/lib -L${X11PREFIX}/lib -lXext -lXmu -lXi -lX11 -lm

View file

@ -0,0 +1,19 @@
# $NetBSD: pkgsrc,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
include $(TOP)/configs/default
CONFIG_NAME= pkgsrc
DEFINES= -DPTHREADS -DUSE_XSHM -DHZ=$(MESA_HZ)
X11_INCLUDES= -I$(X11BASE)/include
CFLAGS+= $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) \
$(DEFINES) $(X11_INCLUDES)
CXXFLAGS+= $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) \
$(DEFINES) $(X11_INCLUDES)
GLUT_CFLAGS= -fexceptions
APP_LIB_DEPS= -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
-lXext -lXmu -lXi -lX11 -lm
SRC_DIRS= glx/x11 mesa glw glu glut

View file

@ -0,0 +1,41 @@
# $NetBSD: pkgsrc-dri,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
include $(TOP)/configs/pkgsrc
CONFIG_NAME= pkgsrc-dri
DEFINES=\
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS -D_REENTRANT
CFLAGS+=\
$(WARN_FLAGS) $(COPTS) -Wmissing-prototypes -Wall \
$(ASM_FLAGS) $(X11_INCLUDES)
CXXFLAGS+=\
$(WARN_FLAGS) $(COPTS) -Wall $(ASM_FLAGS)
ASM_SOURCES?= # defined
LIBDRM_CFLAGS= `$(PKG_CONFIG) --cflags libdrm`
LIBDRM_LIB= `$(PKG_CONFIG) --libs libdrm`
#PCIACCESS_CFLAGS= `$(PKG_CONFIG) --cflags pciaccess`
#PCIACCESS_LIBS= `$(PKG_CONFIG) --cflags pciaccess`
DRI_LIB_DEPS?=\
-lm -lexpat -ldrm
GL_LIB_DEPS=\
-lX11 -lXext -lXxf86vm -lXdamage \
-lXfixes -lm $(LIBDRM_LIB)
GLUT_LIB_DEPS=\
-L$(TOP)/$(LIB_DIR) -lGLU -lGL \
-lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS=\
-lGL -lXt -lX11
SRC_DIRS= glx/x11 mesa glw
DRIVER_DIRS= dri
PROGRAM_DIRS= # defined
WINDOW_SYSTEM= dri
DRI_DIRS?= i810 i915 i965 mach64 mga r128 r200 \
r300 radeon tdfx unichrome savage sis

View file

@ -0,0 +1,9 @@
# $NetBSD: pkgsrc-dri-i386,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
include $(TOP)/configs/pkgsrc-dri
CONFIG_NAME= pkgsrc-dri-x86
ASM_FLAGS?= -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
ASM_SOURCES= $(X86_SOURCES)
ASM_API= $(X86_API)

View file

@ -0,0 +1,9 @@
# $NetBSD: pkgsrc-dri-x86_64,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
include $(TOP)/configs/pkgsrc-dri
CONFIG_NAME= pkgsrc-dri-x86_64
ASM_FLAGS= -DUSE_X86_64_ASM
ASM_SOURCES= $(X86-64_SOURCES)
ASM_API= $(X86-64_API)

View file

@ -0,0 +1,41 @@
# $NetBSD: pkgsrc-indirect,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
include $(TOP)/configs/pkgsrc
CONFIG_NAME= pkgsrc-indirect
DEFINES=\
-DPTHREADS -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -D_REENTRANT
CFLAGS+=\
$(WARN_FLAGS) $(COPTS) -Wmissing-prototypes -Wall \
$(ASM_FLAGS) $(X11_INCLUDES)
CXXFLAGS+=\
$(WARN_FLAGS) $(COPTS) -Wall $(ASM_FLAGS)
ASM_SOURCES?= # defined
EXPAT_INCLUDES= `$(PKG_CONFIG) --cflags expat`
LIBEXPAT= `$(PKG_CONFIG) --libs expat`
LIBDRM_CFLAGS= `$(PKG_CONFIG) --cflags libdrm`
LIBDRM_LIB= `$(PKG_CONFIG) --libs libdrm`
#PCIACCESS_CFLAGS= `$(PKG_CONFIG) --cflags pciaccess`
#PCIACCESS_LIBS= `$(PKG_CONFIG) --cflags pciaccess`
DRI_LIB_DEPS?=\
-lm $(LIBEXPAT) $(LIBDRM_LIB)
GL_LIB_DEPS=\
-lX11 -lXext -lXxf86vm -lXdamage \
-lXfixes -lm $(LIBDRM_LIB)
GLUT_LIB_DEPS=\
-L$(TOP)/$(LIB_DIR) -lGLU -lGL \
-lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS=\
-lGL -lXt -lX11
SRC_DIRS= glx/x11 mesa glw
DRIVER_DIRS= dri
PROGRAM_DIRS= # defined
WINDOW_SYSTEM= dri
DRI_DIRS?= i810 i915 i965 mach64 mga r128 r200 \
r300 radeon tdfx unichrome savage sis

View file

@ -0,0 +1,31 @@
# $NetBSD: gen_matypes.awk,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
BEGIN {
while (getline) {
if (/int main/) break;
}
}
/printf/ {
printf("printf %s\n", substr($0, 12, length($0) - 14))
}
/OFFSET\(/ {
split(substr($0,12, length($0) - 14), offsets, ",");
printf("offset %s \"%s\" \"%s\"\n", offsets[1], offsets[2], offsets[3]);
}
/OFFSET_HEADER/ {
printf("offset_header %s\n", substr($0,19, length($0) - 21))
}
/DEFINE\(/ {
split(substr($0,12, length($0) - 14), offsets, ",");
printf("define %s \"%s\"\n", offsets[1], offsets[2]);
}
/DEFINE_HEADER/ {
printf("define_header %s\n", substr($0,19, length($0) - 21))
}
/SIZEOF\(/ {
split(substr($0,12, length($0) - 14), offsets, ",");
printf("sizeof %s \"%s\"\n", offsets[1], offsets[2]);
}

View file

@ -0,0 +1,98 @@
#!/bin/sh
#
# $NetBSD: gen_matypes.sh,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
test_condition() {
cat > gen_matypes_cross.c << EOF
#include "main/glheader.h"
#include "main/mtypes.h"
#include "tnl/t_context.h"
#undef offsetof
#define offsetof( type, member ) ((size_t) &((type *)0)->member)
int test_variable[($1) ? 1 : -1];
EOF
${CC} -c -o /dev/null ${CFLAGS} gen_matypes_cross.c > /dev/null 2>&1
}
compute_powers(){
local cur
local i
cur=1
i=1
while [ ${i} -le 16 ]; do
power_of_two="${cur} ${power_of_two}"
cur=`expr ${cur} + ${cur}`
i=`expr ${i} + 1`
done
}
compute_powers
offset() {
local got_mismatch
local bits
local o
o=0
got_mismatch=0
for bits in ${power_of_two}; do
if test_condition "offsetof($2, $3) >= $o + $bits"; then
o=`expr $o + $bits`
else
got_mismatch=1
fi
done
[ "$got_mismatch" = 0 ] && exit 1
printf "#define %s\t%d\n" "$1" $o
}
offset_header() {
printf "\n"
printf "\n"
printf "/* =============================================================\n"
printf " * Offsets for %s\n" "$1"
printf " */\n"
printf "\n"
}
define_header() {
printf "\n"
printf "/*\n"
printf " * Flags for %s\n" "$1"
printf " */\n"
printf "\n"
}
define() {
local bits
local v
v=0
for bits in ${power_of_two}; do
if test_condition "$2 >= $v + $bits"; then
v=`expr $v + $bits`
fi
done
printf "#define %s\t0x%x\n" "$1" $v
}
sizeof() {
local got_mismatch
local bits
local v
v=0
got_mismatch=0
for bits in ${power_of_two}; do
if test_condition "sizeof($2) >= $v + $bits"; then
v=`expr $v + $bits`
else
got_mismatch=1
fi
done
[ "$got_mismatch" = 0 ] && exit 1
printf "#define %s\t0x%x\n" "$1" $v
}
awk -f gen_matypes.awk < gen_matypes.c > gen_matypes_tmp.sh
. ./gen_matypes_tmp.sh
rm gen_matypes_tmp.sh

27
MesaLib/hacks.mk Normal file
View file

@ -0,0 +1,27 @@
# $NetBSD: hacks.mk,v 1.3 2008/02/26 06:47:36 bsadewitz Exp $
.if !defined(MESALIBS_HACKS_MK)
MESALIBS_HACKS_MK= # defined
### [Fri Dec 30 21:00:59 CET 2005 : schwarz]
### make sys/types.h not conflict with inttypes.h
### (issue is specific to IRIX 5.3)
###
.if !empty(MACHINE_PLATFORM:MIRIX-5.3-*)
PKG_HACKS+= sys_types_h-inttypes_h-conflict
post-wrapper:
${MKDIR} ${BUILDLINK_DIR}/include/sys && ${GREP} -v '^typedef.*[^u_]int[12368]*_t;' /usr/include/sys/types.h > ${BUILDLINK_DIR}/include/sys/types.h
# should match int8_t, int16_t, and int32_t (only)
.endif
.include "../../mk/compiler.mk"
###
### Ordinarily, this is defined by the build. However, in pkgsrc,
### policy dictates that we do it here.
###
.if !empty(CC_VERSION:Mgcc-[34]*)
PKG_HACKS+= no-strict-aliasing
CFLAGS+= -fno-strict-aliasing
.endif
.endif

36
MesaLib/options.mk Normal file
View file

@ -0,0 +1,36 @@
# $NetBSD: options.mk,v 1.2 2008/02/26 06:47:36 bsadewitz Exp $
. include "../../mk/bsd.fast.prefs.mk"
###
### XXX There are [probably] others, but let's not get crazy just yet.
### This will take a while to test for the myriad platforms we
### support.
###
.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc" || \
${MACHINE_ARCH} == "sparc64") && \
(${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD")
PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib
PKG_SUPPORTED_OPTIONS= dri
.include "../../mk/bsd.options.mk"
###
### XXX Yes, this is a bid overly verbose; with Mesa, that can't
### hurt much.
###
.if !empty(PKG_OPTIONS:Mdri)
BUILD_TARGET= pkgsrc-dri
. include "../../textproc/expat/buildlink3.mk"
. include "../../x11/glproto/buildlink3.mk"
. include "../../x11/libXdamage/buildlink3.mk"
. include "../../x11/libXfixes/buildlink3.mk"
. include "../../x11/libdrm/buildlink3.mk"
. include "../../x11/libXxf86vm/buildlink3.mk"
. include "../../x11/xf86driproto/buildlink3.mk"
. include "../../x11/xf86vidmodeproto/buildlink3.mk"
.endif
.endif

14
MesaLib/patches/patch-aa Normal file
View file

@ -0,0 +1,14 @@
$NetBSD: patch-aa,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/x86/assyntax.h.orig 2007-06-21 18:10:55.000000000 -0400
+++ src/mesa/x86/assyntax.h
@@ -985,7 +985,8 @@ SECTION _DATA public align=16 class=DATA
#if defined(Lynx) || (defined(SYSV) || defined(SVR4)) \
|| (defined(__linux__) || defined(__OS2ELF__)) && defined(__ELF__) \
- || defined(__FreeBSD__) && __FreeBSD__ >= 3
+ || defined(__FreeBSD__) && __FreeBSD__ >= 3 \
+ || defined(__NetBSD__) && defined(__ELF__)
#define GLNAME(a) a
#else
#define GLNAME(a) CONCAT(_, a)

22
MesaLib/patches/patch-ab Normal file
View file

@ -0,0 +1,22 @@
$NetBSD: patch-ab,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/glu/Makefile.orig 2007-09-12 12:03:23.000000000 -0400
+++ src/glu/Makefile
@@ -22,10 +22,13 @@ glu.pc: glu.pc.in
$(pcedit) $< > $@
install: glu.pc
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
- $(INSTALL) $(TOP)/$(LIB_DIR)/libGLU.* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+ $(LIBTOOL) --mode=install \
+ $(BSD_INSTALL_LIB) $(TOP)/$(LIB_DIR)/libGLU.la \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(BSD_INSTALL_DATA) glu.pc \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
clean:
@for dir in $(SUBDIRS) ; do \

45
MesaLib/patches/patch-ac Normal file
View file

@ -0,0 +1,45 @@
$NetBSD: patch-ac,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- Makefile.orig 2008-02-21 18:58:08.000000000 -0500
+++ Makefile
@@ -1,8 +1,8 @@
# Top-level Mesa makefile
-TOP = .
+TOP= .
-SUBDIRS = src progs
+SUBDIRS?= src
default: $(TOP)/configs/current
@@ -90,6 +90,7 @@ hpux11-ia64 \
hpux11-ia64-static \
hpux9 \
hpux9-gcc \
+interix3 \
irix6-64 \
irix6-64-static \
irix6-n32 \
@@ -140,6 +141,10 @@ netbsd \
openbsd \
osf1 \
osf1-static \
+pkgsrc \
+pkgsrc-dri \
+pkgsrc-dri-i386 \
+pkgsrc-dri-x86_64 \
solaris-x86 \
solaris-x86-gcc \
solaris-x86-gcc-static \
@@ -156,10 +161,6 @@ sunos5-v9 \
sunos5-v9-static \
sunos5-v9-cc-g++ \
ultrix-gcc:
- @ if test -f configs/current || test -L configs/current ; then \
- echo "Please run 'make realclean' before changing configs" ; \
- exit 1 ; \
- fi
(cd configs && rm -f current && ln -s $@ current)
$(MAKE) default

175
MesaLib/patches/patch-ad Normal file
View file

@ -0,0 +1,175 @@
$NetBSD: patch-ad,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/Makefile.orig 2007-12-03 14:00:21.000000000 -0500
+++ src/mesa/Makefile
@@ -8,18 +8,21 @@ include sources
GL_MAJOR = 1
GL_MINOR = 5
-GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
+GL_TINY = 0
.SUFFIXES : .cpp
.c.o:
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+ $(LIBTOOL) --mode=compile --tag=CC \
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $(@:.o=.lo)
.cpp.o:
- $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@
+ $(LIBTOOL) --mode=compile --tag=CXX \
+ $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $(@:.o=.lo)
.S.o:
+ $(LIBTOOL) --mode=compile --tag=CC \
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
@@ -51,13 +54,14 @@ beos: depend subdirs libmesa.a
# Linux DRI drivers
# Make archive of core object files
-libmesa.a: $(SOLO_OBJECTS)
- @ $(TOP)/bin/mklib -o mesa -static $(SOLO_OBJECTS);
+libmesa.la: $(SOLO_OBJECTS)
+ @ $(LIBTOOL) --mode=link $(CC) \
+ -o $@ $(SOLO_OBJECTS:.o=.lo) -static -avoid-version
@if [ "${CONFIG_NAME}" = "beos" ] ; then \
mimeset -f "$@" ; \
fi
-linux-solo: depend subdirs libmesa.a
+linux-solo: depend subdirs libmesa.la
cd drivers/dri ; $(MAKE)
@@ -65,10 +69,11 @@ linux-solo: depend subdirs libmesa.a
# Stand-alone Mesa libGL, no built-in drivers (DirectFB)
libgl-core: $(CORE_OBJECTS)
- @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
- -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(CORE_OBJECTS) \
- $(GL_LIB_DEPS)
+ @ $(LIBTOOL) --mode=link $(CC) \
+ -o $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) \
+ $(LDFLAGS) -rpath $(PREFIX)/lib \
+ -version-info $(MESA_MAJOR):$(MESA_MINOR):$(MESA_TINY) \
+ $(CORE_OBJECTS:.o=.lo) $(GL_LIB_DEPS)
directfb: depend subdirs libgl-core
cd drivers/directfb ; $(MAKE)
@@ -78,12 +83,12 @@ directfb: depend subdirs libgl-core
# fbdev Mesa driver (libGL.so)
fbdev: $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) $(COMMON_DRIVER_OBJECTS)
- @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
- -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
- $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) \
- $(COMMON_DRIVER_OBJECTS) $(GL_LIB_DEPS)
-
+ @ $(LIBTOOL) --mode=link $(CC) \
+ -o $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) $(LDFLAGS) \
+ -rpath $(PREFIX)/lib $(CORE_OBJECTS:.o=.lo) \
+ -version-info $(MESA_MAJOR):$(MESA_MINOR):$(MESA_TINY) \
+ $(FBDEV_DRIVER_OBJECTS:.o=.lo) \
+ $(COMMON_DRIVER_OBJECTS:.o=.lo) $(GL_LIB_DEPS)
######################################################################
# Stand-alone Mesa libGL and libOSMesa
@@ -111,29 +116,30 @@ osmesa-only: depend subdirs $(TOP)/$(LIB
# Make the GL library
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
- @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
- -install $(TOP)/$(LIB_DIR) \
- $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
+ @ $(LIBTOOL) --mode=link $(CC) \
+ -o $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) \
+ -version-info $(GL_MAJOR):$(GL_MINOR):$(GL_TINY) \
+ -rpath $(PREFIX)/lib $(LDFLAGS) $(GL_LIB_DEPS) \
+ $(STAND_ALONE_OBJECTS:.o=.lo)
+
# Make the OSMesa library
# Note: version is kept at 6.5.3 to simplify app/linking issues
$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
- $(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
- -ldflags '$(LDFLAGS)' \
- -major 6 -minor 5 -patch 3 \
- -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
- $(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
+ $(LIBTOOL) --mode=link $(CC) \
+ -o $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME:.so=.la) \
+ $(LDFLAGS) -version-info 6:5:3 -rpath $(PREFIX)/lib \
+ $(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS:.o=.lo) ; \
else \
- $(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
- -ldflags '$(LDFLAGS)' \
- -major 6 -minor 5 -patch 3 \
- -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
- $(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
+ $(LIBTOOL) --mode=link $(CC) \
+ -o $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME:.so=.la) \
+ $(LDFLAGS) -version-info 6:5:3 \
+ -o $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME:.so=.la) \
+ -rpath $(PREFIX)/lib $(OSMESA_LIB_DEPS) \
+ $(OSMESA_DRIVER_OBJECTS:.o=.lo) ; \
fi
-
######################################################################
# libGL pkg-config file
pcedit = sed \
@@ -164,20 +170,26 @@ subdirs:
install: default gl.pc
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
- $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(DESTDIR)$(INSTALL_DIR)/include/GL
- @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
- $(INSTALL) $(TOP)/$(LIB_DIR)/libGL* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
- fi
- $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
- @if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
- $(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/include/GL
+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+ @for fn in $(TOP)/include/GL/*.h; do \
+ $(BSD_INSTALL_DATA) $$fn $(DESTDIR)$(INSTALL_DIR)/include/GL; \
+ done
+ @if [ -e "$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la)" ]; then \
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) \
+ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
+ fi
+ $(BSD_INSTALL_DATA) gl.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+ @if [ -e "$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME:.so=.la)" ]; then \
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) \
+ $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME:.so=.la) \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
fi
@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
cd drivers/dri ; $(MAKE) install ; \
- fi
+ fi
## NOT INSTALLED YET:
## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES
@@ -191,7 +203,7 @@ tags:
clean:
-rm -f */*.o
-rm -f */*/*.o
- -rm -f depend depend.bak libmesa.a
+ -rm -f depend depend.bak libmesa*
-rm -f drivers/*/*.o
(cd drivers/dri ; $(MAKE) clean)
(cd x86 ; $(MAKE) clean)

54
MesaLib/patches/patch-ae Normal file
View file

@ -0,0 +1,54 @@
$NetBSD: patch-ae,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/glw/Makefile.orig 2007-09-28 20:43:28.000000000 -0400
+++ src/glw/Makefile
@@ -17,7 +17,8 @@ OBJECTS = $(GLW_SOURCES:.c=.o)
##### RULES #####
.c.o:
- $(CC) -c $(INCDIRS) $(CFLAGS) $<
+ $(LIBTOOL) --mode=compile --tag=CC \
+ $(CC) -c $(INCDIRS) $(CFLAGS) -o $(@:.o=.lo) $<
@@ -34,12 +35,16 @@ glw.pc: glw.pc.in
$(pcedit) $< > $@
install: glw.pc
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
- $(INSTALL) -m 644 *.h $(DESTDIR)$(INSTALL_DIR)/include/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/libGLw.* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -m 644 glw.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/include/GL
+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+ @for fn in *.h; do \
+ $(BSD_INSTALL_DATA) $$fn $(DESTDIR)$(INSTALL_DIR)/include/GL; \
+ done
+ $(LIBTOOL) --mode=install \
+ $(BSD_INSTALL_LIB) $(TOP)/$(LIB_DIR)/libGLw.la \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(BSD_INSTALL_DATA) glw.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
clean:
-rm depend depend.bak
@@ -48,10 +53,12 @@ clean:
# Make the library
$(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- -major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
- $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
- $(GLW_LIB_DEPS) $(OBJECTS)
+ $(LIBTOOL) --mode=link $(CC) \
+ -o $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME:.so=.la) \
+ -rpath $(PREFIX)/lib $(LDFLAGS) \
+ -version-info $(MAJOR):$(MINOR):$(TINY) \
+ $(GLW_LIB_DEPS) $(OBJECTS:.o=.lo)
+
#

44
MesaLib/patches/patch-af Normal file
View file

@ -0,0 +1,44 @@
$NetBSD: patch-af,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/glu/sgi/Makefile.orig 2007-09-28 20:43:28.000000000 -0400
+++ src/glu/sgi/Makefile
@@ -8,7 +8,8 @@ include $(TOP)/configs/current
GLU_MAJOR = 1
GLU_MINOR = 3
-GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
+GLU_TINY= 0 # What is the point of having such a strange versioning scheme?
+ # It breaks libtool, but I hate to say it: libtool is right!
INCDIRS = -I$(TOP)/include -Iinclude -Iinternals -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess
@@ -115,10 +116,12 @@ OBJECTS = $(C_OBJECTS) $(CC_OBJECTS)
##### RULES #####
.c.o:
- $(CC) -c $(INCDIRS) $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(INCDIRS) \
+ $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $(@:.o=.lo)
.cc.o:
- $(CXX) -c $(INCDIRS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
+ $(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(INCDIRS) \
+ $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $(@:.o=.lo)
##### TARGETS #####
@@ -136,10 +139,10 @@ $(TOP)/$(LIB_DIR):
# Make the library:
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
- -major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
- -cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
- $(GLU_LIB_DEPS) $(OBJECTS)
+ $(LIBTOOL) --mode=link $(CXX) \
+ -o $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME:.so=.la) $(LDFLAGS) \
+ -rpath $(PREFIX)/lib $(GLU_LIB_DEPS) $(OBJECTS:.o=.lo) \
+ -version-info $(GLU_MAJOR):$(GLU_MINOR):$(GLU_TINY)
clean:

53
MesaLib/patches/patch-ag Normal file
View file

@ -0,0 +1,53 @@
$NetBSD: patch-ag,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/glut/glx/Makefile.orig 2008-02-25 21:44:01.000000000 -0500
+++ src/glut/glx/Makefile
@@ -80,9 +80,8 @@ OBJECTS = $(SOURCES:.c=.o)
##### RULES #####
.c.o:
- $(CC) -c -I$(TOP)/include $(X11_INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) $<
-
-
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c -I$(TOP)/include \
+ $(X11_INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) -o $(@:.o=.lo) $<
##### TARGETS #####
@@ -91,9 +90,10 @@ default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NA
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
- $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
+ $(LIBTOOL) --mode=link $(CC) \
+ -o $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME:.so=.la) $(LDFLAGS) \
+ -rpath $(PREFIX)/lib $(GLUT_LIB_DEPS) $(OBJECTS:.o=.lo) \
+ -version-info $(GLUT_MAJOR):$(GLUT_MINOR):$(GLUT_TINY) \
$(GLUT_LIB_DEPS) $(OBJECTS)
@@ -106,13 +106,15 @@ glut.pc: glut.pc.in
$(pcedit) $< > $@
install: glut.pc
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
- $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
-
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/include/GL
+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+ $(BSD_INSTALL_DATA) $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
+ $(LIBTOOL) --mode=install \
+ $(BSD_INSTALL_LIB) $(TOP)/$(LIB_DIR)/libglut.la \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(BSD_INSTALL_DATA) glut.pc \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
clean:
-rm -f *.o *~

42
MesaLib/patches/patch-ah Normal file
View file

@ -0,0 +1,42 @@
$NetBSD: patch-ah,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/drivers/dri/glcore/Makefile.orig 2007-09-28 20:43:28.000000000 -0400
+++ src/mesa/drivers/dri/glcore/Makefile
@@ -36,7 +36,7 @@ INCLUDE_DIRS = \
MESA_MODULES = $(TOP)/src/mesa/libmesa.a
# Libraries that the driver shared lib depends on
-LIB_DEPS = -lm -lpthread -lc
+LIB_DEPS = -lm -lc
# LIB_DEPS = -lGL -lm -lpthread -lc
@@ -49,10 +49,12 @@ OBJECTS = $(C_SOURCES:.c=.o) \
##### RULES #####
.c.o:
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
+ $(LIBTOOL) --mode=compile --tag=CC \
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $(@:.o=.lo)
.S.o:
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
+ $(LIBTOOL) --mode=compile --tag=CC \
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $(@:.o=.lo)
##### TARGETS #####
@@ -61,9 +63,10 @@ default: depend $(TOP)/$(LIB_DIR)/$(LIBN
$(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
- CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(LIBNAME) -noprefix \
- -ldflags '$(LDFLAGS)' -install $(TOP)/$(LIB_DIR) \
- $(OBJECTS) $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES)
+ $(LIBTOOL) --mode=link $(CC) -o $(TOP)/$(LIB_DIR)/$(LIB_NAME:.so=.la) \
+ $(LDFLAGS) $(OBJECTS:.o=.lo) $(WINLIB) $(LIB_DEPS) \
+ $(WINOBJ:.o=.lo) $(MESA_MODULES:.a=.la) -rpath $(PREFIX)/lib \
+ -module -avoid-version
depend: $(C_SOURCES) $(ASM_SOURCES)

62
MesaLib/patches/patch-ai Normal file
View file

@ -0,0 +1,62 @@
$NetBSD: patch-ai,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/drivers/dri/Makefile.template.orig 2007-12-18 19:05:46.000000000 -0500
+++ src/mesa/drivers/dri/Makefile.template
@@ -1,6 +1,6 @@
# -*-makefile-*-
-MESA_MODULES = $(TOP)/src/mesa/libmesa.a
+MESA_MODULES = $(TOP)/src/mesa/libmesa.la
COMMON_SOURCES = \
../../common/driverfuncs.c \
@@ -61,25 +61,22 @@ SHARED_INCLUDES = \
##### RULES #####
.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c \
+ $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $(@:.o=.lo)
.S.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
-
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c \
+ $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $(@:.o=.lo)
##### TARGETS #####
-default: depend symlinks $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
-
-
-$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
- $(TOP)/bin/mklib -ldflags '$(LDFLAGS)' -noprefix -o $@ \
- $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
-
+default: depend symlinks $(TOP)/$(LIB_DIR)/$(LIBNAME)
-$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
- $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)
+$(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
+ $(LIBTOOL) --mode=link $(CC) -o $(TOP)/$(LIB_DIR)/$(LIBNAME:.so=.la) \
+ $(OBJECTS:.o=.lo) $(WINOBJ:.o=.lo) $(DRI_LIB_DEPS) \
+ $(MESA_MODULES:.a=.la) -rpath $(PREFIX)/lib -module -avoid-version
depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
touch depend
@@ -98,9 +95,11 @@ clean:
-rm -f depend depend.bak
-install: $(LIBNAME)
- $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
- $(INSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+install: $(TOP)/$(LIB_DIR)/$(LIBNAME)
+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+ $(LIBTOOL) --mode=install \
+ $(BSD_INSTALL_LIB) $(TOP)/$(LIB_DIR)/$(LIBNAME:.so=.la) \
+ $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
include depend

20
MesaLib/patches/patch-aj Normal file
View file

@ -0,0 +1,20 @@
$NetBSD: patch-aj,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/x86/Makefile.orig 2007-06-21 18:10:55.000000000 -0400
+++ src/mesa/x86/Makefile
@@ -21,11 +21,13 @@ clean:
gen_matypes: gen_matypes.c
- $(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes
+ $(LIBTOOL) --mode=link --tag=CC \
+ $(CC) $(INCLUDE_DIRS) $(CFLAGS) -no-install \
+ gen_matypes.c -o gen_matypes
# need some special rules here, unfortunately
matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
- ./gen_matypes > matypes.h
+ $(LIBTOOL) --mode=execute ./gen_matypes > matypes.h
common_x86_asm.o: matypes.h
3dnow_normal.o: matypes.h

22
MesaLib/patches/patch-ak Normal file
View file

@ -0,0 +1,22 @@
$NetBSD: patch-ak,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- include/GL/glxext.h.orig 2007-06-21 18:10:53.000000000 -0400
+++ include/GL/glxext.h
@@ -389,7 +389,7 @@ typedef struct {
#elif defined(__sun__) || defined(__digital__)
#include <inttypes.h>
#if defined(__STDC__)
-#if defined(__arch64__)
+#if defined(__arch64__) || defined(_LP64)
typedef long int int64_t;
typedef unsigned long int uint64_t;
#else
@@ -397,7 +397,7 @@ typedef long long int int64_t;
typedef unsigned long long int uint64_t;
#endif /* __arch64__ */
#endif /* __STDC__ */
-#elif defined( __VMS )
+#elif defined( __VMS ) || defined(__sgi)
#include <inttypes.h>
#elif defined(__SCO__) || defined(__USLC__)
#include <stdint.h>

836
MesaLib/patches/patch-al Normal file
View file

@ -0,0 +1,836 @@
$NetBSD: patch-al,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/drivers/x11/xm_tri.c.orig 2007-06-21 18:10:54.000000000 -0400
+++ src/mesa/drivers/x11/xm_tri.c
@@ -66,7 +66,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLint x = span.x, y = YFLIP(xrb, span.y); \
GLuint i; \
for (i = 0; i < span.end; i++, x++) { \
@@ -82,7 +82,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -102,7 +102,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -117,7 +117,7 @@
span.blue += span.blueStep; \
span.alpha += span.alphaStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -137,7 +137,7 @@
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -152,7 +152,7 @@
span.blue += span.blueStep; \
span.alpha += span.alphaStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -171,7 +171,7 @@
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -184,7 +184,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -202,7 +202,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -217,7 +217,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -232,7 +232,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -248,7 +248,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -265,7 +265,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -278,7 +278,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -296,7 +296,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -310,7 +310,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -327,7 +327,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
XDITHER_SETUP(y); \
@@ -342,7 +342,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -357,7 +357,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
XDITHER_SETUP(y); \
@@ -373,7 +373,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -390,7 +390,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
LOOKUP_SETUP; \
for (i = 0; i < span.end; i++) { \
@@ -404,7 +404,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -422,7 +422,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -436,7 +436,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -453,7 +453,7 @@
XMesaImage *img = xrb->ximage; \
unsigned long pixel; \
PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -463,7 +463,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -481,7 +481,7 @@
GET_XRB(xrb); \
GLuint p = PACK_8A8B8G8R( v2->color[0], v2->color[1],\
v2->color[2], v2->color[3]);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -490,7 +490,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -508,7 +508,7 @@
GET_XRB(xrb); \
GLuint p = PACK_8A8R8G8B(v2->color[0], v2->color[1], \
v2->color[2], v2->color[3]);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -517,7 +517,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -534,7 +534,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
GLuint p = PACK_8R8G8B( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -543,7 +543,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -561,7 +561,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
const GLubyte *color = v2->color;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -573,7 +573,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -588,7 +588,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -601,7 +601,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -618,7 +618,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
GLushort p = PACK_5R6G5B( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -627,7 +627,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -645,7 +645,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
const GLubyte *color = v2->color;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -656,7 +656,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -673,7 +673,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
FLAT_DITHER_ROW_SETUP(YFLIP(xrb, y)); \
@@ -684,7 +684,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -699,7 +699,7 @@
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage; \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
FLAT_DITHER_ROW_SETUP(y); \
@@ -711,7 +711,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -731,7 +731,7 @@
GLubyte r = v2->color[0]; \
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2];
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -741,7 +741,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -762,7 +762,7 @@
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2]; \
GLubyte p = LOOKUP(r,g,b);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
const DEPTH_TYPE z = FixedToDepth(span.z); \
@@ -771,7 +771,7 @@
zRow[i] = z; \
} \
span.z += span.zStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -785,7 +785,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -796,7 +796,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -812,7 +812,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = PACK_8A8B8G8R(FixedToInt(span.red), \
@@ -822,7 +822,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.alpha += span.alphaStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -838,7 +838,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = PACK_8A8R8G8B(FixedToInt(span.red), \
@@ -848,7 +848,7 @@
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.alpha += span.alphaStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -863,7 +863,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = PACK_8R8G8B(FixedToInt(span.red), \
@@ -871,7 +871,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -886,7 +886,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
PIXEL_TYPE *pixel = pRow; \
for (i = 0; i < span.end; i++, pixel++) { \
@@ -896,7 +896,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -910,7 +910,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -921,7 +921,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -936,7 +936,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) PACK_5R6G5B(FixedToInt(span.red), \
@@ -944,7 +944,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -960,7 +960,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -969,7 +969,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -984,7 +984,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
XDITHER_SETUP(y); \
@@ -994,7 +994,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1007,7 +1007,7 @@
#define SETUP_CODE \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
XDITHER_SETUP(y); \
@@ -1018,7 +1018,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1033,7 +1033,7 @@
#define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
#define SETUP_CODE \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
LOOKUP_SETUP; \
for (i = 0; i < span.end; i++) { \
@@ -1042,7 +1042,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1058,7 +1058,7 @@
#define SETUP_CODE \
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -1067,7 +1067,7 @@
span.red += span.redStep; \
span.green += span.greenStep; \
span.blue += span.blueStep; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1082,12 +1082,12 @@
XMesaImage *img = xrb->ximage; \
unsigned long pixel; \
PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
XMesaPutPixel(img, x, y, pixel); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1103,11 +1103,11 @@
GET_XRB(xrb); \
unsigned long p = PACK_8B8G8R( v2->color[0], \
v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1123,11 +1123,11 @@
GET_XRB(xrb); \
unsigned long p = PACK_8R8G8B( v2->color[0], \
v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1143,11 +1143,11 @@
GET_XRB(xrb); \
unsigned long p = PACK_8R8G8B( v2->color[0], \
v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1162,14 +1162,14 @@
#define SETUP_CODE \
GET_XRB(xrb); \
const GLubyte *color = v2->color;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
PIXEL_TYPE *pixel = pRow; \
for (i = 0; i < span.end; i++, pixel++) { \
pixel->r = color[RCOMP]; \
pixel->g = color[GCOMP]; \
pixel->b = color[BCOMP]; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1182,7 +1182,7 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
@@ -1190,7 +1190,7 @@
PACK_TRUEDITHER(p, x, y, v2->color[0], \
v2->color[1], v2->color[2] ); \
XMesaPutPixel(img, x, y, p); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1206,11 +1206,11 @@
GET_XRB(xrb); \
unsigned long p = PACK_5R6G5B( v2->color[0], \
v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1226,13 +1226,13 @@
XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GET_XRB(xrb); \
const GLubyte *color = v2->color;
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
PACK_TRUEDITHER(pRow[i], x, y, color[RCOMP], \
color[GCOMP], color[BCOMP]); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1247,13 +1247,13 @@
#define SETUP_CODE \
GET_XRB(xrb); \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
FLAT_DITHER_ROW_SETUP(YFLIP(xrb, y)); \
for (i = 0; i < span.end; i++, x++) { \
pRow[i] = (PIXEL_TYPE) FLAT_DITHER(x); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1266,14 +1266,14 @@
GET_XRB(xrb); \
XMesaImage *img = xrb->ximage; \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
FLAT_DITHER_ROW_SETUP(y); \
for (i = 0; i < span.end; i++, x++) { \
unsigned long p = FLAT_DITHER(x); \
XMesaPutPixel(img, x, y, p ); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1291,12 +1291,12 @@
GLubyte r = v2->color[0]; \
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2];
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
GLint x = span.x, y = YFLIP(xrb, span.y); \
for (i = 0; i < span.end; i++, x++) { \
pRow[i] = (PIXEL_TYPE) DITHER_HPCR(x, y, r, g, b); \
- }
+ } }
#include "swrast/s_tritemp.h"
@@ -1315,11 +1315,11 @@
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2]; \
GLubyte p = LOOKUP(r,g,b);
-#define RENDER_SPAN( span ) \
+#define RENDER_SPAN( span ) { \
GLuint i; \
for (i = 0; i < span.end; i++) { \
pRow[i] = (PIXEL_TYPE) p; \
- }
+ } }
#include "swrast/s_tritemp.h"

14
MesaLib/patches/patch-am Normal file
View file

@ -0,0 +1,14 @@
$NetBSD: patch-am,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/drivers/x11/xmesaP.h.orig 2007-11-01 11:30:52.000000000 -0400
+++ src/mesa/drivers/x11/xmesaP.h
@@ -228,7 +228,8 @@ struct xmesa_buffer {
/* 0 = not available */
/* 1 = XImage support available */
/* 2 = Pixmap support available too */
-#if defined(USE_XSHM) && !defined(XFree86Server)
+#if (defined(USE_XSHM) || defined(USE_XSHM_HDRONLY)) && \
+ !defined(XFree86Server)
XShmSegmentInfo shminfo;
#endif

17
MesaLib/patches/patch-an Normal file
View file

@ -0,0 +1,17 @@
$NetBSD: patch-an,v 1.2 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/main/glheader.h.orig 2007-09-20 17:11:58.000000000 -0400
+++ src/mesa/main/glheader.h
@@ -77,6 +77,12 @@
# if _MSC_VER == 1200
typedef UINT_PTR uintptr_t;
# endif
+#elif defined(__INTERIX)
+/* Interix 3.x has a gcc that shadows this. */
+# ifndef _UINTPTR_T_DEFINED
+ typedef unsigned long uintptr_t;
+# define _UINTPTR_T_DEFINED
+# endif
#else
# include <inttypes.h>
#endif

28
MesaLib/patches/patch-ao Normal file
View file

@ -0,0 +1,28 @@
$NetBSD: patch-ao,v 1.2 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/x86/common_x86.c.orig 2007-07-12 16:49:55.000000000 -0400
+++ src/mesa/x86/common_x86.c
@@ -38,7 +38,7 @@
#if defined(USE_SSE_ASM) && defined(__linux__)
#include <linux/version.h>
#endif
-#if defined(USE_SSE_ASM) && defined(__FreeBSD__)
+#if defined(USE_SSE_ASM) && (defined(__FreeBSD__) || defined(__NetBSD__))
#include <sys/types.h>
#include <sys/sysctl.h>
#endif
@@ -113,6 +113,14 @@ static void check_os_sse_support( void )
if (ret || !enabled)
_mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
}
+#elif defined (__NetBSD__)
+ {
+ int ret, enabled;
+ size_t len = sizeof(enabled);
+ ret = sysctlbyname("machdep.sse", &enabled, &len, (void *)NULL, 0);
+ if (ret || !enabled)
+ _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
+ }
#elif defined(WIN32)
LPTOP_LEVEL_EXCEPTION_FILTER oldFilter;

33
MesaLib/patches/patch-at Normal file
View file

@ -0,0 +1,33 @@
$NetBSD: patch-at,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
--- src/glx/x11/Makefile.orig 2007-11-01 11:30:52.000000000 -0400
+++ src/glx/x11/Makefile
@@ -53,10 +53,12 @@ INCLUDES = -I. \
##### RULES #####
.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(INCLUDES) \
+ $(CFLAGS) $(EXTRA_DEFINES) $< -o $(@:.o=.lo)
.S.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(INCLUDES) \
+ $(CFLAGS) $(EXTRA_DEFINES) $< -o $(@.o=.lo)
##### TARGETS #####
@@ -64,9 +66,10 @@ default: depend $(TOP)/$(LIB_DIR)/$(GL_L
# Make libGL
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
- $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- -major 1 -minor 2 $(MKLIB_OPTIONS) \
- -install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
+ $(LIBTOOL) --mode=link $(CC) \
+ -o $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) \
+ $(LDFLAGS) -version-info 1:2 $(GL_LIB_DEPS) \
+ -rpath $(PREFIX)/lib $(OBJECTS:.o=.lo)
depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_ASM_API) Makefile

68
MesaLib/patches/patch-au Normal file
View file

@ -0,0 +1,68 @@
$NetBSD: patch-au,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/shader/slang/library/Makefile.orig 2007-06-21 18:10:54.000000000 -0400
+++ src/mesa/shader/slang/library/Makefile
@@ -28,26 +28,26 @@ builtin: builtin_110 builtin_120
#
syn_to_c: syn_to_c.c
- $(CC) syn_to_c.c -o syn_to_c
+ $(LIBTOOL) --mode=link $(CC) syn_to_c.c -o syn_to_c -no-install
gc_to_bin: gc_to_bin.c slang_shader_syn.h
- $(CC) gc_to_bin.c -o gc_to_bin
+ $(LIBTOOL) --mode=link $(CC) gc_to_bin.c -o gc_to_bin -no-install
#
# syntax scripts
#
slang_pp_directives_syn.h: syn_to_c slang_pp_directives.syn
- ./syn_to_c slang_pp_directives.syn > slang_pp_directives_syn.h
+ $(LIBTOOL) --mode=execute ./syn_to_c slang_pp_directives.syn > slang_pp_directives_syn.h
slang_pp_expression_syn.h: syn_to_c slang_pp_expression.syn
- ./syn_to_c slang_pp_expression.syn > slang_pp_expression_syn.h
+ $(LIBTOOL) --mode=execute ./syn_to_c slang_pp_expression.syn > slang_pp_expression_syn.h
slang_shader_syn.h: syn_to_c slang_shader.syn
- ./syn_to_c slang_shader.syn > slang_shader_syn.h
+ $(LIBTOOL) --mode=execute ./syn_to_c slang_shader.syn > slang_shader_syn.h
slang_pp_version_syn.h: syn_to_c slang_pp_version.syn
- ./syn_to_c slang_pp_version.syn > slang_pp_version_syn.h
+ $(LIBTOOL) --mode=execute ./syn_to_c slang_pp_version.syn > slang_pp_version_syn.h
#
# builtin library sources
@@ -59,23 +59,23 @@ builtin_120: slang_120_core_gc.h slang_b
slang_120_core_gc.h: gc_to_bin slang_120_core.gc
- ./gc_to_bin 1 slang_120_core.gc slang_120_core_gc.h
+ $(LIBTOOL) --mode=execute ./gc_to_bin 1 slang_120_core.gc slang_120_core_gc.h
slang_builtin_120_common_gc.h: gc_to_bin slang_builtin_120_common.gc
- ./gc_to_bin 1 slang_builtin_120_common.gc slang_builtin_120_common_gc.h
+ $(LIBTOOL) --mode=execute ./gc_to_bin 1 slang_builtin_120_common.gc slang_builtin_120_common_gc.h
slang_builtin_120_fragment_gc.h: gc_to_bin slang_builtin_120_fragment.gc
- ./gc_to_bin 1 slang_builtin_120_fragment.gc slang_builtin_120_fragment_gc.h
+ $(LIBTOOL) --mode=execute ./gc_to_bin 1 slang_builtin_120_fragment.gc slang_builtin_120_fragment_gc.h
slang_common_builtin_gc.h: gc_to_bin slang_common_builtin.gc
- ./gc_to_bin 1 slang_common_builtin.gc slang_common_builtin_gc.h
+ $(LIBTOOL) --mode=execute ./gc_to_bin 1 slang_common_builtin.gc slang_common_builtin_gc.h
slang_core_gc.h: gc_to_bin slang_core.gc
- ./gc_to_bin 1 slang_core.gc slang_core_gc.h
+ $(LIBTOOL) --mode=execute ./gc_to_bin 1 slang_core.gc slang_core_gc.h
slang_fragment_builtin_gc.h: gc_to_bin slang_fragment_builtin.gc
- ./gc_to_bin 1 slang_fragment_builtin.gc slang_fragment_builtin_gc.h
+ $(LIBTOOL) --mode=execute ./gc_to_bin 1 slang_fragment_builtin.gc slang_fragment_builtin_gc.h
slang_vertex_builtin_gc.h: gc_to_bin slang_vertex_builtin.gc
- ./gc_to_bin 2 slang_vertex_builtin.gc slang_vertex_builtin_gc.h
+ $(LIBTOOL) --mode=execute ./gc_to_bin 2 slang_vertex_builtin.gc slang_vertex_builtin_gc.h

12
MesaLib/patches/patch-cb Normal file
View file

@ -0,0 +1,12 @@
$NetBSD: patch-cb,v 1.1 2008/02/26 06:47:37 bsadewitz Exp $
--- src/mesa/x86-64/Makefile.orig 2007-06-21 18:10:54.000000000 -0400
+++ src/mesa/x86-64/Makefile
@@ -24,6 +24,6 @@ clean:
# need some special rules here, unfortunately
matypes.h: ../main/mtypes.h ../tnl/t_context.h ../x86/gen_matypes
- ../x86/gen_matypes | grep -v '#include "assyntax.h' > matypes.h
+ $(LIBTOOL) --mode=execute ../x86/gen_matypes | grep -v '#include "assyntax.h' > matypes.h
xform4.o: matypes.h

11
glu/DESCR Normal file
View file

@ -0,0 +1,11 @@
This is the GLU polygon tessellation facility for Mesa implemented by Bogdan
Sikorski. The tessellation module is provided under the same terms as the
Mesa package.
This software tries to be fully compliant with the OpenGL routines. By
"tries" I mean that up to my knowledge it behaves as OpenGL tessellation
routines. However, the author makes no claim that Mesa is in any way a
compatible replacement for OpenGL or associated with Silicon Graphics, Inc.
Those who want a licensed implementation of OpenGL should contact a licensed
vendor. This software is distributed under the terms of the GNU Library
General Public License, see the LICENSE file for details.

19
glu/Makefile Normal file
View file

@ -0,0 +1,19 @@
# $NetBSD: Makefile,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
PKGNAME= glu-${MESA_PKGVERSION}
COMMENT= GLU polygon tessellation facility for Mesa
CONFLICTS+= Mesa-glx-[0-9]*
CONFLICTS+= Mesa<3.2.1
.include "../../wip/Mesa/Makefile.lib"
INSTLIBS= ${WRKSRC}/src/glu/sgi/libGLU.la
BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=${MESA_VERSION}
.include "../../wip/MesaLib/buildlink3.mk"
pre-build:
cd ${WRKSRC} && ${RM} -fr src/mesa src/glut src/glw progs
.include "../../mk/bsd.pkg.mk"

3
glu/PLIST Normal file
View file

@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
lib/libGLU.la
lib/pkgconfig/glu.pc

22
glu/buildlink3.mk Normal file
View file

@ -0,0 +1,22 @@
# $NetBSD: buildlink3.mk,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
GLU_BUILDLINK3_MK:= ${GLU_BUILDLINK3_MK}+
.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+= glu
.endif
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nglu}
BUILDLINK_PACKAGES+= glu
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}glu
.if !empty(GLU_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.glu+= glu>=3.4.2
BUILDLINK_ABI_DEPENDS.glu+= glu>=6.4.1nb1
BUILDLINK_PKGSRCDIR.glu?= ../../wip/glu
.endif # GLU_BUILDLINK3_MK
.include "../../wip/MesaLib/buildlink3.mk"
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

80
glu/builtin.mk Normal file
View file

@ -0,0 +1,80 @@
# $NetBSD: builtin.mk,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
BUILTIN_PKG:= glu
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 empty(H_GLU:M__nonexistent__)
BUILTIN_IMAKE_CHECK:= glu:BuildGLULibrary
. include "../../mk/buildlink3/imake-check.mk"
IS_BUILTIN.glu= ${BUILTIN_IMAKE_CHECK.glu}
. endif
.endif
MAKEVARS+= IS_BUILTIN.glu
###
### 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]) && \
empty(H_GLU:M__nonexistent__)
. include "../../wip/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)
. 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 dep in ${BUILDLINK_API_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; \
fi
. 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])
BUILDLINK_API_DEPENDS.glu+= glu>=6.0
. endif
. if !empty(USE_BUILTIN.glu:M[yY][eE][sS])
BUILDLINK_PREFIX.glu= ${X11BASE}
. include "../../mk/x11.buildlink3.mk"
. include "../../mk/x11.builtin.mk"
. endif
.endif # CHECK_BUILTIN.glu

7
glut/DESCR Normal file
View file

@ -0,0 +1,7 @@
Mesa is a 3-D graphics library with an API which is very similar to that
of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax
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 GLUT part of the MesaDemos distribution.

22
glut/Makefile Normal file
View file

@ -0,0 +1,22 @@
# $NetBSD: Makefile,v 1.4 2008/02/26 06:47:37 bsadewitz Exp $
PKGNAME= glut-${MESA_PKGVERSION}
COMMENT= GLUT Graphics library similar to SGI's OpenGL
CONFLICTS+= Mesa-glx-[0-9]*
CONFLICTS+= Mesa<3.2.1
.include "../../wip/Mesa/Makefile.lib"
BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=${MESA_PKGVERSION}
BUILDLINK_API_DEPENDS.glu+= glu>=${MESA_PKGVERSION}
.include "../../wip/MesaLib/buildlink3.mk"
.include "../../x11/libXmu/buildlink3.mk"
.include "../../x11/libXi/buildlink3.mk"
.include "../../wip/glu/buildlink3.mk"
pre-build:
cd ${WRKSRC} && ${RM} -fr src/mesa src/glu src/glw progs
.include "../../mk/bsd.pkg.mk"

5
glut/PLIST Normal file
View file

@ -0,0 +1,5 @@
@comment $NetBSD: PLIST,v 1.3 2008/02/26 06:47:37 bsadewitz Exp $
include/GL/glut.h
include/GL/glutf90.h
lib/libglut.la
@unexec ${RMDIR} %D/include/GL >/dev/null 2>&1 || ${TRUE}

24
glut/buildlink3.mk Normal file
View file

@ -0,0 +1,24 @@
# $NetBSD: buildlink3.mk,v 1.4 2008/02/26 06:47:37 bsadewitz Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
GLUT_BUILDLINK3_MK:= ${GLUT_BUILDLINK3_MK}+
.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+= glut
.endif
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nglut}
BUILDLINK_PACKAGES+= glut
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}glut
.if !empty(GLUT_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.glut+= glut>=3.4.2
BUILDLINK_ABI_DEPENDS.glut+= glut>=6.4.1nb1
BUILDLINK_PKGSRCDIR.glut?= ../../wip/glut
.endif # GLUT_BUILDLINK3_MK
.include "../../wip/MesaLib/buildlink3.mk"
.include "../../x11/libXmu/buildlink3.mk"
.include "../../x11/libXi/buildlink3.mk"
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}