aboutsummaryrefslogtreecommitdiff
path: root/graphics/osg/Makefile
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-02-10 03:57:56 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-02-10 03:57:56 +0000
commit0232d1423d1b8441cd47ed083571cbc8df6f9d1a (patch)
treea65bd3be29b9f44eb0689419d75c5cc7e21ac426 /graphics/osg/Makefile
parent9644477e58cfc1d79d46276394b5f79b1c24742e (diff)
downloadports-0232d1423d1b8441cd47ed083571cbc8df6f9d1a.tar.gz
ports-0232d1423d1b8441cd47ed083571cbc8df6f9d1a.zip
- Fix installation
- Merge some changes from osg-devel - Add more knobs (for things detected via pkg-config) - Remove OPENVRML knob, which is broken - Add PORTSCOUT - Plist fixes
Notes
Notes: svn path=/head/; revision=227967
Diffstat (limited to 'graphics/osg/Makefile')
-rw-r--r--graphics/osg/Makefile82
1 files changed, 61 insertions, 21 deletions
diff --git a/graphics/osg/Makefile b/graphics/osg/Makefile
index 4d57c5c20ed4..4641c6b0a4c8 100644
--- a/graphics/osg/Makefile
+++ b/graphics/osg/Makefile
@@ -7,7 +7,7 @@
PORTNAME= osg
PORTVERSION= 2.6.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= http://www.openscenegraph.org/downloads/developer_releases/ \
http://mirror.amdmi3.ru/
@@ -23,27 +23,40 @@ LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
USE_ZIP= yes
USE_CMAKE= yes
USE_GL= gl glu
-WANT_SDL= yes
+USE_GNOME= pkgconfig
+USE_XORG= x11
USE_LDCONFIG= yes
-PLIST_SUB= OSG_VERSION=2.6.1 OSG_SHLIBVER=48
+PLIST_SUB= OSG_VERSION=${PORTVERSION} \
+ OSG_SHLIBVER=48 \
+ OPENTHREADS_VERSION=2.3.0 \
+ OPENTHREADS_SHLIBVER=11
-OPTIONS= CURL "Support for cURL" off \
- FREETYPE "Support for FreeType" on \
- GDAL "Support for GDAL" off \
- GIF "Support for libungif" on \
- INVENTOR "Support for SGI OpenInventor" off \
- JASPER "Support for JPEG2000" off \
- OPENVRML "Support for OpenVRML" off \
- XINE "Support for Xine" off
+PORTSCOUT= limitw:1,even
+
+OPTIONS= CURL "Support for cURL" off \
+ FREETYPE "Support for FreeType" on \
+ GDAL "Support for GDAL" off \
+ GIF "Support for libungif" on \
+ INVENTOR "Support for SGI OpenInventor" off \
+ JASPER "Support for JPEG2000" off \
+ XINE "Support for Xine" off \
+ SVG "Support for SVG through librsvg2" off \
+ XRANDR "Use Xrandr" on
+
+# broken
+# OPENVRML "Support for OpenVRML" off \
.include <bsd.port.pre.mk>
-# Gui toolkits (FOX, WX, QT, FLTK, SDL, GLUT) are only needed for
-# examples which are not installed, so leave them as is (autodetected)
-FORCE_IGNORE= COLLADA Performer
-FORCE_REQUIRE= JPEG PNG TIFF ZLIB Threads OpenGL X11
+# GUI toolkits are only needed for building examples, which are not even installed
+FORCE_IGNORE= FLTK GLUT SDL FOX Qt3 Qt4 wxWidgets # only needed for examples
+FORCE_IGNORE+= COLLADA Performer # not in ports (yet?)
+FORCE_REQUIRE= Threads OpenGL X11 JPEG PNG TIFF ZLIB # common & lightweight
+FORCE_PC_IGNORE= GTK GTKGL # only needed for examples
+FORCE_PC_REQUIRE=
+# options that affect FIND_PACKAGE
.if defined(WITH_CURL)
FORCE_REQUIRE+= CURL
LIB_DEPENDS+= curl.5:${PORTSDIR}/ftp/curl
@@ -98,14 +111,14 @@ FORCE_IGNORE+= Jasper
PLIST_SUB+= JASPER="@comment "
.endif
-.if defined(WITH_OPENVRML)
-FORCE_REQUIRE+= OpenVRML
-LIB_DEPENDS+= openvrml.8:${PORTSDIR}/www/openvrml
-PLIST_SUB+= OPENVRML=""
-.else
+#.if defined(WITH_OPENVRML)
+#FORCE_REQUIRE+= OpenVRML
+#LIB_DEPENDS+= openvrml.8:${PORTSDIR}/www/openvrml
+#PLIST_SUB+= OPENVRML=""
+#.else
FORCE_IGNORE+= OpenVRML
PLIST_SUB+= OPENVRML="@comment "
-.endif
+#.endif
.if defined(WITH_XINE)
FORCE_REQUIRE+= Xine
@@ -116,6 +129,25 @@ FORCE_IGNORE+= Xine
PLIST_SUB+= XINE="@comment "
.endif
+# options that affect PKG_CHECK_MODULES
+.if defined(WITH_SVG)
+FORCE_PC_REQUIRE+=RSVG CAIRO
+LIB_DEPENDS+= rsvg-2:${PORTSDIR}/graphics/librsvg2 \
+ cairo.2:${PORTSDIR}/graphics/cairo
+PLIST_SUB+= SVG=""
+.else
+FORCE_PC_IGNORE+=RSVG CAIRO
+PLIST_SUB+= SVG="@comment "
+.endif
+
+# other options
+.if defined(WITHOUT_XRANDR)
+CMAKE_ARGS+= -DOSGVIEWER_USE_XRANDR:BOOL=OFF
+.else
+CMAKE_ARGS+= -DOSGVIEWER_USE_XRANDR:BOOL=ON
+USE_XORG+= xrandr
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|"64"|""|' ${WRKSRC}/CMakeLists.txt
@${REINPLACE_CMD} -e 's|cpu_set_t|cpuset_t|g' \
@@ -129,5 +161,13 @@ post-patch:
@${REINPLACE_CMD} -e '/FIND_PACKAGE.*${p}/ s|^|#|' \
${WRKSRC}/CMakeLists.txt
.endfor
+.for p in ${FORCE_PC_REQUIRE}
+ @${REINPLACE_CMD} -e 's|PKG_CHECK_MODULES.*${p}|& REQUIRED| ' \
+ ${WRKSRC}/CMakeLists.txt
+.endfor
+.for p in ${FORCE_PC_IGNORE}
+ @${REINPLACE_CMD} -e '/PKG_CHECK_MODULES.*${p}/ s|^|#|' \
+ ${WRKSRC}/CMakeLists.txt
+.endfor
.include <bsd.port.post.mk>