FS#36757 - [mtpaint] Dependencies
Attached to Project:
Community Packages
Opened by Mark Tyler (mt) - Saturday, 31 August 2013, 18:05 GMT
Last edited by Alexander F. Rødseth (xyproto) - Tuesday, 03 September 2013, 19:46 GMT
Opened by Mark Tyler (mt) - Saturday, 31 August 2013, 18:05 GMT
Last edited by Alexander F. Rødseth (xyproto) - Tuesday, 03 September 2013, 19:46 GMT
|
Details
mtPaint 3.40-10 has been built with a dependency on libjpeg,
so that also needs to be added as an explicit dependency in
PKGBUILD. Likewise, libtiff, libpng and freetype2 are also
dependencies too.
The dependency list contains a reference to jasper, but the command readelf says that no such dependency exists for this binary (jasper is just optional at compile time). libpng15.patch is not required any more for version 3.40 as Dmitry has put some code into png.c to resolve this issue at compile time. In the PKGBUILD file it may be worth explicitly using "lcms2" and "jp2" as configure script arguments (just as has been done with "gif jpeg tiff"). If you use "GIF" as a configure script argument instead of "gif" you don't need to use these lines in PKGBUILD: sed -i 's:-lpng:-lpng -lgif:' _conf.txt sed -i 's:ungif:gif:g' _conf.txt |
This task depends upon
Closed by Alexander F. Rødseth (xyproto)
Tuesday, 03 September 2013, 19:46 GMT
Reason for closing: Fixed
Tuesday, 03 September 2013, 19:46 GMT
Reason for closing: Fixed
I noticed that you are patching the original source code with this line:
sed -i 's:openjpeg.h:openjpeg-1.5/openjpeg.h:' src/png.c
You can achieve the same thing by using this in the CFLAGS environment variable:
pkg-config libopenjpeg --cflags
Using sed to patch source code achieves the same thing, but sed is a blunt instrument and could cause unintended problems that pkg-config is designed to avoid.
On the subject of CFLAGS, I noticed this line in PKGBUILD:
export CFLAGS="`pkg-config gtk+-2.0 --cflags` $CFLAGS"
I think this could this be changed to this:
export CFLAGS="`pkg-config libopenjpeg --cflags` $CFLAGS"
The configure line could then be:
./configure --prefix=/usr --mandir=/usr/share/man man intl GIF jpeg tiff cflags
The cflags argument at the end is needed to force the configure script to use the CFLAGS environment variable.
Lastly, just out of curiosity, why did you decide to suppress compiler warnings with "gcc -w"?
mtpaint was a package I adopted from someone else, so many of the choices that have been made in the PKGBUILD have not originally been mine.
"gcc -w" was just to make the build process less noisy when building the package. Most users will install the pre-compiled mtpaint package, so this is mostly for package maintainers (or people building mtpaint themselves, in which case they may have several things they wish to change. They can change the configure and compilation flags as they desire.)
Thanks for creating mtpaint in the first place as well. :)