- Refactor MesaLib ports.

- Update graphics/libGLw to 7.0.1.
This commit is contained in:
Florent Thoumie 2007-08-29 10:33:10 +00:00
parent 0c3fa6d6e3
commit 971be6f225
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=198485
11 changed files with 126 additions and 240 deletions

View File

@ -6,14 +6,10 @@
#
PORTNAME= dri
PORTVERSION= 7.0.1
PORTVERSION= ${MESAVERSION}
PORTEPOCH= 2
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=mesa3d
DISTNAME= MesaLib-${PORTVERSION}
MAINTAINER= anholt@FreeBSD.org
COMMENT= OpenGL hardware acceleration drivers for the DRI
LIB_DEPENDS= drm:${PORTSDIR}/graphics/libdrm \
@ -22,22 +18,18 @@ BUILD_DEPENDS= makedepend:${PORTSDIR}/devel/makedepend
CONFLICTS= xfree86-dri-* dri-6.2.2005* dri-6.5.2006*
WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}
USE_X_PREFIX= yes
USE_BZIP2= yes
USE_GMAKE= yes
MAKE_ARGS= SHELL=${SH}
MAKE_ENV+= FBSDCC="${CC}" FBSDCXX="${CXX}" \
FBSDCFLAGS="${CFLAGS}" FBSDCXXFLAGS="${CXXFLAGS}" \
PTHREAD_LIBS=${PTHREAD_LIBS}
USE_GCC= 3.4+
USE_XORG= x11
DRIMODDIR= ${PREFIX}/lib/dri
SRCDIR= mesa
.include <bsd.port.pre.mk>
.if ${X_WINDOW_SYSTEM:L} != xorg
IGNORE= requires libGL from X.Org
.if !defined(ARCH)
ARCH!= uname -p
.endif
do-install:
@ -60,6 +52,14 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/lib/savage_dri.so ${DRIMODDIR}
${INSTALL_PROGRAM} ${WRKSRC}/lib/sis_dri.so ${DRIMODDIR}
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include <bsd.port.pre.mk>
.if ${X_WINDOW_SYSTEM:L} != xorg
IGNORE= requires libGL from X.Org
.endif
.if ${OSVERSION} < 500000
pre-patch:
@${REINPLACE_CMD} -e 's|stdint.h|sys/types.h|g' \
@ -67,29 +67,4 @@ pre-patch:
${WRKSRC}/src/mesa/drivers/dri/mga/mgacontext.h
.endif
post-patch:
@${REINPLACE_CMD} -e '/^CC =/d' -e '/^CXX =/d' \
-e 's|/usr/local|$$(LOCALBASE)|g' \
-e 's|/usr/X11R6|$$(X11BASE)|g' \
-e 's|-lpthread|$$(PTHREAD_LIBS)|g' \
-e 's|^\(SRC_DIRS =\).*|\1 mesa|' \
${WRKSRC}/configs/freebsd-dri
.if ${OSVERSION} < 700013
@${REINPLACE_CMD} -e 's|-DHAVE_POSIX_MEMALIGN||' \
${WRKSRC}/configs/freebsd-dri
.endif
.if ${ARCH} == i386
PLIST_SUB+= I386=""
PLIST_SUB+= I386_AMD64=""
ALL_TARGET= freebsd-dri-x86
.elif ${ARCH} == amd64
PLIST_SUB+= I386="@comment "
PLIST_SUB+= I386_AMD64=""
ALL_TARGET= freebsd-dri-amd64
.else
PLIST_SUB+= I386="@comment "
PLIST_SUB+= I386_AMD64="@comment "
ALL_TARGET= freebsd-dri
.endif
.include <bsd.port.post.mk>

View File

