[MacPorts] #42710: digikam 3.5 not compiling with jpeg @9a_0
MacPorts
noreply at macports.org
Mon Mar 10 20:16:30 PDT 2014
#42710: digikam 3.5 not compiling with jpeg @9a_0
------------------------+--------------------------------
Reporter: jul_bsd@… | Owner: macports-tickets@…
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version: 2.2.1
Resolution: | Keywords:
Port: digikam |
------------------------+--------------------------------
Changes (by ryandesign@…):
* status: closed => reopened
* resolution: fixed =>
Comment:
Replying to [comment:4 ryandesign@…]:
> Hopefully fixed in r117626.
A developer of jpeg says jpeg 9a is correct, and digikam is in error. So
in the future I will remove this patch from jpeg, and digikam should be
changed instead:
{{{
From: Guido Vollbeding <guido at jpegclub.org>
Subject: Re: Build failures with jpeg 9a
Date: March 6, 2014 at 07:07:17 CST
To: Ryan Schmidt <ryandesign at macports.org>
Dear Ryan
Thank you for feedback.
In version 9 we changed to a more reliable definition of the 'boolean'
type (in file jmorecfg.h).
This may cause conflicts with applications which do not comply with the
specified application programming interface (the digikam issue is such
a case).
In other cases, it may be necessary to use the HAVE_BOOLEAN mechanism,
if application insists on using their own type.
We have improved the situation in 9a, but some cases remain which can
only be fixed in application code.
Our suggestion is that software developers be notified to correct or
adapt their programs appropriately.
I have done this with the libjpeg maintainer of the Debian Linux
distribution, in which course we went through a batch of cases which
were affected by the issue, and I offered respective solutions.
Your cases were part of the batch:
digikam:
If "true" is a variable of int type, then using an explicit typecast
"(boolean)true" fixes the issue.
If "true" means a constant of some other bool type, then using TRUE
instead fixes the issue.
The libjpeg API specifies the type "boolean" here with values TRUE
or FALSE, and everything else is an error and always was.
swftools-0.9.2 defines following:
lib/jpeg.c:
#ifdef HAVE_JPEGLIB
#define HAVE_BOOLEAN
#include <jpeglib.h>
The interpretation of HAVE_BOOLEAN has been changed in new library,
which now means that both the type AND the corresponding values are
defined, which is more general and consistent.
Modifying the place where boolean is defined or changing at this place to
#ifdef HAVE_JPEGLIB
#ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define HAVE_BOOLEAN
#include <jpeglib.h>
should make it work with either version of libjpeg.
Any other issues should be variations of these and could be resolved
similarly. If you have particular problem please let me know and I
will look at it.
Regards
Guido Vollbeding
Organizer Independent JPEG Group
}}}
--
Ticket URL: <https://trac.macports.org/ticket/42710#comment:6>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list