[145313] trunk/dports/graphics/ctlang
mcalhoun at macports.org
mcalhoun at macports.org
Sun Jan 31 08:04:43 PST 2016
Revision: 145313
https://trac.macports.org/changeset/145313
Author: mcalhoun at macports.org
Date: 2016-01-31 08:04:43 -0800 (Sun, 31 Jan 2016)
Log Message:
-----------
ctlang: add ctl files for compatibility
Modified Paths:
--------------
trunk/dports/graphics/ctlang/Portfile
Added Paths:
-----------
trunk/dports/graphics/ctlang/files/patch-compat_files.diff
Modified: trunk/dports/graphics/ctlang/Portfile
===================================================================
--- trunk/dports/graphics/ctlang/Portfile 2016-01-31 15:52:57 UTC (rev 145312)
+++ trunk/dports/graphics/ctlang/Portfile 2016-01-31 16:04:43 UTC (rev 145313)
@@ -6,6 +6,7 @@
PortGroup cmake 1.0
github.setup ampas CTL 1.5.2 ctl-
+revision 1
name ctlang
categories graphics lang
# the license is a GPL incompatible BSD Variant
@@ -29,6 +30,17 @@
port:aces_container \
port:tiff
+# in https://github.com/ampas/CTL/commit/65c60f0656077dc2763fefa665b81b352f663d96,
+# two files were removed with the message "cleaning up more files",
+# but they are still needed by openexr_viewers
+# there seems to be a request to revert this change
+# see https://github.com/ampas/CTL/issues/37
+post-patch {
+ system \
+ -W ${worksrcpath} \
+ "${patch.cmd} -Rp0 < ${filespath}/patch-compat_files.diff"
+}
+
post-destroot {
# prevent mtree violations
xinstall -m 755 -d ${destroot}${prefix}/share/doc
Added: trunk/dports/graphics/ctlang/files/patch-compat_files.diff
===================================================================
--- trunk/dports/graphics/ctlang/files/patch-compat_files.diff (rev 0)
+++ trunk/dports/graphics/ctlang/files/patch-compat_files.diff 2016-01-31 16:04:43 UTC (rev 145313)
@@ -0,0 +1,203 @@
+From 65c60f0656077dc2763fefa665b81b352f663d96 Mon Sep 17 00:00:00 2001
+From: Scott Dyer <sdyer at oscars.org>
+Date: Tue, 21 May 2013 08:38:19 -0700
+Subject: [PATCH] cleaning up more files
+
+---
+ OpenEXR_CTL/CtlModules/CMakeLists.txt | 2 -
+ OpenEXR_CTL/CtlModules/transform_RRT.ctl | 105 ---------------------
+ OpenEXR_CTL/CtlModules/transform_display_video.ctl | 60 ------------
+ 9 files changed, 128 insertions(+), 242 deletions(-)
+ delete mode 100644 OpenEXR_CTL/CtlModules/transform_RRT.ctl
+ delete mode 100644 OpenEXR_CTL/CtlModules/transform_display_video.ctl
+
+diff --git a/OpenEXR_CTL/CtlModules/CMakeLists.txt b/OpenEXR_CTL/CtlModules/CMakeLists.txt
+index 18d4da5..c63c22e 100644
+--- OpenEXR_CTL/CtlModules/CMakeLists.txt
++++ OpenEXR_CTL/CtlModules/CMakeLists.txt
+@@ -1,8 +1,6 @@
+ install(
+ FILES
+ utilities.ctl
+- transform_RRT.ctl
+- transform_display_video.ctl
+ DESTINATION
+ ${INSTALL_LIB_DIR}/CTL
+ )
+diff --git a/OpenEXR_CTL/CtlModules/transform_RRT.ctl b/OpenEXR_CTL/CtlModules/transform_RRT.ctl
+deleted file mode 100644
+index 57e0a3d..0000000
+--- OpenEXR_CTL/CtlModules/transform_RRT.ctl
++++ /dev/null
+@@ -1,105 +0,0 @@
+-///////////////////////////////////////////////////////////////////////////
+-//
+-// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas
+-// Digital Ltd. LLC
+-//
+-// All rights reserved.
+-//
+-// Redistribution and use in source and binary forms, with or without
+-// modification, are permitted provided that the following conditions are
+-// met:
+-// * Redistributions of source code must retain the above copyright
+-// notice, this list of conditions and the following disclaimer.
+-// * Redistributions in binary form must reproduce the above
+-// copyright notice, this list of conditions and the following disclaimer
+-// in the documentation and/or other materials provided with the
+-// distribution.
+-// * Neither the name of Industrial Light & Magic nor the names of
+-// its contributors may be used to endorse or promote products derived
+-// from this software without specific prior written permission.
+-//
+-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-//
+-///////////////////////////////////////////////////////////////////////////
+-
+-//
+-// A simple rendering transform that converts the pixels
+-// of an ACES RGB image into OCES XYZ pixels for display.
+-//
+-// This rendering transform is a placeholder for the Reference
+-// Rendering Transform (RRT) that is currently being developed
+-// by the File Format Committee of the Academy of Motion Picture
+-// Arts and Sciences. This transform does not claim to be optimal
+-// in any sense, or to be an approximation of any RRT candidate
+-// under consideration.
+-//
+-// The transform consists of three steps:
+-//
+-// - convert from the input image's RGB space to RGB with
+-// primaries and white point according to Rec. 709
+-//
+-// - apply a per-channel lookup table that slightly increases
+-// contrast in darker regions but decreases contrast for
+-// highlights. This tends to make most images look pleasing,
+-// at least in my opinion, for the images I tried.
+-//
+-// - convert from Rec. 709 RGB to CIE XYZ.
+-//
+-
+-import "utilities";
+-
+-const float lutMin = 0.0;
+-const float lutMax = 4.0;
+-
+-const float lut[] =
+-{
+- 0.000000, 0.034258, 0.078228, 0.123407,
+- 0.167658, 0.210146, 0.250543, 0.288758,
+- 0.324816, 0.358798, 0.390816, 0.420991,
+- 0.449445, 0.476300, 0.501668, 0.525658,
+- 0.548368, 0.569891, 0.590312, 0.609707,
+- 0.628150, 0.645704, 0.662431, 0.678385,
+- 0.693616, 0.708173, 0.722096, 0.735426,
+- 0.748199, 0.760448, 0.772204, 0.783497,
+- 0.794351, 0.804793, 0.814844, 0.824526,
+- 0.833859, 0.842861, 0.851549, 0.859939,
+- 0.868046, 0.875884, 0.883465, 0.890803,
+- 0.897909, 0.904793, 0.911465, 0.917936,
+- 0.924214, 0.930307, 0.936224, 0.941971,
+- 0.947557, 0.952987, 0.958269, 0.963408,
+- 0.968409, 0.973279, 0.978022, 0.982644,
+- 0.987148, 0.991539, 0.995822, 1.000000
+-};
+-
+-void
+-transform_RRT
+- (varying half R, // ACES RGB pixels
+- varying half G,
+- varying half B,
+- uniform Chromaticities chromaticities, // RGB space of input image
+- output varying half X_OCES, // OCES XYZ pixels
+- output varying half Y_OCES,
+- output varying half Z_OCES)
+-{
+- float toRec709[4][4] = mult_f44_f44 (RGBtoXYZ (chromaticities, 1.0),
+- XYZtoRGB (rec709Chromaticities, 1.0));
+-
+- float RGB[3] = {R, G, B};
+- RGB = mult_f3_f44 (RGB, toRec709);
+-
+- RGB[0] = lookup1D (lut, lutMin, lutMax, RGB[0]);
+- RGB[1] = lookup1D (lut, lutMin, lutMax, RGB[1]);
+- RGB[2] = lookup1D (lut, lutMin, lutMax, RGB[2]);
+-
+- convertRGBtoXYZ_h (rec709Chromaticities, 1.0, RGB, X_OCES, Y_OCES, Z_OCES);
+-}
+diff --git a/OpenEXR_CTL/CtlModules/transform_display_video.ctl b/OpenEXR_CTL/CtlModules/transform_display_video.ctl
+deleted file mode 100644
+index 8704778..0000000
+--- OpenEXR_CTL/CtlModules/transform_display_video.ctl
++++ /dev/null
+@@ -1,60 +0,0 @@
+-///////////////////////////////////////////////////////////////////////////
+-//
+-// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas
+-// Digital Ltd. LLC
+-//
+-// All rights reserved.
+-//
+-// Redistribution and use in source and binary forms, with or without
+-// modification, are permitted provided that the following conditions are
+-// met:
+-// * Redistributions of source code must retain the above copyright
+-// notice, this list of conditions and the following disclaimer.
+-// * Redistributions in binary form must reproduce the above
+-// copyright notice, this list of conditions and the following disclaimer
+-// in the documentation and/or other materials provided with the
+-// distribution.
+-// * Neither the name of Industrial Light & Magic nor the names of
+-// its contributors may be used to endorse or promote products derived
+-// from this software without specific prior written permission.
+-//
+-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-//
+-///////////////////////////////////////////////////////////////////////////
+-
+-//
+-// A simple display transform for a display with additive RGB
+-// channels: The XYZ output (X_OCES, Y_OCES, Z_OCES) of the
+-// rendering transform is converted a set of RGB values
+-// (R_display, G_display, B_display), taking the chromaticities
+-// of the display's primaries and white point into account.
+-//
+-//
+-
+-import "utilities";
+-
+-void
+-transform_display_video
+- (output varying half R_display,
+- output varying half G_display,
+- output varying half B_display,
+- input varying half X_OCES,
+- input varying half Y_OCES,
+- input varying half Z_OCES,
+- input uniform Chromaticities displayChromaticities)
+-{
+- float XYZ[3] = {X_OCES, Y_OCES, Z_OCES};
+-
+- convertXYZtoRGB_h (displayChromaticities, 1.0, XYZ,
+- R_display, G_display, B_display);
+-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160131/8a708eee/attachment.html>
More information about the macports-changes
mailing list