Subject: pkg/9825: Mesa-glx needs minor updating
To: None <gnats-bugs@gnats.netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: netbsd-bugs
Date: 04/07/2000 14:55:08
>Number:         9825
>Category:       pkg
>Synopsis:       Mesa-glx needs minor updating
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 07 13:04:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Rupprecht
>Release:        4/4/2000
>Organization:
W S Rupprecht Computer Consulting, Fremont CA
>Environment:
	
System: NetBSD capsicum.wsrcc.com 1.4X NetBSD 1.4X (WSRCC) #0: Tue Apr 4 13:11:49 PDT 2000 root@capsicum.wsrcc.com:/v/src/netbsd/NetBSD-current/usr/src/sys/arch/i386/compile/WSRCC i386


>Description:
	pkgsrc Mesa-glx needs a minor updating
>How-To-Repeat:
	cd /usr/pkgsrc/graphics/Mesa-glx-wsr
	make
>Fix:

These fixes will get Mesa-glx to compile and run.  It appears to work
on a "Matrox G400 MAX".  There are some graphical problems with a few
programs.  One case games/batallion when using the highest detail
setting comes up with a black scene window.

One the theory that something working even with some rough edges is
better than nothing, I submit this patch.

--- Makefile.dist	Thu Apr  6 04:43:58 2000
+++ Makefile	Fri Apr  7 12:51:47 2000
@@ -1,16 +1,14 @@
 # $NetBSD: Makefile,v 1.7 2000/04/05 21:08:14 tron Exp $
 
-DISTNAME=	glx-19990804
+DISTNAME=	glx-20000402
 PKGNAME=	Mesa-${DISTNAME:S/-/-${GLX_CHIPSET}-/}
 CATEGORIES=	graphics
 MASTER_SITES=	http://glx.on.openprojects.net/
-EXTRACT_SUFX=	.tar.bz2
+EXTRACT_SUFX=	.tar.gz
 
 MAINTAINER=	packages@netbsd.org
 HOMEPAGE=	http://utah-glx.sourceforge.net/
 
-BROKEN=		update required for Mesa 3.1.
-
 BUILD_DEPENDS+=	${PERL}:../../lang/perl5
 BUILD_DEPENDS+=	${TCLSH}:../../lang/tcl80
 BUILD_DEPENDS+=	${MESA_WRKSRC}/lib/libMesaGL.a:${MESA_PKGDIR}:build
@@ -33,7 +31,7 @@
 BUILD_DEFS+=	GLX_CHIPSET
 MAKE_ENV+=		PERL=${PERL}
 MESA_PKGDIR=	../Mesa
-MESA_VERSION=	3.0
+MESA_VERSION=	3.1
 MESA_WRKSRC=	${BUILD_ROOT}/graphics/Mesa/${WRKDIR:T}/Mesa-${MESA_VERSION}
 PERL=		${LOCALBASE}/bin/perl
 PLIST_SRC=	${WRKDIR}/PLIST

Put this into patch-aa, delete patch-ab, patch-ac

--- libGL/Makefile.in.orig	Sun Feb 27 13:52:53 2000
+++ libGL/Makefile.in	Thu Apr  6 23:29:08 2000
@@ -14,7 +14,7 @@
 # These define the name/version of the shared library we're building
 # ------------------------------------------------------------------
 LIBNAME = GL
-SOGLREV = 1.0
+SOGLREV = 3:0
 
 # Source and Object files
 # -----------------------
@@ -23,7 +23,6 @@
 	map_points.c pointers.c glx_varray.c direct_protocol.c 
 
 OBJS = ${SRCS:.c=.o}
-UNSHARED_OBJS = unshared/*.o
 
 
 # Additional compiler rules
@@ -50,22 +49,12 @@
 	${CC} ${ALL_CFLAGS} -E $*.c > $@
 
 .c.o:
-ifeq "${USE_DYNAMIC_MODULE}" "yes"
-	${RM} $@
-	${CC} ${ALL_CFLAGS} ${SHARED_CFLAGS} -c $<
-else
-	${RM} unshared/$@
-	${CC} ${ALL_CFLAGS} -c $< -o unshared/$@
-endif
+	${LIBTOOL} ${CC} ${ALL_CFLAGS} -c $< 
 
 # Main targets
 # ------------
 
-ifeq "${USE_DYNAMIC_MODULE}" "yes"
-all : lib${LIBNAME}.so.${SOGLREV}
-else
-all : unshared-subdir lib${LIBNAME}.a
-endif
+all : lib${LIBNAME}.la
 
 
 clean :
@@ -78,20 +67,8 @@
 	${DEPEND} -f .deps -- ${ALL_CFLAGS} -- ${SRCS}
 
 
-ifeq "${USE_DYNAMIC_MODULE}" "yes"
-install: lib${LIBNAME}.so.${SOGLREV}
-	@if [ -d ${INSTALL_libdir} ]; then set +x; \
-	else (set -x; ${MKDIR} ${INSTALL_libdir}); fi
-	${INSTALL} ${INSTALLFLAGS} ${INSTBINFLAGS} lib${LIBNAME}.so.${SOGLREV} ${INSTALL_libdir}
-	@T=`echo ${INSTALL_libdir}/lib${LIBNAME}.so.${SOGLREV} | sed 's/\.[^\.]*$$//'`; set -x; ${RM} $$T && ${LN} lib${LIBNAME}.so.${SOGLREV} $$T
-	${RM} ${INSTALL_libdir}/lib${LIBNAME}.so
-	${LN} lib${LIBNAME}.so.${SOGLREV} ${INSTALL_libdir}/lib${LIBNAME}.so
-else
-install: lib${LIBNAME}.a
-	@if [ -d ${INSTALL_libdir} ]; then set +x; \
-	else (set -x; ${MKDIR} ${INSTALL_libdir}); fi
-	${INSTALL} ${INSTALLFLAGS} ${INSTBINFLAGS} lib${LIBNAME}.a ${INSTALL_libdir}
-endif
+install: lib${LIBNAME}.la
+	${LIBTOOL} ${BSD_INSTALL_DATA} $< ${INSTALL_libdir}
 
 tags :
 	${TAGS} -w *.[ch]
@@ -109,21 +86,9 @@
 render.c: genlib.tcl genGL.tcl
 	${TCLSH} genlib.tcl
 
-lib${LIBNAME}.so.${SOGLREV} : render.c ${OBJS}
-	${RM} $@~
-	@SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \
-	if [ `uname` = "SunOS" ] ; then \
-		${CC} -o ./$@~ ${SHARED_LDFLAGS} -Wl,-h,$$SONAME ${OBJS} \
-		${XLIBDIR} ${XLIBS} ${LIBS} ${MATHLIBS}; \
-	else \
-		${CC} -o ./$@~ ${SHARED_LDFLAGS} -Wl,-soname,$$SONAME ${OBJS} \
-		${XLIBDIR} ${XLIBS} ${LIBS} ${MATHLIBS}; \
-	fi; \
-	${RM} $$SONAME; ${LN} $@ $$SONAME; \
-	${RM} $@
-	${MV} $@~ $@
-	${RM} lib${LIBNAME}.so
-	${LN} $@ lib${LIBNAME}.so
+lib${LIBNAME}.la : render.c ${OBJS}
+	${LIBTOOL} --mode=link ${CC} -rpath ${INSTALL_libdir} \
+	  -version-info ${SOGLREV} -o $@ ${OBJS:.o=.lo}
 
 lib${LIBNAME}.a : render.c ${UNSHARED_OBJS}
 	${RM} $@~
>Release-Note:
>Audit-Trail:
>Unformatted: