Update of /cvsroot/ufraw/ufraw
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8280

Modified Files:
        Makefile.am README configure.ac dcraw.cc ufraw_conf.c 
        ufraw_developer.c ufraw_writer.c 
Log Message:
Remove support for lcms1.

Index: ufraw_writer.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_writer.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- ufraw_writer.c      26 Mar 2015 14:00:14 -0000      1.98
+++ ufraw_writer.c      9 May 2015 03:00:17 -0000       1.99
@@ -14,23 +14,7 @@
 #include <glib/gi18n.h>
 #include <errno.h>     /* for errno */
 #include <string.h>
-#ifdef HAVE_LCMS2
 #include <lcms2.h>
-#else
-#include <lcms.h>
-typedef DWORD cmsUInt32Number;
-static LCMSBOOL cmsSaveProfileToMem(cmsHPROFILE hProfile, void *MemPtr,
-                                    cmsUInt32Number *BytesNeeded)
-{
-    size_t _BytesNeeded;
-    LCMSBOOL retval;
-
-    retval = _cmsSaveProfileToMem(hProfile, MemPtr, &_BytesNeeded);
-    if (BytesNeeded)
-        *(BytesNeeded) = (cmsUInt32Number) _BytesNeeded;
-    return retval;
-}
-#endif
 #ifdef HAVE_LIBTIFF
 #include <tiffio.h>
 #endif

Index: dcraw.cc
===================================================================
RCS file: /cvsroot/ufraw/ufraw/dcraw.cc,v
retrieving revision 1.333
retrieving revision 1.334
diff -u -d -r1.333 -r1.334
--- dcraw.cc    30 Apr 2015 03:00:11 -0000      1.333
+++ dcraw.cc    9 May 2015 03:00:17 -0000       1.334
@@ -85,11 +85,7 @@
 }
 #endif                         /* and Adobe Lossy DNGs */
 #ifndef NO_LCMS
-#ifdef HAVE_LCMS2
 #include <lcms2.h>             /* Support color profiles */
-#else
-#include <lcms.h>
-#endif
 #endif
 #ifndef DCRAW_NOMAIN
 #ifdef LOCALEDIR
@@ -9847,18 +9843,12 @@
 extern "C" { char *ufraw_message(int code, const char *format, ...); }
 #define UFRAW_ERROR 100
 #endif
