aboutsummaryrefslogtreecommitdiff
path: root/graphics/dcp2icc
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2015-10-20 16:53:08 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2015-10-20 16:53:08 +0000
commite492407e3e51bca78dd379e03158f76e7f8f94c9 (patch)
treeb825890d238506df687b87a986455020f312f5a0 /graphics/dcp2icc
parent6cbeeb6d95d071fc5745c16292b9875f8d815b98 (diff)
Notes
Diffstat (limited to 'graphics/dcp2icc')
-rw-r--r--graphics/dcp2icc/Makefile36
-rw-r--r--graphics/dcp2icc/distinfo2
-rw-r--r--graphics/dcp2icc/files/patch-#include-cstdlib127
-rw-r--r--graphics/dcp2icc/files/patch-SConstruct22
-rw-r--r--graphics/dcp2icc/files/patch-gcc48-fixes98
-rw-r--r--graphics/dcp2icc/pkg-descr6
6 files changed, 291 insertions, 0 deletions
diff --git a/graphics/dcp2icc/Makefile b/graphics/dcp2icc/Makefile
new file mode 100644
index 000000000000..52778e9b197a
--- /dev/null
+++ b/graphics/dcp2icc/Makefile
@@ -0,0 +1,36 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= dcp2icc
+PORTVERSION= 0.1
+CATEGORIES= graphics converters
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/Version%20${PORTVERSION}
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= DCP to ICC camera profile converter
+
+LICENSE= GPLv2
+
+LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 \
+ liblcms.so:${PORTSDIR}/graphics/lcms
+
+USES= localbase scons tar:bzip2
+USE_GCC= any
+
+PLIST_FILES= bin/${PORTNAME}
+
+post-extract:
+ @${UNZIP_NATIVE_CMD} -qo ${WRKSRC}/XMP-Toolkit-SDK-4.4.2.zip \
+ -d ${WRKSRC}
+ @${UNZIP_NATIVE_CMD} -qo ${WRKSRC}/dng_sdk_1_2.zip -d ${WRKSRC}
+
+post-patch:
+ @${RM} -f ${WRKSRC}/fixes/XMP-Toolkit/XMPFiles.hpp \
+ ${WRKSRC}/fixes/XMP-Toolkit/LargeFileAccess.hpp
+ @${MV} -f ${WRKSRC}/fixes/dng_sdk/dng_hue_sat_map.h \
+ ${WRKSRC}/dng_sdk_1_2/dng_sdk/source
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/graphics/dcp2icc/distinfo b/graphics/dcp2icc/distinfo
new file mode 100644
index 000000000000..2c16d010c735
--- /dev/null
+++ b/graphics/dcp2icc/distinfo
@@ -0,0 +1,2 @@
+SHA256 (dcp2icc-0.1.tar.bz2) = 654c3f061e3b95ab46a74cfcd6b434969736151d21e2152fb02c5347df90a06e
+SIZE (dcp2icc-0.1.tar.bz2) = 15231970
diff --git a/graphics/dcp2icc/files/patch-#include-cstdlib b/graphics/dcp2icc/files/patch-#include-cstdlib
new file mode 100644
index 000000000000..d79591cfcf15
--- /dev/null
+++ b/graphics/dcp2icc/files/patch-#include-cstdlib
@@ -0,0 +1,127 @@
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/AVCHD_Handler.cpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/AVCHD_Handler.cpp
+@@ -7,6 +7,8 @@
+ // of the Adobe license agreement accompanying it.
+ // =================================================================================================
+
++#include <cstdlib>
++
+ #include "AVCHD_Handler.hpp"
+
+ #include "MD5.h"
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/P2_Handler.cpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/P2_Handler.cpp
+@@ -7,6 +7,8 @@
+ // of the Adobe license agreement accompanying it.
+ // =================================================================================================
+
++#include <cstdlib>
++
+ #include "P2_Handler.hpp"
+
+ #include "MD5.h"
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/SonyHDV_Handler.cpp 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/SonyHDV_Handler.cpp
+@@ -7,6 +7,8 @@
+ // of the Adobe license agreement accompanying it.
+ // =================================================================================================
+
++#include <cstdlib>
++
+ #include "SonyHDV_Handler.hpp"
+
+ #include "MD5.h"
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/XDCAMEX_Handler.cpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/XDCAMEX_Handler.cpp
+@@ -7,6 +7,8 @@
+ // of the Adobe license agreement accompanying it.
+ // =================================================================================================
+
++#include <cstdlib>
++
+ #include "XDCAMEX_Handler.hpp"
+ #include "XDCAM_Support.hpp"
+ #include "MD5.h"
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/XDCAM_Handler.cpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/XDCAM_Handler.cpp
+@@ -7,6 +7,8 @@
+ // of the Adobe license agreement accompanying it.
+ // =================================================================================================
+
++#include <cstdlib>
++
+ #include "XDCAM_Handler.hpp"
+ #include "XDCAM_Support.hpp"
+ #include "MD5.h"
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/IPTC_Support.hpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/IPTC_Support.hpp
+@@ -12,6 +12,7 @@
+
+ #include "XMP_Environment.h" // ! This must be the first include.
+
++#include <cstdlib>
+ #include <map>
+
+ #include "XMP_Const.h"
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/PSIR_FileWriter.cpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/PSIR_FileWriter.cpp
+@@ -10,6 +10,7 @@
+ #include "PSIR_Support.hpp"
+ #include "EndianUtils.hpp"
+
++#include <stdlib.h>
+ #include <string.h>
+
+ // =================================================================================================
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/PSIR_MemoryReader.cpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/PSIR_MemoryReader.cpp
+@@ -10,6 +10,7 @@
+ #include "PSIR_Support.hpp"
+ #include "EndianUtils.hpp"
+
++#include <stdlib.h>
+ #include <string.h>
+
+ // =================================================================================================
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/PSIR_Support.hpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/PSIR_Support.hpp
+@@ -12,6 +12,7 @@
+
+ #include "XMP_Environment.h" // ! This must be the first include.
+
++#include <cstdlib>
+ #include <map>
+
+ #include "XMP_Const.h"
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/RIFF_Support.cpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/RIFF_Support.cpp
+@@ -7,6 +7,8 @@
+ // of the Adobe license agreement accompanying it.
+ // =================================================================================================
+
++#include <cstdlib>
++
+ #include "RIFF_Support.hpp"
+
+ #if XMP_WinBuild
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/ReconcileIPTC.cpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/ReconcileIPTC.cpp
+@@ -12,6 +12,7 @@
+ #include "Reconcile_Impl.hpp"
+
+ #include <stdio.h>
++#include <stdlib.h>
+
+ #if XMP_WinBuild
+ #pragma warning ( disable : 4800 ) // forcing value to bool 'true' or 'false' (performance warning)
+--- dcp2icc.src/dcp2icc.cpp.orig 2009-02-09 19:27:41 UTC
++++ dcp2icc.src/dcp2icc.cpp
+@@ -1,7 +1,7 @@
+ #include <iostream>
+ #include <icc34.h>
+ #include <lcms.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include "dng_camera_profile.h"
+ #include "dng_file_stream.h"
diff --git a/graphics/dcp2icc/files/patch-SConstruct b/graphics/dcp2icc/files/patch-SConstruct
new file mode 100644
index 000000000000..a6e88c3ac70d
--- /dev/null
+++ b/graphics/dcp2icc/files/patch-SConstruct
@@ -0,0 +1,22 @@
+--- SConstruct.orig 2009-02-13 20:15:37 UTC
++++ SConstruct
+@@ -1,4 +1,5 @@
+-import sys
++import os,sys
++import SCons.Util
+
+ platform=sys.platform
+
+@@ -15,8 +16,10 @@ else:
+ env=Environment(
+ CPPDEFINES=[("UNIX_ENV",1),("_FILE_OFFSET_BITS",64)],
+ LIBS=["dng_1_2","XMPFiles-4.4.2","XMPCore-4.4.2","XMPcommon-4.4.2","expat","lcms","pthread"],
+- LINKFLAGS="",
+- CCFLAGS="-O2 -I-",
++ CXX=SCons.Util.CLVar(os.environ['CXX']),
++ LINKFLAGS=SCons.Util.CLVar(os.environ['LDFLAGS']),
++ CCFLAGS=SCons.Util.CLVar(os.environ['CPPFLAGS']),
++ CXXFLAGS=SCons.Util.CLVar(os.environ['CXXFLAGS']),
+ LCMS_INCLUDE=None)
+
+ SConscript("SConstruct.XMP", exports="env")
diff --git a/graphics/dcp2icc/files/patch-gcc48-fixes b/graphics/dcp2icc/files/patch-gcc48-fixes
new file mode 100644
index 000000000000..abb90daffb9d
--- /dev/null
+++ b/graphics/dcp2icc/files/patch-gcc48-fixes
@@ -0,0 +1,98 @@
+--- XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.hpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.hpp
+@@ -18,6 +18,7 @@
+ #include <vector>
+ #include <string>
+ #include <map>
++#include <cstring>
+
+ #include <cassert>
+
+@@ -90,8 +91,8 @@ extern WXMP_Result void_wResult;
+
+ #define kHexDigits "0123456789ABCDEF"
+
+-#define XMP_LitMatch(s,l) (std::strcmp((s),(l)) == 0)
+-#define XMP_LitNMatch(s,l,n) (std::strncmp((s),(l),(n)) == 0)
++#define XMP_LitMatch(s,l) (strcmp((s),(l)) == 0)
++#define XMP_LitNMatch(s,l,n) (strncmp((s),(l),(n)) == 0)
+ // *** Use the above macros!
+
+ #define kTab ((char)0x09)
+@@ -368,7 +369,7 @@ static inline bool
+ IsPathPrefix ( XMP_StringPtr fullPath, XMP_StringPtr prefix )
+ {
+ bool isPrefix = false;
+- XMP_StringLen prefixLen = std::strlen(prefix);
++ XMP_StringLen prefixLen = strlen(prefix);
+ if ( XMP_LitNMatch ( prefix, fullPath, prefixLen ) ) {
+ char separator = fullPath[prefixLen];
+ if ( (separator == 0) || (separator == '/') ||
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/PostScript_Handler.cpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/PostScript_Handler.cpp
+@@ -7,6 +7,8 @@
+ // of the Adobe license agreement accompanying it.
+ // =================================================================================================
+
++#include <limits.h>
++
+ #include "XMPScanner.hpp"
+
+ #include "Scanner_Handler.hpp"
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/XMPScanner.cpp.orig 2008-10-06 07:18:58 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport/XMPScanner.cpp
+@@ -9,6 +9,8 @@
+ // one format in a file with a different format', inventors: Sean Parent, Greg Gilley.
+ // =================================================================================================
+
++#include <cstring>
++
+ #if WIN32
+ #pragma warning ( disable : 4127 ) // conditional expression is constant
+ #pragma warning ( disable : 4510 ) // default constructor could not be generated
+--- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/XMPFiles_Impl.hpp.orig 2008-10-06 07:18:56 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/XMPFiles_Impl.hpp
+@@ -26,6 +26,7 @@
+ #include <vector>
+ #include <string>
+ #include <map>
++#include <cstring>
+
+ #include <cassert>
+
+@@ -157,8 +158,8 @@ static inline void MakeUpperCase ( std::
+ }
+ }
+
+-#define XMP_LitMatch(s,l) (std::strcmp((s),(l)) == 0)
+-#define XMP_LitNMatch(s,l,n) (std::strncmp((s),(l),(n)) == 0)
++#define XMP_LitMatch(s,l) (strcmp((s),(l)) == 0)
++#define XMP_LitNMatch(s,l,n) (strncmp((s),(l),(n)) == 0)
+
+ #define IgnoreParam(p) voidVoidPtr = (void*)&p
+
+@@ -513,7 +514,7 @@ static inline bool CheckBytes ( const vo
+
+ static inline bool CheckCString ( const void * left, const void * right )
+ {
+- return (std::strcmp ( (char*)left, (char*)right ) == 0);
++ return (strcmp ( (char*)left, (char*)right ) == 0);
+ }
+
+ // -------------------------------------------------------------------------------------------------
+--- XMP-Toolkit-SDK-4.4.2/source/common/XML_Node.cpp.orig 2008-10-06 07:18:58 UTC
++++ XMP-Toolkit-SDK-4.4.2/source/common/XML_Node.cpp
+@@ -9,10 +9,12 @@
+ #include "XMP_Environment.h" // ! Must be the first #include!
+ #include "XMLParserAdapter.hpp"
+
++#include <cstdio>
++#include <cstring>
+ #include <map>
+
+ // ! Can't include XMP..._Impl.hpp - used by both Core and Files.
+-#define XMP_LitNMatch(s,l,n) (std::strncmp((s),(l),(n)) == 0)
++#define XMP_LitNMatch(s,l,n) (strncmp((s),(l),(n)) == 0)
+
+ #if XMP_WinBuild
+ #define snprintf _snprintf
diff --git a/graphics/dcp2icc/pkg-descr b/graphics/dcp2icc/pkg-descr
new file mode 100644
index 000000000000..2072b1910d28
--- /dev/null
+++ b/graphics/dcp2icc/pkg-descr
@@ -0,0 +1,6 @@
+dcp2icc is a small utility to convert DNG camera profiles to ICC profiles.
+
+To get DNG camera profiles for different cameras, download and install a
+recent version of DNG Converter from Adobe.
+
+WWW: http://sourceforge.net/projects/dcp2icc/