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
Task Type General Gripe
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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
Comment by Alexander F. Rødseth (xyproto) - Sunday, 01 September 2013, 21:04 GMT
Thanks for reporting, I will fix this.
Comment by Mark Tyler (mt) - Tuesday, 03 September 2013, 18:19 GMT
Thanks for looking into these issues. I spotted a few other things as well, so I thought I would mention them just in case it is helpful in some way.

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"?
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 03 September 2013, 18:45 GMT
Thanks for the advice! I agree that sed is a blunt tool that often is best to be avoided.

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.)

Comment by Alexander F. Rødseth (xyproto) - Tuesday, 03 September 2013, 19:46 GMT
Updated mtpaint. Please reopen this issue, file a new issue or even contact me directly if there should be further issues or room for improvement with the package.

Thanks for creating mtpaint in the first place as well. :)

Loading...