From cefed48d4f78b71e2f6a3a15d0ba7f586570de56 Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 14 Jul 2017 07:56:27 -0400 Subject: [PATCH] Support LibRaw delegate library --- Makefile.in | 4 ++ configure | 144 +++++++++++++++++++++++++++++++++++++++++++- configure.ac | 41 ++++++++++++- utilities/compare.1 | 3 + utilities/convert.1 | 1 - 5 files changed, 187 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index f80c50a09..fa6bcf6cb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2619,6 +2619,8 @@ LIBOPENJP2_CFLAGS = @LIBOPENJP2_CFLAGS@ LIBOPENJP2_LIBS = @LIBOPENJP2_LIBS@ LIBRARY_EXTRA_CPPFLAGS = @LIBRARY_EXTRA_CPPFLAGS@ LIBRARY_PATH = @LIBRARY_PATH@ +LIBRAW_CFLAGS = @LIBRAW_CFLAGS@ +LIBRAW_LIBS = @LIBRAW_LIBS@ LIBS = @LIBS@ LIBSTDCLDFLAGS = @LIBSTDCLDFLAGS@ LIBTOOL = @LIBTOOL@ @@ -2758,6 +2760,8 @@ QUANTUM_DEPTH = @QUANTUM_DEPTH@ RANLIB = @RANLIB@ RAQM_CFLAGS = @RAQM_CFLAGS@ RAQM_LIBS = @RAQM_LIBS@ +RAW_CFLAGS = @RAW_CFLAGS@ +RAW_LIBS = @RAW_LIBS@ RMDelegate = @RMDelegate@ RPM = @RPM@ RSVGDecodeDelegate = @RSVGDecodeDelegate@ diff --git a/configure b/configure index 39739a656..7d1b01b48 100755 --- a/configure +++ b/configure @@ -773,6 +773,12 @@ CAIRO_SVG_LIBS CAIRO_SVG_CFLAGS RSVG_LIBS RSVG_CFLAGS +RAW_LIBS +RAW_CFLAGS +RAW_DELEGATE_FALSE +RAW_DELEGATE_TRUE +LIBRAW_LIBS +LIBRAW_CFLAGS PNG_DELEGATE_FALSE PNG_DELEGATE_TRUE PNG_LIBS @@ -1217,6 +1223,7 @@ with_lzma with_openexr with_pango with_png +with_LibRaw with_rsvg with_tiff with_webp @@ -1273,6 +1280,8 @@ PANGO_CFLAGS PANGO_LIBS PNG_CFLAGS PNG_LIBS +LIBRAW_CFLAGS +LIBRAW_LIBS RSVG_CFLAGS RSVG_LIBS CAIRO_SVG_CFLAGS @@ -2019,6 +2028,7 @@ Optional Packages: --without-openexr disable OpenEXR support --without-pango disable PANGO support --without-png disable PNG support + --without-raw disable Raw support --with-rsvg enable RSVG support --without-tiff disable TIFF support --without-webp disable WEBP support @@ -2092,6 +2102,9 @@ Some influential environment variables: PANGO_LIBS linker flags for PANGO, overriding pkg-config PNG_CFLAGS C compiler flags for PNG, overriding pkg-config PNG_LIBS linker flags for PNG, overriding pkg-config + LIBRAW_CFLAGS + C compiler flags for LIBRAW, overriding pkg-config + LIBRAW_LIBS linker flags for LIBRAW, overriding pkg-config RSVG_CFLAGS C compiler flags for RSVG, overriding pkg-config RSVG_LIBS linker flags for RSVG, overriding pkg-config CAIRO_SVG_CFLAGS @@ -4519,7 +4532,7 @@ MAGICK_PATCHLEVEL_VERSION=1 MAGICK_VERSION=7.0.6-1 -MAGICK_GIT_REVISION=20383:6421a7175:20170712 +MAGICK_GIT_REVISION=20419:f94b084a6:20170714 # Substitute library versioning @@ -32508,7 +32521,6 @@ fi # Check for JBIG delegate library. # - # Check whether --with-jbig was given. if test "${with_jbig+set}" = set; then : withval=$with_jbig; with_jbig=$withval @@ -33701,6 +33713,123 @@ fi +# +# Check for the Raw delegate library. +# + +# Check whether --with-LibRaw was given. +if test "${with_LibRaw+set}" = set; then : + withval=$with_LibRaw; with_raw=$withval +else + with_raw='yes' +fi + + +if test "$with_raw" != 'yes'; then + DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-libraw=$with_raw " +fi + +have_raw='no' +RAW_CFLAGS="" +RAW_LIBS="" +RAW_PKG="" +if test "x$with_raw" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------------------------------------------------------" >&5 +$as_echo "-------------------------------------------------------------" >&6; } + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBRAW" >&5 +$as_echo_n "checking for LIBRAW... " >&6; } + +if test -n "$LIBRAW_CFLAGS"; then + pkg_cv_LIBRAW_CFLAGS="$LIBRAW_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libraw >= 0.14.8\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libraw >= 0.14.8") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBRAW_CFLAGS=`$PKG_CONFIG --cflags "libraw >= 0.14.8" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBRAW_LIBS"; then + pkg_cv_LIBRAW_LIBS="$LIBRAW_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libraw >= 0.14.8\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libraw >= 0.14.8") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBRAW_LIBS=`$PKG_CONFIG --libs "libraw >= 0.14.8" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBRAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libraw >= 0.14.8" 2>&1` + else + LIBRAW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libraw >= 0.14.8" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBRAW_PKG_ERRORS" >&5 + + have_raw=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_raw=no +else + LIBRAW_CFLAGS=$pkg_cv_LIBRAW_CFLAGS + LIBRAW_LIBS=$pkg_cv_LIBRAW_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_raw=yes +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 +$as_echo "" >&6; } +fi + +if test "$have_raw" = 'yes'; then + +$as_echo "#define RAW_DELEGATE 1" >>confdefs.h + + CFLAGS="$RAW_CFLAGS $CFLAGS" +fi + + if test "$have_raw" = 'yes'; then + RAW_DELEGATE_TRUE= + RAW_DELEGATE_FALSE='#' +else + RAW_DELEGATE_TRUE='#' + RAW_DELEGATE_FALSE= +fi + + + + + # # Check for RSVG delegate library. # @@ -37466,6 +37595,9 @@ fi if test "$have_ps" = 'yes' ; then MAGICK_DELEGATES="$MAGICK_DELEGATES ps" fi +if test "$have_raw" = 'yes' ; then + MAGICK_DELEGATES="$MAGICK_DELEGATES raw" +fi if test "$have_raqm" = 'yes' ; then MAGICK_DELEGATES="$MAGICK_DELEGATES raqm" fi @@ -37635,7 +37767,7 @@ fi if test "$build_modules" != 'no'; then MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS" else - MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS" + MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RAW_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS" fi @@ -38006,6 +38138,10 @@ if test -z "${PNG_DELEGATE_TRUE}" && test -z "${PNG_DELEGATE_FALSE}"; then as_fn_error $? "conditional \"PNG_DELEGATE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${RAW_DELEGATE_TRUE}" && test -z "${RAW_DELEGATE_FALSE}"; then + as_fn_error $? "conditional \"RAW_DELEGATE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${RSVG_DELEGATE_TRUE}" && test -z "${RSVG_DELEGATE_FALSE}"; then as_fn_error $? "conditional \"RSVG_DELEGATE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -40672,6 +40808,7 @@ matches your expectations. PERL --with-perl=$with_perl $have_perl PNG --with-png=$with_png $have_png RAQM --with-raqm=$with_raqm $have_raqm + RAW --with-raw=$with_raw $have_raw RSVG --with-rsvg=$with_rsvg $have_rsvg TIFF --with-tiff=$with_tiff $have_tiff WEBP --with-webp=$with_webp $have_webp @@ -40759,6 +40896,7 @@ matches your expectations. PERL --with-perl=$with_perl $have_perl PNG --with-png=$with_png $have_png RAQM --with-raqm=$with_raqm $have_raqm + RAW --with-raw=$with_raw $have_raw RSVG --with-rsvg=$with_rsvg $have_rsvg TIFF --with-tiff=$with_tiff $have_tiff WEBP --with-webp=$with_webp $have_webp diff --git a/configure.ac b/configure.ac index a433322f6..32375ebc8 100644 --- a/configure.ac +++ b/configure.ac @@ -2244,7 +2244,6 @@ dnl =========================================================================== # # Check for JBIG delegate library. # - AC_ARG_WITH([jbig], [AC_HELP_STRING([--without-jbig], [disable JBIG support])], @@ -2596,6 +2595,40 @@ AC_SUBST(PNG_LIBS) dnl =========================================================================== +# +# Check for the Raw delegate library. +# +AC_ARG_WITH([LibRaw], + [AC_HELP_STRING([--without-raw], + [disable Raw support])], + [with_raw=$withval], + [with_raw='yes']) + +if test "$with_raw" != 'yes'; then + DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-libraw=$with_raw " +fi + +have_raw='no' +RAW_CFLAGS="" +RAW_LIBS="" +RAW_PKG="" +if test "x$with_raw" = "xyes"; then + AC_MSG_RESULT([-------------------------------------------------------------]) + PKG_CHECK_MODULES(LIBRAW,[libraw >= 0.14.8], have_raw=yes, have_raw=no) + AC_MSG_RESULT([]) +fi + +if test "$have_raw" = 'yes'; then + AC_DEFINE(RAW_DELEGATE,1,Define if you have LIBRAW library) + CFLAGS="$RAW_CFLAGS $CFLAGS" +fi + +AM_CONDITIONAL(RAW_DELEGATE, test "$have_raw" = 'yes') +AC_SUBST(RAW_CFLAGS) +AC_SUBST(RAW_LIBS) + +dnl =========================================================================== + # # Check for RSVG delegate library. # @@ -3685,6 +3718,9 @@ fi if test "$have_ps" = 'yes' ; then MAGICK_DELEGATES="$MAGICK_DELEGATES ps" fi +if test "$have_raw" = 'yes' ; then + MAGICK_DELEGATES="$MAGICK_DELEGATES raw" +fi if test "$have_raqm" = 'yes' ; then MAGICK_DELEGATES="$MAGICK_DELEGATES raqm" fi @@ -3766,7 +3802,7 @@ fi if test "$build_modules" != 'no'; then MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS" else - MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS" + MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RAW_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS" fi AC_SUBST(MAGICK_DEP_LIBS) @@ -3921,6 +3957,7 @@ matches your expectations. PERL --with-perl=$with_perl $have_perl PNG --with-png=$with_png $have_png RAQM --with-raqm=$with_raqm $have_raqm + RAW --with-raw=$with_raw $have_raw RSVG --with-rsvg=$with_rsvg $have_rsvg TIFF --with-tiff=$with_tiff $have_tiff WEBP --with-webp=$with_webp $have_webp diff --git a/utilities/compare.1 b/utilities/compare.1 index 02a43e0f7..eaeb9abf2 100644 --- a/utilities/compare.1 +++ b/utilities/compare.1 @@ -76,6 +76,9 @@ Image Operators: lightness rescaling using sigmoidal contrast enhancement \-trim trim image edges +Image Channel Operators: + \-separate separate an image channel into a grayscale image + Image Sequence Operators: \-crop geometry cut out a rectangular region of the image \-write filename write images to this file diff --git a/utilities/convert.1 b/utilities/convert.1 index 0ad6a5c0e..ee31674c8 100644 --- a/utilities/convert.1 +++ b/utilities/convert.1 @@ -269,7 +269,6 @@ Image Operators: \-white-threshold value force all pixels above the threshold into white - Image Channel Operators: \-channel-fx expression exchange, extract, or transfer one or more image channels -- 2.40.0