From ddf765fee06608a66e4453aab1433e392b0007e2 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 20 Mar 2016 12:10:41 +0000 Subject: [PATCH] graphics/rigsofrods-caelum: add new port PR: 206485 Submitted by: Thibault Payet Caelum is a plug-in/library for Ogre targeted to help create nice-looking (photorealistic if possible) atmospheric effects such as sky colour, clouds and weather phenomena such as rain or snow. http://www.ogre3d.org/tikiwiki/Caelum --- graphics/Makefile | 1 + graphics/rigsofrods-caelum/Makefile | 30 ++++++++++++++ graphics/rigsofrods-caelum/distinfo | 2 + .../files/patch-CMakeDependenciesConfig.txt | 40 +++++++++++++++++++ .../files/patch-main_CMakeLists.txt | 16 ++++++++ graphics/rigsofrods-caelum/pkg-descr | 5 +++ graphics/rigsofrods-caelum/pkg-plist | 28 +++++++++++++ 7 files changed, 122 insertions(+) create mode 100644 graphics/rigsofrods-caelum/Makefile create mode 100644 graphics/rigsofrods-caelum/distinfo create mode 100644 graphics/rigsofrods-caelum/files/patch-CMakeDependenciesConfig.txt create mode 100644 graphics/rigsofrods-caelum/files/patch-main_CMakeLists.txt create mode 100644 graphics/rigsofrods-caelum/pkg-descr create mode 100644 graphics/rigsofrods-caelum/pkg-plist diff --git a/graphics/Makefile b/graphics/Makefile index a88ecb446eb4..0ff40b4d2801 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -918,6 +918,7 @@ SUBDIR += renrot SUBDIR += repng2jpeg SUBDIR += rgbpaint + SUBDIR += rigsofrods-caelum SUBDIR += ristretto SUBDIR += ruby-gd SUBDIR += ruby-gdal diff --git a/graphics/rigsofrods-caelum/Makefile b/graphics/rigsofrods-caelum/Makefile new file mode 100644 index 000000000000..66194fc4d590 --- /dev/null +++ b/graphics/rigsofrods-caelum/Makefile @@ -0,0 +1,30 @@ +# Created by: Thibault Payet +# $FreeBSD$ + +PORTNAME= rigsofrods-caelum +PORTVERSION= 0.6.3 +DISTVERSIONPREFIX= v +CATEGORIES= graphics + +MAINTAINER= monwarez@mailoo.org +COMMENT= OGRE plugin for atmospheric effects + +LICENSE= LGPL3+ +LICENSE_FILE= ${WRKSRC}/lgpl.txt + +LIB_DEPENDS= libOgreMain.so:graphics/ogre3d + +USE_GITHUB= yes +GH_ACCOUNT= RigsOfRods +GH_PROJECT= ogre-caelum + +USES= cmake dos2unix pathfix pkgconfig +CMAKE_ARGS= -DCaelum_BUILD_SAMPLES=FALSE +DOS2UNIX_GLOB= CMake* *.pc.in +USE_LDCONFIG= yes + +post-patch: + @${REINPLACE_CMD} -e '/install.*DOC_FILES/d' \ + ${WRKSRC}/CMakeLists.txt + +.include diff --git a/graphics/rigsofrods-caelum/distinfo b/graphics/rigsofrods-caelum/distinfo new file mode 100644 index 000000000000..1242b00ff04b --- /dev/null +++ b/graphics/rigsofrods-caelum/distinfo @@ -0,0 +1,2 @@ +SHA256 (RigsOfRods-ogre-caelum-v0.6.3_GH0.tar.gz) = 95b0d52d15deaf8baa0ee3a66acc1ae8c2dfa71be149dbcd2e58bbab76af33b5 +SIZE (RigsOfRods-ogre-caelum-v0.6.3_GH0.tar.gz) = 6499915 diff --git a/graphics/rigsofrods-caelum/files/patch-CMakeDependenciesConfig.txt b/graphics/rigsofrods-caelum/files/patch-CMakeDependenciesConfig.txt new file mode 100644 index 000000000000..cce7514b3313 --- /dev/null +++ b/graphics/rigsofrods-caelum/files/patch-CMakeDependenciesConfig.txt @@ -0,0 +1,40 @@ +--- CMakeDependenciesConfig.txt.orig 2016-01-11 16:27:14 UTC ++++ CMakeDependenciesConfig.txt +@@ -2,11 +2,13 @@ IF(WIN32) + set(Ogre_INCLUDE_DIRS "include/Ogre" CACHE PATH "The ogre include path to use") + set(Ogre_LIBRARY_DIRS "lib" CACHE PATH "The ogre lib path to use") + set(Ogre_LIBRARIES "OgreMain" CACHE STRING "The ogre lib to link against") ++ if(Caelum_BUILD_SAMPLES) + set(Ois_INCLUDE_DIRS "include/ois" CACHE PATH "The OIS include path to use") + set(Ois_LIBRARY_DIRS "lib" CACHE PATH "The OIS lib path to use") + set(Ois_LIBRARIES "ois" CACHE STRING "The ogre lib to link against") + # add includes to check directories + set(CMAKE_REQUIRED_INCLUDES ${Ogre_INCLUDE_DIRS} ${Ois_INCLUDE_DIRS}) ++ endif(Caelum_BUILD_SAMPLES) + + # check for libs and include files we want to use + CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_INCLUDES) +@@ -20,7 +22,9 @@ IF(WIN32) + ELSEIF(UNIX) + find_package(PkgConfig) + PKG_CHECK_MODULES (Ogre OGRE REQUIRED) ++ if(Caelum_BUILD_SAMPLES) + PKG_CHECK_MODULES (Ois OIS REQUIRED) ++ endif(Caelum_BUILD_SAMPLES) + # add includes to check directories + set(CMAKE_REQUIRED_INCLUDES ${Ogre_INCLUDE_DIRS} ${Ois_INCLUDE_DIRS}) + # check for libs and include files we want to use +@@ -44,6 +48,7 @@ IF(NOT WIN32) + message("could not find the Ogre includes. Please install them.") + endif() + ++ if(Caelum_BUILD_SAMPLES) + CHECK_INCLUDE_FILE_CXX(OIS/OIS.h HAVE_OIS_DIR_INCLUDES) + if(HAVE_OIS_DIR_INCLUDES) + set(OIS_INCLUDE "OIS/OIS.h") +@@ -63,4 +68,5 @@ IF(NOT WIN32) + else() + set(OIS_USING_DIR FALSE) + endif() ++ endif(Caelum_BUILD_SAMPLES) + endif() diff --git a/graphics/rigsofrods-caelum/files/patch-main_CMakeLists.txt b/graphics/rigsofrods-caelum/files/patch-main_CMakeLists.txt new file mode 100644 index 000000000000..ebc2ba38a5f8 --- /dev/null +++ b/graphics/rigsofrods-caelum/files/patch-main_CMakeLists.txt @@ -0,0 +1,16 @@ +Boost is OGRE dependency, Caelum itself doesn't link against it + +--- main/CMakeLists.txt.orig 2016-01-11 16:27:14 UTC ++++ main/CMakeLists.txt +@@ -7,11 +7,6 @@ FILE(GLOB sources ${Caelum_SOURCE_DIR}/m + + set(LIBNAME "Caelum") + +- +-find_package(Boost 1.44 COMPONENTS date_time filesystem) +-include_directories(${Boost_INCLUDE_DIRS}) +-link_directories (${Boost_LIBRARY_DIRS}) +- + add_definitions("-DCAELUM_LIB -DCAELUM_SCRIPT_SUPPORT -D_CAELUM_TYPE_DESCRIPTORS") + + ADD_LIBRARY(${LIBNAME} SHARED ${sources}) diff --git a/graphics/rigsofrods-caelum/pkg-descr b/graphics/rigsofrods-caelum/pkg-descr new file mode 100644 index 000000000000..7a8114f17bb1 --- /dev/null +++ b/graphics/rigsofrods-caelum/pkg-descr @@ -0,0 +1,5 @@ +Caelum is a plug-in/library for Ogre targeted to help create +nice-looking (photorealistic if possible) atmospheric effects such as +sky colour, clouds and weather phenomena such as rain or snow. + +WWW: http://www.ogre3d.org/tikiwiki/Caelum diff --git a/graphics/rigsofrods-caelum/pkg-plist b/graphics/rigsofrods-caelum/pkg-plist new file mode 100644 index 000000000000..92ed8f7dd75b --- /dev/null +++ b/graphics/rigsofrods-caelum/pkg-plist @@ -0,0 +1,28 @@ +include/Caelum/Astronomy.h +include/Caelum/Caelum.h +include/Caelum/CaelumConfig.h +include/Caelum/CaelumExceptions.h +include/Caelum/CaelumPlugin.h +include/Caelum/CaelumPrecompiled.h +include/Caelum/CaelumPrerequisites.h +include/Caelum/CaelumScriptTranslator.h +include/Caelum/CaelumSystem.h +include/Caelum/CameraBoundElement.h +include/Caelum/CloudSystem.h +include/Caelum/DepthComposer.h +include/Caelum/FastGpuParamRef.h +include/Caelum/FlatCloudLayer.h +include/Caelum/GroundFog.h +include/Caelum/ImageStarfield.h +include/Caelum/InternalUtilities.h +include/Caelum/Moon.h +include/Caelum/PointStarfield.h +include/Caelum/PrecipitationController.h +include/Caelum/PrivatePtr.h +include/Caelum/SkyDome.h +include/Caelum/SkyLight.h +include/Caelum/Sun.h +include/Caelum/TypeDescriptor.h +include/Caelum/UniversalClock.h +lib/libCaelum.so +libdata/pkgconfig/Caelum.pc