-#ifdef HAVE_LCMS2
 static void dcraw_lcms_message (cmsContext ContextID,
                                 cmsUInt32Number ErrorCode,
                                 const char *ErrorText)
 {
     (void) ContextID;
-#else
-static int dcraw_lcms_message (int ErrorCode, const char *ErrorText)
-{
-#endif
-    /* Possible ErrorCode:
-     * see cmsERROR_* in <lcms2.h> or LCMS_ERRC_* in <lcms.h>. */
+    /* Possible ErrorCode: see cmsERROR_* in <lcms2.h>. */
     (void) ErrorCode;
 
 #ifdef DCRAW_NOMAIN
@@ -9866,10 +9856,6 @@
 #else
     fprintf (stderr, "%s", ErrorText);
 #endif
-
-#ifdef HAVE_LCMS1
-    return 1; /* Tell lcms that we handled the error */
-#endif
 }
 
 void CLASS apply_profile (const char *input, const char *output)
@@ -9880,11 +9866,7 @@
   FILE *fp;
   unsigned size;
 
-#ifdef HAVE_LCMS2
   cmsSetLogErrorHandler (dcraw_lcms_message);
-#else
-  cmsSetErrorHandler (dcraw_lcms_message);
-#endif
   if (strcmp (input, "embed"))
     hInProfile = cmsOpenProfileFromFile (input, "r");
   else if (profile_length) {

Index: ufraw_developer.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_developer.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- ufraw_developer.c   26 Mar 2015 14:00:14 -0000      1.98
+++ ufraw_developer.c   9 May 2015 03:00:17 -0000       1.99
@@ -16,33 +16,17 @@
 #endif
 #include <math.h>
 #include <string.h>
-#ifdef HAVE_LCMS2
 #include <lcms2.h>
 #include <lcms2_plugin.h>
-#else
-#include <lcms.h>
-#define cmsCreateLab2Profile(x) cmsCreateLabProfile(x)
-typedef GAMMATABLE cmsToneCurve;
-typedef WORD cmsUInt16Number;
-#endif
 
-#ifdef HAVE_LCMS2
 static void lcms_message(cmsContext ContextID,
                          cmsUInt32Number ErrorCode,
                          const char *ErrorText)
 {
     (void) ContextID;
-#else
-static int lcms_message(int ErrorCode, const char *ErrorText)
-{
-#endif
-    /* Possible ErrorCode:
-     * see cmsERROR_* in <lcms2.h> or LCMS_ERRC_* in <lcms.h>. */
+    /* Possible ErrorCode: see cmsERROR_* in <lcms2.h>. */
     (void) ErrorCode;
     ufraw_message(UFRAW_ERROR, "%s", ErrorText);
-#ifdef HAVE_LCMS1
-    return 1; /* Tell lcms that we handled the error */
-#endif
 }
 
 developer_data *developer_init()
@@ -66,13 +50,8 @@
     d->luminosityCurveData.m_gamma = -1.0;
     d->luminosityProfile = NULL;
     cmsToneCurve **TransferFunction = (cmsToneCurve **)d->TransferFunction;
-#ifdef HAVE_LCMS2
     TransferFunction[0] = cmsBuildGamma(NULL, 1.0);
     TransferFunction[1] = TransferFunction[2] = cmsBuildGamma(NULL, 1.0);
-#else
-    TransferFunction[0] = cmsAllocGamma(0x100);
-    TransferFunction[1] = TransferFunction[2] = cmsBuildGamma(0x100, 1.0);
-#endif
     d->saturationProfile = NULL;
     d->adjustmentProfile = NULL;
     d->intent[out_profile] = -1;
@@ -88,11 +67,7 @@
         d->lightnessAdjustment[i].hue = 0.0;
         d->lightnessAdjustment[i].hueWidth = 0.0;
     }
-#ifdef HAVE_LCMS2
     cmsSetLogErrorHandler(lcms_message);
-#else
-    cmsSetErrorHandler(lcms_message);
-#endif
     return d;
 }
 
@@ -103,13 +78,8 @@
     for (i = 0; i < profile_types; i++)
         if (d->profile[i] != NULL) cmsCloseProfile(d->profile[i]);
     cmsCloseProfile(d->luminosityProfile);
-#ifdef HAVE_LCMS2
     cmsFreeToneCurve(d->TransferFunction[0]);
     cmsFreeToneCurve(d->TransferFunction[1]);
-#else
-    cmsFreeGamma(d->TransferFunction[0]);
-    cmsFreeGamma(d->TransferFunction[1]);
-#endif
     cmsCloseProfile(d->saturationProfile);
     cmsCloseProfile(d->adjustmentProfile);
     if (d->colorTransform != NULL)
@@ -123,7 +93,6 @@
 
 static const char *embedded_display_profile = "embedded display profile";
 
-#ifdef HAVE_LCMS2
 /*
  * Emulates cmsTakeProductName() from lcms 1.x.
  *
@@ -155,7 +124,6 @@
 
     return name;
 }
-#endif
 
 /* Update the profile in the developer
  * and init values in the profile if needed */
@@ -250,14 +218,9 @@
 static const double max_luminance = 100.0;
 static const double max_colorfulness = 181.019336; /* sqrt(128*128+128*128) */
 
-#ifdef HAVE_LCMS2
 static cmsInt32Number contrast_saturation_sampler(const cmsUInt16Number In[],
         cmsUInt16Number Out[],
         void *Cargo)
-#else
-static int contrast_saturation_sampler(cmsUInt16Number In[],
-                                       cmsUInt16Number Out[], void *Cargo)
-#endif
 {
     cmsCIELab Lab;
     cmsCIELCh LCh;
@@ -281,7 +244,6 @@
     cmsHPROFILE hICC;
     struct contrast_saturation cs = { contrast, saturation };
 
-#ifdef HAVE_LCMS2
     cmsPipeline* Pipeline = NULL;
     cmsStage* CLUT = NULL;
 
@@ -323,44 +285,11 @@
     if (Pipeline) cmsPipelineFree(Pipeline);
     if (hICC) cmsCloseProfile(hICC);
     return NULL;
-#else /* HAVE_LCMS1 */
-    LPLUT Lut;
-
-    hICC = _cmsCreateProfilePlaceholder();
-    if (hICC == NULL) return NULL; // can't allocate
-
-    cmsSetDeviceClass(hICC, icSigAbstractClass);
-    cmsSetColorSpace(hICC, icSigLabData);
-    cmsSetPCS(hICC, icSigLabData);
-    cmsSetRenderingIntent(hICC, INTENT_PERCEPTUAL);
-
-    // Creates a LUT with 3D grid only
-    Lut = cmsAllocLUT();
-    cmsAlloc3DGrid(Lut, 11, 3, 3);
-    if (!cmsSample3DGrid(Lut, contrast_saturation_sampler, &cs , 0)) {
-        // Shouldn't reach here
-        cmsFreeLUT(Lut);
-        cmsCloseProfile(hICC);
-        return NULL;
-    }
-    // Create tags
-    cmsAddTag(hICC, icSigMediaWhitePointTag, (void *) cmsD50_XYZ());
-    cmsAddTag(hICC, icSigAToB0Tag, (void *) Lut);
-    // LUT is already on virtual profile
-    cmsFreeLUT(Lut);
-
-    return hICC;
-#endif /* HAVE_LCMS1 */
 }
 
-#ifdef HAVE_LCMS2
 static cmsInt32Number luminance_adjustment_sampler(const cmsUInt16Number In[],
         cmsUInt16Number Out[],
         void *Cargo)
-#else
-static int luminance_adjustment_sampler(cmsUInt16Number In[],
-                                        cmsUInt16Number Out[], void *Cargo)
-#endif
 {
     cmsCIELab Lab;
     cmsCIELCh LCh;
@@ -401,7 +330,6 @@
 {
     cmsHPROFILE hICC;
 
-#ifdef HAVE_LCMS2
     cmsPipeline* Pipeline = NULL;
     cmsStage* CLUT = NULL;
 
@@ -445,33 +373,6 @@
     if (Pipeline) cmsPipelineFree(Pipeline);
     if (hICC) cmsCloseProfile(hICC);
     return NULL;
-#else /* HAVE_LCMS1 */
-    LPLUT Lut;
-
-    hICC = _cmsCreateProfilePlaceholder();
-    if (hICC == NULL) return NULL; // can't allocate
-
-    cmsSetDeviceClass(hICC, icSigAbstractClass);
-    cmsSetColorSpace(hICC, icSigLabData);
-    cmsSetPCS(hICC, icSigLabData);
-    cmsSetRenderingIntent(hICC, INTENT_PERCEPTUAL);
-
-    // Creates a LUT with 3D grid only
-    Lut = cmsAllocLUT();
-    cmsAlloc3DGrid(Lut, 33, 3, 3);
-    if (!cmsSample3DGrid(Lut, luminance_adjustment_sampler, (void*)d, 0)) {
-        // Shouldn't reach here
-        cmsFreeLUT(Lut);
-        cmsCloseProfile(hICC);
-        return NULL;
-    }
-    // Create tags
-    cmsAddTag(hICC, icSigMediaWhitePointTag, (void *) cmsD50_XYZ());
-    cmsAddTag(hICC, icSigAToB0Tag, (void *) Lut);
-    // LUT is already on virtual profile
-    cmsFreeLUT(Lut);
-    return hICC;
-#endif /* HAVE_LCMS1 */
 }
 
 /* Find a for which (1-exp(-a x)/(1-exp(-a)) has derivative b at x=0 */
@@ -736,7 +637,6 @@
                 ufraw_message(UFRAW_REPORT, NULL);
                 d->luminosityProfile = NULL;
             } else {
-#ifdef HAVE_LCMS2
                 cmsToneCurve **TransferFunction =
                     (cmsToneCurve **)d->TransferFunction;
                 cmsFloat32Number values[0x100];
@@ -748,15 +648,6 @@
                 d->luminosityProfile = cmsCreateLinearizationDeviceLink(
                                            cmsSigLabData, TransferFunction);
                 cmsSetDeviceClass(d->luminosityProfile, cmsSigAbstractClass);
-#else
-                LPGAMMATABLE *TransferFunction =
-                    (LPGAMMATABLE *)d->TransferFunction;
-                for (i = 0; i < 0x100; i++)
-                    TransferFunction[0]->GammaTable[i] = cs->m_Samples[i];
-                d->luminosityProfile = cmsCreateLinearizationDeviceLink(
-                                           icSigLabData, TransferFunction);
-                cmsSetDeviceClass(d->luminosityProfile, icSigAbstractClass);
-#endif
             }
             CurveSampleFree(cs);
         }

