Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Nov 2015 09:27:04 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r402145 - in head/graphics/appleseed: . files
Message-ID:  <201511210927.tAL9R44U046727@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Sat Nov 21 09:27:04 2015
New Revision: 402145
URL: https://svnweb.freebsd.org/changeset/ports/402145

Log:
  - Update to version 1.3.0-beta, which integrates most of our patches for
    native FreeBSD support
  - Provide the real ONLY_FOR_ARCHS_REASON
  - Rename DISNEY_MATERIAL to simply DISNEY (previous name was too long)

Added:
  head/graphics/appleseed/files/patch-src_appleseed_foundation_platform_x86timer.cpp   (contents, props changed)
Deleted:
  head/graphics/appleseed/files/patch-sandbox_stylesheets_default.qss
  head/graphics/appleseed/files/patch-src_appleseed.cli_continuoussavingtilecallback.cpp
  head/graphics/appleseed/files/patch-src_appleseed.shared_application_superlogger.cpp
  head/graphics/appleseed/files/patch-src_appleseed.studio_main_main.cpp
  head/graphics/appleseed/files/patch-src_appleseed.studio_mainwindow_project_materialcollectionitem.cpp
  head/graphics/appleseed/files/patch-src_appleseed.studio_mainwindow_project_objectinstanceitem.cpp
  head/graphics/appleseed/files/patch-src_appleseed_CMakeLists.txt
  head/graphics/appleseed/files/patch-src_appleseed_foundation_platform_compiler.cpp
  head/graphics/appleseed/files/patch-src_appleseed_foundation_platform_path.cpp
  head/graphics/appleseed/files/patch-src_appleseed_foundation_platform_path.h
  head/graphics/appleseed/files/patch-src_appleseed_foundation_platform_system.cpp
  head/graphics/appleseed/files/patch-src_appleseed_foundation_platform_thread.cpp
  head/graphics/appleseed/files/patch-src_appleseed_foundation_utility_job_workerthread.cpp
  head/graphics/appleseed/files/patch-src_appleseed_renderer_kernel_rendering_generic_genericframerenderer.cpp
  head/graphics/appleseed/files/patch-src_appleseed_renderer_kernel_rendering_progressive_progressiveframerenderer.cpp
  head/graphics/appleseed/files/patch-src_appleseed_renderer_utility_plugin.cpp
Modified:
  head/graphics/appleseed/Makefile
  head/graphics/appleseed/distinfo
  head/graphics/appleseed/files/patch-CMakeLists.txt

Modified: head/graphics/appleseed/Makefile
==============================================================================
--- head/graphics/appleseed/Makefile	Sat Nov 21 09:04:35 2015	(r402144)
+++ head/graphics/appleseed/Makefile	Sat Nov 21 09:27:04 2015	(r402145)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	appleseed
-DISTVERSION=	1.2.0-beta
-PORTREVISION=	2
+DISTVERSION=	1.3.0-beta
 CATEGORIES=	graphics
 
 MAINTAINER=	danfe@FreeBSD.org
@@ -20,7 +19,7 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	${PORTNAME}hq
 
 ONLY_FOR_ARCHS=	i386 amd64
-ONLY_FOR_ARCHS_REASON=	uses SSE instructions
+ONLY_FOR_ARCHS_REASON=	not ported to it yet
 
 USES=		cmake:outsource
 USE_QT4=	moc_build qmake_build rcc_build uic_build opengl
