2013-05-23 04:35:26 +02:00
|
|
|
# Created by: Randall Hopper <aa8vb@nc.rr.com>
|
2001-05-31 12:10:36 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= osg
|
2014-10-02 21:55:55 +02:00
|
|
|
PORTVERSION= 3.2.1
|
2014-12-25 21:54:41 +01:00
|
|
|
PORTREVISION= 4
|
2001-05-31 12:10:36 +02:00
|
|
|
CATEGORIES= graphics
|
2014-01-20 15:35:09 +01:00
|
|
|
MASTER_SITES= http://trac.openscenegraph.org/downloads/developer_releases/ \
|
2009-07-28 18:34:36 +02:00
|
|
|
http://mirror.amdmi3.ru/distfiles/
|
2008-08-27 09:50:15 +02:00
|
|
|
DISTNAME= OpenSceneGraph-${PORTVERSION}
|
2001-05-31 12:10:36 +02:00
|
|
|
|
2008-09-23 22:46:54 +02:00
|
|
|
MAINTAINER= amdmi3@FreeBSD.org
|
2003-02-20 19:08:19 +01:00
|
|
|
COMMENT= C++ OpenGL scene graph library for real-time rendering
|
2001-05-31 12:10:36 +02:00
|
|
|
|
2014-01-20 15:35:09 +01:00
|
|
|
LICENSE= OSGPL
|
|
|
|
LICENSE_NAME= OpenSceneGraph Public License
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
|
|
|
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
|
|
|
|
2013-09-26 19:19:33 +02:00
|
|
|
LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
|
|
|
|
libpng.so:${PORTSDIR}/graphics/png \
|
|
|
|
libtiff.so:${PORTSDIR}/graphics/tiff
|
2008-09-23 22:50:58 +02:00
|
|
|
|
2009-04-01 04:49:36 +02:00
|
|
|
CONFLICTS= osg-devel-[0-9]*
|
|
|
|
|
2014-10-20 11:34:03 +02:00
|
|
|
USES= alias cmake:outsource pkgconfig zip
|
2008-09-23 22:46:54 +02:00
|
|
|
USE_GL= gl glu
|
2009-02-10 04:57:56 +01:00
|
|
|
USE_XORG= x11
|
2008-09-23 22:50:58 +02:00
|
|
|
USE_LDCONFIG= yes
|
2008-08-27 09:50:15 +02:00
|
|
|
|
2009-02-10 04:57:56 +01:00
|
|
|
PLIST_SUB= OSG_VERSION=${PORTVERSION} \
|
2014-01-20 15:35:09 +01:00
|
|
|
OSG_SHLIBVER=100 \
|
|
|
|
OPENTHREADS_VERSION=${PORTVERSION} \
|
2014-10-02 21:55:55 +02:00
|
|
|
OPENTHREADS_SHLIBVER=20
|
2008-11-15 20:00:01 +01:00
|
|
|
|
2009-02-10 04:57:56 +01:00
|
|
|
PORTSCOUT= limitw:1,even
|
|
|
|
|
2014-01-20 15:35:09 +01:00
|
|
|
OPTIONS_DEFINE= CURL FREETYPE GDAL GIF INVENTOR JASPER XINE GTA \
|
|
|
|
VNC OPENEXR FFMPEG SVG PDF SDL NVTT QT4 XRANDR
|
2013-09-26 19:19:33 +02:00
|
|
|
OPTIONS_DEFAULT=FREETYPE GIF FFMPEG XRANDR
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
GDAL_DESC= GDAL support
|
|
|
|
INVENTOR_DESC= SGI OpenInventor support
|
2014-01-20 15:35:09 +01:00
|
|
|
GTA_DESC= GTA file format support
|
2013-05-23 04:35:26 +02:00
|
|
|
VNC_DESC= LibVNCServer support
|
|
|
|
SDL_DESC= Use SDL (joystick support in present3d)
|
2014-01-20 15:35:09 +01:00
|
|
|
NVTT_DESC= Use NVidia texture tools
|
2013-05-23 04:35:26 +02:00
|
|
|
|
2013-09-26 19:19:33 +02:00
|
|
|
OPTIONS_SUB= yes
|
|
|
|
|
|
|
|
CURL_LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
|
|
|
|
FREETYPE_LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2
|
|
|
|
GDAL_LIB_DEPENDS= libgdal.so:${PORTSDIR}/graphics/gdal
|
|
|
|
GIF_LIB_DEPENDS= libgif.so:${PORTSDIR}/graphics/giflib
|
|
|
|
INVENTOR_LIB_DEPENDS= libInventor.so:${PORTSDIR}/graphics/inventor
|
|
|
|
JASPER_LIB_DEPENDS= libjasper.so:${PORTSDIR}/graphics/jasper
|
|
|
|
XINE_LIB_DEPENDS= libxine.so:${PORTSDIR}/multimedia/libxine
|
2014-01-20 15:35:09 +01:00
|
|
|
GTA_LIB_DEPENDS= libgta.so:${PORTSDIR}/devel/libgta
|
2013-09-26 19:19:33 +02:00
|
|
|
VNC_LIB_DEPENDS= libvncserver.so:${PORTSDIR}/net/libvncserver
|
|
|
|
OPENEXR_LIB_DEPENDS= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR
|
|
|
|
FFMPEG_LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
|
|
|
|
SVG_LIB_DEPENDS= librsvg-2.so:${PORTSDIR}/graphics/librsvg2
|
|
|
|
PDF_LIB_DEPENDS= libpoppler-glib.so:${PORTSDIR}/graphics/poppler-glib
|
2014-01-20 15:35:09 +01:00
|
|
|
SDL_USE= SDL=sdl
|
|
|
|
NVTT_LIB_DEPENDS= libnvtt.so:${PORTSDIR}/graphics/nvidia-texture-tools
|
2013-09-26 19:19:33 +02:00
|
|
|
XRANDR_CMAKE_ON= -DOSGVIEWER_USE_XRANDR:BOOL=ON
|
|
|
|
XRANDR_CMAKE_OFF= -DOSGVIEWER_USE_XRANDR:BOOL=OFF
|
2014-01-20 15:35:09 +01:00
|
|
|
QT4_USE= QT4=corelib,gui,opengl,qmake_build,moc_build,uic_build,rcc_build
|
|
|
|
QT4_CMAKE_ON= -DOSG_USE_QT=ON
|
|
|
|
QT4_CMAKE_OFF= -DOSG_USE_QT=OFF
|
2008-09-23 22:46:54 +02:00
|
|
|
|
2012-04-26 02:47:48 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2008-09-23 22:46:54 +02:00
|
|
|
|
2009-02-10 04:57:56 +01:00
|
|
|
# GUI toolkits are only needed for building examples, which are not even installed
|
2014-01-20 15:35:09 +01:00
|
|
|
FORCE_IGNORE= FLTK GLUT FOX Qt3 Qt5Widgets wxWidgets OpenAL GtkGl # only for examples
|
2012-04-26 02:47:48 +02:00
|
|
|
FORCE_IGNORE+= COLLADA Performer OurDCMTK XUL FBX # not in ports
|
2014-01-20 15:35:09 +01:00
|
|
|
FORCE_IGNORE+= OpenVRML # ports version too old
|
|
|
|
FORCE_IGNORE+= ITK # ports version doesn't build on 10.x
|
2012-04-26 02:47:48 +02:00
|
|
|
FORCE_REQUIRE= Threads OpenGL X11 JPEG PNG TIFF ZLIB # common & lightweight
|
2008-09-23 22:46:54 +02:00
|
|
|
|
2009-02-10 04:57:56 +01:00
|
|
|
# options that affect FIND_PACKAGE
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MCURL}
|
2008-09-23 22:46:54 +02:00
|
|
|
FORCE_REQUIRE+= CURL
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= CURL
|
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MFREETYPE}
|
2008-09-23 22:46:54 +02:00
|
|
|
FORCE_REQUIRE+= FreeType
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= FreeType
|
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MGDAL}
|
2008-09-23 22:46:54 +02:00
|
|
|
FORCE_REQUIRE+= GDAL
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= GDAL
|
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MGIF}
|
2008-09-23 22:46:54 +02:00
|
|
|
FORCE_REQUIRE+= GIFLIB
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= GIFLIB
|
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MINVENTOR}
|
2008-09-23 22:46:54 +02:00
|
|
|
FORCE_REQUIRE+= Inventor
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= Inventor
|
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MJASPER}
|
2008-09-23 22:46:54 +02:00
|
|
|
FORCE_REQUIRE+= Jasper
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= Jasper
|
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MXINE}
|
2008-09-23 22:46:54 +02:00
|
|
|
FORCE_REQUIRE+= Xine
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= Xine
|
|
|
|
.endif
|
|
|
|
|
2014-01-20 15:35:09 +01:00
|
|
|
.if ${PORT_OPTIONS:MGTA}
|
|
|
|
FORCE_REQUIRE+= GTA
|
2009-04-01 04:49:36 +02:00
|
|
|
.else
|
2014-01-20 15:35:09 +01:00
|
|
|
FORCE_IGNORE+= GTA
|
2009-04-01 04:49:36 +02:00
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MVNC}
|
2009-04-01 04:49:36 +02:00
|
|
|
FORCE_REQUIRE+= LibVNCServer
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= LibVNCServer
|
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MOPENEXR}
|
2009-04-01 04:49:36 +02:00
|
|
|
FORCE_REQUIRE+= OpenEXR
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= OpenEXR
|
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MFFMPEG}
|
2012-04-26 02:47:48 +02:00
|
|
|
FORCE_REQUIRE+= FFmpeg
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= FFmpeg
|
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MSDL}
|
2012-04-26 02:47:48 +02:00
|
|
|
FORCE_REQUIRE+= SDL
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= SDL
|
|
|
|
.endif
|
|
|
|
|
2014-01-20 15:35:09 +01:00
|
|
|
.if ${PORT_OPTIONS:MNVTT}
|
|
|
|
FORCE_REQUIRE+= NVTT
|
|
|
|
.else
|
|
|
|
FORCE_IGNORE+= NVTT
|
|
|
|
.endif
|
|
|
|
|
2009-02-10 04:57:56 +01:00
|
|
|
# options that affect PKG_CHECK_MODULES
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MSVG}
|
2012-04-26 02:47:48 +02:00
|
|
|
FORCE_REQUIRE+= RSVG
|
2009-02-10 04:57:56 +01:00
|
|
|
.else
|
2012-04-26 02:47:48 +02:00
|
|
|
FORCE_IGNORE+= RSVG
|
2009-02-10 04:57:56 +01:00
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MPDF}
|
2012-04-26 02:47:48 +02:00
|
|
|
FORCE_REQUIRE+= Poppler-glib
|
2009-04-01 04:49:36 +02:00
|
|
|
.else
|
2012-04-26 02:47:48 +02:00
|
|
|
FORCE_IGNORE+= Poppler-glib
|
2009-04-01 04:49:36 +02:00
|
|
|
.endif
|
|
|
|
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MSVG} || ${PORT_OPTIONS:MPDF}
|
2013-09-26 19:19:33 +02:00
|
|
|
USE_GNOME= cairo
|
2009-04-01 04:49:36 +02:00
|
|
|
.endif
|
|
|
|
|
2009-02-10 04:57:56 +01:00
|
|
|
# other options
|
2013-05-23 04:35:26 +02:00
|
|
|
.if ${PORT_OPTIONS:MXRANDR}
|
2012-04-26 02:47:48 +02:00
|
|
|
USE_XORG+= xrandr
|
|
|
|
.endif
|
|
|
|
|
2008-08-27 09:50:15 +02:00
|
|
|
post-patch:
|
2009-06-08 14:18:45 +02:00
|
|
|
@${FIND} ${WRKSRC}/CMakeModules -type f -print0 | ${XARGS} -0 \
|
|
|
|
${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g'
|
2012-04-26 02:47:48 +02:00
|
|
|
@${REINPLACE_CMD} -e '/FIND_LIBRARY.*DL_LIBRARY/ d' \
|
|
|
|
${WRKSRC}/CMakeLists.txt
|
2008-09-23 22:46:54 +02:00
|
|
|
.for p in ${FORCE_REQUIRE}
|
|
|
|
@${REINPLACE_CMD} -e '/FIND_PACKAGE.*${p}/ s|)$$| REQUIRED&|' \
|
|
|
|
${WRKSRC}/CMakeLists.txt
|
|
|
|
.endfor
|
|
|
|
.for p in ${FORCE_IGNORE}
|
|
|
|
@${REINPLACE_CMD} -e '/FIND_PACKAGE.*${p}/ s|^|#|' \
|
|
|
|
${WRKSRC}/CMakeLists.txt
|
|
|
|
.endfor
|
2002-05-25 19:38:07 +02:00
|
|
|
|
2012-04-26 02:47:48 +02:00
|
|
|
.include <bsd.port.mk>
|