Index: configure.ac
===================================================================
RCS file: /cvsroot/ufraw/ufraw/configure.ac,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -d -r1.183 -r1.184
--- configure.ac        11 Feb 2015 05:30:09 -0000      1.183
+++ configure.ac        9 May 2015 03:00:17 -0000       1.184
@@ -70,21 +70,7 @@
 
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.12 gthread-2.0)
 
-PKG_CHECK_MODULES(LCMS2, lcms2,
-  [have_lcms="lcms 2.x"
-   AC_DEFINE(HAVE_LCMS2, 1, have the lcms 2.x library)
-   LCMS_CFLAGS="$LCMS2_CFLAGS"
-   LCMS_LIBS="$LCMS2_LIBS"],
-  [have_lcms="lcms 2.x not found"])
-
-if test "x$have_lcms" != "xlcms 2.x"; then
-  PKG_CHECK_MODULES(LCMS1, lcms >= 1.14,
-    [have_lcms="lcms 1.x"
-     AC_DEFINE(HAVE_LCMS1, 1, have the lcms 1.x library)
-     LCMS_CFLAGS="$LCMS1_CFLAGS"
-     LCMS_LIBS="$LCMS1_LIBS"],
-    [AC_MSG_ERROR(can not build UFRaw without lcms)])
-fi
+PKG_CHECK_MODULES(LCMS2, lcms2)
 
 AC_ARG_WITH([gtk],
   [AS_HELP_STRING([--with-gtk],
@@ -226,11 +212,11 @@
 
 # UFRAW_CPPFLAGS is added to the preprocessor flags AM_CPPFLAGS,
 # affecting also the C and C++ compilers.
-UFRAW_CPPFLAGS="$UFRAW_CPPFLAGS $EXIV2_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS 
$LCMS_CFLAGS $LENSFUN_CFLAGS $LIBTIFF_CFLAGS $LIBPNG_CFLAGS $CFITSIO_CFLAGS"
+UFRAW_CPPFLAGS="$UFRAW_CPPFLAGS $EXIV2_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS 
$LCMS2_CFLAGS $LENSFUN_CFLAGS $LIBTIFF_CFLAGS $LIBPNG_CFLAGS $CFITSIO_CFLAGS"
 AC_SUBST(UFRAW_CPPFLAGS)
 
 # UFRAW_LDADD is added to the linker flags LDADD.
-UFRAW_LDADD="$UFRAW_LDADD $EXIV2_LIBS $GLIB_LIBS $LCMS_LIBS $LENSFUN_LIBS 
$LIBTIFF_LIBS $LIBPNG_LIBS $CFITSIO_LIBS $CARBON_LIBS"
+UFRAW_LDADD="$UFRAW_LDADD $EXIV2_LIBS $GLIB_LIBS $LCMS2_LIBS $LENSFUN_LIBS 
$LIBTIFF_LIBS $LIBPNG_LIBS $CFITSIO_LIBS $CARBON_LIBS"
 AC_SUBST(UFRAW_LDADD)
 
 # Windows and Darwin (Mac OS X) will require some special attention.
@@ -373,7 +359,6 @@
 AC_OUTPUT
 
 AC_MSG_NOTICE(====================== summary =====================)
-AC_MSG_NOTICE(color management support: $have_lcms)
 AC_MSG_NOTICE(build GTK GUI: $have_gtk)
 AC_MSG_NOTICE(build GIMP plug-in: $have_gimp)
 AC_MSG_NOTICE(EXIF support using exiv2: $have_exiv2)

Index: ufraw_conf.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_conf.c,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -d -r1.202 -r1.203
--- ufraw_conf.c        26 Mar 2015 14:00:14 -0000      1.202
+++ ufraw_conf.c        9 May 2015 03:00:17 -0000       1.203
@@ -1712,13 +1712,6 @@
 char versionText[] =
     "%s " VERSION "\n"
 
-    "LCMS "
-#ifdef HAVE_LCMS2
-    "2.x\n"
-#else
-    "1.x\n"
-#endif
-
     "EXIV2 "
 #ifdef HAVE_EXIV2
     "enabled.\n"

Index: README
===================================================================
RCS file: /cvsroot/ufraw/ufraw/README,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- README      10 Feb 2015 06:00:17 -0000      1.74
+++ README      9 May 2015 03:00:17 -0000       1.75
@@ -31,9 +31,9 @@
 (If building from CVS rather than a release see also "Building UFRaw
 from CVS", below.)
 
-Building UFRaw requires development packages for GLib >= 2.12 and lcms >= 1.14
-(lcms 2.x is used if found). There are many optional dependencies which enable
-building additional programs and adding features to existing programs.
+Building UFRaw requires development packages for GLib >= 2.12 and lcms2.
+There are many optional dependencies which enable building additional
+programs and adding features to existing programs.
 
 The UFRaw build process expects Perl to be present (for pod2man). It is
 needed only if you are changing ufraw.pod or if you are building from CVS.
@@ -52,7 +52,6 @@
 will look like this:
 
 configure: ====================== summary =====================
-configure: color management support: lcms 2.x
 configure: build GTK GUI: yes
 configure: build GIMP plug-in: yes
 configure: EXIF support using exiv2: yes
@@ -145,7 +144,7 @@
 (e.g. rawphoto) are not installed because they may claim the raw file
 first, preventing UFRaw from running.
 
-If one of the packages (lcms, libjpeg, libtiff, zlib etc.) is not installed
+If one of the packages (lcms2, libjpeg, libtiff, zlib etc.) is not installed
 on your system, and you can not install it using the normal packaging
 system, you can build it locally and use UFRaw's configuration option
 --with-prefix to point to its location.  To build any of the above
@@ -282,7 +281,7 @@
 * ufraw-gimp depends on libgimp and all its derivatives.
 * ufraw only depends on libgtk and its derivatives.
 * ufraw-batch only depends on glib.
-In addition all the executables may depend on lcms, libjpeg, libtiff, zlib,
+In addition all the executables may depend on lcms2, libjpeg, libtiff, zlib,
 exiv2 and lensfun, depending on the way you configured UFRaw's build.
 
 Lastly, I'm requesting that you should consider adding a link to

Index: Makefile.am
===================================================================
RCS file: /cvsroot/ufraw/ufraw/Makefile.am,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- Makefile.am 23 Sep 2014 01:00:25 -0000      1.63
+++ Makefile.am 9 May 2015 03:00:17 -0000       1.64
@@ -125,8 +125,7 @@
 windows-installer: ufraw-$(VERSION)-setup.exe
 
 ufraw-$(VERSION)-setup.exe: ufraw-setup.iss ufraw.exe ufraw-batch.exe \
-    ufraw-gimp.exe ufraw-setup.bmp ufraw_icon.bmp ufraw_icon.ico \
-    $(PREFIX)/bin/liblcms-1.dll
+    ufraw-gimp.exe ufraw-setup.bmp ufraw_icon.bmp ufraw_icon.ico
        strip ufraw.exe ufraw-batch.exe ufraw-gimp.exe
        $(WINE) $(ISCC) ufraw-setup.iss
 


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
ufraw-cvs mailing list
ufraw-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs

Reply via email to