ports/115020: New port: graphics/osmesa - Mesa's off-screen rendering interface
Thierry Thomas
thierry at pompo.net
Sun Jul 29 22:00:06 UTC 2007
>Number: 115020
>Category: ports
>Synopsis: New port: graphics/osmesa - Mesa's off-screen rendering interface
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Jul 29 22:00:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Thierry Thomas
>Release: FreeBSD 6.2-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun May 20 15:59:36 CEST 2007 thierry at graf.pompo.net:/usr/obj/usr/src/sys/GRAF070519 i386
>Description:
Mesa's off-screen rendering interface is used for rendering into
user-allocated blocks of memory. That is, the GL_FRONT
colorbuffer is actually a buffer in main memory, rather than a
window on your display.
There are no window system or operating system dependencies.
One potential application is to use Mesa as an off-line,
batch-style renderer.
Important note: maintainer is set to "x11 at FreeBSD.org", because
this port is very related to graphics/libGL - if the x11 team
accepts it.
>How-To-Repeat:
I am going to submit a separate PR containing an update of
graphics/mesa-demos to test it.
>Fix:
Please execute the following script:
--- osmesa.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# graphics/osmesa
# graphics/osmesa/files
# graphics/osmesa/files/patch-mklib
# graphics/osmesa/files/patch-Makefile
# graphics/osmesa/Makefile
# graphics/osmesa/distinfo
# graphics/osmesa/pkg-descr
# graphics/osmesa/pkg-plist
#
echo c - graphics/osmesa
mkdir -p graphics/osmesa > /dev/null 2>&1
echo c - graphics/osmesa/files
mkdir -p graphics/osmesa/files > /dev/null 2>&1
echo x - graphics/osmesa/files/patch-mklib
sed 's/^X//' >graphics/osmesa/files/patch-mklib << 'END-of-graphics/osmesa/files/patch-mklib'
X--- bin/mklib.orig Wed Jun 20 14:50:40 2007
X+++ bin/mklib Wed Jun 20 14:50:53 2007
X@@ -100,6 +100,9 @@
X -L*)
X DEPS="$DEPS $1"
X ;;
X+ '-pthread')
X+ DEPS="$DEPS -pthread"
X+ ;;
X '-cplusplus')
X CPLUSPLUS=1
X ;;
END-of-graphics/osmesa/files/patch-mklib
echo x - graphics/osmesa/files/patch-Makefile
sed 's/^X//' >graphics/osmesa/files/patch-Makefile << 'END-of-graphics/osmesa/files/patch-Makefile'
X--- Makefile.orig Fri Jun 22 00:14:38 2007
X+++ Makefile Sun Jul 29 18:31:40 2007
X@@ -23,7 +23,6 @@
X fi \
X done
X
X-
X realclean:
X touch $(TOP)/configs/current
X $(MAKE) clean
X@@ -75,6 +74,9 @@
X freebsd-dri \
X freebsd-dri-amd64 \
X freebsd-dri-x86 \
X+freebsd-osmesa \
X+freebsd-osmesa16 \
X+freebsd-osmesa32 \
X hpux10 \
X hpux10-gcc \
X hpux10-static \
X@@ -158,6 +160,11 @@
X fi
X (cd configs && rm -f current && ln -s $@ current)
X $(MAKE) default
X+ -rm -f $(TOP)/configs/current
X+ -rm -f `find $(TOP)/src/mesa/ -name \*.o`
X+ -rm -f `find $(TOP)/src/mesa/ -name \*.a`
X+ -rm -f `find $(TOP)/src/mesa/ -name \*.so`
X+ -rm -f `find $(TOP)/src/mesa/ -name depend`
X
X
X # Rules for making release tarballs
END-of-graphics/osmesa/files/patch-Makefile
echo x - graphics/osmesa/Makefile
sed 's/^X//' >graphics/osmesa/Makefile << 'END-of-graphics/osmesa/Makefile'
X# New ports collection makefile for: OSMesa
X# Date created: 28 July 2007
X# Whom: thierry at pompo.net
X#
X# $FreeBSD$
X#
X
XPORTNAME= OSMesa
XPORTVERSION= 7.0
XCATEGORIES= graphics
XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
X ftp://ftp.fu-berlin.de/pub/unix/X11/graphics/Mesa/
XMASTER_SITE_SUBDIR= mesa3d
XDISTNAME= MesaLib-${PORTVERSION}
X
XMAINTAINER= x11 at FreeBSD.org
XCOMMENT= Mesa off-screen rendering interface
X
XBUILD_DEPENDS= makedepend:${PORTSDIR}/devel/makedepend
X
XCONFLICTS= XFree86-libraries-* xorg-libraries-6.*
X
XUSE_GL= yes
XUSE_GMAKE= yes
XUSE_LDCONFIG= yes
XMAKE_ARGS= MAKE=${GMAKE}
X
XWRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}
XUSE_BZIP2= yes
XUSE_LDCONFIG= yes
X
XALL_TARGET= realclean freebsd-osmesa
XCOLCHAN= 16 32
X
X.for chan in ${COLCHAN}
X. if !defined(${WITHOUT_OSMESA${chan}})
XALL_TARGET+= freebsd-osmesa${chan}
XPLIST_SUB+= OSM${chan}=""
X. else
XPLIST_SUB+= OSM${chan}="@comment "
X. endif
X.endfor
X
Xpre-everything::
X @${ECHO_MSG}
X.for chan in ${COLCHAN}
X. if !defined(${WITHOUT_OSMESA${chan}})
X @${ECHO_MSG} "Define WITHOUT_OSMESA${chan} if not interested in ${chan}-bits color channels"
X @${ECHO_MSG}
X. endif
X.endfor
X
Xpost-extract:
X.for chan in "" ${COLCHAN}
X ${CP} ${WRKSRC}/configs/linux-osmesa${chan} ${WRKSRC}/configs/freebsd-osmesa${chan}
X.endfor
X
Xpre-configure:
X.for chan in "" ${COLCHAN}
X ${REINPLACE_CMD} \
X -e 's|Linux|${OPSYS}|' \
X -e 's|linux|${OPSYS:L}|' \
X -e 's|gcc|${CC}|' \
X -e 's|g++|${CXX}|' \
X -e 's|-O3||' \
X -e 's|CFLAGS = |CFLAGS = ${CFLAGS} |' \
X -e 's|CXXFLAGS = |CXXFLAGS = ${CFLAGS} |' \
X -e 's|/usr/X11R6|${X11BASE}|' \
X -e 's|-lpthread|${PTHREAD_LIBS}|' \
X ${WRKSRC}/configs/freebsd-osmesa${chan}
X.endfor
X ${REINPLACE_CMD} \
X -e 's|^\(MKDEP_OPTIONS.*\)|\1 --|' \
X ${WRKSRC}/configs/default
X
Xdo-install:
X ${MKDIR} ${PREFIX}/include/GL ${PREFIX}/lib
X ${INSTALL_DATA} ${WRKSRC}/include/GL/osmesa.h ${PREFIX}/include/GL
X.for chan in "" ${COLCHAN}
X. if !defined(${WITHOUT_OSMESA${chan}})
X ${INSTALL_PROGRAM} ${WRKSRC}/lib/libOSMesa${chan}.so.7 ${PREFIX}/lib
X ${LN} -sf libOSMesa${chan}.so.7 ${PREFIX}/lib/libOSMesa${chan}.so
X. endif
X.endfor
X
X.include <bsd.port.mk>
END-of-graphics/osmesa/Makefile
echo x - graphics/osmesa/distinfo
sed 's/^X//' >graphics/osmesa/distinfo << 'END-of-graphics/osmesa/distinfo'
XMD5 (MesaLib-7.0.tar.bz2) = 50c371455fa7532c04aa0a970f9bc51f
XSHA256 (MesaLib-7.0.tar.bz2) = dc4dcd24712c4bdafc430f281e7200b9b7d9a6de1995223275def1d1bf012c08
XSIZE (MesaLib-7.0.tar.bz2) = 3366124
END-of-graphics/osmesa/distinfo
echo x - graphics/osmesa/pkg-descr
sed 's/^X//' >graphics/osmesa/pkg-descr << 'END-of-graphics/osmesa/pkg-descr'
XMesa's off-screen rendering interface is used for rendering into user-allocated
Xblocks of memory. That is, the GL_FRONT colorbuffer is actually a buffer in main
Xmemory, rather than a window on your display. There are no window system or
Xoperating system dependencies. One potential application is to use Mesa as an
Xoff-line, batch-style renderer.
X
XWWW: http://www.mesa3d.org/osmesa.html
END-of-graphics/osmesa/pkg-descr
echo x - graphics/osmesa/pkg-plist
sed 's/^X//' >graphics/osmesa/pkg-plist << 'END-of-graphics/osmesa/pkg-plist'
Xinclude/GL/osmesa.h
Xlib/libOSMesa.so
Xlib/libOSMesa.so.7
X%%OSM16%%lib/libOSMesa16.so
X%%OSM16%%lib/libOSMesa16.so.7
X%%OSM32%%lib/libOSMesa32.so
X%%OSM32%%lib/libOSMesa32.so.7
X at dirrmtry include/GL
END-of-graphics/osmesa/pkg-plist
exit
--- osmesa.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list