[sword-devel] ICU 61+ and SWIG build improvements

Greg Hellings greg.hellings at gmail.com
Wed Jul 11 22:04:53 MST 2018


Hi everyone!

ICU 62 just landed in Fedora's Rawhide, which means that I've been forced
to deal with the failure of the library to build against ICU 61+ that
others have addressed. I have worked up a patch to the CMake system that
detects when ICU is higher than version 61 and handles that condition
appropriately. In doing so, I rely on the much newer FindICU.cmake file
included in upstream CMake. This bumps the minimum version of CMake needed
up to version 3.7. This is fine everywhere in the RHEL/CentOS/Fedora world.
It will run into some issues on the oldest LTS versions of Ubuntu still
hanging around. I'm not sure anyone is building for that ancient system
anyway. If you are, be forewarned you'll have issues. Here is my proposed
diff that's landing in Fedora for now and I'll land it into SVN if no one
crows about it:
https://src.fedoraproject.org/rpms/sword/blob/master/f/sword-1.8.1-icu61.diff

Also, Fedora is getting ready to make the switch away from having Python 2
installed by default (Fedora 29) and is planning to deprecate all Python 2
versions sometime thereafter (Fedora 30? 31?). In the meantime, we're
dealing with dual stack Python 2 and 3 versions in parallel, and we have
been for a long time. I've been ignoring this since it started, only
shipping Python 2 bindings. I'm now getting ready to ship Python 2 AND 3
bindings as options in Fedora 28+. As such, I've worked up a patch that
revamps how Python bindings are compiled in the CMake version of the
library. Most of what happens was just down to parameterizing out a few
places where the executable name was hard-coded and allowing two copies to
be built in parallel. However, I also re-worked the CLI options.
Previously, if you wanted to build Python bindings you had to pass
-DSWORD_BINDINGS="Python" to the CMake call. Similarly, if you wanted to
build Perl bindings, you would do -DSWORD_BINDINGS="Perl". You would do
="Python Perl" if you wanted both. With this new patch, the options are now
boolean flags, and there are separate ones for Python 2, 3, and Perl. So
building for all three Swig targets would look like
-DSWORD_PYTHON_2:BOOL=TRUE -DSWORD_PYTHON_3:BOOL=TRUE -DSWORD_PERL:BOOL=TRUE
The changes for that live here:
https://src.fedoraproject.org/rpms/sword/blob/master/f/sword-1.8.1-swig.diff
.

I'm still working on the finishing touches to both patches, but please
weigh in if you have concerns, advice, or issues with my proposed changes.

--Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20180712/ceb54c2a/attachment.html>


More information about the sword-devel mailing list