Skip site navigation (1)Skip section navigation (2)
Date:      6 Mar 2000 20:04:40 -0000
From:      lioux@uol.com.br
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/17231: Update port: graphics/Mesa3 from 3.0 to 3.1
Message-ID:  <20000306200440.767.qmail@Fedaykin.here>

next in thread | raw e-mail | index | archive | help

>Number:         17231
>Category:       ports
>Synopsis:       Update port: graphics/Mesa3 from 3.0 to 3.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar  6 12:10:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Mario Sergio Fujikawa Ferreira
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:

FreeBSD Here.here 4.0-CURRENT FreeBSD 4.0-CURRENT #0: Fri Mar  3 05:43:39 ES
T 2000     root@Here.here:/usr/current/src/sys/compile/LIOUX  i386

>Description:

That's an update to Mesa from 3.0 to 3.1. I changed the default library
numbering shipped with Mesa according to the numbering used on port 3.0.

The only caveat was that GLUT had to be numbered 3.2 not 3.7 as before, due
to a version control shipped with Mesa 3.1.

Besides that, there is now a mesa.conf file that controls some parts of Mesa
behavior. It lies on ${PREFIX}/etc/mesa.conf.sample. There is a warning
included so that ppl will know they have to create their own
${PREFIX}/etc/mesa.conf based on the aforementioned one.

There shouldn't be any port dependency inconsistencies: I've already tried
qt145/kdebase11(the opengl builtin screensavers worked just fine) and
xscreensaver with it; works slow (just like 3.0) but it does work.

It is also ${PREFIX} safe, although forcibly.

However, graphics/glx should be marked BROKEN and a PR should be opened untill
it is fixed by the maintainer.

One doubt, MESA 3.1 can be 3Dnow accelerated; nonetheless, configure does
not enable that because:

*******************************************************************************
 The installed assembler does not supports the 3Dnow! command set.
 Update your binutils package, if you want to compile 3Dnow! support into
Mesa.
*******************************************************************************

Can we fix that in the long run?

I am babbling. I hope this gets commited soon, so that I can safely continue
compiling everything and be sure all my dependencies are getting recorded in
the right place. :)

>How-To-Repeat:

	

>Fix:

diff -ruN /usr/ports/graphics/Mesa3/Makefile ./Makefile
--- /usr/ports/graphics/Mesa3/Makefile	Tue Aug 31 03:44:53 1999
+++ ./Makefile	Mon Mar  6 16:05:47 2000
@@ -6,48 +6,94 @@
 # $FreeBSD: ports/graphics/Mesa3/Makefile,v 1.34 1999/08/31 06:44:53 mharo Exp $
 #
 
-DISTNAME=       MesaLib-3.0
-PKGNAME=	Mesa-3.0
+DISTNAME=       MesaLib-3.1
+PKGNAME=	Mesa-3.1
 CATEGORIES=	graphics
-MASTER_SITES= 	ftp://iris.ssec.wisc.edu/pub/Mesa/ \
-		ftp://ftp.fu-berlin.de/pub/unix/X11/graphics/Mesa/
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX} MesaDemos-3.0.tar.gz
-
+MASTER_SITES=	ftp://ftp.mesa3d.org/mesa/ \
+ 		ftp://www.mesa3d.org/mesa/patches_to_3.1/ \
+		http://gd.tuwien.ac.at/graphics/libs/Mesa/
+DISTFILES=	${FILES_TO_FETCH} ${PATCH_FILES_EXTRA}
 MAINTAINER=	jseger@FreeBSD.org
 
-WRKSRC=		${WRKDIR}/Mesa-3.0
+USE_BZIP2=	yes
+USE_GMAKE=	yes
+USE_LIBTOOL=	yes
+GNU_CONFIGURE=	yes
+
+DIST_SUBDIR=	Mesa
+WRKSRC=		${WRKDIR}/${PKGNAME}
+
+EXTRACT_ONLY=	${FILES_TO_FETCH}
 
 USE_X_PREFIX=	yes
