-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add harfbuzz library #115
Add harfbuzz library #115
Conversation
Testing it now. It seems that Anyway, my test code is here (based on a project by @sharkwouter), so if anyone wants to try and test this library, it should be a good start. |
So for threads we have pthreads, which is also used in C++ by threads. You can find the source here: https://github.com/pspdev/pthread-embedded/tree/platform_agnostic |
So, I installed both sdl2-ttf and harfbuzz from the automated build and this is the result I got:
|
My bad, for some reason on Ubuntu CMake is okay with "Harfbuzz" package, but for PSP it requires lowercase "harfbuzz". Not sure why CMake behaves differently, but I have updated CMakeLists.txt now. |
Two more things that are unwanted are these warnings:
Possibly something is not right during |
I have actually compiled my example and run it in an emulator. Here's the patch that I needed: --- /usr/local/pspdev/psp/lib/cmake/harfbuzz/harfbuzzConfig.cmake
+++ harfbuzzConfig.cmake
@@ -59,8 +59,8 @@
add_library(harfbuzz::harfbuzz STATIC IMPORTED)
set_target_properties(harfbuzz::harfbuzz PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "/harfbuzz"
- INTERFACE_LINK_LIBRARIES "Threads::Threads;/usr/local/pspdev/psp/lib/libfreetype.a"
+ INTERFACE_INCLUDE_DIRECTORIES "/usr/local/pspdev/psp/include/harfbuzz"
+ INTERFACE_LINK_LIBRARIES "/usr/local/pspdev/psp/lib/libfreetype.a;/usr/local/pspdev/psp/lib/libpng.a;/usr/local/pspdev/psp/lib/libz.a;/usr/local/pspdev/psp/lib/libbz2.a"
)
if(CMAKE_VERSION VERSION_LESS 2.8.12) |
Not sure if you're still working on this, but you can add the patch to this repo, no problem. For an example you could look at SDL2. |
@sharkwouter I will add the patch, I think it is still missing threads. It's just the example that is not using them, but anything that relies on threads would fail. It shouldn't be hard to add. I can probably finalize this later today, and then try to link SDL2_ttf against harfbuzz. |
|
I think the cmake file containing direct references to full paths is normal, since we have that for more packages but it does not seem to cause problems. I've added a patch which fixes the issue with it trying to link to threads. Hope that helps. I would not try to fix references to the srcdir in .a files. |
Can you add hardbuzz as a dependency for freetype? That is still missing. |
Yes, if this fix is okay with you, then it's fine with me as well. I think harfbuzz should also be added as a dependency for SDL2_ttf, I'll see if it builds and works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you still add harfbuzz as dependency for sdl2_ttf?
Sure, I can do it as a part of this pull request as well. |
Let's see if this test still fails when SDL2-ttf is built with harfbuzz: #45 (comment) Needs to be tested on real hardware, but at least it works on emulator: |
@sharkwouter I would probably still add this patch to |
I added a fix for psp-pkg-conf outputting something that does not work. I'm testing now. |
@tpimh the fix-cmake patch file already addresses this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a dependency loop. Harfbuzz relies on Freetype2 and Freetype2 relies on Harfbuzz. Our build script cannot handle that.
What can we do with this? Does it have to be like this?
The fix-cmake patch only removes "Threads::Threads" from I can remove harfbuzz dependency from freetype2, and sdl2-ttf should still build fine. Need to check how other distros handle such circular dependencies. |
f1981a3
to
69a0db0
Compare
Even after removing the circular dependency, the build system was not able to build the package without extra complications.
|
Thanks! |
Again, I haven't yet tested if it works, so I am creating this PR as a draft. Just want to know if anything should be changed.