Hello community, here is the log from the commit of package sk1 for openSUSE:Factory checked in at 2017-04-06 10:59:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sk1 (Old) and /work/SRC/openSUSE:Factory/.sk1.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sk1" Thu Apr 6 10:59:33 2017 rev:25 rq:483150 version:2.0~rc2 Changes: -------- --- /work/SRC/openSUSE:Factory/sk1/sk1.changes 2017-02-19 01:03:33.270321397 +0100 +++ /work/SRC/openSUSE:Factory/.sk1.new/sk1.changes 2017-04-06 10:59:34.933360313 +0200 @@ -1,0 +2,6 @@ +Mon Mar 27 14:09:43 UTC 2017 - pgaj...@suse.com + +- add ImageMagick7 support for us + + sk1-ImageMagick7.patch + +------------------------------------------------------------------- New: ---- sk1-ImageMagick7.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sk1.spec ++++++ --- /var/tmp/diff_new_pack.KhXQ5t/_old 2017-04-06 10:59:35.865228608 +0200 +++ /var/tmp/diff_new_pack.KhXQ5t/_new 2017-04-06 10:59:35.869228043 +0200 @@ -24,6 +24,13 @@ Group: Productivity/Graphics/Vector Editors Url: http://sk1project.net/ Source: http://sk1project.net/dc3.php?version=2.0rc2&target=sk1-2.0rc2.tar.gz#/%{name}-2.0rc2.tar.gz +# should go upstream, but +# (1) it is not complete. Source file +# includes wand/MagickWand.h but it should include +# MagickWand/MagickWand.h instead for ImageMagick 7 +# (2) it is ok to change *Matte* to *Alpha* in magickwand.py +# unconditionally? +Patch0: sk1-ImageMagick7.patch BuildRequires: fdupes BuildRequires: pkgconfig BuildRequires: update-desktop-files @@ -55,6 +62,7 @@ %prep %setup -q -n %{name}-2.0rc2 +%patch0 -p1 # Use the path defined by %%py_sitedir sed -i '/install_path/s|\/.*\(\/\)|%{py_sitedir}\1|' setup-sk1.py ++++++ sk1-ImageMagick7.patch ++++++ Index: sk1-2.0rc2/src/uc2/libimg/_libimg.c =================================================================== --- sk1-2.0rc2.orig/src/uc2/libimg/_libimg.c 2016-10-09 12:40:45.000000000 +0200 +++ sk1-2.0rc2/src/uc2/libimg/_libimg.c 2017-03-27 16:07:18.725664504 +0200 @@ -199,15 +199,15 @@ im_NextImage(PyObject *self, PyObject *a // UndefinedType, // BilevelType, // GrayscaleType, -// GrayscaleMatteType, +// GrayscaleMatteType (GrayscaleAlphaType for ImageMagick7), // PaletteType, -// PaletteMatteType, +// PaletteMatteType (PaletteAlphaType for ImageMagick7), // TrueColorType, -// TrueColorMatteType, +// TrueColorMatteType (TrueColorAlphaType for ImageMagick7), // ColorSeparationType, -// ColorSeparationMatteType, +// ColorSeparationMatteType (ColorSeparationAlphaType for ImageMagick7), // OptimizeType, -// PaletteBilevelMatteType +// PaletteBilevelMatteType (PaletteBilevelAlphaType for ImageMagick7) static PyObject * im_GetImageType(PyObject *self, PyObject *args) { @@ -230,32 +230,52 @@ im_GetImageType(PyObject *self, PyObject else if (img_type == GrayscaleType){ return Py_BuildValue("s", "GrayscaleType"); } +#if MagickLibVersion >= 0x700 + else if (img_type == GrayscaleAlphaType){ +#else else if (img_type == GrayscaleMatteType){ - return Py_BuildValue("s", "GrayscaleMatteType"); +#endif + return Py_BuildValue("s", "GrayscaleAlphaType"); } else if (img_type == PaletteType){ return Py_BuildValue("s", "PaletteType"); } +#if MagickLibVersion >= 0x700 + else if (img_type == PaletteAlphaType){ +#else else if (img_type == PaletteMatteType){ - return Py_BuildValue("s", "PaletteMatteType"); +#endif + return Py_BuildValue("s", "PaletteAlphaType"); } else if (img_type == TrueColorType){ return Py_BuildValue("s", "TrueColorType"); } +#if MagickLibVersion >= 0x700 + else if (img_type == TrueColorAlphaType){ +#else else if (img_type == TrueColorMatteType){ - return Py_BuildValue("s", "TrueColorMatteType"); +#endif + return Py_BuildValue("s", "TrueColorAlphaType"); } else if (img_type == ColorSeparationType){ return Py_BuildValue("s", "ColorSeparationType"); } +#if MagickLibVersion >= 0x700 + else if (img_type == ColorSeparationAlphaType){ +#else else if (img_type == ColorSeparationMatteType){ - return Py_BuildValue("s", "ColorSeparationMatteType"); +#endif + return Py_BuildValue("s", "ColorSeparationAlphaType"); } else if (img_type == OptimizeType){ return Py_BuildValue("s", "OptimizeType"); } +#if MagickLibVersion >= 0x700 + else if (img_type == PaletteBilevelAlphaType){ +#else else if (img_type == PaletteBilevelMatteType){ - return Py_BuildValue("s", "PaletteBilevelMatteType"); +#endif + return Py_BuildValue("s", "PaletteBilevelAlphaType"); } else { return Py_BuildValue("s", "UndefinedType"); @@ -281,9 +301,9 @@ im_GetImageType(PyObject *self, PyObject //HSBColorspace, //HSLColorspace, //HWBColorspace, -//Rec601LumaColorspace, +//Rec601LumaColorspace (only in ImageMagick <= 6), //Rec601YCbCrColorspace, -//Rec709LumaColorspace, +//Rec709LumaColorspace (only in ImageMagick <= 6), //Rec709YCbCrColorspace, //LogColorspace, //CMYColorspace @@ -351,15 +371,19 @@ im_GetColorspace(PyObject *self, PyObjec else if (cs == HWBColorspace){ return Py_BuildValue("s", "HWBColorspace"); } +#if MagickLibVersion < 0x700 else if (cs == Rec601LumaColorspace){ return Py_BuildValue("s", "Rec601LumaColorspace"); } +#endif else if (cs == Rec601YCbCrColorspace){ return Py_BuildValue("s", "Rec601YCbCrColorspace"); } +#if MagickLibVersion < 0x700 else if (cs == Rec709LumaColorspace){ return Py_BuildValue("s", "Rec709LumaColorspace"); } +#endif else if (cs == Rec709YCbCrColorspace){ return Py_BuildValue("s", "Rec709YCbCrColorspace"); } @@ -426,25 +450,41 @@ get_image_type(char* mode) { return GrayscaleType; } else if (strcmp(mode, "GrayscaleMatteType") == 0) { +#if MagickLibVersion >= 0x700 + return GrayscaleAlphaType; +#else return GrayscaleMatteType; +#endif } else if (strcmp(mode, "PaletteType") == 0) { return PaletteType; } - else if (strcmp(mode, "PaletteMatteType") == 0) { + else if (strcmp(mode, "PaletteAlphaType") == 0) { +#if MagickLibVersion >= 0x700 + return PaletteAlphaType; +#else return PaletteMatteType; +#endif } else if (strcmp(mode, "TrueColorType") == 0) { return TrueColorType; } - else if (strcmp(mode, "TrueColorMatteType") == 0) { + else if (strcmp(mode, "TrueColorAlphaType") == 0) { +#if MagickLibVersion >= 0x700 + return TrueColorAlphaType; +#else return TrueColorMatteType; +#endif } else if (strcmp(mode, "ColorSeparationType") == 0) { return ColorSeparationType; } else if (strcmp(mode, "ColorSeparationMatteType") == 0) { +#if MagickLibVersion >= 0x700 + return ColorSeparationAlphaType; +#else return ColorSeparationMatteType; +#endif } else { return TrueColorType; Index: sk1-2.0rc2/src/uc2/libimg/magickwand.py =================================================================== --- sk1-2.0rc2.orig/src/uc2/libimg/magickwand.py 2016-10-09 12:40:45.000000000 +0200 +++ sk1-2.0rc2/src/uc2/libimg/magickwand.py 2017-03-27 16:03:39.189632867 +0200 @@ -19,13 +19,13 @@ from cStringIO import StringIO BILEVEL_TYPE = 'BilevelType' L_TYPE = 'GrayscaleType' -LA_TYPE = 'GrayscaleMatteType' +LA_TYPE = 'GrayscaleAlphaType' P_TYPE = 'PaletteType' -PA_TYPE = 'PaletteMatteType' +PA_TYPE = 'PaletteAlphaType' RGB_TYPE = 'TrueColorType' -RGBA_TYPE = 'TrueColorMatteType' +RGBA_TYPE = 'TrueColorAlphaType' CMYK_TYPE = 'ColorSeparationType' -CMYKA_TYPE = 'ColorSeparationMatteType' +CMYKA_TYPE = 'ColorSeparationAlphaType' WAND_TYPES = [BILEVEL_TYPE, L_TYPE, LA_TYPE, P_TYPE, PA_TYPE, RGB_TYPE, RGBA_TYPE, CMYK_TYPE, CMYKA_TYPE, ]