-LIBS=		libMesaGL libMesaGLU
+CONFIGURE_ARGS=		--enable-static --sysconfdir=${PREFIX}/etc
+
+LIBS=		libGL libGLU libglut
+LIB_DIRS=	src src-glu src-glut
+
+FILES_TO_FETCH=	${DISTNAME}${EXTRACT_SUFX} MesaDemos-3.1${EXTRACT_SUFX}
+PATCH_FILES_EXTRA= src/bitmap.c src/vbrender.c src/Makefile.fx \
+		include/GL/mesa_wgl.h include/GL/amesa.h \
+		src-glu/quadric.c
+
+# one've got to respect ${PREFIX}, respect my authority :-)
+post-patch:
+	@${CP} ${WRKSRC}/src/config.c ${WRKDIR}
+	@${ECHO_MSG} '#define __DEFINED_MESA_CONF_PATH \
+		 "${PREFIX}/etc/mesa.conf"' >> ${WRKDIR}/mesa.conf.prefix.patch
+	@${CAT} ${WRKDIR}/mesa.conf.prefix.patch ${WRKDIR}/config.c > \
+		${WRKSRC}/src/config.c
 
 .include <bsd.port.pre.mk>
 
 .if ${PORTOBJFORMAT} == "elf"
-ALL_TARGET=	freebsd-elf
 SHLIB_VERSION=	14
 GLUT_VERSION=	3
 .else
-ALL_TARGET=	freebsd
 SHLIB_VERSION=	14.0
-GLUT_VERSION=	3.7
+GLUT_VERSION=	3.2
 .endif
 
+# or, post-extract: whichever is more adequate
+pre-patch:
+.for file in ${PATCH_FILES_EXTRA}
+	@${CP} ${DISTDIR}/${DIST_SUBDIR}/${file} ${WRKSRC}/${file}
+.endfor
+
 do-install:
+.for directory in ${LIB_DIRS}
 .for file in ${LIBS}
-	${INSTALL_DATA} ${WRKSRC}/lib/${file}.a ${PREFIX}/lib
-	${INSTALL_DATA} ${WRKSRC}/lib/${file}.so.${SHLIB_VERSION} ${PREFIX}/lib
-	${LN} -fs ${file}.so.${SHLIB_VERSION} ${PREFIX}/lib/${file}.so
+	@/bin/test -r ${WRKSRC}/${directory}/.libs/${file}.a \
+		&& ${INSTALL_DATA} ${WRKSRC}/${directory}/.libs/${file}.a ${PREFIX}/lib \
+		|| ${ECHO_MSG} -n ""
+	@/bin/test -r ${WRKSRC}/${directory}/.libs/${file}.so.${SHLIB_VERSION} \
+		&& ${INSTALL_DATA} ${WRKSRC}/${directory}/.libs/${file}.so.${SHLIB_VERSION} ${PREFIX}/lib \
+		&& ${LN} -fs ${file}.so.${SHLIB_VERSION} ${PREFIX}/lib/${file}.so \
+		|| ${ECHO_MSG} -n ""
+
+# The next 7 don't work on my home system. Why?
+#.if exists(${WRKSRC}/${directory}/.libs/${file}.a)
+#	@${INSTALL_DATA} ${WRKSRC}/${directory}/.libs/${file}.a ${PREFIX}/lib
+#.endif
+#.if exists(${WRKSRC}/${directory}/.libs/${file}.so.${SHLIB_VERSION})
+#	${INSTALL_DATA} ${WRKSRC}/${directory}/.libs/${file}.so.${SHLIB_VERSION} ${PREFIX}/lib
+#	@${LN} -fs ${file}.so.${SHLIB_VERSION} ${PREFIX}/lib/${file}.so
+#.endif
+
+.endfor
 .endfor
-	${INSTALL_DATA} ${WRKSRC}/lib/libglut.a ${PREFIX}/lib
-	${INSTALL_DATA} ${WRKSRC}/lib/libglut.so.${GLUT_VERSION} ${PREFIX}/lib
-	${LN} -fs libglut.so.${GLUT_VERSION} ${PREFIX}/lib/libglut.so
+	@${INSTALL_DATA} ${WRKSRC}/src-glut/.libs/libglut.so.${GLUT_VERSION} ${PREFIX}/lib
+	@${LN} -fs libglut.so.${GLUT_VERSION} ${PREFIX}/lib/libglut.so
 .for file in GL GLU
-	@${LN} -fs libMesa${file}.a ${PREFIX}/lib/lib${file}.a
-	@${LN} -fs libMesa${file}.so.${SHLIB_VERSION} ${PREFIX}/lib/lib${file}.so.${SHLIB_VERSION}
-	@${LN} -fs libMesa${file}.so ${PREFIX}/lib/lib${file}.so
+	@${LN} -fs lib${file}.a ${PREFIX}/lib/libMesa${file}.a
+	@${LN} -fs lib${file}.so.${SHLIB_VERSION} ${PREFIX}/lib/libMesa${file}.so.${SHLIB_VERSION}
+	@${LN} -fs lib${file}.so ${PREFIX}/lib/libMesa${file}.so
 .endfor
