On Mon, Feb 18, 2019 at 1:24 PM Thomas Jarosch <[email protected]>
wrote:
> Hello Richard,
>
> thanks for the patch! I've taken it as basis and refined it a bit further.
>
> Some comments:
>
> You wrote on Sun, Feb 17, 2019 at 09:02:38AM -0600:
> > $ cat libftdi-cmake_swig.patch
> > --- a/python/CMakeLists.txt
> > +++ b/python/CMakeLists.txt
> > @@ -1,3 +1,7 @@
> > +# swig_add_module is deprecated and SWIG_MODULE_<target>_REAL_NAME is no
> > +# longer set by default so set policy to the old behavior.
> > +cmake_policy(SET CMP0078 OLD)
> > +
>
> this needs a CMAKE_VERSION guard since CMP0078 exists in cmake 3.13+ only.
>
Yeah, I figured it might, I was just going for a quick and dirty version to
get it building again on Rawhide.
> > option ( PYTHON_BINDINGS "Build python bindings via swig" ON )
> > option ( LINK_PYTHON_LIBRARY "Link against python libraries" ON )
> >
> > @@ -24,8 +28,9 @@ if ( SWIG_FOUND AND PYTHONLIBS_FOUND AND
> >
> > if ( DOCUMENTATION AND DOXYGEN_FOUND )
> > set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND})
> > + set_property(SOURCE ftdi1.i PROPERTY DEPENDS ftdi1_doc.i)
>
> I've dropped this part. Fedora uses the outdated libftdi 1.3,
> the cmake files were improved in the 1.4 release a lot.
>
Yeah, I saw the new release. I'm not the main package maintainer but I did
look at what it would take to update, there's a fair number of packages
affected so I plan to look at that over the next couple of weeks.
> I've spotted this in there:
>
> add_dependencies( ${SWIG_MODULE_ftdi1_REAL_NAME} doc_i )
>
> so I guess it should already be ok?
>
That might work with older cmake but part of the new method is the
dependency has to be set *before* the swig_add_module/library call.
"Source file properties on module files must be set before the invocation
of the swig_add_library command to specify special behavior of SWIG and
ensure generated files will receive the required settings."
At least I couldn't get it to work until I did that because ftdi1.i kept
trying to link before ftdi1_doc.i was generated.
The updated patch can be found on the "cmake-swig-updates" branch.
> Here's the final patch, I've kept your authorship:
>
> http://developer.intra2net.com/git/?p=libftdi;a=commit;h=f49ee0d141e6a3f467c9054916d2f8876ae22587
>
> Can you test the "cmake-swig-updates" branch on Fedora rawhide?
>
Will do and will let you know. I should have time tonight after $DAYJOB.
I was about to cut a release for libftdi 1.5, so it would be
> nice to know if it still compiles on Fedora rawhide. My own
> workstation runs F29 and it compiles fine there.
>
You can always try out mock, that what I use, lets you build in a chroot
from EL 6->7 to Fedora 28->Rawhide from your F29 machine.
After I check the patch I'll probably wait for 1.5 so I only have to
rebuild all the dependent packages once. Hopefully no major API changes?
Thanks,
Richard
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [email protected]