mesa stable port information

Package: mesa
Version: 7.0.2
Revision: 2

Maintainer: None

Depends: %N-shlibs (= %v-%r)
BuildDepends: fink (>= 0.24.12), x11-dev
BuildDependsOnly: True

Description: 3-D graphics library
Homepage: http://mesa3d.sourceforge.net/
License: OSI-Approved

Source: mirror:sourceforge:mesa3d/MesaLib-%v.tar.bz2
Source2: mirror:sourceforge:mesa3d/MesaGLUT-%v.tar.bz2

SourceDirectory: Mesa-%v
Source-MD5: 93e6ed7924ff069a4f883b4fce5349dc
Source2-MD5: 3a33f8efc8c58a592a854cfc7a643286

PatchFile: %n.patch
PatchFile-MD5: 333851395cdba6e525e86fcfa84be96d
PatchScript: sed 's,@PREFIX@,%p,g' < %{PatchFile} | patch -p1

UseMaxBuildJobs: false
CompileScript: <<
make darwin
make realclean
make darwin-static
<<

InstallScript: <<
mkdir -p %i/lib/%n
mv lib/* %i/lib/%n/

mkdir -p %i/include/%n
mv include/* %i/include/%n/

mkdir -p %i/share/%n
cp -r docs %i/share/%n/
ln -sf %p/lib/%n %i/share/%n/lib
ln -sf %p/include/%n %i/share/%n/include
<<

SplitOff: <<
Package: %N-shlibs
Depends: x11, x11-shlibs
Files: lib/mesa/lib*.*.dylib
Shlibs: <<
%p/lib/mesa/libGLU.1.dylib 1.3.0 %n (>= 6.5.2-1)
%p/lib/mesa/libGL.1.dylib 1.5.0 %n (>= 6.5.2-1)
%p/lib/mesa/libglut.3.dylib 3.7.0 %n (>= 6.5.2-1)
%p/lib/mesa/libOSMesa.6.dylib 6.5.0 %n (>= 6.5.2-1)
<<
DocFiles: docs/COPYING
<<

DocFiles: docs/COPYING

DescDetail: <<
Mesa is a 3-D graphics library with an API which
is very similar to that of OpenGL.* To the extent
that Mesa utilizes the OpenGL command syntax or
state machine, it is being used with authorization
from Silicon Graphics, Inc.(SGI). However, the
author does not possess an OpenGL license from
SGI, and makes no claim that Mesa is in any way
a compatible replacement for OpenGL or associated
with SGI. Those who want a licensed implementation
of OpenGL should contact a licensed vendor.
<<

DescUsage: <<
The libraries and headers are installed in
%p/lib/mesa and %p/include/mesa, respectively. This
is to avoid conflict with other OpenGL dependent
packages in Fink like GLUT/freeglut, etc. To use the
libraries and headers installed, you need to
explicitly set the Include (-I) and Linker (-L)
flags before compiling against Mesa3d. The order
in which the flags are passed to the linker
is also important, so that Mesa libraries is the
one that is seen first by the linker (before the
system OpenGL).

Care needs to be taken to avoid system OpenGL,
if you want to use Mesa3d, while compiling, like
making sure that it's first in the linker's search
path. Otherwise, you get runtime errors.
<<

DescPackaging: <<
A link is created from %p/include/mesa and
%p/lib/mesa to %p/share/mesa/include and
%p/share/mesa/lib, respectively. This is done to
facilitate compiling certain programmes which look
for a common GL directory containing an include
directory (with gl.h, etc.) and lib directory
(with libGL.*, etc.).

Previously maintained by Murali Vadivelu
<<

mesa stable port .patch

diff -urN Mesa-7.0.2.orig/Makefile Mesa-7.0.2/Makefile
--- Mesa-7.0.2.orig/Makefile 2007-11-10 16:41:24.000000000 +0000
+++ Mesa-7.0.2/Makefile 2008-03-02 00:49:08.000000000 +0000
@@ -27,7 +27,7 @@
realclean:
touch $(TOP)/configs/current
$(MAKE) clean
- -rm -rf lib*
+# -rm -rf lib*
-rm -f $(TOP)/configs/current
-rm -f `find . -name \*.o`
-rm -f `find . -name \*.a`
diff -urN Mesa-7.0.2.orig/bin/mklib Mesa-7.0.2/bin/mklib
--- Mesa-7.0.2.orig/bin/mklib 2007-11-01 15:30:52.000000000 +0000
+++ Mesa-7.0.2/bin/mklib 2008-03-02 00:55:20.000000000 +0000
@@ -575,6 +575,7 @@
echo "mklib: Making Darwin static library: " ${LIBNAME}
LINK="ar"
OPTS="-ruvs"
+ echo "${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}"
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
else
@@ -584,10 +585,11 @@
OPTS="${ARCHOPT} -bundle -multiply_defined suppress"
else
LIBSUFFIX="dylib"
- OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+ OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -headerpad_max_install_names -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name @PREFIX@/lib/mesa/lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
fi
- LINKNAME="lib${LIBNAME}.${LIBSUFFIX}"
- LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+ LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+ LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
+ LIBNAME="lib${LIBNAME}.${MAJOR}.${MINOR}.${LIBSUFFIX}"

# examine first object to determine ABI
set ${OBJECTS}
@@ -611,9 +613,11 @@
fi

echo "mklib: Making Darwin shared library: " ${LIBNAME}
- ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ echo "${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}"
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME} ${LINKNAME}
- FINAL_LIBS="${LIBNAME} ${LINKNAME}"
+ ln -s ${LIBNAME} ${LINKNAME2}
+ FINAL_LIBS="${LIBNAME} ${LINKNAME} ${LINKNAME2}"
fi
;;

mesa _unstable_ port .patch