+	@${MKDIR} ${PREFIX}/etc
+	@${INSTALL_DATA} ${WRKSRC}/src/mesa.conf ${PREFIX}/etc/mesa.conf.sample
 	@${MKDIR} ${PREFIX}/include/GL
-	${INSTALL_DATA} ${WRKSRC}/include/GL/* ${PREFIX}/include/GL
-	${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib
+	@${INSTALL_DATA} ${WRKSRC}/include/GL/*.h ${PREFIX}/include/GL
+	@${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib
+	@${SED} s!/usr/X11R6/!${PREFIX}/!g ${PKGDIR}/MESSAGE | /usr/bin/fmt
 
 .include <bsd.port.post.mk>
diff -ruN /usr/ports/graphics/Mesa3/files/md5 ./files/md5
--- /usr/ports/graphics/Mesa3/files/md5	Wed Sep 30 23:17:42 1998
+++ ./files/md5	Wed Mar  1 01:50:18 2000
@@ -1,2 +1,10 @@
-MD5 (MesaLib-3.0.tar.gz) = 34af82a8ab6b8283ea77855f3fdf7ef5
-MD5 (MesaDemos-3.0.tar.gz) = 6ec326092bf8f634a23f7203dc66baad
+MD5 (Mesa/MesaLib-3.1.tar.bz2) = 58292669606fd6b06ee109b790c14c1c
+MD5 (Mesa/MesaDemos-3.1.tar.bz2) = bf16132074cbd0b9f6ce211437966b51
+MD5 (Mesa/src/bitmap.c) = 4cc89ccb7fbd5b322b149a96581f2a78
+MD5 (Mesa/src/vbrender.c) = 8cf327261b6d570c1f93aa98b6859765
+MD5 (Mesa/src/Makefile.fx) = c1dd412de0b46ee11fe3c041735279d8
+MD5 (Mesa/widgets-sgi/Makefile) = 280b3967a5d31192a4a61c8c8e667099
+MD5 (Mesa/widgets-sgi/Makefile.X11) = 08e3416bdfd383c5e81b50e27e160992
+MD5 (Mesa/include/GL/mesa_wgl.h) = c14c9b4048af8b08440aa9b758cd4a66
+MD5 (Mesa/include/GL/amesa.h) = 766f8c080f407c187823bafb1e15a59b
+MD5 (Mesa/src-glu/quadric.c) = 3b46c68356f6d01a65e362b255096288
diff -ruN /usr/ports/graphics/Mesa3/patches/patch-aa ./patches/patch-aa
--- /usr/ports/graphics/Mesa3/patches/patch-aa	Sat Oct  3 18:38:11 1998
+++ ./patches/patch-aa	Mon Mar  6 11:36:58 2000
@@ -1,51 +1,21 @@
---- Make-config.orig	Sun Aug 30 05:27:56 1998
-+++ Make-config	Wed Sep 30 14:50:03 1998
-@@ -1,8 +1,12 @@
- # Make-config
+Well, I am trying to comply to the last version of this port.
+Besides, I won't break the ports that depend on this one.
+Furthermore, this can be easily fixed later if necessary.
+However, there is one caveat, LIBGLUT age was changed just to get
+this thing working.
+
+--- configure.orig	Tue Dec 14 17:20:48 1999
++++ configure	Sat Mar  4 21:23:18 2000
+@@ -815,9 +815,9 @@
  
--MAJOR=3
-+MAJOR=14
- MINOR=0
-+.if ${PORTOBJFORMAT} == "elf"
-+VERSION=$(MAJOR)
-+.else
- VERSION=$(MAJOR).$(MINOR)
-+.endif
  
- # Mesa 3-D graphics library
- # Copyright (C) 1995-1998  Brian Paul
-@@ -281,6 +285,16 @@
- 	"MAKELIB = ../mklib.freebsd" \
- 	"XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11"
+ # CURRENT:REVISION:AGE
+-LIBGL_VERSION=3:0:2
+-LIBGLU_VERSION=3:0:2
+-LIBGLUT_VERSION=10:0:7
++LIBGL_VERSION=14:0:2
++LIBGLU_VERSION=14:0:2
++LIBGLUT_VERSION=3:0:2
+ 
  
-+freebsd-elf:
-+	$(MAKE) $(MFLAGS) targets \
-+	"GL_LIB = libMesaGL.a" \
-+	"GLU_LIB = libMesaGLU.a" \
-+	"GLUT_LIB = libglut.a" \
-+	"CC = gcc" \
-+	"CFLAGS = -O2 -fPIC -pedantic -I/usr/X11R6/include -DSHM -DHZ=100" \
-+	"MAKELIB = ../mklib.freebsd" \
-+	"XLIBS = -Wl,-rpath,${X11BASE}/lib -L${X11BASE}/lib -lXext -lXmu -lXi -lX11"
-+
- freebsd-386:
- 	$(MAKE) $(MFLAGS) targets \
- 	"GL_LIB = libMesaGL.a" \
-@@ -291,6 +305,17 @@
- 	"MAKELIB = ../mklib.freebsd" \
- 	"XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11" \
- 	"ASM_SOURCES = asm_386.S"
-+
-+freebsd-386-elf:
-+	$(MAKE) $(MFLAGS) targets \
-+	"GL_LIB = libMesaGL.a" \
-+	"GLU_LIB = libMesaGLU.a" \
-+	"GLUT_LIB = libglut.a" \
-+	"CC = gcc" \
-+	"CFLAGS = -O3 -ffast-math -fPIC -pedantic -I/usr/X11R6/include -DSHM -DHZ=100 -DUSE_X86_ASM" \
-+	"MAKELIB = ../mklib.freebsd" \
-+	"XLIBS = -Wl,-rpath,${X11BASE}/lib -L${X11BASE}/lib -lXext -lXmu -lXi -lX11" \
-+	"ASM_SOURCES = asm_386.S"
  
- gcc:
- 	$(MAKE) $(MFLAGS) targets \
diff -ruN /usr/ports/graphics/Mesa3/patches/patch-ab ./patches/patch-ab
--- /usr/ports/graphics/Mesa3/patches/patch-ab	Wed Sep 30 23:17:46 1998
+++ ./patches/patch-ab	Sat Mar  4 21:08:01 2000
@@ -1,21 +1,20 @@
---- Makefile.orig	Tue Sep  1 05:14:24 1998
-+++ Makefile	Wed Sep 30 14:52:15 1998
-@@ -123,7 +123,9 @@
- 	@echo "  make cygnus-linux         for Win95/NT using Cygnus-Win32 under Linux"
- 	@echo "  make dgux                 for Data General"
- 	@echo "  make freebsd              for FreeBSD systems with GCC"
-+	@echo "  make freebsd-elf          for FreeBSD systems with GCC, make ELF shared libs"
- 	@echo "  make freebsd-386          for FreeBSD systems with GCC, w/ Intel assembly"
-+	@echo "  make freebsd-386-elf      for FreeBSD systems with GCC, w/ Intel assembly, make ELF shared libs"
- 	@echo "  make gcc                  for a generic system with GCC"
- 	@echo "  make hpux9                for HP systems with HPUX 9.x"
- 	@echo "  make hpux9-sl             for HP systems with HPUX 9.x, make shared libs"
-@@ -208,7 +210,7 @@
+This will teach it to respect ${PREFIX}
+
+--- src/config.c.orig	Sat Mar  4 13:57:33 2000
++++ src/config.c	Sat Mar  4 13:57:27 2000
+@@ -403,11 +403,15 @@
+ {
+    const char *default_config = "mesa3.1";
  
- 
- 
--aix aix-sl amix bsdos dgux freebsd freebsd-386 gcc \
-+aix aix-sl amix bsdos dgux freebsd freebsd-elf freebsd-386 freebsd-386-elf gcc \
- hpux9 hpux9-gcc hpux9-sl hpux9-gcc-sl hpux10 hpux10-gcc hpux10-gcc-sl \
- irix-debug irix4 irix5 irix5-gcc irix5-dso irix6-32 \
- irix6-32-dso \
++#if defined(__DEFINED_MESA_CONF_PATH)
++   const char *filename = __DEFINED_MESA_CONF_PATH;
++#else
+ #if defined(__WIN32__) || defined(__MSDOS__)
+    const char *filename = "mesa.cnf";
+ #else
+    const char *filename = "/etc/mesa.conf"; 
+ #endif   
++#endif
+    FILE *file;
+    struct cnode *list;
+    int line = 1;
diff -ruN /usr/ports/graphics/Mesa3/patches/patch-ac ./patches/patch-ac
--- /usr/ports/graphics/Mesa3/patches/patch-ac	Sat Sep 18 14:33:23 1999
+++ ./patches/patch-ac	Wed Dec 31 21:00:00 1969
@@ -1,44 +0,0 @@
---- mklib.freebsd.orig	Tue Oct 21 18:34:34 1997
-+++ mklib.freebsd	Fri Sep 17 13:50:59 1999
-@@ -34,7 +34,11 @@
- 
- #--platform------------------------------------------------------------
- 
--VERSION=$MAJOR.$MINOR
-+if [ "${PORTOBJFORMAT}" = "elf" ]; then
-+    VERSION=$MAJOR
-+else
-+    VERSION=$MAJOR.$MINOR
-+fi
- 
- BASENAME=`echo ${LIBRARY} | sed "s/\.a//g"`
- SHLIB=${BASENAME}.so.${VERSION}
-@@ -44,6 +48,26 @@
- 
- ar cq ${STLIB} ${OBJECTS}
- ranlib ${STLIB}
--ld -Bshareable -o ${SHLIB} ${OBJECTS}
- 
--mv ${SHLIB} ../lib
-+if [ "${PORTOBJFORMAT}" = "elf" ]; then
-+    # This is a bit of a kludge, but... (see mklib.irix6-n32)
-+    if test ${BASENAME} = "libMesaGL" ; then
-+        # Add Xext & X11 to MesaGL.so's NEEDED .so list.
-+        # If MesaGL is dloaded, the dependent .so's must be dloaded as well.  
-+        # Dependent .so info is necessary when Mesa is loaded dynamically 
-+        # by extensible interpreters (e.g. Python) where the interpreter 
-+        # can't/shouldn't know all the dependent libraries that an 
-+        # interpreter extension module may need to link with.  Shared libs 
-+        # should be built to indicate what they need via NEEDED and RPATH. 
-+        # For example, see:     objdump -x libXt.so.6 | egrep 'NEEDED|RPATH'
-+	OBJECTS="${OBJECTS} -L${X11BASE}/lib -rpath ${X11BASE}/lib"
-+	OBJECTS="${OBJECTS} -lXext -lX11 -lm"
-+    fi
-+
-+    ld -shared -soname ${SHLIB} -o ${SHLIB} ${OBJECTS}
-+    ln -sf ${SHLIB} ${BASENAME}.so
-+    mv ${SHLIB} ${BASENAME}.so ../lib
-+else
-+    ld -Bshareable -o ${SHLIB} ${OBJECTS}
-+    mv ${SHLIB} ../lib
-+fi
diff -ruN /usr/ports/graphics/Mesa3/pkg/MESSAGE ./pkg/MESSAGE
--- /usr/ports/graphics/Mesa3/pkg/MESSAGE	Wed Dec 31 21:00:00 1969
+++ ./pkg/MESSAGE	Mon Mar  6 14:14:17 2000
@@ -0,0 +1,6 @@
+	ATTENTIONATTENTION:
+
+Mesa 3.1, by default, reads /usr/X11R6/etc/mesa.conf when Mesa starts.
+This file controls default hints, enable/disable of extensions, and more.
+Check the /usr/X11R6/etc/mesa.conf.sample as an example.
+Then, set your own on configuration file at /usr/X11R6/etc/mesa.conf
diff -ruN /usr/ports/graphics/Mesa3/pkg/PLIST ./pkg/PLIST
--- /usr/ports/graphics/Mesa3/pkg/PLIST	Wed Sep 30 23:17:47 1998
+++ ./pkg/PLIST	Mon Mar  6 14:18:42 2000
@@ -1,3 +1,5 @@
+etc/mesa.conf.sample
+include/GL/amesa.h
 include/GL/dosmesa.h
 include/GL/foomesa.h
 include/GL/fxmesa.h
@@ -7,14 +9,17 @@
 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/mesa_wgl.h
 include/GL/mglmesa.h
 include/GL/osmesa.h
-include/GL/osmesa3.h
 include/GL/svgamesa.h
 include/GL/wmesa.h
 include/GL/xmesa.h
+include/GL/xmesa_x.h
+include/GL/xmesa_xf86.h
 lib/libGL.a
 lib/libGL.so
 lib/libGL.so.14
@@ -29,7 +34,9 @@
 lib/libMesaGLU.so.14
 lib/libglut.a
 lib/libglut.so
-lib/libglut.so.3.7
+lib/libglut.so.3
 @exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %B
 @unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R
 @dirrm include/GL
+
+@unexec echo "Don't forget to erase your manually written ${PKG_PREFIX}/etc/mesa.conf. You will have to, it won't be removed automatically for you." | /usr/bin/fmt

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000306200440.767.qmail>