diff options
Diffstat (limited to 'graphics/libGL')
-rw-r--r-- | graphics/libGL/Makefile | 16 | ||||
-rw-r--r-- | graphics/libGL/bsd.mesalib.mk | 20 | ||||
-rw-r--r-- | graphics/libGL/files/extra-configure | 42 | ||||
-rw-r--r-- | graphics/libGL/files/extra-configure-old | 43 | ||||
-rw-r--r-- | graphics/libGL/files/extra-mach64_context.h | 21 | ||||
-rw-r--r-- | graphics/libGL/files/extra-mach64_context.h-old | 20 | ||||
-rw-r--r-- | graphics/libGL/files/extra-sis_context.h | 22 | ||||
-rw-r--r-- | graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h | 25 | ||||
-rw-r--r-- | graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c | 99 | ||||
-rw-r--r-- | graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c | 91 | ||||
-rw-r--r-- | graphics/libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c | 15 | ||||
-rw-r--r-- | graphics/libGL/files/patch-src_mesa_Makefile | 4 | ||||
-rw-r--r-- | graphics/libGL/files/pkg-deinstall.in | 2 | ||||
-rw-r--r-- | graphics/libGL/files/pkg-install.in | 17 |
14 files changed, 415 insertions, 22 deletions
diff --git a/graphics/libGL/Makefile b/graphics/libGL/Makefile index 6eca53c..e66811e 100644 --- a/graphics/libGL/Makefile +++ b/graphics/libGL/Makefile @@ -17,17 +17,21 @@ LIB_DEPENDS+= drm:${PORTSDIR}/graphics/libdrm \ USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto -SUB_FILES= pkg-install pkg-deinstall - -pre-install: - PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL +SUB_FILES= pkg-install pkg-deinstall do-install: ${RM} -f ${WRKSRC}/include/GL/glu*.h cd ${WRKSRC}/src/mesa; ${GMAKE} install-libgl post-install: - PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include "${.CURDIR}/bsd.mesalib.mk" -.include <bsd.port.mk> + +.include <bsd.port.pre.mk> + +.if ${ARCH} != "amd64" || ${ARCH} != "i386" +CONFIGURE_ARGS+=--disable-gallium-intel +.endif + +.include <bsd.port.post.mk> diff --git a/graphics/libGL/bsd.mesalib.mk b/graphics/libGL/bsd.mesalib.mk index 5eaed41..b1e9130 100644 --- a/graphics/libGL/bsd.mesalib.mk +++ b/graphics/libGL/bsd.mesalib.mk @@ -51,9 +51,18 @@ CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers \ --disable-egl .if defined(WITH_NEW_XORG) -EXTRA_PATCHES+= ${PATCHDIR}/extra-src-glsl_ir_constant_expression.cpp +EXTRA_PATCHES+= ${PATCHDIR}/extra-configure \ + ${PATCHDIR}/extra-mach64_context.h \ + ${PATCHDIR}/extra-sis_context.h \ + ${PATCHDIR}/extra-src-glsl_ir_constant_expression.cpp \ + ${PATCHDIR}/extra-src__gallium__include__pipe__p_config.h \ + ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c \ + ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c \ + ${PATCHDIR}/extra-src__mesa__drivers__dri__radeon__radeon_span.c .else -EXTRA_PATCHES+= ${PATCHDIR}/extra-src__mesa__x86-64__glapi_x86-64.S \ +EXTRA_PATCHES+= ${PATCHDIR}/extra-configure-old \ + ${PATCHDIR}/extra-mach64_context.h-old \ + ${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 @@ -100,3 +109,10 @@ post-patch: ${WRKSRC}/src/mesa/Makefile \ ${WRKSRC}/src/mesa/drivers/dri/Makefile +.if defined(WITH_NEW_XORG) +# replace hardlinks with patched radeon_span.c +.for i in r200 r300 r600 + @${CP} -fp ${WRKSRC}/src/mesa/drivers/dri/radeon/radeon_span.c \ + ${WRKSRC}/src/mesa/drivers/dri/${i}/ +.endfor +.endif diff --git a/graphics/libGL/files/extra-configure b/graphics/libGL/files/extra-configure new file mode 100644 index 0000000..fc1a68f --- /dev/null +++ b/graphics/libGL/files/extra-configure @@ -0,0 +1,42 @@ +--- configure.orig 2011-11-17 19:46:34.000000000 +0000 ++++ configure 2012-06-28 12:53:09.000000000 +0000 +@@ -7817,10 +7817,35 @@ + DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" + fi + +- if test "x$DRI_DIRS" = "xyes"; then +- DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 \ +- radeon tdfx unichrome savage sis swrast" +- fi ++ case "$host_cpu" in ++ x86_64) ++ # i810 is missing because there is no x86-64 system where it ++ # could *ever* be used. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i915 i965 mach64 mga nouveau r128 r200 r300 r600 \ ++ radeon savage tdfx unichrome sis swrast" ++ fi ++ ;; ++ i*86) ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 \ ++ r600 radeon savage tdfx unichrome sis swrast" ++ fi ++ ;; ++ powerpc*) ++ # Build only the drivers for cards that exist on PowerPC. ++ # At some point MGA will be added, but not yet. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast" ++ fi ++ ;; ++ sparc*) ++ # Build only the drivers for cards that exist on SPARC. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast" ++ fi ++ ;; ++ esac + ;; + gnu*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" diff --git a/graphics/libGL/files/extra-configure-old b/graphics/libGL/files/extra-configure-old new file mode 100644 index 0000000..b2e156d --- /dev/null +++ b/graphics/libGL/files/extra-configure-old @@ -0,0 +1,43 @@ +--- configure.orig 2009-12-22 03:31:30.000000000 +0100 ++++ configure 2012-06-27 19:49:26.000000000 +0200 +@@ -6946,12 +6946,35 @@ + CXXFLAGS="$CXXFLAGS -ansi -pedantic" + fi + +- # ffb and gamma are missing because they have not been converted +- # to use the new interface. +- if test "x$DRI_DIRS" = "xyes"; then +- DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ ++ case "$host_cpu" in ++ x86_64) ++ # i810 is missing because there is no x86-64 system where it ++ # could *ever* be used. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ + unichrome savage sis swrast" +- fi ++ fi ++ ;; ++ i*86) ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ ++ unichrome savage sis swrast" ++ fi ++ ;; ++ powerpc*) ++ # Build only the drivers for cards that exist on PowerPC. ++ # At some point MGA will be added, but not yet. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast" ++ fi ++ ;; ++ sparc*) ++ # Build only the drivers for cards that exist on SPARC. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast" ++ fi ++ ;; ++ esac + ;; + gnu*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" 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-mach64_context.h-old b/graphics/libGL/files/extra-mach64_context.h-old new file mode 100644 index 0000000..9e3b38e --- /dev/null +++ b/graphics/libGL/files/extra-mach64_context.h-old @@ -0,0 +1,20 @@ +--- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2012-06-27 19:59:32.000000000 +0200 ++++ src/mesa/drivers/dri/mach64/mach64_context.h 2012-06-27 20:08:30.000000000 +0200 +@@ -294,11 +294,14 @@ + #define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0) + #define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0) + #else +-#ifndef __OpenBSD__ +-#include <byteswap.h> +-#else ++#if defined(__OpenBSD__) + #include <machine/endian.h> + #define bswap_32 bswap32 ++#elif defined(__FreeBSD__) ++#include <sys/endian.h> ++#define bswap_32 bswap32 ++#else ++#include <byteswap.h> + #endif + + #define LE32_IN( x ) bswap_32( *(GLuint *)(x) ) 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__gallium__include__pipe__p_config.h b/graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h new file mode 100644 index 0000000..41f38a9 --- /dev/null +++ b/graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h @@ -0,0 +1,25 @@ +--- src/gallium/include/pipe/p_config.h.orig 2011-10-15 02:43:58.000000000 +0200 ++++ src/gallium/include/pipe/p_config.h 2012-06-28 21:27:06.000000000 +0200 +@@ -106,6 +106,13 @@ + #endif + #endif + ++#if defined(__sparc__) || defined(__sparc64__) ++#define PIPE_ARCH_SPARC ++#if defined(__sparc64__) ++#define PIPE_ARCH_SPARC_64 ++#endif ++#endif ++ + + /* + * Endian detection. +@@ -133,7 +140,7 @@ + + #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) + #define PIPE_ARCH_LITTLE_ENDIAN +-#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) ++#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_SPARC) || defined(PIPE_ARCH_SPARC_64) + #define PIPE_ARCH_BIG_ENDIAN + #endif + diff --git a/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c b/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c new file mode 100644 index 0000000..c07a519 --- /dev/null +++ b/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c @@ -0,0 +1,99 @@ +--- src/mesa/drivers/dri/nouveau/nouveau_array.c.orig 2011-01-06 01:19:15.000000000 +0100 ++++ src/mesa/drivers/dri/nouveau/nouveau_array.c 2012-04-28 18:27:06.000000000 +0200 +@@ -29,54 +29,71 @@ + #include "nouveau_array.h" + #include "nouveau_bufferobj.h" + ++#define EXTRACT(in_t, out_t) extract_func_##in_t##_to_##out_t ++ ++#define EXTRACT_FUNC(in_t, out_t, k) \ ++static out_t EXTRACT(in_t, out_t) \ ++(struct nouveau_array *a, int i, int j) { \ ++ in_t x = ((in_t *)(a->buf + i * a->stride))[j]; \ ++ \ ++ return (out_t)x / (k); \ ++} ++ ++EXTRACT_FUNC(GLchar, unsigned, 1); ++EXTRACT_FUNC(GLchar, float, SCHAR_MAX); ++EXTRACT_FUNC(GLubyte, unsigned, 1); ++EXTRACT_FUNC(GLubyte, float, UCHAR_MAX); ++EXTRACT_FUNC(GLshort, unsigned, 1); ++EXTRACT_FUNC(GLshort, float, SHRT_MAX); ++EXTRACT_FUNC(GLushort, unsigned, 1); ++EXTRACT_FUNC(GLushort, float, USHRT_MAX); ++EXTRACT_FUNC(GLint, unsigned, 1); ++EXTRACT_FUNC(GLint, float, INT_MAX); ++EXTRACT_FUNC(GLuint, unsigned, 1); ++EXTRACT_FUNC(GLuint, float, UINT_MAX); ++EXTRACT_FUNC(GLfloat, unsigned, 1.0 / UINT_MAX); ++EXTRACT_FUNC(GLfloat, float, 1); ++ ++#undef EXTRACT_FUNC ++ + static void + get_array_extract(struct nouveau_array *a, extract_u_t *extract_u, + extract_f_t *extract_f) + { +-#define EXTRACT(in_t, out_t, k) \ +- ({ \ +- auto out_t f(struct nouveau_array *, int, int); \ +- out_t f(struct nouveau_array *a, int i, int j) { \ +- in_t x = ((in_t *)(a->buf + i * a->stride))[j]; \ +- \ +- return (out_t)x / (k); \ +- }; \ +- f; \ +- }); +- + switch (a->type) { + case GL_BYTE: +- *extract_u = EXTRACT(char, unsigned, 1); +- *extract_f = EXTRACT(char, float, SCHAR_MAX); ++ *extract_u = EXTRACT(GLchar, unsigned); ++ *extract_f = EXTRACT(GLchar, float); + break; + case GL_UNSIGNED_BYTE: +- *extract_u = EXTRACT(unsigned char, unsigned, 1); +- *extract_f = EXTRACT(unsigned char, float, UCHAR_MAX); ++ *extract_u = EXTRACT(GLubyte, unsigned); ++ *extract_f = EXTRACT(GLubyte, float); + break; + case GL_SHORT: +- *extract_u = EXTRACT(short, unsigned, 1); +- *extract_f = EXTRACT(short, float, SHRT_MAX); ++ *extract_u = EXTRACT(GLshort, unsigned); ++ *extract_f = EXTRACT(GLshort, float); + break; + case GL_UNSIGNED_SHORT: +- *extract_u = EXTRACT(unsigned short, unsigned, 1); +- *extract_f = EXTRACT(unsigned short, float, USHRT_MAX); ++ *extract_u = EXTRACT(GLushort, unsigned); ++ *extract_f = EXTRACT(GLushort, float); + break; + case GL_INT: +- *extract_u = EXTRACT(int, unsigned, 1); +- *extract_f = EXTRACT(int, float, INT_MAX); ++ *extract_u = EXTRACT(GLint, unsigned); ++ *extract_f = EXTRACT(GLint, float); + break; + case GL_UNSIGNED_INT: +- *extract_u = EXTRACT(unsigned int, unsigned, 1); +- *extract_f = EXTRACT(unsigned int, float, UINT_MAX); ++ *extract_u = EXTRACT(GLuint, unsigned); ++ *extract_f = EXTRACT(GLuint, float); + break; + case GL_FLOAT: +- *extract_u = EXTRACT(float, unsigned, 1.0 / UINT_MAX); +- *extract_f = EXTRACT(float, float, 1); ++ *extract_u = EXTRACT(GLfloat, unsigned); ++ *extract_f = EXTRACT(GLfloat, float); + break; + default: + assert(0); + } + } ++#undef EXTRACT + + void + nouveau_init_array(struct nouveau_array *a, int attr, int stride, diff --git a/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c b/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c new file mode 100644 index 0000000..7c29328 --- /dev/null +++ b/graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c @@ -0,0 +1,91 @@ +--- src/mesa/drivers/dri/nouveau/nouveau_render_t.c.orig 2011-01-06 01:19:34.000000000 +0100 ++++ src/mesa/drivers/dri/nouveau/nouveau_render_t.c 2012-04-28 18:27:06.000000000 +0200 +@@ -97,52 +97,49 @@ + } \ + } while (0) + +-/* +- * Select an appropriate dispatch function for the given index buffer. +- */ +-static dispatch_t +-get_array_dispatch(struct nouveau_array *a) ++static void ++dispatch_l(struct gl_context *ctx, unsigned int start, int delta, ++ unsigned int n) + { +- if (!a->fields) { +- auto void f(struct gl_context *, unsigned int, int, unsigned int); +- +- void f(struct gl_context *ctx, unsigned int start, int delta, +- unsigned int n) { +- struct nouveau_channel *chan = context_chan(ctx); +- RENDER_LOCALS(ctx); ++ struct nouveau_channel *chan = context_chan(ctx); ++ RENDER_LOCALS(ctx); + +- EMIT_VBO(L, ctx, start, delta, n); +- }; +- +- return f; +- +- } else if (a->type == GL_UNSIGNED_INT) { +- auto void f(struct gl_context *, unsigned int, int, unsigned int); +- +- void f(struct gl_context *ctx, unsigned int start, int delta, +- unsigned int n) { +- struct nouveau_channel *chan = context_chan(ctx); +- RENDER_LOCALS(ctx); ++ EMIT_VBO(L, ctx, start, delta, n); ++} + +- EMIT_VBO(I32, ctx, start, delta, n); +- }; ++static void ++dispatch_i32(struct gl_context *ctx, unsigned int start, int delta, ++ unsigned int n) ++{ ++ struct nouveau_channel *chan = context_chan(ctx); ++ RENDER_LOCALS(ctx); + +- return f; ++ EMIT_VBO(I32, ctx, start, delta, n); ++} + +- } else { +- auto void f(struct gl_context *, unsigned int, int, unsigned int); ++static void ++dispatch_i16(struct gl_context *ctx, unsigned int start, int delta, ++ unsigned int n) ++{ ++ struct nouveau_channel *chan = context_chan(ctx); ++ RENDER_LOCALS(ctx); + +- void f(struct gl_context *ctx, unsigned int start, int delta, +- unsigned int n) { +- struct nouveau_channel *chan = context_chan(ctx); +- RENDER_LOCALS(ctx); +- +- EMIT_VBO(I32, ctx, start, delta, n & 1); +- EMIT_VBO(I16, ctx, start, delta, n & ~1); +- }; ++ EMIT_VBO(I32, ctx, start, delta, n & 1); ++ EMIT_VBO(I16, ctx, start, delta, n & ~1); ++} + +- return f; +- } ++/* ++ * Select an appropriate dispatch function for the given index buffer. ++ */ ++static dispatch_t ++get_array_dispatch(struct nouveau_array *a) ++{ ++ if (!a->fields) ++ return dispatch_l; ++ else if (a->type == GL_UNSIGNED_INT) ++ return dispatch_i32; ++ else ++ return dispatch_i16; + } + + /* diff --git a/graphics/libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c b/graphics/libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c new file mode 100644 index 0000000..3a186e9 --- /dev/null +++ b/graphics/libGL/files/extra-src__mesa__drivers__dri__radeon__radeon_span.c @@ -0,0 +1,15 @@ +--- src/mesa/drivers/dri/radeon/radeon_span.c.orig 2011-07-09 03:37:10.000000000 +0200 ++++ src/mesa/drivers/dri/radeon/radeon_span.c 2012-06-28 21:44:07.000000000 +0200 +@@ -55,7 +55,11 @@ + #include <byteswap.h> + #define CPU_TO_LE16( x ) bswap_16( x ) + #define LE16_TO_CPU( x ) bswap_16( x ) +-#endif /* __linux__ */ ++#elif defined(__FreeBSD__) ++#include <sys/endian.h> ++#define CPU_TO_LE16( x ) bswap16( x ) ++#define LE16_TO_CPU( x ) bswap16( x ) ++#endif + #else + #define CPU_TO_LE16( x ) ( x ) + #define LE16_TO_CPU( x ) ( x ) diff --git a/graphics/libGL/files/patch-src_mesa_Makefile b/graphics/libGL/files/patch-src_mesa_Makefile index 35ce2a9..fe2624b 100644 --- a/graphics/libGL/files/patch-src_mesa_Makefile +++ b/graphics/libGL/files/patch-src_mesa_Makefile @@ -5,11 +5,11 @@ install-libgl: default gl.pc install-headers - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) -+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/libGL ++ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \ - $(DESTDIR)$(INSTALL_LIB_DIR) -+ $(DESTDIR)$(INSTALL_LIB_DIR)/libGL ++ $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig install-osmesa: default osmesa.pc diff --git a/graphics/libGL/files/pkg-deinstall.in b/graphics/libGL/files/pkg-deinstall.in index 9762354..37d8953 100644 --- a/graphics/libGL/files/pkg-deinstall.in +++ b/graphics/libGL/files/pkg-deinstall.in @@ -6,7 +6,7 @@ PREFIX="${PKG_PREFIX-/usr/local}" case $2 in - POST-DEINSTALL) +DEINSTALL) /bin/rm -f ${PREFIX}/lib/libGL.so* ;; esac diff --git a/graphics/libGL/files/pkg-install.in b/graphics/libGL/files/pkg-install.in index d3b04d9..280922c 100644 --- a/graphics/libGL/files/pkg-install.in +++ b/graphics/libGL/files/pkg-install.in @@ -6,18 +6,13 @@ PREFIX="${PKG_PREFIX-/usr/local}" case $2 in - PRE-INSTALL) - /bin/rm -f ${PREFIX}/lib/libGL.so* - ;; - - POST-INSTALL) - if [ -f ${PREFIX}/lib/nvidia/libGL.so.1 ]; then - /bin/ln -f ${PREFIX}/lib/nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so - /bin/ln -f ${PREFIX}/lib/nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so.1 +POST-INSTALL) + if [ -f ${PREFIX}/lib/.nvidia/libGL.so.1 ]; then + /bin/ln -f ${PREFIX}/lib/.nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so + /bin/ln -f ${PREFIX}/lib/.nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so.1 else - /bin/ln -f ${PREFIX}/lib/libGL/libGL.so.1 ${PREFIX}/lib/libGL.so - /bin/ln -f ${PREFIX}/lib/libGL/libGL.so.1 ${PREFIX}/lib/libGL.so.1 + /bin/ln -f ${PREFIX}/lib/.libGL/libGL.so.1 ${PREFIX}/lib/libGL.so + /bin/ln -f ${PREFIX}/lib/.libGL/libGL.so.1 ${PREFIX}/lib/libGL.so.1 fi ;; esac - |