mesa-libglw stable port information

Info2: <<
Package: mesa-libglw-%type_pkg[motif]
Version: 7.2
Revision: 1
BuildDependsOnly: True
Type: motif (lesstif openmotif3 openmotif4)
Source: mirror:sourceforge:mesa3d/MesaLib-%v.tar.bz2
Source-MD5: 04d379292e023df0b0266825cb0dbde5
PatchFile: mesa-libglw.patch
PatchFile-MD5: e585f9311d0da559c29e5424d6c66242
SourceDirectory: Mesa-%v
Depends: x11, %N-shlibs (= %v-%r), %type_pkg[motif]-shlibs
BuildDepends: %type_pkg[motif], x11-dev, fink (>= 0.24.12)
BuildConflicts: (%type_pkg[motif] != lesstif) lesstif, (%type_pkg[motif] != openmotif3) openmotif3, (%type_pkg[motif] != openmotif4) openmotif4
Conflicts: mesa-libglw, mesa-libglw-lesstif, mesa-libglw-openmotif3, mesa-libglw-openmotif4
Replaces: mesa-libglw, mesa-libglw-lesstif, mesa-libglw-openmotif3, mesa-libglw-openmotif4
PatchScript: <<
sed 's|@FINKPREFIX@|%p|g' < %{PatchFile} | sed 's|@MOTIF@|%type_pkg[motif]|g'| patch -p1
<<
CompileScript: <<
#!/bin/sh -ev
make OPT_FLAGS="-O3 -I%p/include" LIB_DIR=lib darwin
<<
InstallScript: <<
#!/bin/sh -ev
make install DESTDIR=%d LIB_DIR=lib
cd %d/%p/lib
ln -s libGLw-%type_pkg[motif].1.0.dylib libGLw.dylib
<<
SplitOff: <<
Package: %N-shlibs
Depends: x11, %type_pkg[motif]-shlibs
Files: %p/lib/libGLw-%type_pkg[motif].*.dylib
Shlibs: <<
%p/lib/libGLw-%type_pkg[motif].1.dylib 1.0.0 %n (>=7.0.2-3)
<<
<<
License: BSD
Description: Xt / Motif OpenGL widgets
Homepage: http://www.mesa3d.org
Maintainer: None
<<

mesa-libglw stable port .patch

diff -uNr Mesa-7.2/bin/mklib Mesa-7.2.fink/bin/mklib
--- Mesa-7.2/bin/mklib 2008-08-25 10:46:41.000000000 -0400
+++ Mesa-7.2.fink/bin/mklib 2009-01-01 10:12:42.000000000 -0500
@@ -638,7 +638,7 @@
else
LIBSUFFIX="dylib"
if [ -z "$ID" ] ; then
- ID="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+ ID="@FINKPREFIX@/lib/liblib${LIBNAME}.${MAJOR}.${MINOR}.${LIBSUFFIX}"
fi
OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name ${ID}"
fi
diff -uNr Mesa-7.2/configs/darwin Mesa-7.2.fink/configs/darwin
--- Mesa-7.2/configs/darwin 2008-08-25 10:46:41.000000000 -0400
+++ Mesa-7.2.fink/configs/darwin 2009-01-01 11:12:05.000000000 -0500
@@ -4,7 +4,7 @@

CONFIG_NAME = darwin

-INSTALL_DIR = /usr/X11
+INSTALL_DIR = @FINKPREFIX@

# Compiler and flags
CC = gcc
@@ -29,7 +29,7 @@
GL_LIB_NAME = libGL.dylib
GLU_LIB_NAME = libGLU.dylib
GLUT_LIB_NAME = libglut.dylib
-GLW_LIB_NAME = libGLw.dylib
+GLW_LIB_NAME = libGLw-@MOTIF@.dylib
OSMESA_LIB_NAME = libOSMesa.dylib

# globs used to install the lib and all symlinks
@@ -43,11 +43,9 @@
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
-GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXt
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -l$(GL_LIB) /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXt -L/@FINKPREFIX@/lib -lXm
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm

-# omit glw lib for now:
-SRC_DIRS = glx/x11 mesa glu glw glut/glx
GLU_DIRS = sgi
DRIVER_DIRS = osmesa
#DRIVER_DIRS = dri
diff -uNr Mesa-7.2/configs/default Mesa-7.2.fink/configs/default
--- Mesa-7.2/configs/default 2008-09-13 16:32:10.000000000 -0400
+++ Mesa-7.2.fink/configs/default 2009-01-01 10:12:42.000000000 -0500
@@ -43,7 +43,7 @@
GL_LIB = GL
GLU_LIB = GLU
GLUT_LIB = glut
-GLW_LIB = GLw
+GLW_LIB = GLw-@MOTIF@
OSMESA_LIB = OSMesa


@@ -66,13 +66,13 @@

# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
# order to build the Motif widget too)
-GLW_SOURCES = GLwDrawA.c
-MOTIF_CFLAGS = -I/usr/include/Motif1.2
+GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
+MOTIF_CFLAGS = -I@FINKPREFIX@/include


# Directories to build
LIB_DIR = lib
-SRC_DIRS = mesa glu glut/glx glw
+SRC_DIRS = glw
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
# Which subdirs under $(TOP)/progs/ to enter:
@@ -85,7 +85,7 @@
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXi -lm
-GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
+GLW_LIB_DEPS = -l$(GL_LIB) -lXt -lX11

# Program dependencies - specific GL/glut libraries added in Makefiles
APP_LIB_DEPS = -lm
diff -uNr Mesa-7.2/src/glw/Makefile Mesa-7.2.fink/src/glw/Makefile
--- Mesa-7.2/src/glw/Makefile 2008-08-25 10:46:42.000000000 -0400
+++ Mesa-7.2.fink/src/glw/Makefile 2009-01-01 10:12:42.000000000 -0500
@@ -34,13 +34,13 @@
glw.pc: glw.pc.in
$(pcedit) $< > $@

-install: glw.pc
+install:
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
$(INSTALL) -m 644 *.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/$(GLW_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) -m 644 glw.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(INSTALL) $(TOP)/$(LIB_DIR)/lib$(GLW_LIB).$(MAJOR).$(MINOR).dylib $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) $(TOP)/$(LIB_DIR)/lib$(GLW_LIB).$(MAJOR).dylib $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) $(TOP)/$(LIB_DIR)/lib$(GLW_LIB).dylib $(DESTDIR)$(INSTALL_LIB_DIR)

clean:
-rm -f depend depend.bak
@@ -53,7 +53,7 @@
-major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
-id $(INSTALL_LIB_DIR)/lib$(GLW_LIB).$(MAJOR).dylib \
- $(GLW_LIB_DEPS) $(OBJECTS)
+ $(OBJECTS) $(GLW_LIB_DEPS)


#

mesa-libglw _unstable_ port .patch