diff options
author | kwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09> | 2011-02-19 00:50:33 +0800 |
---|---|---|
committer | kwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09> | 2011-02-19 00:50:33 +0800 |
commit | d5285b0cb17a980da1e3288e09852bf60016b643 (patch) | |
tree | 0cede665375609c384990abd86fce75aed6195be | |
parent | 4207532167df12eb772d649e992d9afcbcb80967 (diff) | |
download | xorg-devel-ports-d5285b0cb17a980da1e3288e09852bf60016b643.tar.gz xorg-devel-ports-d5285b0cb17a980da1e3288e09852bf60016b643.tar.zst xorg-devel-ports-d5285b0cb17a980da1e3288e09852bf60016b643.zip |
* Fix bsd.mesalibs.mk so PATCHDIR points to libGL/files
* Move the EXTRA_PATCH for mesalib74-configure from the ports to bsd.mesalibs.mk.
remove mesali74-configure from all ports except libGL for obviously reasons.
Only dri and mesa-demos have own patches, didn't want to bother moving them.
* The extra patches in libGL/files/patch-src* are build patches for trunk Clang.
And have been accepted upstream. Work done by dim@.
* De-author pkg-descr's.
git-svn-id: https://trillian.chruetertee.ch/svn/ports/branches/xorg-dev@212 058c260c-8361-11dd-a0ac-aa2bafec7d09
31 files changed, 655 insertions, 6 deletions
diff --git a/graphics/dri/Makefile b/graphics/dri/Makefile index 941e19c..4ea164c 100644 --- a/graphics/dri/Makefile +++ b/graphics/dri/Makefile @@ -21,9 +21,9 @@ MAKE_JOBS_UNSAFE= yes USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto -.ifndef WITHOUT_NOUVEAU -EXTRA_PATCHES+= ${FILESDIR}/mesalib74-configure -.endif +EXTRA_PATCHES+= ${FILESDIR}/patch-mach64_context.h \ + ${FILESDIR}/patch-sis_context.h + do-install: cd ${WRKSRC}/src/mesa; ${GMAKE} install-dri diff --git a/graphics/dri/pkg-descr b/graphics/dri/pkg-descr index e35a1d1..776a52a 100644 --- a/graphics/dri/pkg-descr +++ b/graphics/dri/pkg-descr @@ -3,6 +3,3 @@ DRI. With an X Server configured for the DRI they allow direct rendering of hardware-accelerated OpenGL. WWW: http://dri.sourceforge.net/ - -- Eric Anholt -anholt@FreeBSD.org diff --git a/graphics/libGL/Makefile b/graphics/libGL/Makefile new file mode 100644 index 0000000..af767f3 --- /dev/null +++ b/graphics/libGL/Makefile @@ -0,0 +1,29 @@ +# New ports collection makefile for: xorg-server +# Date created: 7 May 2004 +# Whom: anholt@FreeBSD.org +# +# $FreeBSD: ports/graphics/libGL/Makefile,v 1.16 2010/08/15 09:27:28 arved Exp $ +# + +PORTNAME= libGL +PORTVERSION= ${MESAVERSION} +CATEGORIES= graphics + +COMMENT= OpenGL library that renders using GLX or DRI + +BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend +LIB_DEPENDS+= drm:${PORTSDIR}/graphics/libdrm \ + expat.6:${PORTSDIR}/textproc/expat2 + +USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto:both + +.ifndef WITHOUT_NOUVEAU +EXTRA_PATCHES+= ${FILESDIR}/mesalib74-configure +.endif + +do-install: + ${RM} -f ${WRKSRC}/include/GL/glu*.h + cd ${WRKSRC}/src/mesa; ${GMAKE} install-libgl + +.include "${.CURDIR}/bsd.mesalib.mk" +.include <bsd.port.mk> diff --git a/graphics/libGL/bsd.mesalib.mk b/graphics/libGL/bsd.mesalib.mk new file mode 100644 index 0000000..2814728 --- /dev/null +++ b/graphics/libGL/bsd.mesalib.mk @@ -0,0 +1,121 @@ +#-*- mode: Fundamental; tab-width: 4; -*- +# ex:ts=4 +# +# bsd.mesa.mk - an attempt to refactor MesaLib ports. +# +# Created by: Florent Thoumie <flz@FreeBSD.org> +# +# !!! Here be dragons !!! (they seem to be everywhere these days) +# +# Remember to upgrade the following ports everytime you bump MESAVERSION: +# +# - graphics/libGL +# - graphics/libGLU +# - graphics/libGLw +# - graphics/libglut +# - graphics/dri +# +# $FreeBSD: ports/graphics/libGL/bsd.mesalib.mk,v 1.16 2010/02/07 11:51:05 nork Exp $ +# + +MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} +MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} + +.ifdef WITHOUT_NOUVEAU +MESABASEVERSION= 7.6.1 +MESASUBVERSION= +PLIST_SUB+= MESALIB76= MESALIB74="@comment " +.else +MESABASEVERSION= 7.4.4 +MESASUBVERSION= +PLIST_SUB+= MESALIB74= MESALIB76="@comment " +EXTRA_PATCHES+= ${PATCHDIR}/mesalib74-configure +.endif + +MASTER_SITES?= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/:mesa,glut,demos +MASTER_SITE_SUBDIR= mesa3d +DISTFILES= MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}:mesa +MAINTAINER?= x11@FreeBSD.org + +USE_BZIP2= yes +USE_GMAKE= yes +USE_LDCONFIG= yes +GNU_CONFIGURE= yes +MAKE_JOBS_SAFE= yes + +CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include \ + LDFLAGS=-L${LOCALBASE}/lib +CONFIGURE_ARGS= --disable-gallium + +ALL_TARGET= default + +#MAKE_ARGS= SHELL=${SH} +#CFLAGS+= -DUSE_XSHM -DHZ=100 + +PATCHDIR= ${.CURDIR}/../../graphics/libGL/files +WRKSRC= ${WRKDIR}/Mesa-${MESABASEVERSION} + +.if !defined(ARCH) +ARCH!= uname -p +.endif + +.if ${ARCH} == alpha +FAST_MATH= +.else +FAST_MATH= -ffast-math +.endif + +COMPONENT= ${PORTNAME:L:C/^lib//:C/mesa-//} + +.if ${COMPONENT:Mglut} == "" +. if ${COMPONENT:Mglu} == "" +CONFIGURE_ARGS+= --disable-glu --disable-glut +. else +CONFIGURE_ARGS+= --disable-glut +. endif +.else +DISTFILES+= MesaGLUT-${MESADISTVERSION}${EXTRACT_SUFX}:glut +.endif + +.if ${COMPONENT:Mglw} == "" +CONFIGURE_ARGS+= --disable-glw +.else +CONFIGURE_ARGS+= --enable-motif +.endif + +.if ${COMPONENT:Mdemos} == "" +CONFIGURE_ARGS+= --with-demos=no +.else +DISTFILES+= MesaDemos-${MESADISTVERSION}${EXTRACT_SUFX}:demos +CONFIGURE_ARGS+= --with-demos=demos,xdemos +.endif + +.if ${COMPONENT:Mdri} == "" +CONFIGURE_ARGS+= --with-dri-drivers=no +.endif + +.if defined(WITHOUT_XCB) +CONFIGURE_ARGS+= --disable-xcb +.else +CONFIGURE_ARGS+= --enable-xcb +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \ + ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \ + ${WRKSRC}/src/glu/Makefile \ + ${WRKSRC}/src/glw/Makefile \ + ${WRKSRC}/src/mesa/Makefile \ + ${WRKSRC}/src/mesa/drivers/dri/Makefile +.if ${COMPONENT:Mglut} != "" + @${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \ + ${WRKSRC}/src/glut/glx/Makefile +.endif +.if ${COMPONENT:Mdemos} != "" + @${REINPLACE_CMD} -e 's|../images/|${DATADIR}/images/|g' \ + -e 's|geartrain.dat|${DATADIR}/data/geartrain.dat|g' \ + -e 's|terrain.dat|${DATADIR}/data/terrain.dat|g' \ + -e 's|isosurf.dat|${DATADIR}/data/isosurf.dat|g' \ + ${WRKSRC}/progs/demos/*.c ${WRKSRC}/progs/xdemos/*.c +.endif diff --git a/graphics/libGL/distinfo b/graphics/libGL/distinfo new file mode 100644 index 0000000..b44fb33 --- /dev/null +++ b/graphics/libGL/distinfo @@ -0,0 +1,6 @@ +MD5 (MesaLib-7.4.4.tar.bz2) = b66528d314c574dccbe0ed963cac5e93 +SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec +SIZE (MesaLib-7.4.4.tar.bz2) = 3375615 +MD5 (MesaLib-7.6.1.tar.bz2) = 7db4617e9e10ad3aca1b64339fd71b7d +SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44 +SIZE (MesaLib-7.6.1.tar.bz2) = 4886995 diff --git a/graphics/dri/files/mesalib74-configure b/graphics/libGL/files/mesalib74-configure index af45b71..af45b71 100644 --- a/graphics/dri/files/mesalib74-configure +++ b/graphics/libGL/files/mesalib74-configure diff --git a/graphics/libGL/files/patch-src__mesa__x86-64__glapi_x86-64.S b/graphics/libGL/files/patch-src__mesa__x86-64__glapi_x86-64.S new file mode 100644 index 0000000..908a6fe --- /dev/null +++ b/graphics/libGL/files/patch-src__mesa__x86-64__glapi_x86-64.S @@ -0,0 +1,12 @@ +--- ./src/mesa/x86-64/glapi_x86-64.S.orig 2009-03-13 04:28:49.000000000 +0100 ++++ ./src/mesa/x86-64/glapi_x86-64.S 2011-01-28 18:12:18.000000000 +0100 +@@ -73,7 +73,8 @@ _x86_64_get_dispatch: + + .p2align 4,,15 + _x86_64_get_dispatch: +- movq _gl_DispatchTSD(%rip), %rdi ++ movq _gl_DispatchTSD@GOTPCREL(%rip), %rax ++ movl (%rax), %edi + jmp pthread_getspecific@PLT + + #elif defined(THREADS) diff --git a/graphics/libGL/files/patch-src__mesa__x86-64__xform4.S b/graphics/libGL/files/patch-src__mesa__x86-64__xform4.S new file mode 100644 index 0000000..9735b1f --- /dev/null +++ b/graphics/libGL/files/patch-src__mesa__x86-64__xform4.S @@ -0,0 +1,65 @@ +--- ./src/mesa/x86-64/xform4.S.orig 2009-01-22 18:38:35.000000000 +0100 ++++ ./src/mesa/x86-64/xform4.S 2011-01-28 18:09:55.000000000 +0100 +@@ -53,7 +53,7 @@ _mesa_x86_64_transform_points4_general: + * rdx = source + */ + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -135,7 +135,7 @@ _mesa_x86_64_transform_points4_3d: + movaps 16(%rax), %xmm10 + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -195,7 +195,7 @@ p4_3d_done: + _mesa_x86_64_transform_points4_identity: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -223,7 +223,7 @@ p4_identity_done: + _mesa_3dnow_transform_points4_3d_no_rot: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -287,7 +287,7 @@ p4_3d_no_rot_done: + _mesa_3dnow_transform_points4_perspective: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -353,7 +353,7 @@ p4_perspective_done: + _mesa_3dnow_transform_points4_2d_no_rot: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -408,7 +408,7 @@ p4_2d_no_rot_done: + _mesa_3dnow_transform_points4_2d: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ diff --git a/graphics/libGL/files/patch-src__mesa__x86__glapi_x86.S b/graphics/libGL/files/patch-src__mesa__x86__glapi_x86.S new file mode 100644 index 0000000..71da78c --- /dev/null +++ b/graphics/libGL/files/patch-src__mesa__x86__glapi_x86.S @@ -0,0 +1,11 @@ +--- ./src/mesa/x86/glapi_x86.S.orig 2009-03-13 04:28:49.000000000 +0100 ++++ ./src/mesa/x86/glapi_x86.S 2011-01-28 18:11:56.000000000 +0100 +@@ -47,7 +47,7 @@ + #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX)) + + #if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) +-#define GLOBL_FN(x) GLOBL x ; .type x, function ++#define GLOBL_FN(x) GLOBL x ; .type x, @function + #else + #define GLOBL_FN(x) GLOBL x + #endif diff --git a/graphics/libGL/files/patch-src__mesa__x86__read_rgba_span_x86.S b/graphics/libGL/files/patch-src__mesa__x86__read_rgba_span_x86.S new file mode 100644 index 0000000..37b08d1 --- /dev/null +++ b/graphics/libGL/files/patch-src__mesa__x86__read_rgba_span_x86.S @@ -0,0 +1,11 @@ +--- ./src/mesa/x86/read_rgba_span_x86.S.orig 2008-08-25 16:46:47.000000000 +0200 ++++ ./src/mesa/x86/read_rgba_span_x86.S 2011-01-28 18:10:06.000000000 +0100 +@@ -648,7 +648,7 @@ _generic_read_RGBA_span_RGB565_MMX: + testl $0x01, %ecx + je .L01 + +- movzxw (%eax), %ecx ++ movzwl (%eax), %ecx + movd %ecx, %mm4 + + pshufw $0x00, %mm4, %mm0 diff --git a/graphics/libGL/pkg-descr b/graphics/libGL/pkg-descr new file mode 100644 index 0000000..eeba293 --- /dev/null +++ b/graphics/libGL/pkg-descr @@ -0,0 +1,4 @@ +This package contains the OpenGL library, which can perform rendering over GLX +or using the Direct Rendering Infrastructure. + +WWW: http://www.freedesktop.org/Software/xorg diff --git a/graphics/libGL/pkg-plist b/graphics/libGL/pkg-plist new file mode 100644 index 0000000..b07eac0 --- /dev/null +++ b/graphics/libGL/pkg-plist @@ -0,0 +1,20 @@ +include/GL/dmesa.h +include/GL/ggimesa.h +include/GL/gl.h +include/GL/gl_mangle.h +include/GL/glext.h +include/GL/glfbdev.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/vms_x_fix.h +%%MESALIB76%%include/GL/wglext.h +include/GL/wmesa.h +lib/libGL.so +lib/libGL.so.1 +libdata/pkgconfig/gl.pc +@dirrmtry include/GL diff --git a/graphics/libGLU/Makefile b/graphics/libGLU/Makefile new file mode 100644 index 0000000..ed9c288 --- /dev/null +++ b/graphics/libGLU/Makefile @@ -0,0 +1,23 @@ +# New ports collection makefile for: libGLU +# Date created: 7 May 2004 +# Whom: anholt@FreeBSD.org +# +# $FreeBSD: ports/graphics/libGLU/Makefile,v 1.13 2010/03/25 23:11:21 marius Exp $ +# + +PORTNAME= libGLU +PORTVERSION= ${MESAVERSION} +CATEGORIES= graphics + +COMMENT= OpenGL utility library + +USE_GL= gl +USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto + +do-install: + cd ${WRKSRC}/src/glu; ${GMAKE} install + ${INSTALL_DATA} ${WRKSRC}/include/GL/glu*.h ${PREFIX}/include/GL/ + cd ${WRKSRC}/src/glu; ${GMAKE} install + +.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk" +.include <bsd.port.mk> diff --git a/graphics/libGLU/distinfo b/graphics/libGLU/distinfo new file mode 100644 index 0000000..b44fb33 --- /dev/null +++ b/graphics/libGLU/distinfo @@ -0,0 +1,6 @@ +MD5 (MesaLib-7.4.4.tar.bz2) = b66528d314c574dccbe0ed963cac5e93 +SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec +SIZE (MesaLib-7.4.4.tar.bz2) = 3375615 +MD5 (MesaLib-7.6.1.tar.bz2) = 7db4617e9e10ad3aca1b64339fd71b7d +SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44 +SIZE (MesaLib-7.6.1.tar.bz2) = 4886995 diff --git a/graphics/libGLU/pkg-descr b/graphics/libGLU/pkg-descr new file mode 100644 index 0000000..3a7d2e7 --- /dev/null +++ b/graphics/libGLU/pkg-descr @@ -0,0 +1,3 @@ +This package contains the OpenGL utility library. + +WWW: http://www.freedesktop.org/Software/xorg diff --git a/graphics/libGLU/pkg-plist b/graphics/libGLU/pkg-plist new file mode 100644 index 0000000..330c54e --- /dev/null +++ b/graphics/libGLU/pkg-plist @@ -0,0 +1,5 @@ +include/GL/glu.h +include/GL/glu_mangle.h +lib/libGLU.so +lib/libGLU.so.1 +libdata/pkgconfig/glu.pc diff --git a/graphics/libGLw/Makefile b/graphics/libGLw/Makefile new file mode 100644 index 0000000..3e94523 --- /dev/null +++ b/graphics/libGLw/Makefile @@ -0,0 +1,24 @@ +# New ports collection makefile for: libGLw +# Date created: 7 May 2004 +# Whom: anholt@FreeBSD.org +# +# $FreeBSD: ports/graphics/libGLw/Makefile,v 1.9 2010/03/25 23:11:21 marius Exp $ +# + +PORTNAME= libGLw +PORTVERSION= ${MESAVERSION} +CATEGORIES= graphics + +COMMENT= OpenGL widgets library + +BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend +LIB_DEPENDS+= Xm.3:${PORTSDIR}/x11-toolkits/open-motif + +USE_GL= gl +USE_XORG= glproto xt x11 xext xxf86vm xdamage xfixes dri2proto + +do-install: + cd ${WRKSRC}/src/glw; ${GMAKE} install + +.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk" +.include <bsd.port.mk> diff --git a/graphics/libGLw/distinfo b/graphics/libGLw/distinfo new file mode 100644 index 0000000..b44fb33 --- /dev/null +++ b/graphics/libGLw/distinfo @@ -0,0 +1,6 @@ +MD5 (MesaLib-7.4.4.tar.bz2) = b66528d314c574dccbe0ed963cac5e93 +SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec +SIZE (MesaLib-7.4.4.tar.bz2) = 3375615 +MD5 (MesaLib-7.6.1.tar.bz2) = 7db4617e9e10ad3aca1b64339fd71b7d +SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44 +SIZE (MesaLib-7.6.1.tar.bz2) = 4886995 diff --git a/graphics/libGLw/pkg-descr b/graphics/libGLw/pkg-descr new file mode 100644 index 0000000..d3a7ea7 --- /dev/null +++ b/graphics/libGLw/pkg-descr @@ -0,0 +1,3 @@ +This package contains the OpenGL widgets library. + +WWW: http://www.mesa3d.org/ diff --git a/graphics/libGLw/pkg-plist b/graphics/libGLw/pkg-plist new file mode 100644 index 0000000..211b586 --- /dev/null +++ b/graphics/libGLw/pkg-plist @@ -0,0 +1,8 @@ +include/GL/GLwDrawA.h +include/GL/GLwDrawAP.h +include/GL/GLwMDrawA.h +include/GL/GLwMDrawAP.h +lib/libGLw.so +lib/libGLw.so.1 +libdata/pkgconfig/glw.pc +@dirrmtry include/GL diff --git a/graphics/libglut/Makefile b/graphics/libglut/Makefile new file mode 100644 index 0000000..ebd0ef1 --- /dev/null +++ b/graphics/libglut/Makefile @@ -0,0 +1,25 @@ +# New ports collection makefile for: libglut +# Date created: Tue Feb 7 12:02:49 1995 +# Whom: anholt +# +# $FreeBSD: ports/graphics/libglut/Makefile,v 1.24 2010/03/25 23:11:22 marius Exp $ +# + +PORTNAME= libglut +PORTVERSION= ${MESAVERSION} +CATEGORIES= graphics + +MAINTAINER= x11@FreeBSD.org +COMMENT= OpenGL utility toolkit + +USE_GL= glu +USE_XORG= glproto x11 xext xxf86vm xdamage xfixes xi xmu dri2proto + +do-install: + cd ${WRKSRC}/src/glut/glx; ${GMAKE} install + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${WRKSRC}/include/GL/glutf90.h \ + ${PREFIX}/include/GL + +.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk" +.include <bsd.port.mk> diff --git a/graphics/libglut/distinfo b/graphics/libglut/distinfo new file mode 100644 index 0000000..f7e3f97 --- /dev/null +++ b/graphics/libglut/distinfo @@ -0,0 +1,12 @@ +MD5 (MesaLib-7.4.4.tar.bz2) = b66528d314c574dccbe0ed963cac5e93 +SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec +SIZE (MesaLib-7.4.4.tar.bz2) = 3375615 +MD5 (MesaGLUT-7.4.4.tar.bz2) = e14bbb52517e8121b31f1387515365ab +SHA256 (MesaGLUT-7.4.4.tar.bz2) = 66c9486d73061ffd8d17a05b6e62851fec575867a99ad8cfc6137c2c16848c2e +SIZE (MesaGLUT-7.4.4.tar.bz2) = 328900 +MD5 (MesaLib-7.6.1.tar.bz2) = 7db4617e9e10ad3aca1b64339fd71b7d +SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44 +SIZE (MesaLib-7.6.1.tar.bz2) = 4886995 +MD5 (MesaGLUT-7.6.1.tar.bz2) = ca9aecb91f05b1da9fd7d5eeb19d47d7 +SHA256 (MesaGLUT-7.6.1.tar.bz2) = c828f572a4e5c521e87ef265c5d2f1f02ba99ea2307e6323aa8165b152e4eb9d +SIZE (MesaGLUT-7.6.1.tar.bz2) = 321756 diff --git a/graphics/libglut/pkg-descr b/graphics/libglut/pkg-descr new file mode 100644 index 0000000..e5a5452 --- /dev/null +++ b/graphics/libglut/pkg-descr @@ -0,0 +1,5 @@ +libglut is a library provided with Mesa which provides an interface for creating +windows containing OpenGL contexts on a wide variety of platforms and handling +user interaction. + +WWW: http://www.mesa3d.org/ diff --git a/graphics/libglut/pkg-plist b/graphics/libglut/pkg-plist new file mode 100644 index 0000000..382dca6 --- /dev/null +++ b/graphics/libglut/pkg-plist @@ -0,0 +1,6 @@ +include/GL/glut.h +include/GL/glutf90.h +lib/libglut.so +lib/libglut.so.3 +libdata/pkgconfig/glut.pc +@dirrmtry include/GL diff --git a/graphics/mesa-demos/Makefile b/graphics/mesa-demos/Makefile new file mode 100644 index 0000000..32b0270 --- /dev/null +++ b/graphics/mesa-demos/Makefile @@ -0,0 +1,57 @@ +# New ports collection makefile for: mesa-demos +# Date created: 7 Nov 2003 +# Whom: anholt@FreeBSD.org +# +# $FreeBSD: ports/graphics/mesa-demos/Makefile,v 1.33 2010/10/29 11:18:38 ehaupt Exp $ +# + +PORTNAME= demos +PORTVERSION= ${MESAVERSION} +CATEGORIES= graphics +MASTER_SITES= CRITICAL/mesa3d:mesa,glut,demos +PKGNAMEPREFIX= mesa- + +MAINTAINER= c.petrik.sosa@gmail.com +COMMENT= OpenGL demos distributed with Mesa + +USE_GL= glu glut +USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto + +DATADIR= ${PREFIX}/share/${PKGNAMEPREFIX}${PORTNAME} + +OPTIONS= NVIDIA_GL "Use NVIDIA's libraries" off + +EXTRA_PATCHES+= ${FILESDIR}/patch-progs-xdemos-glxpixmap.c \ + ${FILESDIR}/patch-progs-xdemos-yuvrect_client.c + + +do-install: + @for i in demos xdemos; do \ + cd ${WRKSRC}/progs/$$i; \ + for j in `${MAKE} -V PROGS`; do \ + ${ECHO_CMD} ${INSTALL_PROGRAM} $$j ${PREFIX}/bin; \ + ${INSTALL_PROGRAM} $$j ${PREFIX}/bin; \ + done; \ + done + ${MKDIR} ${DATADIR}/images ${DATADIR}/data + @cd ${WRKSRC}/progs/images; \ + for i in `ls *.rgb*`; do \ + ${ECHO_CMD} ${INSTALL_DATA} $$i ${DATADIR}/images; \ + ${INSTALL_DATA} $$i ${DATADIR}/images; \ + done + @cd ${WRKSRC}/progs/demos; \ + for i in `ls *.dat`; do \ + ${ECHO_CMD} ${INSTALL_DATA} $$i ${DATADIR}/data; \ + ${INSTALL_DATA} $$i ${DATADIR}/data; \ + done + +.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk" +.include <bsd.port.pre.mk> +CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS} -I${LOCALBASE}/include" \ + LDFLAGS="${PTHREAD_LIBS} -L${LOCALBASE}/lib" + +.if defined(WITH_NVIDIA_GL) +CFLAGS+= -DWITH_NVIDIA_GL=1 +.endif + +.include <bsd.port.post.mk> diff --git a/graphics/mesa-demos/distinfo b/graphics/mesa-demos/distinfo new file mode 100644 index 0000000..f2bdb00 --- /dev/null +++ b/graphics/mesa-demos/distinfo @@ -0,0 +1,12 @@ +MD5 (MesaLib-7.4.4.tar.bz2) = b66528d314c574dccbe0ed963cac5e93 +SHA256 (MesaLib-7.4.4.tar.bz2) = eaf73d7a3a2dc959ddc0753abaa18160c64bec00b35bf4a0c96040b2072918ec +SIZE (MesaLib-7.4.4.tar.bz2) = 3375615 +MD5 (MesaDemos-7.4.4.tar.bz2) = 628142ec9a54cd28cc027e6ce26cff47 +SHA256 (MesaDemos-7.4.4.tar.bz2) = 2b055f1b364795caec122092dedca9ac3ecce4fcf61947f52a286a681e9d1111 +SIZE (MesaDemos-7.4.4.tar.bz2) = 1367659 +MD5 (MesaLib-7.6.1.tar.bz2) = 7db4617e9e10ad3aca1b64339fd71b7d +SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44 +SIZE (MesaLib-7.6.1.tar.bz2) = 4886995 +MD5 (MesaDemos-7.6.1.tar.bz2) = a4226f06732a02556fcf6be290b86dff +SHA256 (MesaDemos-7.6.1.tar.bz2) = d2368fc86d032dc6478df70f99b114abdf6c0c1da57bf1d3927ab179876f9c4b +SIZE (MesaDemos-7.6.1.tar.bz2) = 1547790 diff --git a/graphics/mesa-demos/files/config b/graphics/mesa-demos/files/config new file mode 100644 index 0000000..bbf7203 --- /dev/null +++ b/graphics/mesa-demos/files/config @@ -0,0 +1,30 @@ +# Configuration for mesa-demos port for FreeBSD +# Taken from Mesa CVS mesa/Mesa/configs/freebsd Rev 1.2 +# $FreeBSD: ports/graphics/mesa-demos/files/config,v 1.4 2008/04/19 17:50:27 miwi Exp $ +# + +# Set and remember $CFLAGS, $CXXFLAGS, $CC and $CXX before they are +# overriden in default include + +_CC := $(CC) +_CXX := $(CXX) +_CFLAGS := -fPIC -pedantic -I$(LOCALBASE)/include -DUSE_XSHM -DHZ=100 $(CFLAGS) \ + -DPTHREADS $(PTHREAD_CFLAGS) +_CXXFLAGS := -fPIC -pedantic $(CXXFLAGS) + +include $(TOP)/configs/default + +CONFIG_NAME = FreeBSD + +# Now reset compiler and flags +CC = $(_CC) +CXX = $(_CXX) +CFLAGS = $(_CFLAGS) +CXXFLAGS = $(_CXXFLAGS) + +GLUT_CFLAGS = -fexceptions + +LIB_DIR = $(LOCALBASE)/lib + +APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm $(PTHREAD_LIBS) + diff --git a/graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c b/graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c new file mode 100644 index 0000000..1dfc2c4 --- /dev/null +++ b/graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c @@ -0,0 +1,11 @@ +--- progs/xdemos/glxpixmap.c.orig Fri Apr 6 22:29:09 2007 ++++ progs/xdemos/glxpixmap.c Fri Apr 6 22:38:33 2007 +@@ -105,7 +105,7 @@ + * to render correctly. This is because Mesa allows RGB rendering + * into any kind of visual, not just TrueColor or DirectColor. + */ +-#ifdef GLX_MESA_pixmap_colormap ++#if defined(GLX_MESA_pixmap_colormap) && !defined(WITH_NVIDIA_GL) + if (strstr(glXQueryExtensionsString(dpy, 0), "GLX_MESA_pixmap_colormap")) { + /* stand-alone Mesa, specify the colormap */ + glxpm = glXCreateGLXPixmapMESA( dpy, visinfo, pm, attr.colormap ); diff --git a/graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c b/graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c new file mode 100644 index 0000000..1dbf8e3 --- /dev/null +++ b/graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c @@ -0,0 +1,28 @@ +--- progs/xdemos/yuvrect_client.c.orig Fri Apr 6 22:42:30 2007 ++++ progs/xdemos/yuvrect_client.c Fri Apr 6 22:48:05 2007 +@@ -140,7 +140,11 @@ + exit(0); + } + +- glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0); ++ #ifdef WITH_NVIDIA_GL ++ glx_memory = glXAllocateMemoryNV(ImgWidth * ImgHeight * 2, 0, 0 ,0); ++ #else ++ glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0); ++ #endif + if (!glx_memory) + { + fprintf(stderr,"Failed to allocate MESA memory\n"); +@@ -317,7 +321,11 @@ + glXSwapBuffers(dpy, win); + event_loop(dpy, win); + +- glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory); ++ #ifdef WITH_NVIDIA_GL ++ glXFreeMemoryNV(glx_memory); ++ #else ++ glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory); ++ #endif + glXDestroyContext(dpy, ctx); + XDestroyWindow(dpy, win); + XCloseDisplay(dpy); diff --git a/graphics/mesa-demos/pkg-descr b/graphics/mesa-demos/pkg-descr new file mode 100644 index 0000000..2d69b2e --- /dev/null +++ b/graphics/mesa-demos/pkg-descr @@ -0,0 +1,10 @@ +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. +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. + +WWW: http://www.mesa3d.org/ diff --git a/graphics/mesa-demos/pkg-plist b/graphics/mesa-demos/pkg-plist new file mode 100644 index 0000000..f729403 --- /dev/null +++ b/graphics/mesa-demos/pkg-plist @@ -0,0 +1,99 @@ +bin/arbfplight +bin/arbfslight +bin/arbocclude +bin/bounce +bin/clearspd +bin/copypix +bin/corender +bin/cubemap +%%MESALIB76%%bin/dinoshade +bin/drawpix +bin/engine +bin/fbo_firecube +%%MESALIB76%%bin/fbotexture +bin/fire +bin/fogcoord +bin/fplight +bin/fslight +bin/gamma +bin/gearbox +bin/gears +bin/geartrain +bin/glinfo +bin/gloss +%%MESALIB74%%bin/glslnoise +bin/glsync +bin/gltestperf +bin/glthreads +%%MESALIB74%%bin/glutfx +bin/glxcontexts +bin/glxdemo +bin/glxgears +bin/glxgears_fbconfig +bin/glxgears_pixmap +bin/glxheads +bin/glxinfo +bin/glxpbdemo +bin/glxpixmap +bin/glxsnoop +bin/glxswapcontrol +bin/ipers +bin/isosurf +bin/lodbias +bin/manywin +bin/morph3d +bin/multiarb +%%MESALIB76%%bin/multictx +bin/offset +bin/overlay +bin/paltex +bin/pbdemo +bin/pbinfo +bin/pointblast +%%MESALIB76%%bin/projtex +bin/rain +bin/ray +bin/readpix +bin/reflect +bin/renormal +bin/shadowtex +bin/sharedtex +%%MESALIB76%%bin/sharedtex_mt +bin/singlebuffer +bin/spectex +bin/spriteblast +bin/stex3d +%%MESALIB74%%bin/streaming_rect +bin/teapot +bin/terrain +bin/tessdemo +bin/texcyl +%%MESALIB74%%bin/texdown +bin/texenv +%%MESALIB74%%bin/texobj +bin/texture_from_pixmap +%%MESALIB76%%bin/textures +bin/trispd +bin/tunnel +bin/tunnel2 +bin/vao_demo +bin/wincopy +bin/winpos +bin/xfont +bin/xrotfontdemo +%%DATADIR%%/data/geartrain.dat +%%DATADIR%%/data/isosurf.dat +%%DATADIR%%/data/terrain.dat +%%DATADIR%%/images/arch.rgb +%%DATADIR%%/images/bw.rgb +%%DATADIR%%/images/girl.rgb +%%DATADIR%%/images/girl2.rgb +%%DATADIR%%/images/reflect.rgb +%%DATADIR%%/images/s128.rgb +%%DATADIR%%/images/tile.rgb +%%DATADIR%%/images/tree2.rgba +%%DATADIR%%/images/tree3.rgb +%%DATADIR%%/images/wrs_logo.rgb +@dirrm %%DATADIR%%/images +@dirrm %%DATADIR%%/data +@dirrm %%DATADIR%% |