diff options
author | Sam James <sam@gentoo.org> | 2021-12-20 00:36:33 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-12-20 00:48:20 +0000 |
commit | 0d1bf1816e7e2b05f0d9435e2d266272f120d19f (patch) | |
tree | 28165d75d3d9304c2e070191cdf4d66f190a8103 /media-gfx/graphite2 | |
parent | x11-drivers/nvidia-drivers: add 390.147, xorg-21+kernel-5.15 support (diff) | |
download | gentoo-0d1bf1816e7e2b05f0d9435e2d266272f120d19f.tar.gz gentoo-0d1bf1816e7e2b05f0d9435e2d266272f120d19f.tar.bz2 gentoo-0d1bf1816e7e2b05f0d9435e2d266272f120d19f.zip |
media-gfx/graphite2: fix build system (mainly musl build)
- Fix musl build (force in -lssp_nonshared for -nodefaultlibs)
- Fix .cmake install path
Bug: https://bugs.gentoo.org/532408
Closes: https://bugs.gentoo.org/829690
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx/graphite2')
-rw-r--r-- | media-gfx/graphite2/files/graphite2-1.3.14-fix-cmake-files-libdir.patch | 13 | ||||
-rw-r--r-- | media-gfx/graphite2/files/graphite2-1.35-fix-gcc-linking.patch | 18 | ||||
-rw-r--r-- | media-gfx/graphite2/graphite2-1.3.14-r1.ebuild (renamed from media-gfx/graphite2/graphite2-1.3.14.ebuild) | 17 |
3 files changed, 44 insertions, 4 deletions
diff --git a/media-gfx/graphite2/files/graphite2-1.3.14-fix-cmake-files-libdir.patch b/media-gfx/graphite2/files/graphite2-1.3.14-fix-cmake-files-libdir.patch new file mode 100644 index 000000000000..d4ae9846dce4 --- /dev/null +++ b/media-gfx/graphite2/files/graphite2-1.3.14-fix-cmake-files-libdir.patch @@ -0,0 +1,13 @@ +Fix CMake install path. Noticed as part of the SSP patch (which we handle in +the ebuild instead). + +https://git.alpinelinux.org/aports/tree/main/graphite2/cmake.patch?h=3.15-stable +https://bugs.gentoo.org/829690 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -156,4 +152,4 @@ endif() + + + install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin) +-install(EXPORT graphite2 DESTINATION share/graphite2 NAMESPACE gr2_) ++install(EXPORT graphite2 DESTINATION lib${LIB_SUFFIX}/cmake/graphite2 NAMESPACE gr2_) diff --git a/media-gfx/graphite2/files/graphite2-1.35-fix-gcc-linking.patch b/media-gfx/graphite2/files/graphite2-1.35-fix-gcc-linking.patch new file mode 100644 index 000000000000..b162ca9aa6f9 --- /dev/null +++ b/media-gfx/graphite2/files/graphite2-1.35-fix-gcc-linking.patch @@ -0,0 +1,18 @@ +https://src.fedoraproject.org/rpms/graphite2/raw/41fb7c104c8f9293254abaa91bbda1daafb458cd/f/graphite-arm-nodefaultlibs.patch +https://bugs.gentoo.org/829690 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -120,11 +120,7 @@ + if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") + target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32) + else (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") +- if (GRAPHITE2_SANITIZERS) +- target_link_libraries(graphite2 c gcc_s) +- else () +- target_link_libraries(graphite2 c gcc) +- endif () ++ target_link_libraries(graphite2 c gcc_s) + endif() + include(Graphite) + if (BUILD_SHARED_LIBS) + diff --git a/media-gfx/graphite2/graphite2-1.3.14.ebuild b/media-gfx/graphite2/graphite2-1.3.14-r1.ebuild index 3f1a3d4d8c22..86136261342d 100644 --- a/media-gfx/graphite2/graphite2-1.3.14.ebuild +++ b/media-gfx/graphite2/graphite2-1.3.14-r1.ebuild @@ -6,7 +6,7 @@ EAPI=7 CMAKE_ECLASS=cmake GENTOO_DEPEND_ON_PERL="no" PYTHON_COMPAT=( python3_{7,8,9} ) -inherit perl-module python-any-r1 cmake-multilib +inherit perl-module python-any-r1 cmake-multilib flag-o-matic DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems" HOMEPAGE="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_home" @@ -20,7 +20,7 @@ RESTRICT="!test? ( test )" RDEPEND="perl? ( dev-lang/perl:= )" DEPEND=" - perl? ( dev-lang/perl ) + perl? ( dev-lang/perl:= ) test? ( dev-libs/glib:2 ) " BDEPEND=" @@ -37,7 +37,11 @@ BDEPEND=" ) " -PATCHES=( "${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch" ) +PATCHES=( + "${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch" + "${FILESDIR}/${PN}-1.35-fix-gcc-linking.patch" + "${FILESDIR}/${PN}-1.3.14-fix-cmake-files-libdir.patch" +) pkg_setup() { use perl && perl_set_version @@ -45,7 +49,7 @@ pkg_setup() { } python_check_deps() { - has_version "dev-python/fonttools[${PYTHON_USEDEP}]" + has_version -b "dev-python/fonttools[${PYTHON_USEDEP}]" } src_prepare() { @@ -67,6 +71,11 @@ multilib_src_configure() { -DGRAPHITE2_NSEGCACHE:BOOL=ON ) + if use elibc_musl ; then + # bug #829690 + sed -i -e 's:${GRAPHITE_LINK_FLAGS}:-lssp_shared &:' "${S}"/src/CMakeLists.txt || die + fi + cmake_src_configure # fix perl linking |