summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2012-08-31 16:29:49 +0000
committeradam <adam@pkgsrc.org>2012-08-31 16:29:49 +0000
commita7bcef017393385de55c8733093192b36f2d10a0 (patch)
tree473fe5b5176d2194c2bc3d584ca88ae37c77e1f7
parent20e98e5751603f2431f82b1427382fe36c64be2d (diff)
downloadpkgsrc-a7bcef017393385de55c8733093192b36f2d10a0.tar.gz
Changes:
* clean-up * converted to LIBTOOL * builds on OS X
-rw-r--r--graphics/opencsg/Makefile23
-rw-r--r--graphics/opencsg/PLIST7
-rw-r--r--graphics/opencsg/buildlink3.mk3
-rw-r--r--graphics/opencsg/distinfo5
-rw-r--r--graphics/opencsg/patches/patch-Makefile11
-rw-r--r--graphics/opencsg/patches/patch-src_Makefile81
6 files changed, 97 insertions, 33 deletions
diff --git a/graphics/opencsg/Makefile b/graphics/opencsg/Makefile
index 813a48a0f1e..400528338a7 100644
--- a/graphics/opencsg/Makefile
+++ b/graphics/opencsg/Makefile
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2012/03/26 14:02:42 joerg Exp $
-#
+# $NetBSD: Makefile,v 1.5 2012/08/31 16:29:49 adam Exp $
-PKGNAME= opencsg-1.3.2
DISTNAME= OpenCSG-1.3.2
-PKG_REVISION= 1
+PKGNAME= ${DISTNAME:tl}
+PKGREVISION= 1
CATEGORIES= graphics
MASTER_SITES= http://www.opencsg.org/
@@ -14,16 +13,24 @@ LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
-USE_TOOLS+= pkg-config gmake
-USE_LANGUAGES= c c++
+USE_LANGUAGES= c c++
+USE_LIBTOOL= yes
+USE_TOOLS+= gmake pkg-config
+BUILD_DIRS= src
INSTALLATION_DIRS= include lib
do-install:
- ${INSTALL_LIB} ${WRKSRC}/lib/* ${DESTDIR}${PREFIX}/lib/
${INSTALL_DATA} ${WRKSRC}/include/* ${DESTDIR}${PREFIX}/include/
+ ${LIBTOOL} --mode=install ${INSTALL_LIB} \
+ ${WRKSRC}/src/libopencsg.la ${DESTDIR}${PREFIX}/lib
-.include "../../graphics/glew/buildlink3.mk"
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "Darwin"
+LDFLAGS+= -framework OpenGL
+.else
+LDFLAGS+= -lGL -lGLU -lXmu
.include "../../graphics/glut/buildlink3.mk"
.include "../../x11/libXmu/buildlink3.mk"
+.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/opencsg/PLIST b/graphics/opencsg/PLIST
index 3eac9019cf6..9f7a12a16c1 100644
--- a/graphics/opencsg/PLIST
+++ b/graphics/opencsg/PLIST
@@ -1,6 +1,3 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2012/02/26 20:41:04 reinoud Exp $
+@comment $NetBSD: PLIST,v 1.2 2012/08/31 16:29:49 adam Exp $
include/opencsg.h
-lib/libopencsg.so
-lib/libopencsg.so.1
-lib/libopencsg.so.1.3
-lib/libopencsg.so.${PKGVERSION}
+lib/libopencsg.la
diff --git a/graphics/opencsg/buildlink3.mk b/graphics/opencsg/buildlink3.mk
index e0022290ba8..bca913c422d 100644
--- a/graphics/opencsg/buildlink3.mk
+++ b/graphics/opencsg/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.1.1.1 2012/02/26 20:41:04 reinoud Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2012/08/31 16:29:49 adam Exp $
BUILDLINK_TREE+= opencsg
@@ -8,7 +8,6 @@ OPENCSG_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.opencsg+= opencsg>=1.3.2
BUILDLINK_PKGSRCDIR.opencsg?= ../../graphics/opencsg
-.include "../../graphics/glew/buildlink3.mk"
.endif # OPENCSG_BUILDLINK3_MK
BUILDLINK_TREE+= -opencsg
diff --git a/graphics/opencsg/distinfo b/graphics/opencsg/distinfo
index 65bf48d8c59..ce0c4ae4891 100644
--- a/graphics/opencsg/distinfo
+++ b/graphics/opencsg/distinfo
@@ -1,8 +1,7 @@
-$NetBSD: distinfo,v 1.3 2012/03/14 23:11:58 joerg Exp $
+$NetBSD: distinfo,v 1.4 2012/08/31 16:29:49 adam Exp $
SHA1 (OpenCSG-1.3.2.tar.gz) = e2b4abf169ae3e319eb5f6d9ae6136fa96710a05
RMD160 (OpenCSG-1.3.2.tar.gz) = 4480778c310a3d5f84933c1b35508dd94adf2332
Size (OpenCSG-1.3.2.tar.gz) = 744712 bytes
-SHA1 (patch-Makefile) = 13c3cc669156b04b5d09af9587f76d1055629518
SHA1 (patch-RenderTexture.cpp) = 9d65c9928b4f42fde109b5497912e6654b188c69
-SHA1 (patch-src_Makefile) = 7122719be270b183d35c7c0d8b39266dc84df4a7
+SHA1 (patch-src_Makefile) = a6950aaf3d8c23f1e5553267a4239f822d2e43d9
diff --git a/graphics/opencsg/patches/patch-Makefile b/graphics/opencsg/patches/patch-Makefile
deleted file mode 100644
index ea830779f9e..00000000000
--- a/graphics/opencsg/patches/patch-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: patch-Makefile,v 1.1.1.1 2012/02/26 20:41:04 reinoud Exp $
-
---- Makefile.orig 2011-12-01 21:25:12.000000000 +0000
-+++ Makefile
-@@ -1,4 +1,5 @@
--SUBDIRS = glew src example
-+# only build src since we are linking using pkgsrc to libglew
-+SUBDIRS = src
-
- all:
- for X in $(SUBDIRS); do make -C $$X ; done
diff --git a/graphics/opencsg/patches/patch-src_Makefile b/graphics/opencsg/patches/patch-src_Makefile
index 56180633f34..d0f7e4ae623 100644
--- a/graphics/opencsg/patches/patch-src_Makefile
+++ b/graphics/opencsg/patches/patch-src_Makefile
@@ -1,15 +1,88 @@
-$NetBSD: patch-src_Makefile,v 1.1 2012/03/14 23:11:58 joerg Exp $
+$NetBSD: patch-src_Makefile,v 1.2 2012/08/31 16:29:49 adam Exp $
---- src/Makefile.orig 2012-03-13 15:57:17.000000000 +0000
+--- src/Makefile.orig 2011-12-01 21:25:12.000000000 +0000
+++ src/Makefile
-@@ -18,8 +18,8 @@ LEXFLAGS =
+@@ -8,18 +8,14 @@
+
+ ####### Compiler, tools and options
+
+-CC = gcc
+-CXX = g++
+ LEX = flex
+ YACC = yacc
+-CFLAGS = -pipe -Wall -W -O2 -fPIC
+-CXXFLAGS = -pipe -Wall -W -O2 -fPIC
+ LEXFLAGS =
YACCFLAGS= -d
INCPATH = -I. -I../include -I../glew/include -I.. -I/usr/X11R6/include
- LINK = g++
+-LINK = g++
-LFLAGS = -shared -Wl,-soname,libopencsg.so.1 -Wl,-rpath,../lib
-LIBS = $(SUBLIBS) -L/usr/X11R6/lib -lGLU -lGL -lXmu
++LINK = ${LIBTOOL} --mode=link ${CXX}
+LFLAGS = -shared -Wl,-soname,libopencsg.so.1 -Wl,-rpath,${X11BASE}/lib
+LIBS = $(SUBLIBS) -lGLU -lGL -lXmu
AR = ar cqs
RANLIB =
QMAKE = qmake
+@@ -105,7 +101,7 @@ OBJMOC =
+ DIST = src.pro
+ QMAKE_TARGET = opencsg
+ DESTDIR = ../lib/
+-TARGET = libopencsg.so.1.3.2
++TARGET = libopencsg.la
+ TARGETA = ../lib/libopencsg.a
+ TARGETD = libopencsg.so.1.3.2
+ TARGET0 = libopencsg.so
+@@ -118,36 +114,27 @@ first: all
+ .SUFFIXES: .c .o .cpp .cc .cxx .C
+
+ .cpp.o:
+- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
++ ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+ .cc.o:
+- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
++ ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+ .cxx.o:
+- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
++ ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+ .C.o:
+- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
++ ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+ .c.o:
+- $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
++ ${LIBTOOL} --mode=compile $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+
+ ####### Build rules
+
+ all: Makefile ../lib/$(TARGET)
+
+ ../lib/$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) $(OBJCOMP)
+- test -d ../lib/ || mkdir -p ../lib/
+- -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
+- $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) $(OBJCOMP)
+- -ln -s $(TARGET) $(TARGET0)
+- -ln -s $(TARGET) $(TARGET1)
+- -ln -s $(TARGET) $(TARGET2)
+- -$(DEL_FILE) ../lib/$(TARGET)
+- -$(DEL_FILE) ../lib/$(TARGET0)
+- -$(DEL_FILE) ../lib/$(TARGET1)
+- -$(DEL_FILE) ../lib/$(TARGET2)
+- -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) ../lib/
++ $(LINK) ${LDFLAGS} -o $(TARGET) $(OBJECTS:.o=.lo) \
++ -rpath ${PREFIX}/lib -version-info 1:3
+
+
+
+@@ -272,7 +259,7 @@ stencilManager.o: stencilManager.cpp ope
+ stencilManager.h
+
+ RenderTexture.o: ../RenderTexture/RenderTexture.cpp ../RenderTexture/RenderTexture.h
+- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o RenderTexture.o ../RenderTexture/RenderTexture.cpp
++ ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o RenderTexture.o ../RenderTexture/RenderTexture.cpp
+
+ ####### Install
+