@ -5,71 +5,21 @@
# $FreeBSD$
#
PORTNAME?= libGL
PORTVERSION?= 7.0.1
PORTNAME= libGL
PORTVERSION= ${MESAVERSION}
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
ftp://ftp.fu-berlin.de/pub/unix/X11/graphics/Mesa/
MASTER_SITE_SUBDIR= mesa3d
DISTFILES= MesaLib-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= x11@FreeBSD.org
COMMENT?= OpenGL library that renders using GLX or DRI
COMMENT= OpenGL library that renders using GLX or DRI
BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend
LIB_DEPENDS+= drm:${PORTSDIR}/graphics/libdrm
CONFLICTS= XFree86-libraries-* xorg-libraries-6.*
USE_XORG= glproto xxf86vm xext xfixes xdamage
USE_GMAKE= yes
USE_LDCONFIG= yes
CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/drm
GLHEADERS= gl.h glext.h glx.h glxext.h
MAKE_ARGS= SHELL=${SH}
WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}
PREFIX?= ${X11BASE}
USE_BZIP2= yes
SRCDIR= glx/x11
HEADERS= gl.h glext.h glx.h glxext.h
HEADERSDIR= include/GL
pre-patch:
@${REINPLACE_CMD} \
-e 's|/usr/X11R6|${X11BASE}|g' \
-e 's|/usr/local|${LOCALBASE}|g' \
-e 's|gcc|${CC}|g' \
-e 's|g++|${CXX}|g' \
-e 's|CFLAGS = |CFLAGS = ${CFLAGS} |g' \
-e 's|OPT_FLAGS = .*|OPT_FLAGS = ${CFLAGS}|g' \
-e 's|-lpthread|${PTHREAD_LIBS}|g' \
-e 's|SRC_DIRS = .*|SRC_DIRS = glx/x11|g' \
${WRKSRC}/configs/freebsd-dri
@${REINPLACE_CMD} \
-e 's|^\(MKDEP_OPTIONS.*\)|\1 --|' \
-e 's|^DRI_DRIVER_INSTALL_DIR.*|DRI_DRIVER_INSTALL_DIR = ${X11BASE}/lib/dri|' \
${WRKSRC}/configs/default
do-install:
${MKDIR} ${PREFIX}/include/GL
.for i in ${GLHEADERS}
${INSTALL_DATA} ${WRKSRC}/include/GL/${i} ${PREFIX}/include/GL
.endfor
${INSTALL_PROGRAM} ${WRKSRC}/lib/libGL.so.1 ${PREFIX}/lib
${LN} -sf libGL.so.1 ${PREFIX}/lib/libGL.so
.include <bsd.port.pre.mk>
.if ${ARCH} == i386
PLIST_SUB+= I386=""
PLIST_SUB+= I386_AMD64=""
ALL_TARGET= freebsd-dri-x86
.elif ${ARCH} == amd64
PLIST_SUB+= I386="@comment "
PLIST_SUB+= I386_AMD64=""
ALL_TARGET= freebsd-dri-amd64
.else
PLIST_SUB+= I386="@comment "
PLIST_SUB+= I386_AMD64="@comment "
ALL_TARGET= freebsd-dri
.endif
.include <bsd.port.post.mk>
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include <bsd.port.mk>

View File

