Date: Tue, 20 Oct 2015 16:53:08 +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: r399872 - in head/graphics: . dcp2icc dcp2icc/files Message-ID: <201510201653.t9KGr8Xp096853@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe Date: Tue Oct 20 16:53:08 2015 New Revision: 399872 URL: https://svnweb.freebsd.org/changeset/ports/399872 Log: Add a port of dcp2icc, small utility to convert DNG camera profiles to ICC profiles. While it builds with Clang, resulting binary crashes on exit (albeit it produces seemingly correct output file), so request GCC for the moment. WWW: http://sourceforge.net/projects/dcp2icc/ Added: head/graphics/dcp2icc/ head/graphics/dcp2icc/Makefile (contents, props changed) head/graphics/dcp2icc/distinfo (contents, props changed) head/graphics/dcp2icc/files/ head/graphics/dcp2icc/files/patch-#include-cstdlib (contents, props changed) head/graphics/dcp2icc/files/patch-SConstruct (contents, props changed) head/graphics/dcp2icc/files/patch-gcc48-fixes (contents, props changed) head/graphics/dcp2icc/pkg-descr (contents, props changed) Modified: head/graphics/Makefile Modified: head/graphics/Makefile ============================================================================== --- head/graphics/Makefile Tue Oct 20 16:24:16 2015 (r399871) +++ head/graphics/Makefile Tue Oct 20 16:53:08 2015 (r399872) @@ -114,6 +114,7 @@ SUBDIR += darktable SUBDIR += dataplot SUBDIR += dc20pack + SUBDIR += dcp2icc SUBDIR += dcraw SUBDIR += dcraw-m SUBDIR += deegree-csw Added: head/graphics/dcp2icc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/dcp2icc/Makefile Tue Oct 20 16:53:08 2015 (r399872) @@ -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> Added: head/graphics/dcp2icc/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/dcp2icc/distinfo Tue Oct 20 16:53:08 2015 (r399872) @@ -0,0 +1,2 @@ +SHA256 (dcp2icc-0.1.tar.bz2) = 654c3f061e3b95ab46a74cfcd6b434969736151d21e2152fb02c5347df90a06e +SIZE (dcp2icc-0.1.tar.bz2) = 15231970 Added: head/graphics/dcp2icc/files/patch-#include-cstdlib ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/dcp2icc/files/patch-#include-cstdlib Tue Oct 20 16:53:08 2015 (r399872) @@ -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" Added: head/graphics/dcp2icc/files/patch-SConstruct ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/dcp2icc/files/patch-SConstruct Tue Oct 20 16:53:08 2015 (r399872) @@ -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") Added: head/graphics/dcp2icc/files/patch-gcc48-fixes ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/dcp2icc/files/patch-gcc48-fixes Tue Oct 20 16:53:08 2015 (r399872) @@ -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 Added: head/graphics/dcp2icc/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/dcp2icc/pkg-descr Tue Oct 20 16:53:08 2015 (r399872) @@ -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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510201653.t9KGr8Xp096853>