summaryrefslogtreecommitdiff
path: root/graphics/lib3ds
diff options
context:
space:
mode:
authorjmmv <jmmv>2006-04-11 14:47:06 +0000
committerjmmv <jmmv>2006-04-11 14:47:06 +0000
commitc56c28951446de28b0d9b2ca911aede6adba2ad5 (patch)
treef59815c252343ee2ef6b1158abe26cd5c000f2f1 /graphics/lib3ds
parent7f42ca13faae6e56912440afd44ec38732909319 (diff)
downloadpkgsrc-c56c28951446de28b0d9b2ca911aede6adba2ad5.tar.gz
libtoolize this package so that it builds under Mac OS X; building the
shared library by hand (as happened before) was not portable. Bump PKGREVISION to 5.
Diffstat (limited to 'graphics/lib3ds')
-rw-r--r--graphics/lib3ds/Makefile12
-rw-r--r--graphics/lib3ds/PLIST6
-rw-r--r--graphics/lib3ds/distinfo10
-rw-r--r--graphics/lib3ds/patches/patch-aa51
-rw-r--r--graphics/lib3ds/patches/patch-ab111
-rw-r--r--graphics/lib3ds/patches/patch-ac24
-rw-r--r--graphics/lib3ds/patches/patch-ad13
-rw-r--r--graphics/lib3ds/patches/patch-ae107
8 files changed, 193 insertions, 141 deletions
diff --git a/graphics/lib3ds/Makefile b/graphics/lib3ds/Makefile
index 0e9204f7713..bd1c0f23e5f 100644
--- a/graphics/lib3ds/Makefile
+++ b/graphics/lib3ds/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.11 2006/02/05 23:09:34 joerg Exp $
+# $NetBSD: Makefile,v 1.12 2006/04/11 14:47:06 jmmv Exp $
#
DISTNAME= lib3ds-1.2.0
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= graphics devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lib3ds/}
@@ -11,10 +11,14 @@ HOMEPAGE= http://lib3ds.sourceforge.net/
COMMENT= 3D Studio File Format Library
GNU_CONFIGURE= YES
-
-LDFLAGS+= -lm
+USE_LIBTOOL= YES
+USE_TOOLS= autoconf automake
.include "../../graphics/Mesa/buildlink3.mk"
.include "../../mk/x11.buildlink3.mk"
+pre-configure:
+ cd ${WRKSRC} && libtoolize --force
+ cd ${WRKSRC} && autoreconf -i --force
+
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/lib3ds/PLIST b/graphics/lib3ds/PLIST
index fa415b6f02f..602929a8787 100644
--- a/graphics/lib3ds/PLIST
+++ b/graphics/lib3ds/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2003/05/24 09:32:34 salo Exp $
+@comment $NetBSD: PLIST,v 1.3 2006/04/11 14:47:06 jmmv Exp $
bin/3ds2m
bin/3ds2rib
bin/3dsdump
@@ -24,9 +24,7 @@ include/lib3ds/tracks.h
include/lib3ds/types.h
include/lib3ds/vector.h
include/lib3ds/viewport.h
-lib/lib3ds.a
-lib/lib3ds.so
-lib/lib3ds.so.1
+lib/lib3ds.la
man/man1/3ds2m.1
man/man1/3dsdump.1
man/man1/lib3ds-config.1
diff --git a/graphics/lib3ds/distinfo b/graphics/lib3ds/distinfo
index 9728fe958de..d540c6956b2 100644
--- a/graphics/lib3ds/distinfo
+++ b/graphics/lib3ds/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.4 2005/02/24 08:45:08 agc Exp $
+$NetBSD: distinfo,v 1.5 2006/04/11 14:47:06 jmmv Exp $
SHA1 (lib3ds-1.2.0.tar.gz) = 49614218c4c11572887beefaa34d23f72ef70a2c
RMD160 (lib3ds-1.2.0.tar.gz) = 3e0401e36b545c2a54213ecb2ea3216360450562
Size (lib3ds-1.2.0.tar.gz) = 136806 bytes
-SHA1 (patch-aa) = a3bd4a1d0d1982211d783531112ace00d1aef377
-SHA1 (patch-ab) = 37229292682ea9bc35cddb2a1f089e46e8490139
-SHA1 (patch-ac) = ea31fbc277bb980d6d04ca867948f275be919793
+SHA1 (patch-aa) = 0933c6cb86b05306feb97a10f282ea935bfe2c24
+SHA1 (patch-ab) = b2d6804b71fb37428ebf7fb59168ae8ef2eec362
+SHA1 (patch-ac) = d73dd1b2cdabe61f78d4a7307a04917ff5fc379b
+SHA1 (patch-ad) = bbf95ca49e1bf6fa67314f9818af5b1b974eb54a
+SHA1 (patch-ae) = 7760d2311d99f3d5d91f89fceced314648abbeb0
diff --git a/graphics/lib3ds/patches/patch-aa b/graphics/lib3ds/patches/patch-aa
index 7c787822f9a..f589a83fd1a 100644
--- a/graphics/lib3ds/patches/patch-aa
+++ b/graphics/lib3ds/patches/patch-aa
@@ -1,44 +1,13 @@
-$NetBSD: patch-aa,v 1.2 2004/04/24 20:51:47 snj Exp $
+$NetBSD: patch-aa,v 1.3 2006/04/11 14:47:06 jmmv Exp $
---- examples/Makefile.in.orig 2002-01-14 06:24:34.000000000 -0800
-+++ examples/Makefile.in 2004-04-24 13:04:41.000000000 -0700
-@@ -88,26 +88,25 @@ INCLUDES = \
- @GLUT_CHECK_TRUE@PLAYER = @GLUT_CHECK_TRUE@player
- @GLUT_CHECK_FALSE@PLAYER =
+--- configure.in.orig 2002-01-14 13:09:15.000000000 +0100
++++ configure.in
+@@ -38,7 +38,7 @@ AM_INIT_AUTOMAKE(lib3ds, $LIB3DS_VERSION
--noinst_PROGRAMS = \
-+PROGRAMS = \
- 3ds2rib \
-- $(PLAYER)
-+ player
+ dnl Checks for programs.
+ AC_PROG_CC
+-AC_PROG_RANLIB
++AC_PROG_LIBTOOL
+ CONFIGURE_GLUT(,)
-
- LDADD = \
-- $(top_builddir)/lib3ds/lib3ds.a \
-+ -L$(top_builddir)/lib3ds -l3ds \
- @DMALLOC_LIBS@ -lm
-
-
- player_SOURCES = player.c
- player_LDADD = \
-- $(top_builddir)/lib3ds/lib3ds.a \
-+ -L$(top_builddir)/lib3ds -l3ds -lGL -lGLU -lX11 -lXi -lXmu -lglut \
- @GLUT_LIBS@ \
- @DMALLOC_LIBS@ -lm
-
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
- CONFIG_HEADER = ../config.h
- CONFIG_CLEAN_FILES = glstub.h
--PROGRAMS = $(noinst_PROGRAMS)
-
-
- DEFS = @DEFS@ -I. -I$(srcdir) -I..
-@@ -239,6 +238,8 @@ check: check-am
- installcheck-am:
- installcheck: installcheck-am
- install-exec-am:
-+ ${BSD_INSTALL_PROGRAM} 3ds2rib ${PREFIX}/bin
-+ ${BSD_INSTALL_PROGRAM} player ${PREFIX}/bin/3dsplayer
- install-exec: install-exec-am
-
- install-data-am:
+ AC_MSG_CHECKING([for debugging mode])
diff --git a/graphics/lib3ds/patches/patch-ab b/graphics/lib3ds/patches/patch-ab
index c19833201fe..0adcd5166d8 100644
--- a/graphics/lib3ds/patches/patch-ab
+++ b/graphics/lib3ds/patches/patch-ab
@@ -1,81 +1,34 @@
-$NetBSD: patch-ab,v 1.1 2003/05/24 09:32:34 salo Exp $
+$NetBSD: patch-ab,v 1.2 2006/04/11 14:47:06 jmmv Exp $
---- lib3ds/Makefile.in.orig 2002-01-14 15:24:32.000000000 +0100
-+++ lib3ds/Makefile.in 2003-05-24 10:45:16.000000000 +0200
-@@ -85,6 +85,7 @@
- INCLUDES = -I$(top_srcdir)
+--- examples/Makefile.am.orig 2002-01-14 13:27:45.000000000 +0100
++++ examples/Makefile.am
+@@ -25,23 +25,17 @@ INCLUDES = \
+ @GLUT_CFLAGS@ \
+ @DMALLOC_CFLAGS@
+
+-if GLUT_CHECK
+-PLAYER = player
+-else
+-PLAYER =
+-endif
+-
+-noinst_PROGRAMS = \
++bin_PROGRAMS = \
+ 3ds2rib \
+- $(PLAYER)
++ 3dsplayer
+
+ LDADD = \
+- $(top_builddir)/lib3ds/lib3ds.a \
++ $(top_builddir)/lib3ds/lib3ds.la \
+ @DMALLOC_LIBS@ -lm
+
+-player_SOURCES = player.c
+-player_LDADD = \
+- $(top_builddir)/lib3ds/lib3ds.a \
++3dsplayer_SOURCES = player.c
++3dsplayer_LDADD = \
++ $(top_builddir)/lib3ds/lib3ds.la \
+ @GLUT_LIBS@ \
+ @DMALLOC_LIBS@ -lm
- lib_LIBRARIES = lib3ds.a
-+lib_SHLIBRARIES= lib3ds.so.1
-
- lib3ds_a_SOURCES = \
- io.c \
-@@ -139,7 +140,7 @@
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
- CONFIG_HEADER = ../config.h
- CONFIG_CLEAN_FILES =
--LIBRARIES = $(lib_LIBRARIES)
-+LIBRARIES = $(lib_LIBRARIES) $(lib_SHLIBRARIES)
-
-
- DEFS = @DEFS@ -I. -I$(srcdir) -I..
-@@ -150,6 +151,7 @@
- lib3ds_a_OBJECTS = io.o float.o vector.o matrix.o quat.o tcb.o ease.o \
- chunk.o file.o background.o atmosphere.o shadow.o viewport.o material.o \
- mesh.o camera.o light.o tracks.o node.o
-+lib3ds_so_OBJECTS = $(lib3ds_a_OBJECTS:S/.o$/.so/)
- AR = ar
- CFLAGS = @CFLAGS@
- COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-@@ -169,7 +171,7 @@
-
- all: all-redirect
- .SUFFIXES:
--.SUFFIXES: .S .c .o .s
-+.SUFFIXES: .S .c .o .s .so
- $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps lib3ds/Makefile
-
-@@ -187,10 +189,10 @@
-
- maintainer-clean-libLIBRARIES:
-
--install-libLIBRARIES: $(lib_LIBRARIES)
-+install-libLIBRARIES: $(lib_LIBRARIES) $(lib_SHLIBRARIES)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(libdir)
-- @list='$(lib_LIBRARIES)'; for p in $$list; do \
-+ @list='$(lib_LIBRARIES) $(lib_SHLIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
-@@ -203,6 +205,8 @@
- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
- done
-+ cd $(DESTDIR)$(libdir); \
-+ ln -sf $(lib_SHLIBRARIES) $(lib_SHLIBRARIES:S/.1$//)
-
- uninstall-libLIBRARIES:
- @$(NORMAL_UNINSTALL)
-@@ -219,6 +223,9 @@
- .S.o:
- $(COMPILE) -c $<
-
-+.c.so:
-+ $(COMPILE) -fpic -DPIC -c $< -o $(.TARGET)
-+
- mostlyclean-compile:
- -rm -f *.o core *.core
-
-@@ -234,6 +241,10 @@
- $(AR) cru lib3ds.a $(lib3ds_a_OBJECTS) $(lib3ds_a_LIBADD)
- $(RANLIB) lib3ds.a
-
-+lib3ds.so.1: $(lib3ds_so_OBJECTS) $(lib3ds_a_DEPENDENCIES)
-+ $(CC) -shared -o lib3ds.so.1 -Wl,-soname=lib3ds.so.1 $(lib3ds_so_OBJECTS) $(lib3ds_a_LIBADD)
-+ ln -sf lib3ds.so.1 lib3ds.so
-+
- install-lib3dsHEADERS: $(lib3ds_HEADERS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(lib3dsdir)
diff --git a/graphics/lib3ds/patches/patch-ac b/graphics/lib3ds/patches/patch-ac
index fb978618f1e..3fa6adbd271 100644
--- a/graphics/lib3ds/patches/patch-ac
+++ b/graphics/lib3ds/patches/patch-ac
@@ -1,13 +1,19 @@
-$NetBSD: patch-ac,v 1.1 2003/05/24 09:32:34 salo Exp $
+$NetBSD: patch-ac,v 1.2 2006/04/11 14:47:06 jmmv Exp $
---- tools/Makefile.in.orig 2002-01-14 15:24:33.000000000 +0100
-+++ tools/Makefile.in 2003-05-24 10:17:03.000000000 +0200
-@@ -91,7 +91,7 @@
+--- lib3ds/Makefile.am.orig 2002-01-14 13:27:45.000000000 +0100
++++ lib3ds/Makefile.am
+@@ -24,9 +24,12 @@ lib3dsdir=$(includedir)/lib3ds
+ INCLUDES = -I$(top_srcdir)
- LDADD = \
-- $(top_builddir)/lib3ds/lib3ds.a \
-+ -L$(top_builddir)/lib3ds -l3ds \
- @DMALLOC_LIBS@ -lm
-
+-lib_LIBRARIES = lib3ds.a
++lib_LTLIBRARIES = lib3ds.la
+-lib3ds_a_SOURCES = \
++lib3ds_la_LIBADD = -lm
++lib3ds_la_LDFLAGS = -version-info 1
++
++lib3ds_la_SOURCES = \
+ io.c \
+ float.c \
+ vector.c \
diff --git a/graphics/lib3ds/patches/patch-ad b/graphics/lib3ds/patches/patch-ad
new file mode 100644
index 00000000000..d7391f30ae0
--- /dev/null
+++ b/graphics/lib3ds/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1 2006/04/11 14:47:06 jmmv Exp $
+
+--- tools/Makefile.am.orig 2002-01-14 13:27:45.000000000 +0100
++++ tools/Makefile.am
+@@ -29,7 +29,7 @@ bin_PROGRAMS = \
+ 3ds2m
+
+ LDADD = \
+- $(top_builddir)/lib3ds/lib3ds.a \
++ $(top_builddir)/lib3ds/lib3ds.la \
+ @DMALLOC_LIBS@ -lm
+
+ MANPAGES = \
diff --git a/graphics/lib3ds/patches/patch-ae b/graphics/lib3ds/patches/patch-ae
new file mode 100644
index 00000000000..58171f1e00d
--- /dev/null
+++ b/graphics/lib3ds/patches/patch-ae
@@ -0,0 +1,107 @@
+$NetBSD: patch-ae,v 1.1 2006/04/11 14:47:06 jmmv Exp $
+
+--- /dev/null 2006-04-11 16:18:52.000000000 +0200
++++ acinclude.m4 2006-04-11 16:20:57.000000000 +0200
+@@ -0,0 +1,102 @@
++#
++# CONFIGURE_GLUT([ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
++#
++AC_DEFUN(CONFIGURE_GLUT,
++[
++ GL_HEADER_DIR="GL"
++ GLU_HEADER_DIR="GL"
++ GLUT_HEADER_DIR="GL"
++
++ GLUT_CFLAGS="-I/usr/X11R6/include"
++ GLUT_LIBS_FRAMEWORKS="-lobjc -framework GLUT -framework OpenGL"
++ GLUT_LIBS_WIN32="-lglut32 -lopengl32 -lglu32"
++ GLUT_LIBS_UNIX="-lglut -lGLU -lGL"
++
++ AC_ARG_WITH(glut-cflags,
++ [ --with-glut-cflags=FLGS GL/GLU/glut compiler flags],
++ [
++ GLUT_CFLAGS="$withval"
++ ])
++
++ AC_ARG_WITH(glut-libs,
++ [ --with-glut-libs=LIBS GL/GLU/glut linker flags],
++ [
++ GLUT_LIBS="$withval"
++ GLUT_FRAMEWORKS="$withval"
++ ])
++
++ saved_CFLAGS="$CFLAGS"
++ saved_LIBS="$LIBS"
++ AC_LANG_SAVE
++ AC_LANG_C
++
++ have_GLUT="yes"
++ CFLAGS="$saved_CFLAGS $GLUT_CFLAGS"
++ AC_CHECK_HEADER(GL/gl.h,, have_GLUT=no)
++ AC_CHECK_HEADER(GL/glu.h,, have_GLUT=no)
++ AC_CHECK_HEADER(GL/glut.h,, have_GLUT=no)
++
++ if test "$have_GLUT" = "no"; then
++ have_GLUT="yes"
++ CFLAGS="$saved_CFLAGS $GLUT_CFLAGS"
++ AC_CHECK_HEADER(OpenGL/gl.h,, have_GLUT=no)
++ AC_CHECK_HEADER(OpenGL/glu.h,, have_GLUT=no)
++ AC_CHECK_HEADER(GLUT/glut.h,, have_GLUT=no)
++ if test "$have_GLUT" = "yes"; then
++ GL_HEADER_DIR="OpenGL"
++ GLU_HEADER_DIR="OpenGL"
++ GLUT_HEADER_DIR="GLUT"
++ fi
++ fi
++
++ if test "$have_GLUT" = "yes"; then
++ CFLAGS="$saved_CFLAGS $GLUT_CFLAGS"
++
++ if test "$have_GLUT" = "yes"; then
++ AC_MSG_CHECKING([if GL/GLU/glut frameworks exist])
++ GLUT_LIBS="$GLUT_LIBS_FRAMEWORKS"
++ LIBS="$saved_LIBS $GLUT_LIBS"
++ AC_TRY_LINK(, [ char glBegin(); void glutSwapBuffers();],
++ , have_GLUT=no)
++ AC_MSG_RESULT($have_GLUT)
++ fi
++
++ if test "$have_GLUT" = "no"; then
++ have_GLUT=yes
++ AC_MSG_CHECKING([for GL/GLU/glut win32 libs])
++ GLUT_LIBS="$GLUT_LIBS_WIN32"
++ LIBS="$saved_LIBS $GLUT_LIBS"
++ AC_TRY_LINK(, [ char glBegin(); void glutSwapBuffers();],
++ , have_GLUT=no)
++ AC_MSG_RESULT($have_GLUT)
++ fi
++
++ if test "$have_GLUT" = "no"; then
++ have_GLUT=yes
++ AC_MSG_CHECKING([for GL/GLU/glut unix libs])
++ GLUT_LIBS="$GLUT_LIBS_UNIX"
++ LIBS="$saved_LIBS $GLUT_LIBS"
++ AC_TRY_LINK(, [ char glBegin(); void glutSwapBuffers();],
++ , have_GLUT=no)
++ AC_MSG_RESULT($have_GLUT)
++ fi
++ fi
++
++ LIBS="$saved_LIBS"
++ CFLAGS="$saved_CFLAGS"
++ AC_LANG_RESTORE
++
++ AM_CONDITIONAL(GLUT_CHECK, test "$have_GLUT" = "yes")
++ if test "$have_GLUT" = "yes"; then
++ ifelse([$1], , :, [$1])
++ else
++ GLUT_CFLAGS=""
++ GLUT_LIBS=""
++ ifelse([$2], , :, [$2])
++ fi
++ AC_SUBST(GL_HEADER_DIR)
++ AC_SUBST(GLU_HEADER_DIR)
++ AC_SUBST(GLUT_HEADER_DIR)
++ AC_SUBST(GLUT_CFLAGS)
++ AC_SUBST(GLUT_LIBS)
++])