Commit 923e88a0 authored by Manuel Günther's avatar Manuel Günther

Versions are now taken directly from the header files of the libraries

parent c8ca9cdd
Pipeline #20955 passed with stage
in 25 minutes and 49 seconds
......@@ -47,8 +47,8 @@
*/
#ifdef HAVE_LIBJPEG
static PyObject* libjpeg_version() {
boost::format f("%d (compiled with %d bits depth)");
f % LIBJPEG_VERSION % BITS_IN_JSAMPLE;
boost::format f("%d.%d (compiled with %d bits depth)");
f % JPEG_LIB_VERSION_MAJOR % JPEG_LIB_VERSION_MINOR % BITS_IN_JSAMPLE;
return Py_BuildValue("s", f.str().c_str());
}
#endif
......@@ -89,13 +89,9 @@
*/
#ifdef HAVE_GIFLIB
static PyObject* giflib_version() {
#ifdef GIFLIB_VERSION
return Py_BuildValue("s", GIFLIB_VERSION);
#else
boost::format f("%s.%s.%s");
f % BOOST_PP_STRINGIZE(GIFLIB_MAJOR) % BOOST_PP_STRINGIZE(GIFLIB_MINOR) % BOOST_PP_STRINGIZE(GIFLIB_RELEASE);
return Py_BuildValue("s", f.str().c_str());
#endif
}
#endif
......
......@@ -127,7 +127,6 @@ class jpeg:
def macros(self):
return [
('HAVE_%s' % self.name.upper(), '1'),
('%s_VERSION' % self.name.upper(), '"%s"' % self.version),
]
def libtiff_version(header):
......@@ -223,7 +222,6 @@ class tiff:
def macros(self):
return [
('HAVE_%s' % self.name.upper(), '1'),
('%s_VERSION' % self.name.upper(), '"%s"' % self.version),
]
def libgif_version(header):
......@@ -325,7 +323,6 @@ class gif:
def macros(self):
return [
('HAVE_%s' % self.name.upper(), '1'),
('%s_VERSION' % self.name.upper(), '"%s"' % self.version),
]
jpeg_pkg = jpeg()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment