Re: [Svxlink-devel] Libsigc++ Dependency
Brought to you by:
sm0svx
From: Felix L. <fel...@gm...> - 2011-07-24 12:13:55
|
Hello, Here is a patch porting 'svxlink' to libsigc++-2.0. It is based on 'autoconf' but any recent branch should work. Just the hunk for 'configure.ac' will fail. Please instruct your build system to use libsigc++-2.0. A couple of words of caution: 1. A name conflict with glibc makes it necessary to specify the namespace for 'ptr_fun()' explicitly as 'sigc::ptr_fun()'. 2. To avoid a more comprehensive conflict in files using Qt, <sigc++/sigc++.h> must be included before any Qt header files. That is easily accomplished by placing, near the top of each file: #include <sigc++/sigc++.h> Unfortunately, I could not figure out how to get that into 'MainWindowBase.ui', which is a file generated by Qt Designer. Including the line <include location="global" impldecl="in implementation">sigc++/sigc++.h</include> in the appropriate section did not help, as the include directive is placed second, after 'qvariant.h'. The file 'MainWIndowBase.ui.h' is also included too late. For now one has to patch 'MainWindowBase.h' or simply 'MainWindowBase.uic.cpp'. Accordingly, please run 'make' until 'MainWindowBase.uic.cpp' has been built (the file name may be different under the standard build system). Then place the include directive near the top of that file, and run 'make' again. Perhaps an experienced Qt hand can perform the 'coup de grace'. It could be a fast-earned prize of honor! As a side note, this patch makes the change to sigc++-2.0 permanent. Earlier attempts to make it optional were stymied as 'moc' stumbled on preprocessor directives in QOBJECT class definitions. It occurred to me we could run the preprocessor before 'moc', but then Tobias gave his OK to just go ahead and port it. Regards, Felix, WU8K > ---------- Forwarded message ---------- > From: Tobias Blomberg <sm...@us...> > To: Discussions about development issues <svx...@li...> > Date: Thu, 14 Jul 2011 20:44:23 +0200 > Subject: Re: [Svxlink-devel] Libsigc++ Dependency > On Thursday 14 July 2011 14.32.01 Felix Lechner wrote: > > Hello, > > > > When packaging for Ubuntu, I also noticed the somewhat unusual > > dependency on libsigc++ version 1.2. > > > > I tried to port to libsigc++ version 2.0 by using preprocessor defines > > (to make the change optional) but ran into problems with the Qt Meta > > Object Compiler. > > You don't have to make it an option. If you get it to work with 2.0 I see no > reason to stick with 1.2. > > As I wrote in a previous mail I think I also encountered the same Qt vs. > Sigc++2 issue when trying to port it some years ago. Maybe it's worth a new > try. > > 73's de SM0SVX / Tobias > > > > In particular, it seemed to me that the base class SigC::Object should > > be changed to sigc::trackable throughout. Unfortunately, 'moc' did > > not deal gently with preprocessor directives in the class definition. > > > > Regards, > > Felix > > > > On Mon, Jul 11, 2011 at 12:32:05PM +0200, steve-k@... wrote: > > > Hi, > > > > > > there are mainly three options to get svxlink working with sigc++: > > > > > > - compile and install sigc++ 1.2 from souce, when no longer available > > > > > > as part of a distribution > > > > > > - port svxlink to sigc++ 2.x > > > - integrate relevant parts of sigc++ 1.2 into svxlink and remove external > > > > > > sigc++ dependence > > > > > > I've tried the latter options and did not find it too complicated (C++ > > > templates), but did not check it into SVN. The final decision can only > > > be made by Tobias. > > > > I was asking it for our distribution. I am a packager of svxlink for > > Pardus. Mainly, we do not want to keep 2 versions of a library in > > official repository. So, if (currently) is possible to use Svxlink with > > newer sigc++ without any problems, I would very like to use it. However, > > if newer sigc++ is not intended and it does not work stable, we would > > make an exception in our repository. > > > > > 73s Steve, DH1DM > > > > Regards, |