@ -0,0 +1,85 @@
#-*- 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/dri
#
# $FreeBSD$
#
MESAVERSION= 7.0.1
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
ftp://ftp.fu-berlin.de/pub/unix/X11/graphics/Mesa/
MASTER_SITE_SUBDIR= mesa3d
DISTFILES= MesaLib-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= x11@FreeBSD.org
CONFLICTS?= XFree86-libraries-* xorg-libraries-6.*
USE_BZIP2= yes
USE_GMAKE= yes
USE_LDCONFIG= yes
MAKE_ARGS= SHELL=${SH}
CFLAGS+= -DUSE_XSHM -DHZ=100
PREFIX= ${X11BASE}
FILESDIR= ${.CURDIR}/../../graphics/libGL/files
WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}
CONFDIR= ${WRKSRC}/configs
SHVER?= 1
.if !defined(ARCH)
ARCH!= uname -p
.endif
.if ${ARCH} == i386
PLIST_SUB+= I386=""
PLIST_SUB+= I386_AMD64=""
ALL_TARGET= freebsd-dri-x86
.elif ${ARCH} == amd64
PLIST_SUB+= I386="@comment "
PLIST_SUB+= I386_AMD64=""
ALL_TARGET= freebsd-dri-amd64
.else
PLIST_SUB+= I386="@comment "
PLIST_SUB+= I386_AMD64="@comment "
ALL_TARGET= freebsd-dri
.endif
pre-patch:
@${REINPLACE_CMD} \
-e '/^CC =/d' -e '/^CXX =/d' \
-e 's|/usr/X11R6|${X11BASE}|g' \
-e 's|/usr/local|${LOCALBASE}|g' \
-e 's|-lpthread|${PTHREAD_LIBS}|g' \
-e 's|CFLAGS = |CFLAGS = ${CFLAGS} |g' \
-e 's|OPT_FLAGS = .*|OPT_FLAGS = ${CFLAGS}|g' \
-e "s|SRC_DIRS = .*|SRC_DIRS = ${SRCDIR}|g" \
-e 's|-DHAVE_POSIX_MEMALIGN||' \
${CONFDIR}/freebsd-dri
@${REINPLACE_CMD} \
-e 's|^\(MKDEP_OPTIONS.*\)|\1 -- -I${X11BASE}/include|' \
-e 's|^\(MKLIB_OPTIONS.*\)|\1 -L${X11BASE}/lib|' \
-e 's|^DRI_DRIVER_INSTALL_DIR.*|DRI_DRIVER_INSTALL_DIR = ${X11BASE}/lib/dri|' \
${CONFDIR}/default
.if !target(do-install)
do-install:
${MKDIR} ${PREFIX}/include/GL/
.for i in ${HEADERS}
${INSTALL_DATA} ${WRKSRC}/${HEADERSDIR}/${i} ${PREFIX}/include/GL/
.endfor
${INSTALL_PROGRAM} ${WRKSRC}/lib/${PORTNAME}.so.${SHVER} ${PREFIX}/lib
${LN} -sf ${PORTNAME}.so.${SHVER} ${PREFIX}/lib/${PORTNAME}.so
.endif

View File

@ -6,32 +6,17 @@
#
PORTNAME= libGLU
PORTVERSION= 7.0.1
PORTVERSION= ${MESAVERSION}
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= mesa3d
DISTNAME= MesaLib-${PORTVERSION}
MAINTAINER= x11@FreeBSD.org
COMMENT= OpenGL utility library
CONFLICTS= XFree86-libraries-* xorg-libraries-6.*
USE_BZIP2= yes
USE_LDCONFIG= yes
USE_GL= gl
USE_XORG= xmu xi
USE_X_PREFIX= yes
WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}/src/glu/sgi
ALL_TARGET= libGLU.so
post-patch:
${CP} ${FILESDIR}/config ${WRKDIR}/Mesa-${PORTVERSION}/configs/current
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/libGLU.so.1 ${PREFIX}/lib
${LN} -sf libGLU.so.1 ${PREFIX}/lib/libGLU.so
${INSTALL_DATA} ${WRKDIR}/Mesa-${PORTVERSION}/include/GL/glu.h ${PREFIX}/include/GL
SRCDIR= glu/sgi
HEADERS= glu.h
HEADERSDIR= include/GL
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include <bsd.port.mk>

View File

