Skip to content
Snippets Groups Projects
Commit 923e88a0 authored by Manuel Günther's avatar Manuel Günther
Browse files

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

parent c8ca9cdd
Branches
Tags
1 merge request!41Resolve "versions of image libraries are evaluated by hand and given as parameters on the compiler command line"
Pipeline #
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
*/ */
#ifdef HAVE_LIBJPEG #ifdef HAVE_LIBJPEG
static PyObject* libjpeg_version() { static PyObject* libjpeg_version() {
boost::format f("%d (compiled with %d bits depth)"); boost::format f("%d.%d (compiled with %d bits depth)");
f % LIBJPEG_VERSION % BITS_IN_JSAMPLE; f % JPEG_LIB_VERSION_MAJOR % JPEG_LIB_VERSION_MINOR % BITS_IN_JSAMPLE;
return Py_BuildValue("s", f.str().c_str()); return Py_BuildValue("s", f.str().c_str());
} }
#endif #endif
...@@ -89,13 +89,9 @@ ...@@ -89,13 +89,9 @@
*/ */
#ifdef HAVE_GIFLIB #ifdef HAVE_GIFLIB
static PyObject* giflib_version() { static PyObject* giflib_version() {
#ifdef GIFLIB_VERSION
return Py_BuildValue("s", GIFLIB_VERSION);
#else
boost::format f("%s.%s.%s"); boost::format f("%s.%s.%s");
f % BOOST_PP_STRINGIZE(GIFLIB_MAJOR) % BOOST_PP_STRINGIZE(GIFLIB_MINOR) % BOOST_PP_STRINGIZE(GIFLIB_RELEASE); f % BOOST_PP_STRINGIZE(GIFLIB_MAJOR) % BOOST_PP_STRINGIZE(GIFLIB_MINOR) % BOOST_PP_STRINGIZE(GIFLIB_RELEASE);
return Py_BuildValue("s", f.str().c_str()); return Py_BuildValue("s", f.str().c_str());
#endif
} }
#endif #endif
......
...@@ -127,7 +127,6 @@ class jpeg: ...@@ -127,7 +127,6 @@ class jpeg:
def macros(self): def macros(self):
return [ return [
('HAVE_%s' % self.name.upper(), '1'), ('HAVE_%s' % self.name.upper(), '1'),
('%s_VERSION' % self.name.upper(), '"%s"' % self.version),
] ]
def libtiff_version(header): def libtiff_version(header):
...@@ -223,7 +222,6 @@ class tiff: ...@@ -223,7 +222,6 @@ class tiff:
def macros(self): def macros(self):
return [ return [
('HAVE_%s' % self.name.upper(), '1'), ('HAVE_%s' % self.name.upper(), '1'),
('%s_VERSION' % self.name.upper(), '"%s"' % self.version),
] ]
def libgif_version(header): def libgif_version(header):
...@@ -325,7 +323,6 @@ class gif: ...@@ -325,7 +323,6 @@ class gif:
def macros(self): def macros(self):
return [ return [
('HAVE_%s' % self.name.upper(), '1'), ('HAVE_%s' % self.name.upper(), '1'),
('%s_VERSION' % self.name.upper(), '"%s"' % self.version),
] ]
jpeg_pkg = jpeg() jpeg_pkg = jpeg()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment