1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

- Update LuxRender modern (Embree-based) branch to version 1.6

- Move DISTFILES setting back to master port exclusively as upstream had
  used correct (coherent with v1.4) tags for v1.6 this time
- Register mutual port install-time conflict (CONFLICTS_INSTALL)
- Create convenience symlink in `post-extract' rather than `pre-patch',
  because `200:dos2unix' bogusly(?) runs before `300:pre-patch'
- Since luxrays' library samples are not built as of r410138, do not try
  to patch them (GC currently no-op patches)
- For the same reason, do not request GLUT, GLEW, and execinfo libraries
  that were only used when building samples
- Convert FreeImage to an option (mandatory for v1.4) and default to off
This commit is contained in:
Alexey Dokuchaev 2016-06-06 09:37:11 +00:00
parent 247c71f1c7
commit d563f26084
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=416447
14 changed files with 98 additions and 174 deletions

View File

@ -2,11 +2,11 @@
# $FreeBSD$
PORTNAME= luxrender
DISTVERSION?= 1.5.1
DISTVERSION?= 1.6
CATEGORIES= graphics
MASTER_SITES= https://bitbucket.org/luxrender/lux/get/ \
https://bitbucket.org/luxrender/luxrays/get/:lr
DISTFILES?= ${PORTNAME}_v${DISTVERSION}.tar.gz \
DISTFILES= v${DISTVERSION:C/[.-]//g}${EXTRACT_SUFX} \
${PORTNAME}_v${DISTVERSION:S/-//}${EXTRACT_SUFX}:lr
DIST_SUBDIR= ${PORTNAME}
@ -17,17 +17,19 @@ LICENSE= GPLv3
LIB_DEPENDS= libboost_python.so:devel/boost-python-libs \
libfftw3.so:math/fftw3 \
libfreeimage.so:graphics/freeimage \
libOpenImageIO.so:graphics/openimageio
.if ${DISTVERSION} != 1.4
LIB_DEPENDS+= libembree.so:graphics/embree
.endif
CONFLICTS_INSTALL?= ${PORTNAME}14-1.4*
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= uses SSE instructions
USES= bison cmake execinfo python:build tar:bzip2
USE_GL= glut glew
USES+= bison cmake python:build tar:bzip2
USE_GL= glu
WRKSRC= ${WRKDIR}/${PORTNAME}-lux-${LUX_REV}
LUXRAYS_WRKSRC= ${WRKDIR}/${PORTNAME}-luxrays-${LUXRAYS_REV}
@ -39,22 +41,25 @@ CMAKE_ARGS= -DLUXCORE_INCLUDE_DIRS:PATH="${LUXRAYS_WRKSRC}/include" \
-DSLG_LIBRARY:PATH="${LUXRAYS_WRKSRC}/lib/libsmallluxgpu.a" \
-DLUXRAYS_DISABLE_OPENCL:BOOL=ON
LUX_REV?= 8dabcd6b7016
LUXRAYS_REV?= 8577ff287efb
LUX_REV?= b3f85cf7742f
LUXRAYS_REV?= 61352e6aae3f
OPTIONS_DEFINE= X11
OPTIONS_DEFINE= FREEIMAGE X11
OPTIONS_DEFAULT= X11
FREEIMAGE_DESC= Build with FreeImage (otherwise use OIIO only)
FREEIMAGE_CMAKE_ON= -DLUX_USE_FREEIMAGE:BOOL=ON
FREEIMAGE_LIB_DEPENDS= libfreeimage.so:graphics/freeimage
X11_DESC= Build GUI executable (requires Qt 4)
X11_USE= QT4=moc_build,qmake_build,rcc_build,uic_build,corelib,gui
X11_PLIST_FILES= bin/luxrender
pre-patch:
post-extract:
@${LN} -sf ${PORTNAME}-luxrays-${LUXRAYS_REV} ${WRKDIR}/luxrays
post-patch:
@${REINPLACE_CMD} -e 's/__APPLE__/__FreeBSD__/' \
${LUXRAYS_WRKSRC}/samples/smallluxgpu4/smallluxgpu.h \
${WRKSRC}/core/osfunc.h \
${WRKSRC}/shapes/mikktspace/weldmesh.c
# Avoid infamous "local symbol discarded in section `.text...' errors

View File

@ -1,4 +1,4 @@
SHA256 (luxrender/luxrender_v1.5.1.tar.gz) = 6f55594759c7580bc9b08d517fc23a4e7c2e2195e8ad367e87ba1a3a2216f3e2
SIZE (luxrender/luxrender_v1.5.1.tar.gz) = 3267994
SHA256 (luxrender/luxrender_v1.5.1.tar.bz2) = 551ce7506f04a51f59c262cb47dd03db5db1d4a0d3cd7f43d7b4dbb10ddd94cc
SIZE (luxrender/luxrender_v1.5.1.tar.bz2) = 29613457
SHA256 (luxrender/v16.tar.bz2) = 29144f657087644086928a66421df5d25fc4dccd05970200932f5693650ddecf
SIZE (luxrender/v16.tar.bz2) = 2421141
SHA256 (luxrender/luxrender_v1.6.tar.bz2) = eb38489e4bcb1336027efc8fa991f506bf78e8cb9edc7b73794e0cdcf998b15a
SIZE (luxrender/luxrender_v1.6.tar.bz2) = 36615450

View File

@ -1,19 +1,47 @@
--- ../luxrays/CMakeLists.txt.orig 2015-10-06 08:56:47 UTC
--- ../luxrays/CMakeLists.txt.orig
+++ ../luxrays/CMakeLists.txt
@@ -128,16 +128,6 @@ add_subdirectory(src/luxcore)
#
################################################################################
@@ -91,14 +91,6 @@ if (NOT OPENGL_FOUND AND NOT LUXRAYS_DIS
SET(LUXRAYS_DISABLE_OPENCL 1)
endif()
-if (NOT GLEW_FOUND)
- MESSAGE(FATAL_ERROR "--> Could not locate required GLEW files, disabling samples build - Please check ${GLEW_SEARCH_PATH}")
-endif()
-
-if (NOT GLUT_FOUND)
- MESSAGE(FATAL_ERROR "--> Could not locate required GLUT files, disabling samples build - Please check ${GLUT_SEARCH_PATH}")
-endif()
-
if (NOT EMBREE_FOUND)
MESSAGE(FATAL_ERROR "--> Could not locate required Intel Embree files - Please check ${EMBREE_SEARCH_PATH}")
endif()
@@ -124,29 +116,6 @@ add_subdirectory(src/luxcore)
################################################################################
#
-# Samples
-#
-################################################################################
-
-if(NOT APPLE OR OSX_BUILD_DEMOS)
- add_subdirectory(samples/benchsimple)
- add_subdirectory(samples/luxcoredemo)
- add_subdirectory(samples/luxcorescenedemo)
- add_subdirectory(samples/luxcoreimplserializationdemo)
-endif()
-
-if(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)
- add_subdirectory(samples/smallluxgpu4)
-endif(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)
-
################################################################################
-add_subdirectory(samples/luxcoreconsole)
-if(OPENGL_FOUND)
- add_subdirectory(samples/luxcoreui)
-endif(OPENGL_FOUND)
-
-
-################################################################################
-#
# For non win32 we'll have to copy everything to a single dir
#
################################################################################

View File

@ -1,14 +0,0 @@
--- ../luxrays/samples/benchsimple/CMakeLists.txt.orig
+++ ../luxrays/samples/benchsimple/CMakeLists.txt
@@ -19,8 +19,10 @@
# LuxRays website: http://www.luxrender.net #
###########################################################################
+find_package(Threads)
+
include_directories(${LuxRays_INCLUDE_DIR})
link_directories (${LuxRays_LIB_DIR})
add_executable(benchsimple benchsimple.cpp)
-target_link_libraries(benchsimple luxrays)
+target_link_libraries(benchsimple luxrays ${PYTHON_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

View File

@ -1,16 +0,0 @@
--- ../luxrays/samples/luxcoredemo/CMakeLists.txt.orig
+++ ../luxrays/samples/luxcoredemo/CMakeLists.txt
@@ -22,10 +22,12 @@
#
################################################################################
+find_package(Threads)
+
set(LUXCORELIBDEMO_SRCS
luxcoredemo.cpp
)
add_executable(luxcoredemo ${LUXCORELIBDEMO_SRCS})
-TARGET_LINK_LIBRARIES(luxcoredemo luxcore smallluxgpu luxrays ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+TARGET_LINK_LIBRARIES(luxcoredemo luxcore smallluxgpu luxrays ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${PYTHON_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

View File

@ -1,16 +0,0 @@
--- ../luxrays/samples/luxcoreimplserializationdemo/CMakeLists.txt.orig 2015-08-29 17:04:08 UTC
+++ ../luxrays/samples/luxcoreimplserializationdemo/CMakeLists.txt
@@ -22,10 +22,12 @@
#
################################################################################
+find_package(Threads)
+
set(LUXCOREIMPL_SERIALIZATIONDEMO_SRCS
luxcoreimplserializationdemo.cpp
)
add_executable(luxcoreimplserializationdemo ${LUXCOREIMPL_SERIALIZATIONDEMO_SRCS})
-TARGET_LINK_LIBRARIES(luxcoreimplserializationdemo luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+TARGET_LINK_LIBRARIES(luxcoreimplserializationdemo luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${PYTHON_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

View File

@ -1,16 +0,0 @@
--- ../luxrays/samples/luxcorescenedemo/CMakeLists.txt.orig
+++ ../luxrays/samples/luxcorescenedemo/CMakeLists.txt
@@ -22,10 +22,12 @@
#
################################################################################
+find_package(Threads)
+
set(LUXCORESCENEDEMO_SRCS
luxcorescenedemo.cpp
)
add_executable(luxcorescenedemo ${LUXCORESCENEDEMO_SRCS})
-TARGET_LINK_LIBRARIES(luxcorescenedemo luxcore smallluxgpu luxrays ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+TARGET_LINK_LIBRARIES(luxcorescenedemo luxcore smallluxgpu luxrays ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${PYTHON_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

View File

@ -1,24 +0,0 @@
--- ../luxrays/samples/smallluxgpu4/CMakeLists.txt.orig
+++ ../luxrays/samples/smallluxgpu4/CMakeLists.txt
@@ -22,6 +22,8 @@
#
#############################################################################
+find_package(Threads)
+
set(SMALLLUXGPU_SRCS
smallluxgpu.cpp
displayfunc.cpp
@@ -29,11 +31,7 @@
add_executable(slg4 ${SMALLLUXGPU_SRCS})
-if(APPLE)
- TARGET_LINK_LIBRARIES(slg4 luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
-else(APPLE)
- TARGET_LINK_LIBRARIES(slg4 luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
-endif(APPLE)
+TARGET_LINK_LIBRARIES(slg4 luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${PYTHON_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} -lexecinfo)
# This instructs FREEGLUT to emit a pragma for the static version
SET_TARGET_PROPERTIES(slg4 PROPERTIES COMPILE_DEFINITIONS FREEGLUT_STATIC)

View File

@ -2,8 +2,6 @@
# $FreeBSD$
DISTVERSION= 1.4
DISTFILES= v${DISTVERSION:C/[.-]//g}${EXTRACT_SUFX} \
${PORTNAME}_v${DISTVERSION:S/-//}${EXTRACT_SUFX}:lr
LUX_REV= dfd211d6faa0
LUXRAYS_REV= 7c7127ee1fa4
@ -14,4 +12,11 @@ PKGNAMESUFFIX= 14
DISTINFO_FILE= ${.CURDIR}/distinfo
PATCHDIR= ${.CURDIR}/files
CONFLICTS_INSTALL= ${PORTNAME}-*
USES= dos2unix
DOS2UNIX_FILES= ../luxrays/CMakeLists.txt
OPTIONS_SLAVE= FREEIMAGE
.include "${MASTERDIR}/Makefile"

View File

@ -0,0 +1,38 @@
--- ../luxrays/CMakeLists.txt.orig
+++ ../luxrays/CMakeLists.txt
@@ -91,14 +91,6 @@ if (NOT OPENGL_FOUND AND NOT LUXRAYS_DIS
SET(LUXRAYS_DISABLE_OPENCL 1)
endif()
-if (NOT GLEW_FOUND)
- MESSAGE(FATAL_ERROR "--> Could not locate required GLEW files, disabling samples build - Please check ${GLEW_SEARCH_PATH}")
-endif()
-
-if (NOT GLUT_FOUND)
- MESSAGE(FATAL_ERROR "--> Could not locate required GLUT files, disabling samples build - Please check ${GLUT_SEARCH_PATH}")
-endif()
-
if (LUXRAYS_DISABLE_OPENCL)
ADD_DEFINITIONS("-DLUXRAYS_DISABLE_OPENCL")
endif()
@@ -120,20 +112,6 @@ add_subdirectory(src/luxcore)
################################################################################
#
-# Samples
-#
-################################################################################
-
-add_subdirectory(samples/benchsimple)
-add_subdirectory(samples/luxcoredemo)
-add_subdirectory(samples/luxcorescenedemo)
-if(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)
- add_subdirectory(samples/smallluxgpu4)
-endif(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)
-
-
-################################################################################
-#
# For non win32 we'll have to copy everything to a single dir
#
################################################################################

View File

@ -1,14 +0,0 @@
--- ../luxrays/samples/benchsimple/CMakeLists.txt.orig
+++ ../luxrays/samples/benchsimple/CMakeLists.txt
@@ -19,8 +19,10 @@
# LuxRays website: http://www.luxrender.net #
###########################################################################
+find_package(Threads)
+
include_directories(${LuxRays_INCLUDE_DIR})
link_directories (${LuxRays_LIB_DIR})
add_executable(benchsimple benchsimple.cpp)
-target_link_libraries(benchsimple luxrays)
+target_link_libraries(benchsimple luxrays ${PYTHON_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

View File

@ -1,16 +0,0 @@
--- ../luxrays/samples/luxcoredemo/CMakeLists.txt.orig
+++ ../luxrays/samples/luxcoredemo/CMakeLists.txt
@@ -22,10 +22,12 @@
#
################################################################################
+find_package(Threads)
+
set(LUXCORELIBDEMO_SRCS
luxcoredemo.cpp
)
add_executable(luxcoredemo ${LUXCORELIBDEMO_SRCS})
-TARGET_LINK_LIBRARIES(luxcoredemo luxcore smallluxgpu luxrays ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+TARGET_LINK_LIBRARIES(luxcoredemo luxcore smallluxgpu luxrays ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${PYTHON_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

View File

@ -1,16 +0,0 @@
--- ../luxrays/samples/luxcorescenedemo/CMakeLists.txt.orig
+++ ../luxrays/samples/luxcorescenedemo/CMakeLists.txt
@@ -22,10 +22,12 @@
#
################################################################################
+find_package(Threads)
+
set(LUXCORESCENEDEMO_SRCS
luxcorescenedemo.cpp
)
add_executable(luxcorescenedemo ${LUXCORESCENEDEMO_SRCS})
-TARGET_LINK_LIBRARIES(luxcorescenedemo luxcore smallluxgpu luxrays ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+TARGET_LINK_LIBRARIES(luxcorescenedemo luxcore smallluxgpu luxrays ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${PYTHON_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

View File

@ -1,20 +0,0 @@
--- ../luxrays/samples/smallluxgpu4/CMakeLists.txt.orig
+++ ../luxrays/samples/smallluxgpu4/CMakeLists.txt
@@ -25,6 +25,8 @@
#
#############################################################################
+find_package(Threads)
+
set(SMALLLUXGPU_SRCS
smallluxgpu.cpp
displayfunc.cpp
@@ -32,7 +34,7 @@ set(SMALLLUXGPU_SRCS
add_executable(slg4 ${SMALLLUXGPU_SRCS})
-TARGET_LINK_LIBRARIES(slg4 luxcore smallluxgpu luxrays ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+TARGET_LINK_LIBRARIES(slg4 luxcore smallluxgpu luxrays ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${PYTHON_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} -lexecinfo)
# This instructs FREEGLUT to emit a pragma for the static version
SET_TARGET_PROPERTIES(slg4 PROPERTIES COMPILE_DEFINITIONS FREEGLUT_STATIC)