@@ -41,29 +40,21 @@ PLIST_SUB=	APPHOME=${CMAKE_INSTALL_PREFI
 SUB_FILES=	pkg-message
 SUB_LIST:=	${PLIST_SUB}
 
-OPTIONS_DEFINE=	OSL DISNEY_MATERIAL
-OPTIONS_DEFAULT=	OSL DISNEY_MATERIAL
+OPTIONS_DEFINE=	OSL DISNEY
+OPTIONS_DEFAULT=	OSL DISNEY
 OPTIONS_SUB=	yes
 
 OSL_DESC=	Open Shading Language support
-DISNEY_MATERIAL_DESC=	Disney material support
+DISNEY_DESC=	Disney material support
 
 OSL_CMAKE_ON=	-DWITH_OSL:BOOL=ON
 OSL_LIB_DEPENDS=	liboslexec.so:${PORTSDIR}/graphics/openshadinglanguage
 
-DISNEY_MATERIAL_CMAKE_ON=	-DWITH_DISNEY_MATERIAL:BOOL=ON
-DISNEY_MATERIAL_LIB_DEPENDS=	libOpenImageIO.so:${PORTSDIR}/graphics/openimageio \
-				libSeExprEditor.so:${PORTSDIR}/graphics/seexpr
+DISNEY_CMAKE_ON=	-DWITH_DISNEY_MATERIAL:BOOL=ON
+DISNEY_LIB_DEPENDS=	libOpenImageIO.so:${PORTSDIR}/graphics/openimageio \
+			libSeExprEditor.so:${PORTSDIR}/graphics/seexpr
 
 post-patch:
-	@${REINPLACE_CMD} -e 's,Linux,${OPSYS},' \
-		${WRKSRC}/src/appleseed.cli/CMakeLists.txt \
-		${WRKSRC}/src/appleseed.studio/CMakeLists.txt \
-		${WRKSRC}/src/tools/animatecamera/CMakeLists.txt \
-		${WRKSRC}/src/tools/convertmeshfile/CMakeLists.txt \
-		${WRKSRC}/src/tools/dumpmetadata/CMakeLists.txt \
-		${WRKSRC}/src/tools/makefluffy/CMakeLists.txt \
-		${WRKSRC}/src/tools/updateprojectfile/CMakeLists.txt
 	@${RMDIR} ${WRKSRC}/sandbox/docs/api
 
 .include <bsd.port.mk>

Modified: head/graphics/appleseed/distinfo
==============================================================================
--- head/graphics/appleseed/distinfo	Sat Nov 21 09:04:35 2015	(r402144)
+++ head/graphics/appleseed/distinfo	Sat Nov 21 09:27:04 2015	(r402145)
@@ -1,2 +1,2 @@
-SHA256 (appleseedhq-appleseed-1.2.0-beta_GH0.tar.gz) = ec14a0846f2d357a39c6b4be163f85931e8effa56a1f0518b46e3203a4ae06d3
-SIZE (appleseedhq-appleseed-1.2.0-beta_GH0.tar.gz) = 107789060
+SHA256 (appleseedhq-appleseed-1.3.0-beta_GH0.tar.gz) = 454fd3cbc72e5ea35988871415a70d04c37b987b86288a36413b007ea8fcf37d
+SIZE (appleseedhq-appleseed-1.3.0-beta_GH0.tar.gz) = 115256964

Modified: head/graphics/appleseed/files/patch-CMakeLists.txt
==============================================================================
--- head/graphics/appleseed/files/patch-CMakeLists.txt	Sat Nov 21 09:04:35 2015	(r402144)
+++ head/graphics/appleseed/files/patch-CMakeLists.txt	Sat Nov 21 09:27:04 2015	(r402145)
@@ -1,25 +1,17 @@
---- CMakeLists.txt.orig	2015-06-13 09:38:53 UTC
+--- CMakeLists.txt.orig	2015-11-03 13:40:41 UTC
 +++ CMakeLists.txt
-@@ -84,6 +84,9 @@ option (USE_EXTERNAL_ZLIB       "Use ext
- option (WITH_CLI                "Build appleseed.cli"                                   ON)
- option (WITH_STUDIO             "Build appleseed.studio"                                ON)
- option (WITH_TOOLS              "Build appleseed tools"                                 ON)
-+option (WITH_DOXYGEN            "Generate API Reference with Doxygen"                   ON)
-+option (WITH_TESTS              "Install unit tests and benchmarks"                     ON)
-+option (WITH_HEADERS            "Install header files"                                  ON)
- option (WITH_PYTHON             "Build Python bindings"                                 ON)
- option (WITH_ALEMBIC            "Build Alembic support"                                 OFF)
- option (WITH_OSL                "Build OSL support"                                     OFF)
-@@ -115,7 +118,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows"
-     include (src/cmake/config/win-vs.txt)
- elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-     include (src/cmake/config/mac-clang.txt)
--elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
-+elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD")
-     include (src/cmake/config/linux-gcc.txt)
- else ()
-     message (FATAL_ERROR "Unsupported platform or compiler (CMAKE_SYSTEM_NAME is \"${CMAKE_SYSTEM_NAME}\"). "
-@@ -147,6 +150,9 @@ if (WITH_OSL)
+@@ -107,6 +107,10 @@ option (USE_EXTERNAL_ZLIB               
+ option (WITH_CLI                            "Build appleseed.cli"                                   ON)
+ option (WITH_STUDIO                         "Build appleseed.studio"                                ON)
+ option (WITH_TOOLS                          "Build appleseed tools"                                 ON)
++option (WITH_DOXYGEN                        "Generate API Reference with Doxygen"                   ON)
++option (WITH_SAMPLES                        "Intall sample files (require headers)"                 ON)
++option (WITH_HEADERS                        "Intall header files (to build samples)"                ON)
++option (WITH_TESTS                          "Install unit tests and benchmarks"                     ON)
+ option (WITH_PYTHON                         "Build Python bindings"                                 ON)
+ option (WITH_ALEMBIC                        "Build Alembic support"                                 OFF)
+ option (WITH_OSL                            "Build OSL support"                                     OFF)
+@@ -178,6 +182,9 @@ if (WITH_OSL)
                      ${PROJECT_SOURCE_DIR}/src/appleseed/renderer/kernel/shading/stdosl.h)
  endif ()
  
@@ -29,7 +21,7 @@
  
  #--------------------------------------------------------------------------------------------------
  # Boost libraries.
-@@ -244,7 +250,6 @@ endif ()
+@@ -284,7 +291,6 @@ endif ()
  # Common include paths.
  include_directories (
      src/appleseed
@@ -37,7 +29,7 @@
      ${PYTHON_INCLUDE_DIRS}
  )
  
-@@ -546,7 +551,7 @@ endif ()
+@@ -595,7 +601,7 @@ endif ()
  
  find_package (Doxygen)
  
@@ -46,13 +38,21 @@
      configure_file (${PROJECT_SOURCE_DIR}/scripts/appleseed.doxyfile.in ${PROJECT_BINARY_DIR}/appleseed.doxyfile @ONLY)
      add_custom_target (
          doc ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/appleseed.doxyfile
-@@ -596,22 +601,25 @@ install (
+@@ -644,23 +650,33 @@ endif ()
+ install (
      DIRECTORY
          sandbox/docs
++    DESTINATION .
++)
++
++if (WITH_SAMPLES)
++install (
++    DIRECTORY
          sandbox/samples
 -        sandbox/share
      DESTINATION .
  )
++endif ()
  
  install (
 -    CODE "FILE (MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/images)"
@@ -75,7 +75,7 @@
  install (
      DIRECTORY src/appleseed/foundation
      DESTINATION include
-@@ -629,3 +637,4 @@ install (
+@@ -678,3 +694,4 @@ install (
      DESTINATION include
      FILES_MATCHING PATTERN "*.h"
  )

Added: head/graphics/appleseed/files/patch-src_appleseed_foundation_platform_x86timer.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/appleseed/files/patch-src_appleseed_foundation_platform_x86timer.cpp	Sat Nov 21 09:27:04 2015	(r402145)
@@ -0,0 +1,72 @@
+--- src/appleseed/foundation/platform/x86timer.cpp.orig	2015-11-03 13:40:41 UTC
++++ src/appleseed/foundation/platform/x86timer.cpp
+@@ -105,16 +105,26 @@ uint64 X86Timer::read_start()
+ // gcc.
+ #elif defined __GNUC__
+ 
+-    uint32 h, l;
++    uint32 h, l, _dummy;
+ 
++    // %ebx may be used to point to GOT for PIC on 32-bit x86, so it must be
++    // preserved (cf. src/appleseed/foundation/platform/system.cpp).
++    // We force in-order execution of the RDTSC instruction by calling CPUID
++    // first.  Reference: "Using the RDTSC Instruction for Performance
++    // Monitoring", Section 3.1, p. 3 [Intel 1997].
+     asm volatile (
+-        "cpuid\n\t"                         // force in-order execution of the RDTSC instruction
+-        "rdtsc\n\t"
+-        "mov %%edx, %0\n\t"
+-        "mov %%eax, %1\n\t"
+-        : "=r" (h), "=r" (l)                // outputs
+-        :                                   // inputs
+-        : "%rax", "%rbx", "%rcx", "%rdx"    // clobbered registers
++#if __x86_64__
++        "movq %%rbx, %q2\n\t"
++        "cpuid\n\t"
++        "xchgq %%rbx, %q2\n\t"
++#else
++        "movl %%ebx, %2\n\t"
++        "cpuid\n\t"
++        "xchgl %%ebx, %2\n\t"
++#endif
++        "rdtsc"
++        : "=d" (h), "=a" (l), "=r" (_dummy)
++      : : "ecx"
+     );
+ 
+     return (static_cast<uint64>(h) << 32) | l;
+@@ -158,16 +168,27 @@ uint64 X86Timer::read_end()
+ // gcc.
+ #elif defined __GNUC__
+ 
+-    uint32 h, l;
++    uint32 h, l, _dummy;
+ 
++    // Here we call CPUID to prevent instructions coming afterward from
++    // executing before the RDTSCP instruction.  Reference: "How to
++    // Benchmark Code Execution Times on Intel IA-32 and IA-64 Instruction
++    // Set Architectures", Section 3.2.1, p. 16 [Intel 2010].
+     asm volatile (
+         "rdtscp\n\t"
+-        "mov %%edx, %0\n\t"
+-        "mov %%eax, %1\n\t"
+-        "cpuid\n\t"                         // prevent instructions coming afterward from executing before the RDTSCP instruction
+-        : "=r" (h), "=r" (l)                // outputs
+-        :                                   // inputs
+-        : "%rax", "%rbx", "%rcx", "%rdx"    // clobbered registers
++        "movl %%edx, %0\n\t"
++        "movl %%eax, %1\n\t"
++#if __x86_64__
++        "movq %%rbx, %q2\n\t"
++        "cpuid\n\t"
++        "xchgq %%rbx, %q2\n\t"
++#else
++        "movl %%ebx, %2\n\t"
++        "cpuid\n\t"
++        "xchgl %%ebx, %2\n\t"
++#endif
++        : "=m" (h), "=m" (l), "=r" (_dummy)
++        : : "eax", "ecx", "edx"
+     );
+ 
+     return (static_cast<uint64>(h) << 32) | l;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511210927.tAL9R44U046727>