wjaguar / mtPaint

Mark Tyler's Painting Program
http://mtpaint.sourceforge.net
GNU General Public License v3.0
155 stars 29 forks source link

gtk3 version breaks 3.50.4 and 3.50.5 #52

Closed nunotexbsd closed 3 years ago

nunotexbsd commented 3 years ago

Hello,

I'm maintaining FreeBSD port at version 3.50.3.

I'm trying to update to 3.50.5 but I got this configure error (same with 3.50.4:

`===> Configuring for mtpaint-3.50.05

[: gtk3: bad number GTK+3 versions prior to 3.12 are not and can not be supported ===> Script "configure" failed unexpectedly. Please report the problem to eduardo@FreeBSD.org [maintainer] and attach the "/usr/home/nunotex/Work/freebsd/ports/graphics/mtpaint/work/mtPaint-81ba5f2/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/local/sbin/pkg-static info -g -Ea). *** Error code 1`

gtk3 is at version gtk3-3.24.24

Any hints to fix it?

Thanks,

Nuno Teixeira

wjaguar commented 3 years ago

Thanks for reporting this. Seems incompatibility of BSD and GNU stuff strikes again. :( And if said BSD stuff did at least report the line with error, fixing it would be worlds easier...

Anyway, my guess at this time is the cause is sed command silently (!) failing and doing nothing; see the changes in ./configure in 3.50.04 as to why it is now there. Thus the GTKVERSION variable gets set to "gtk3" and numeric comparison with it fails. If it is what happened, commenting out the line:

GTKVERSION="`echo "$A" | sed -e 's/gtk[23]\.\?\([0-9]*\).*/\1/'`";;

should work as an emergency fix. And replacing it with:

GTKVERSION="`echo "$A" | sed -e 's/gtk[23]\.\{0,1\}\([0-9]*\).*/\1/'`";;

might even really fix the problem

To avoid guessing in the dark, is there a FreeBSD liveCD you can recommend so I could test that stuff?

nunotexbsd commented 3 years ago

Hello!

Thanks for the quick answer and fix!

I've tried 2nd fix GTKVERSION="echo "$A" | sed -e 's/gtk[23].{0,1}([0-9])./\1/'";; and it works! I can compile mtpaint again.

Best way to try FreeBSD is running it in a VM. Look for Virtual Machine Images in:

https://www.freebsd.org/where/

Cheers!

Nuno Teixeira