Conversation
7d43b9e to
e0e1213
Compare
|
Hi @jtanx, git clone https://github.com/fontforge/fontforge; cd fontforge; mkdir build; cd build'&&' actually means fork and run in parallel while ';' means run sequentially afterwards. Next, this is an error which reflects packaging # Sigh, the old build system checks for the non-existant LibSpiroGetVersionYou'll want to add code to differentiate the recent 20190731 release from the older versions of libspiro that don't have it. FontForge has had code that uses this instruction since 2015. |
I don't know what interpreter you're using, but that's plain wrong with bash and cmd. Please read this.
See, this would be a non-issue if the version was just added to the header, as I previously mentioned, and which could have easily been done before 20190731 was cut. Now I have to go and add yet more of these dumb feature detection methods. |
|
My error, you're right, I was thinking '&' which had to be fixed elsewhere for something else.
At this point, version control is all in one place : at the top of configure.ac libuninameslist has version numbers in the header - let's see your improvement. |
That's moot, because that's not accessible from the header.
I don't understand why it doesn't just have But anyway, assuming Of course, that doesn't help with older versions, which was why it should have been included in the last libspiro release. Looking at that code, we should probably clean it up anyway and just drop support for older versions of libspiro/libuninameslist. |
|
I was looking forward to your solution using headers or packaging, etc. with libuninameslist I guess I'll have to accept you at least removed the inflammatory comments. |
|
I suggest folding libuninameslist into FontForge, dropping support for external library and simplifying the code. The library is nit used by anything else, so all this complexity is not warranted. I’d go even further and suggest doing this for libspiro, but it seems to have at least one user other than FontForge, so that might be a controversial decision. |
I’m working on this. |
|
Yeah, that's actually not a bad idea, nice. |
1d20b9d to
c2c1a5f
Compare
|
Are there any other questions/concerns/comments about this? Otherwise I'd like to look at getting this in soon. |
|
I tried it today while working on other stuff and actually quite like it. So, no negative comment, only a positive one in support :-) |
|
I did a code review that wasn't conclusive either way, which basically means I didn't see any problems but wasn't confident enough to offer an assessment. Given that this is build infrastructure it seems to me that there are two conventional ways of going:
I'm happy to "vote" for option 2 in this case. |
|
Alright, option 2 works for me too. If there really are no further comments on this, then I'll be looking at merging this in a day or two. @frank-trampe, still waiting for details on how that ppa works, so that Packaging can be updated. |
|
Great! A bonus of this is that I don't think my This might be why: [fred@pc fontforge]$ ls -alh bin/fontforge # With cmake
-rwxr-xr-x 1 fred fred 15M Aug 15 16:21 bin/fontforge
[fred@pc fontforge]$ ls -alh `which fontforge` # Autotools build
-rwxr-xr-x 1 root root 57K Aug 9 19:51 /usr/local/bin/fontforge |
Yeah, this is because cmake actually sets the RPATH properly (and changes it again when it gets installed). So it's always looking for the right dll when you invoke it from the build folder |
|
(My #!/bin/sh
DIR=bin # Change to `fontforgeexe` for autotools builds
libtool --mode=execute gdb -ex "run ${1@Q}" $DIR/fontforge) |
|
Sorry, commented before seeing yours! That makes sense. |
|
I just found out about the switch and I think it's great! Thank you for this! I always cheer when autotools are removed from something. I took the liberty to edit the Wiki build instructions slightly to make them more cmake-y. |
CMake build system
This replaces the autotools build system with CMake. Details on usage may be found here on the wiki.
The minimum requirement is CMake 3.5. It only supports Python 3.
It is more or less feature complete, with a couple of caveats, so I think it's about time to open this up to others to try, and also for feedback on it.
The only major exclusion compared to autotools is it does not install headers and pkgconfig details. While it is certainly possible to mimic the old behaviour, I'm not seeing much reason to make libfontforge something that can be developed against. As seen in #3823, FontForge isn't well designed to be used in external projects, and we provide no stability guarantees over what is effectively internal interfaces. I doubt that we even export all required headers at the moment.
I have confirmed it builds on CI. It has more than halved the build time for Windows, and there are substantial benefits on Linux and MacOS too. It's now a matter of diminishing returns, as the time to install dependencies becomes more a more significant portion than building FontForge itself.
Somewhat more importantly for me, incremental builds are now super quick, which makes development just so much more enjoyable.
The only other part that is missing is fixing up the Deb/RPM packaging that we bundle. I think only the Debian packaging is still relevant, since that's all we use for the PPA. But as I have no insight into how the PPA functions, or how the packages are built, it's a bit hard for me to make the appropriate changes - @frank-trampe I'd appreciate your help with this.
Type of change
Related issues: #3512
Edit: On the diffstat, around 50% of the added lines is just backported modules copied from CMake 3.14.