Skip to content

Commit 6c4df28

Browse files
author
Cristy
committed
Ensure PythonMagick compiles against ImageMagick 7.0.2 and above
1 parent 08c7e67 commit 6c4df28

15 files changed

+287
-17
lines changed

ChangeLog

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2015-08-14 0.9.14 Cristy <quetzlzacatenango@image...>
2+
* Ensure PythonMagick compiles against ImageMagick 7.0.2 and above.
3+
14
2015-08-12 0.9.13 Cristy <quetzlzacatenango@image...>
25
* Ensure PythonMagick compiles against Boost 1.60 and above.
36

configure

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for PythonMagick 0.9.13.
3+
# Generated by GNU Autoconf 2.69 for PythonMagick 0.9.14.
44
#
55
#
66
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
587587
# Identity of this package.
588588
PACKAGE_NAME='PythonMagick'
589589
PACKAGE_TARNAME='PythonMagick'
590-
PACKAGE_VERSION='0.9.13'
591-
PACKAGE_STRING='PythonMagick 0.9.13'
590+
PACKAGE_VERSION='0.9.14'
591+
PACKAGE_STRING='PythonMagick 0.9.14'
592592
PACKAGE_BUGREPORT=''
593593
PACKAGE_URL=''
594594

@@ -1362,7 +1362,7 @@ if test "$ac_init_help" = "long"; then
13621362
# Omit some internal or obsolete options to make the list less imposing.
13631363
# This message is too long to be a string in the A/UX 3.1 sh.
13641364
cat <<_ACEOF
1365-
\`configure' configures PythonMagick 0.9.13 to adapt to many kinds of systems.
1365+
\`configure' configures PythonMagick 0.9.14 to adapt to many kinds of systems.
13661366

13671367
Usage: $0 [OPTION]... [VAR=VALUE]...
13681368

@@ -1432,7 +1432,7 @@ fi
14321432

14331433
if test -n "$ac_init_help"; then
14341434
case $ac_init_help in
1435-
short | recursive ) echo "Configuration of PythonMagick 0.9.13:";;
1435+
short | recursive ) echo "Configuration of PythonMagick 0.9.14:";;
14361436
esac
14371437
cat <<\_ACEOF
14381438

@@ -1577,7 +1577,7 @@ fi
15771577
test -n "$ac_init_help" && exit $ac_status
15781578
if $ac_init_version; then
15791579
cat <<\_ACEOF
1580-
PythonMagick configure 0.9.13
1580+
PythonMagick configure 0.9.14
15811581
generated by GNU Autoconf 2.69
15821582

15831583
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2030,7 +2030,7 @@ cat >config.log <<_ACEOF
20302030
This file contains any messages produced by compilers while
20312031
running configure, to aid debugging if configure makes a mistake.
20322032

2033-
It was created by PythonMagick $as_me 0.9.13, which was
2033+
It was created by PythonMagick $as_me 0.9.14, which was
20342034
generated by GNU Autoconf 2.69. Invocation command line was
20352035

20362036
$ $0 $@
@@ -2903,7 +2903,7 @@ fi
29032903

29042904
# Define the identity of the package.
29052905
PACKAGE='PythonMagick'
2906-
VERSION='0.9.13'
2906+
VERSION='0.9.14'
29072907

29082908

29092909
cat >>confdefs.h <<_ACEOF
@@ -17937,7 +17937,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1793717937
# report actual input values of CONFIG_FILES etc. instead of their
1793817938
# values after options handling.
1793917939
ac_log="
17940-
This file was extended by PythonMagick $as_me 0.9.13, which was
17940+
This file was extended by PythonMagick $as_me 0.9.14, which was
1794117941
generated by GNU Autoconf 2.69. Invocation command line was
1794217942

1794317943
CONFIG_FILES = $CONFIG_FILES
@@ -18003,7 +18003,7 @@ _ACEOF
1800318003
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1800418004
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1800518005
ac_cs_version="\\
18006-
PythonMagick config.status 0.9.13
18006+
PythonMagick config.status 0.9.14
1800718007
configured by $0, generated by GNU Autoconf 2.69,
1800818008
with options \\"\$ac_cs_config\\"
1800918009

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Process this file with autoconf to produce a configure script.
33

44
AC_PREREQ(2.69)
5-
AC_INIT([PythonMagick],[0.9.13],[],[PythonMagick])
5+
AC_INIT([PythonMagick],[0.9.14],[],[PythonMagick])
66
AC_CONFIG_SRCDIR([pythonmagick_src/_PathLinetoAbs.cpp])
77
AC_CONFIG_AUX_DIR([config])
88
AC_CONFIG_MACRO_DIR([m4])

pythonmagick_src/_Blob.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ void Export_pyste_src_Blob()
2727
.def("__init__", &update_wrapper)
2828
.def(init< const Magick::Blob& >())
2929
.def("base64", (void (Magick::Blob::*)(const std::string) )&Magick::Blob::base64)
30+
#if MagickLibVersion < 0x700
3031
.def("base64", (std::string (Magick::Blob::*)() )&Magick::Blob::base64)
32+
#else
33+
.def("base64", (std::string (Magick::Blob::*)() const )&Magick::Blob::base64)
34+
#endif
3135
.def("update", &update_wrapper)
3236
.def("updateNoCopy", &updateNoCopy_wrapper)
3337
.def("length", &Magick::Blob::length)

pythonmagick_src/_Color.cpp

+16-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ void Export_pyste_src_Color()
1818
.def(init< const std::string& >())
1919
.def(init< const char* >())
2020
.def(init< const Magick::Color& >())
21+
#if MagickLibVersion < 0x700
2122
.def(init< const MagickCore::PixelPacket& >())
2223
.def("redQuantum", (void (Magick::Color::*)(MagickCore::Quantum) )&Magick::Color::redQuantum)
2324
.def("redQuantum", (MagickCore::Quantum (Magick::Color::*)() const)&Magick::Color::redQuantum)
@@ -29,22 +30,34 @@ void Export_pyste_src_Color()
2930
.def("alphaQuantum", (MagickCore::Quantum (Magick::Color::*)() const)&Magick::Color::alphaQuantum)
3031
.def("alpha", (void (Magick::Color::*)(double) )&Magick::Color::alpha)
3132
.def("alpha", (double (Magick::Color::*)() const)&Magick::Color::alpha)
32-
.def("isValid", (void (Magick::Color::*)(bool) )&Magick::Color::isValid)
33-
.def("isValid", (bool (Magick::Color::*)() const)&Magick::Color::isValid)
3433
.def("intensity", &Magick::Color::intensity)
3534
.def("scaleDoubleToQuantum", &Magick::Color::scaleDoubleToQuantum)
3635
.def("scaleQuantumToDouble", (double (*)(const MagickCore::Quantum))&Magick::Color::scaleQuantumToDouble)
3736
.def("scaleQuantumToDouble", (double (*)(const double))&Magick::Color::scaleQuantumToDouble)
3837
.staticmethod("scaleDoubleToQuantum")
3938
.staticmethod("scaleQuantumToDouble")
39+
.def("to_MagickCore_PixelPacket", &Magick::Color::operator MagickCore::PixelPacket)
40+
#else
41+
.def(init< const MagickCore::PixelInfo& >())
42+
.def("quantumRed", (void (Magick::Color::*)(MagickCore::Quantum) )&Magick::Color::quantumRed)
43+
.def("quantumRed", (MagickCore::Quantum (Magick::Color::*)() const)&Magick::Color::quantumRed)
44+
.def("quantumGreen", (void (Magick::Color::*)(MagickCore::Quantum) )&Magick::Color::quantumGreen)
45+
.def("quantumGreen", (MagickCore::Quantum (Magick::Color::*)() const)&Magick::Color::quantumGreen)
46+
.def("quantumBlue", (void (Magick::Color::*)(MagickCore::Quantum) )&Magick::Color::quantumBlue)
47+
.def("quantumBlue", (MagickCore::Quantum (Magick::Color::*)() const)&Magick::Color::quantumBlue)
48+
.def("quantumAlpha", (void (Magick::Color::*)(MagickCore::Quantum) )&Magick::Color::quantumAlpha)
49+
.def("quantumAlpha", (MagickCore::Quantum (Magick::Color::*)() const)&Magick::Color::quantumAlpha)
50+
.def("to_MagickCore_PixelInfo", &Magick::Color::operator MagickCore::PixelInfo)
51+
#endif
52+
.def("isValid", (void (Magick::Color::*)(bool) )&Magick::Color::isValid)
53+
.def("isValid", (bool (Magick::Color::*)() const)&Magick::Color::isValid)
4054
.def( self > self )
4155
.def( self < self )
4256
.def( self == self )
4357
.def( self != self )
4458
.def( self <= self )
4559
.def( self >= self )
4660
.def("to_std_string", &Magick::Color::operator std::string)
47-
.def("to_MagickCore_PixelPacket", &Magick::Color::operator MagickCore::PixelPacket)
4861
;
4962

5063
implicitly_convertible<std::string,Magick::Color>();}

pythonmagick_src/_ColorspaceType.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ void Export_pyste_src_ColorspaceType()
3030
.value("HSBColorspace", MagickCore::HSBColorspace)
3131
.value("HSLColorspace", MagickCore::HSLColorspace)
3232
.value("HWBColorspace", MagickCore::HWBColorspace)
33+
#if MagickLibVersion < 0x700
3334
.value("Rec601LumaColorspace", MagickCore::Rec601LumaColorspace)
35+
#endif
3436
.value("Rec601YCbCrColorspace", MagickCore::Rec601YCbCrColorspace)
37+
#if MagickLibVersion < 0x700
3538
.value("Rec709LumaColorspace", MagickCore::Rec709LumaColorspace)
39+
#endif
3640
.value("Rec709YCbCrColorspace", MagickCore::Rec709YCbCrColorspace)
3741
.value("LogColorspace", MagickCore::LogColorspace)
3842
.value("CMYColorspace", MagickCore::CMYColorspace)

pythonmagick_src/_CompositeOperator.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ void Export_pyste_src_CompositeOperator()
3131
.value("DarkenCompositeOp", MagickCore::DarkenCompositeOp)
3232
.value("OverlayCompositeOp", MagickCore::OverlayCompositeOp)
3333
.value("CopyYellowCompositeOp", MagickCore::CopyYellowCompositeOp)
34+
#if MagickLibVersion < 0x700
3435
.value("MinusCompositeOp", MagickCore::MinusCompositeOp)
36+
#else
37+
.value("MinusDstCompositeOp", MagickCore::MinusDstCompositeOp)
38+
.value("MinusSrcCompositeOp", MagickCore::MinusSrcCompositeOp)
39+
#endif
3540
.value("UndefinedCompositeOp", MagickCore::UndefinedCompositeOp)
3641
.value("HueCompositeOp", MagickCore::HueCompositeOp)
3742
.value("DstOutCompositeOp", MagickCore::DstOutCompositeOp)
@@ -45,18 +50,31 @@ void Export_pyste_src_CompositeOperator()
4550
.value("SrcInCompositeOp", MagickCore::SrcInCompositeOp)
4651
.value("CopyCompositeOp", MagickCore::CopyCompositeOp)
4752
.value("DstOverCompositeOp", MagickCore::DstOverCompositeOp)
53+
#if MagickLibVersion < 0x700
4854
.value("CopyOpacityCompositeOp", MagickCore::CopyOpacityCompositeOp)
55+
#else
56+
.value("CopyAlphaCompositeOp", MagickCore::CopyAlphaCompositeOp)
57+
#endif
4958
.value("ColorBurnCompositeOp", MagickCore::ColorBurnCompositeOp)
5059
.value("DstCompositeOp", MagickCore::DstCompositeOp)
5160
.value("CopyBlueCompositeOp", MagickCore::CopyBlueCompositeOp)
5261
.value("DissolveCompositeOp", MagickCore::DissolveCompositeOp)
5362
.value("MultiplyCompositeOp", MagickCore::MultiplyCompositeOp)
63+
#if MagickLibVersion < 0x700
5464
.value("DivideCompositeOp", MagickCore::DivideCompositeOp)
65+
#else
66+
.value("DivideDstCompositeOp", MagickCore::DivideDstCompositeOp)
67+
.value("DivideSrcCompositeOp", MagickCore::DivideSrcCompositeOp)
68+
#endif
5569
.value("ColorDodgeCompositeOp", MagickCore::ColorDodgeCompositeOp)
5670
.value("SrcOverCompositeOp", MagickCore::SrcOverCompositeOp)
5771
.value("AtopCompositeOp", MagickCore::AtopCompositeOp)
5872
.value("SoftLightCompositeOp", MagickCore::SoftLightCompositeOp)
73+
#if MagickLibVersion < 0x700
5974
.value("AddCompositeOp", MagickCore::AddCompositeOp)
75+
#else
76+
.value("ModulusAddCompositeOp", MagickCore::ModulusAddCompositeOp)
77+
#endif
6078
.value("OverCompositeOp", MagickCore::OverCompositeOp)
6179
.value("SrcCompositeOp", MagickCore::SrcCompositeOp)
6280
.value("ClearCompositeOp", MagickCore::ClearCompositeOp)
@@ -65,7 +83,11 @@ void Export_pyste_src_CompositeOperator()
6583
.value("CopyGreenCompositeOp", MagickCore::CopyGreenCompositeOp)
6684
.value("LightenCompositeOp", MagickCore::LightenCompositeOp)
6785
.value("ReplaceCompositeOp", MagickCore::ReplaceCompositeOp)
86+
#if MagickLibVersion < 0x700
6887
.value("SubtractCompositeOp", MagickCore::SubtractCompositeOp)
88+
#else
89+
.value("ModulusSubtractCompositeOp", MagickCore::ModulusSubtractCompositeOp)
90+
#endif
6991
.value("ColorizeCompositeOp", MagickCore::ColorizeCompositeOp)
7092
.value("CopyRedCompositeOp", MagickCore::CopyRedCompositeOp)
7193
.value("XorCompositeOp", MagickCore::XorCompositeOp)

pythonmagick_src/_Drawable.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ using namespace boost::python;
1515
// Module ======================================================================
1616
void Export_pyste_src_Drawable()
1717
{
18-
class_< Magick::Drawable >("Drawable", init< >())
19-
.def(init< const Magick::DrawableBase& >())
20-
.def(init< const Magick::Drawable& >())
18+
class_< Magick::Drawable >("Drawable", init< >() )
19+
.def(init< const Magick::DrawableBase& >() )
20+
.def(init< const Magick::Drawable& >() )
21+
#if MagickLibVersion < 0x700
2122
.def( self != self )
2223
.def( self == self )
2324
.def( self < self )
2425
.def( self > self )
2526
.def( self <= self )
2627
.def( self >= self )
28+
#endif
2729
;
2830

2931
}

pythonmagick_src/_DrawableDashArray.cpp

+28
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ using namespace boost::python;
1414

1515
namespace {
1616

17+
#if MagickLibVersion < 0x700
18+
1719
struct Magick_DrawableDashArray_Wrapper: Magick::DrawableDashArray
1820
{
1921
Magick_DrawableDashArray_Wrapper(PyObject* py_self_, const double* p0):
@@ -42,4 +44,30 @@ void Export_pyste_src_DrawableDashArray()
4244
;
4345
implicitly_convertible<Magick::DrawableDashArray,Magick::Drawable>();
4446
}
47+
#else
48+
struct Magick_DrawableStrokeDashArray_Wrapper: Magick::DrawableStrokeDashArray
49+
{
50+
Magick_DrawableStrokeDashArray_Wrapper(PyObject* py_self_, const double* p0):
51+
Magick::DrawableStrokeDashArray(p0), py_self(py_self_) {}
52+
53+
Magick_DrawableStrokeDashArray_Wrapper(PyObject* py_self_, const Magick::DrawableStrokeDashArray& p0):
54+
Magick::DrawableStrokeDashArray(p0), py_self(py_self_) {}
55+
56+
57+
PyObject* py_self;
58+
};
59+
60+
61+
}// namespace
62+
63+
64+
// Module ======================================================================
65+
void Export_pyste_src_DrawableStrokeDashArray()
66+
{
67+
class_< Magick::DrawableStrokeDashArray, Magick_DrawableStrokeDashArray_Wrapper >("DrawableStrokeDashArray", init< const double* >())
68+
.def(init< const Magick::DrawableStrokeDashArray& >())
69+
;
70+
implicitly_convertible<Magick::DrawableStrokeDashArray,Magick::Drawable>();
71+
}
4572

73+
#endif

pythonmagick_src/_DrawableDashOffset.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// Using =======================================================================
1313
using namespace boost::python;
1414

15+
#if MagickLibVersion < 0x700
1516
namespace {
1617

1718
struct Magick_DrawableDashOffset_Wrapper: Magick::DrawableDashOffset
@@ -36,4 +37,29 @@ void Export_pyste_src_DrawableDashOffset()
3637
;
3738
implicitly_convertible<Magick::DrawableDashOffset,Magick::Drawable>();
3839
}
40+
#else
41+
namespace {
42+
43+
struct Magick_DrawableStrokeDashOffset_Wrapper: Magick::DrawableStrokeDashOffset
44+
{
45+
Magick_DrawableStrokeDashOffset_Wrapper(PyObject* py_self_, const double p0):
46+
Magick::DrawableStrokeDashOffset(p0), py_self(py_self_) {}
47+
48+
49+
PyObject* py_self;
50+
};
51+
3952

53+
}// namespace
54+
55+
56+
// Module ======================================================================
57+
void Export_pyste_src_DrawableStrokeDashOffset()
58+
{
59+
class_< Magick::DrawableStrokeDashOffset, boost::noncopyable, Magick_DrawableStrokeDashOffset_Wrapper >("DrawableStrokeDashOffset", init< const double >())
60+
.def("offset", (void (Magick::DrawableStrokeDashOffset::*)(const double) )&Magick::DrawableStrokeDashOffset::offset)
61+
.def("offset", (double (Magick::DrawableStrokeDashOffset::*)() const)&Magick::DrawableStrokeDashOffset::offset)
62+
;
63+
implicitly_convertible<Magick::DrawableStrokeDashOffset,Magick::Drawable>();
64+
}
65+
#endif

pythonmagick_src/_DrawableMatte.cpp

+32
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
// Using =======================================================================
1313
using namespace boost::python;
1414

15+
#if MagickLibVersion < 0x700
1516
namespace {
1617

18+
1719
struct Magick_DrawableMatte_Wrapper: Magick::DrawableMatte
1820
{
1921
Magick_DrawableMatte_Wrapper(PyObject* py_self_, double p0, double p1, MagickCore::PaintMethod p2):
@@ -40,4 +42,34 @@ void Export_pyste_src_DrawableMatte()
4042
;
4143
implicitly_convertible<Magick::DrawableMatte,Magick::Drawable>();
4244
}
45+
#else
46+
namespace {
47+
48+
49+
struct Magick_DrawableAlpha_Wrapper: Magick::DrawableAlpha
50+
{
51+
Magick_DrawableAlpha_Wrapper(PyObject* py_self_, double p0, double p1, MagickCore::PaintMethod p2):
52+
Magick::DrawableAlpha(p0, p1, p2), py_self(py_self_) {}
53+
54+
55+
PyObject* py_self;
56+
};
4357

58+
59+
}// namespace
60+
61+
62+
// Module ======================================================================
63+
void Export_pyste_src_DrawableAlpha()
64+
{
65+
class_< Magick::DrawableAlpha, boost::noncopyable, Magick_DrawableAlpha_Wrapper >("DrawableAlpha", init< double, double, MagickCore::PaintMethod >())
66+
.def("x", (void (Magick::DrawableAlpha::*)(double) )&Magick::DrawableAlpha::x)
67+
.def("x", (double (Magick::DrawableAlpha::*)() const)&Magick::DrawableAlpha::x)
68+
.def("y", (void (Magick::DrawableAlpha::*)(double) )&Magick::DrawableAlpha::y)
69+
.def("y", (double (Magick::DrawableAlpha::*)() const)&Magick::DrawableAlpha::y)
70+
.def("paintMethod", (void (Magick::DrawableAlpha::*)(MagickCore::PaintMethod) )&Magick::DrawableAlpha::paintMethod)
71+
.def("paintMethod", (MagickCore::PaintMethod (Magick::DrawableAlpha::*)() const)&Magick::DrawableAlpha::paintMethod)
72+
;
73+
implicitly_convertible<Magick::DrawableAlpha,Magick::Drawable>();
74+
}
75+
#endif

pythonmagick_src/_FilterTypes.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@
1010
using namespace boost::python;
1111

1212
// Module ======================================================================
13+
#if MagickLibVersion < 0x700
1314
void Export_pyste_src_FilterTypes()
1415
{
1516
enum_< MagickCore::FilterTypes >("FilterTypes")
17+
#else
18+
void Export_pyste_src_FilterType()
19+
{
20+
enum_< MagickCore::FilterType >("FilterType")
21+
#endif
1622
.value("BesselFilter", MagickCore::BesselFilter)
1723
.value("QuadraticFilter", MagickCore::QuadraticFilter)
1824
.value("BartlettFilter", MagickCore::BartlettFilter)

0 commit comments

Comments
 (0)