diff options
Diffstat (limited to 'graphics/libGL')
-rw-r--r-- | graphics/libGL/Makefile | 24 | ||||
-rw-r--r-- | graphics/libGL/bsd.mesalib.mk | 114 | ||||
-rw-r--r-- | graphics/libGL/distinfo | 4 | ||||
-rw-r--r-- | graphics/libGL/files/extra-mach64_context.h | 21 | ||||
-rw-r--r-- | graphics/libGL/files/extra-sis_context.h | 22 | ||||
-rw-r--r-- | graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp | 14 | ||||
-rw-r--r-- | graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S | 12 | ||||
-rw-r--r-- | graphics/libGL/files/extra-src__mesa__x86-64__xform4.S | 74 | ||||
-rw-r--r-- | graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S | 11 | ||||
-rw-r--r-- | graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S | 11 | ||||
-rw-r--r-- | graphics/libGL/pkg-descr | 4 | ||||
-rw-r--r-- | graphics/libGL/pkg-plist | 20 |
12 files changed, 331 insertions, 0 deletions
diff --git a/graphics/libGL/Makefile b/graphics/libGL/Makefile new file mode 100644 index 0000000..f3f054a --- /dev/null +++ b/graphics/libGL/Makefile @@ -0,0 +1,24 @@ +# New ports collection makefile for: xorg-server +# Date created: 7 May 2004 +# Whom: anholt@FreeBSD.org +# +# $FreeBSD$ +# + +PORTNAME= libGL +PORTVERSION= ${MESAVERSION} +CATEGORIES= graphics + +COMMENT= OpenGL library that renders using GLX or DRI + +LIB_DEPENDS+= drm:${PORTSDIR}/graphics/libdrm \ + expat.6:${PORTSDIR}/textproc/expat2 + +USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto:both + +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..c01d7f4 --- /dev/null +++ b/graphics/libGL/bsd.mesalib.mk @@ -0,0 +1,114 @@ +#-*- 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$ +# + +MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} +MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} + +.if defined(WITH_NEW_XORG) +MESABASEVERSION= 7.11.2 +# if there is a subversion, include the '-' between 7.11-rc2 for example. +MESASUBVERSION= +PLIST_SUB+= OLD="@comment " NEW="" +.else +MESABASEVERSION= 7.6.1 +MESASUBVERSION= +PLIST_SUB+= OLD="" NEW="@comment " +.endif + +MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/:mesa,glut +DISTFILES= MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}:mesa +MAINTAINER?= x11@FreeBSD.org + +BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend \ + ${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2 + +USE_BISON= build +USE_PYTHON_BUILD=yes +USE_BZIP2= yes +USE_GMAKE= yes +USE_LDCONFIG= yes +GNU_CONFIGURE= yes +MAKE_JOBS_SAFE= yes + +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers \ + --disable-egl + +.if defined(WITH_NEW_XORG) +EXTRA_PATCHES+= ${PATCHDIR}/extra-mach64_context.h \ + ${PATCHDIR}/extra-sis_context.h \ + ${PATCHDIR}/extra-src-glsl_ir_constant_expression.cpp +.else +EXTRA_PATCHES+= ${PATCHDIR}/extra-src__mesa__x86-64__glapi_x86-64.S \ + ${PATCHDIR}/extra-src__mesa__x86-64__xform4.S \ + ${PATCHDIR}/extra-src__mesa__x86__glapi_x86.S \ + ${PATCHDIR}/extra-src__mesa__x86__read_rgba_span_x86.S +.endif + +ALL_TARGET= default + +PATCHDIR= ${.CURDIR}/../../graphics/libGL/files +WRKSRC= ${WRKDIR}/Mesa-${MESABASEVERSION}${MESASUBVERSION} + +.if !defined(ARCH) +ARCH!= uname -p +.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: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 diff --git a/graphics/libGL/distinfo b/graphics/libGL/distinfo new file mode 100644 index 0000000..106ab0b --- /dev/null +++ b/graphics/libGL/distinfo @@ -0,0 +1,4 @@ +SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44 +SIZE (MesaLib-7.6.1.tar.bz2) = 4886995 +SHA256 (MesaLib-7.11.2.tar.bz2) = 57746aa8c60bc6f5596ec6c6c7274de40fa12edce5ec33fe899e704fa00b5357 +SIZE (MesaLib-7.11.2.tar.bz2) = 6257280 diff --git a/graphics/libGL/files/extra-mach64_context.h b/graphics/libGL/files/extra-mach64_context.h new file mode 100644 index 0000000..f844599 --- /dev/null +++ b/graphics/libGL/files/extra-mach64_context.h @@ -0,0 +1,21 @@ +--- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2011-05-13 01:47:18.000000000 +0200 ++++ src/mesa/drivers/dri/mach64/mach64_context.h 2011-07-27 09:59:53.000000000 +0200 +@@ -289,7 +289,7 @@ + /* ================================================================ + * Byte ordering + */ +-#if MESA_LITTLE_ENDIAN == 1 ++#if defined(MESA_LITTLE_ENDIAN) && MESA_LITTLE_ENDIAN == 1 + #define LE32_IN( x ) ( *(GLuint *)(x) ) + #define LE32_IN_FLOAT( x ) ( *(GLfloat *)(x) ) + #define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0) +@@ -298,6 +298,9 @@ + #if defined(__OpenBSD__) || defined(__NetBSD__) + #include <machine/endian.h> + #define bswap_32 bswap32 ++#elif defined(__FreeBSD__) ++#include <sys/endian.h> ++#define bswap_32 bswap32 + #else + #include <byteswap.h> + #endif diff --git a/graphics/libGL/files/extra-sis_context.h b/graphics/libGL/files/extra-sis_context.h new file mode 100644 index 0000000..0e16f51 --- /dev/null +++ b/graphics/libGL/files/extra-sis_context.h @@ -0,0 +1,22 @@ +--- src/mesa/drivers/dri/sis/sis_context.h.orig 2010-12-14 22:43:15.000000000 +0100 ++++ src/mesa/drivers/dri/sis/sis_context.h 2011-07-27 09:58:22.000000000 +0200 +@@ -400,10 +400,18 @@ + #define MMIO_READ(reg) *(volatile GLint *)(smesa->IOBase + (reg)) + #define MMIO_READf(reg) *(volatile GLfloat *)(smesa->IOBase + (reg)) + +-#if defined(__i386__) || defined(__x86_64__) ++#if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) + #define MMIO_WMB() __asm __volatile("" : : : "memory") + #elif defined(__ia64__) + #define MMIO_WMB() __asm __volatile("mf" : : : "memory") ++#elif defined(__powerpc__) ++#define MMIO_WMB() __asm __volatile("eieio" : : : "memory") ++#elif defined(__sparc64__) ++/* ++ * #StoreStore probably would be sufficient for this driver at the ++ * time of this writing but we use #Sync for safety. ++ */ ++#define MMIO_WMB() __asm __volatile("membar #Sync" : : : "memory") + #else + #error platform needs WMB + #endif diff --git a/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp b/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp new file mode 100644 index 0000000..8df4043 --- /dev/null +++ b/graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp @@ -0,0 +1,14 @@ +--- src/glsl/ir_constant_expression.cpp.orig 2011-07-23 15:08:44.000000000 +0200 ++++ src/glsl/ir_constant_expression.cpp 2011-07-23 15:09:03.000000000 +0200 +@@ -39,6 +39,11 @@ + #include "ir_visitor.h" + #include "glsl_types.h" + ++#include <sys/param.h> ++#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027) ++#define log2(x) (log(x) / log(2)) ++#endif ++ + static float + dot(ir_constant *op0, ir_constant *op1) + { diff --git a/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S b/graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S new file mode 100644 index 0000000..908a6fe --- /dev/null +++ b/graphics/libGL/files/extra-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/extra-src__mesa__x86-64__xform4.S b/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S new file mode 100644 index 0000000..193e6cc --- /dev/null +++ b/graphics/libGL/files/extra-src__mesa__x86-64__xform4.S @@ -0,0 +1,74 @@ +--- src/mesa/x86-64/xform4.S.orig 2009-01-22 18:38:35.000000000 +0100 ++++ src/mesa/x86-64/xform4.S 2011-05-09 21:26:00.000000000 +0200 +@@ -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 */ +@@ -116,7 +116,7 @@ p4_constants: + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 +-.float 0f+1.0 ++.float 1.0 + + .text + .align 16 +@@ -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/extra-src__mesa__x86__glapi_x86.S b/graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S new file mode 100644 index 0000000..71da78c --- /dev/null +++ b/graphics/libGL/files/extra-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/extra-src__mesa__x86__read_rgba_span_x86.S b/graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S new file mode 100644 index 0000000..37b08d1 --- /dev/null +++ b/graphics/libGL/files/extra-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..4125f74 --- /dev/null +++ b/graphics/libGL/pkg-plist @@ -0,0 +1,20 @@ +%%OLD%%include/GL/dmesa.h +%%OLD%%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 +%%OLD%%include/GL/mglmesa.h +include/GL/osmesa.h +%%OLD%%include/GL/svgamesa.h +include/GL/vms_x_fix.h +include/GL/wglext.h +include/GL/wmesa.h +lib/libGL.so +lib/libGL.so.1 +libdata/pkgconfig/gl.pc +@dirrmtry include/GL |