@ -1,31 +0,0 @@
# Configuration for mesa-demos port for FreeBSD
# Taken from Mesa CVS mesa/Mesa/configs/freebsd Rev 1.2
# $FreeBSD: /tmp/pcvs/ports/graphics/libGLU/files/Attic/config,v 1.1 2007-05-19 20:09:44 flz Exp $
#
# Set and remember $CFLAGS, $CXXFLAGS, $CC and $CXX before they are
# overriden in default include
_CC := $(CC)
_CXX := $(CXX)
_CFLAGS := -fPIC -pedantic -I$(X11BASE)/include -DUSE_XSHM -DHZ=100 $(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 = $(X11BASE)/lib
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm

View File

@ -1,16 +0,0 @@
--- Makefile.orig Wed Jul 12 19:43:20 2006
+++ Makefile Tue Oct 3 00:22:56 2006
@@ -135,10 +135,10 @@
-mkdir $(TOP)/$(LIB_DIR)
# Make the library:
-$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' \
+$(GLU_LIB_NAME): $(OBJECTS)
+ ${TOP}/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' \
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
- -cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
+ -cplusplus $(MKLIB_OPTIONS) \
$(GLU_LIB_DEPS) $(OBJECTS)

View File

@ -6,38 +6,22 @@
#
PORTNAME= libGLw
PORTVERSION= 6.5.3
PORTVERSION= ${MESAVERSION}
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= mesa3d
DISTNAME= MesaLib-${PORTVERSION}
MAINTAINER= x11@FreeBSD.org
COMMENT= OpenGL widgets library
CONFLICTS= XFree86-libraries-* xorg-libraries-6.*
BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend
LIB_DEPENDS+= Xm.3:${PORTSDIR}/x11-toolkits/open-motif
USE_BZIP2= yes
USE_LDCONFIG= yes
USE_XORG= xt
USE_GL= gl
USE_XORG= xt
USE_X_PREFIX= yes
WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}/src/glw/
CFLAGS+= -D__GLX_MOTIF=1
SRCDIR= glw
ALL_TARGET= libGLw.so
GLWHEADERS= GLwDrawA.h GLwDrawAP.h GLwMDrawA.h GLwMDrawAP.h
post-patch:
${CP} ${FILESDIR}/config ${WRKDIR}/Mesa-${PORTVERSION}/configs/current
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/libGLw.so.1 ${PREFIX}/lib
${LN} -sf libGLw.so.1 ${PREFIX}/lib/libGLw.so
.for i in ${GLWHEADERS}
${INSTALL_DATA} ${WRKDIR}/Mesa-${PORTVERSION}/src/glw/$i ${PREFIX}/include/GL
.endfor
HEADERS= GLwDrawA.h GLwDrawAP.h GLwMDrawA.h GLwMDrawAP.h
HEADERSDIR= src/glw
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
MD5 (MesaLib-6.5.3.tar.bz2) = 46359457147c469745f24b5074a186f0
SHA256 (MesaLib-6.5.3.tar.bz2) = f8b09b40b59d6951dcd9889d19a67d1995c5f558bafa1e978f4b0e88035a96b3
SIZE (MesaLib-6.5.3.tar.bz2) = 3351899
MD5 (MesaLib-7.0.1.tar.bz2) = c056abd763e899114bf745c9eedbf9ad
SHA256 (MesaLib-7.0.1.tar.bz2) = 5190ffac157882d9129d31f262339512f4a45dcf95ccdad213760a7d54d82de7
SIZE (MesaLib-7.0.1.tar.bz2) = 3343538

View File

@ -1,31 +0,0 @@
# Configuration for mesa-demos port for FreeBSD
# Taken from Mesa CVS mesa/Mesa/configs/freebsd Rev 1.2
# $FreeBSD: /tmp/pcvs/ports/graphics/libGLw/files/Attic/config,v 1.2 2007-07-30 07:49:42 pav Exp $
#
# Set and remember $CFLAGS, $CXXFLAGS, $CC and $CXX before they are
# overriden in default include
_CC := $(CC)
_CXX := $(CXX)
_CFLAGS := -fPIC -pedantic -I$(X11BASE)/include -DUSE_XSHM -DHZ=100 -D__GLX_MOTIF=1 $(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 = $(X11BASE)/lib
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm

View File

@ -1,5 +1,5 @@
--- GLwDrawA.c.orig Tue Mar 13 21:11:41 2007
+++ GLwDrawA.c Tue Mar 13 21:12:38 2007
--- src/glw/GLwDrawA.c.orig Tue Mar 13 21:11:41 2007
+++ src/glw/GLwDrawA.c Tue Mar 13 21:12:38 2007
@@ -668,7 +668,7 @@
#endif

View File

@ -1,15 +0,0 @@
--- Makefile.orig Thu Dec 7 19:46:44 2006
+++ Makefile Thu Dec 7 19:47:07 2006
@@ -37,10 +37,10 @@
# Make the library
-$(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
+$(GLW_LIB_NAME): $(OBJECTS)
$(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' \
-major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
- $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
+ $(MKLIB_OPTIONS) \
$(GLW_LIB_DEPS) $(OBJECTS)