diff --git a/media-libs/lasi/files/lasi-1.1.3-gcc11.patch b/media-libs/lasi/files/lasi-1.1.3-gcc11.patch new file mode 100644 index 0000000000000..ac0bdde218c78 --- /dev/null +++ b/media-libs/lasi/files/lasi-1.1.3-gcc11.patch @@ -0,0 +1,25 @@ +Source: +https://salsa.debian.org/debian/lasi/-/blob/master/debian/patches/fix-gcc11-throw-ftbfs.patch?ref_type=heads + +Description: Avoid dynamic exception spec, to fix build with C++17 (GCC-11) + GCC 11 defaults to C++17 which does not allow dynamic exception + specifications anymore. Replace "throw(std::runtime_error)" with + "noexcept(false)" as described in https://gcc.gnu.org/gcc-11/porting_to.html +Author: Lukas Märdian +Origin: vendor, Ubuntu +Bug-Debian: https://bugs.debian.org/984083 +Forwarded: no +Last-Update: 2021-10-15 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/util.h ++++ b/src/util.h +@@ -27,7 +27,7 @@ + + /** Converts a freetype return code into an exception. + */ +-inline void evalReturnCode(const int errCode, const char* funcName) throw (std::runtime_error) { ++inline void evalReturnCode(const int errCode, const char* funcName) noexcept(false) { + if (errCode) + throw std::runtime_error(std::string("Error returned from ") + funcName); + } diff --git a/media-libs/lasi/files/lasi-1.1.3-gnuinstalldirs.patch b/media-libs/lasi/files/lasi-1.1.3-gnuinstalldirs.patch new file mode 100644 index 0000000000000..cbbb7894fc245 --- /dev/null +++ b/media-libs/lasi/files/lasi-1.1.3-gnuinstalldirs.patch @@ -0,0 +1,101 @@ +From e42c088333a16b76a6bacd49e4bcdbdcb2f942ca Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Sun, 28 Sep 2025 21:12:53 +0200 +Subject: [PATCH] Use GNUInstallDirs + +Mostly slotting in easily. + +Signed-off-by: Andreas Sturmlechner +--- + cmake/modules/instdirs.cmake | 40 +++--------------------------------- + examples/CMakeLists.txt | 4 ++-- + 2 files changed, 5 insertions(+), 39 deletions(-) + +diff --git a/cmake/modules/instdirs.cmake b/cmake/modules/instdirs.cmake +index 3eb0290..c130551 100644 +--- a/cmake/modules/instdirs.cmake ++++ b/cmake/modules/instdirs.cmake +@@ -12,48 +12,14 @@ + # CMAKE_INSTALL_OLDINCLUDEDIR not set because libLASi does not use those + # install locations). + ++include(GNUInstallDirs) ++ + set( + CMAKE_INSTALL_EXEC_PREFIX + ${CMAKE_INSTALL_PREFIX} + CACHE PATH "install location for architecture-dependent files" + ) + +-set( +-CMAKE_INSTALL_BINDIR +-${CMAKE_INSTALL_EXEC_PREFIX}/bin +-CACHE PATH "install location for user executables" +-) +- +-set( +-CMAKE_INSTALL_DATADIR +-${CMAKE_INSTALL_PREFIX}/share +-CACHE PATH "install location for read-only architecture-independent data" +-) +- +-set( +-CMAKE_INSTALL_LIBDIR +-${CMAKE_INSTALL_EXEC_PREFIX}/lib +-CACHE PATH "install location for object code libraries" +-) +- +-set( +-CMAKE_INSTALL_INCLUDEDIR +-${CMAKE_INSTALL_PREFIX}/include +-CACHE PATH "install location for C header files" +-) +- +-set( +-CMAKE_INSTALL_INFODIR +-${CMAKE_INSTALL_DATADIR}/info +-CACHE PATH "install location for info documentation" +-) +- +-set( +-CMAKE_INSTALL_MANDIR +-${CMAKE_INSTALL_DATADIR}/man +-CACHE PATH "install location for man documentation" +-) +- + # These cached default PATHS are derived from those above and + # are the ones actually used by the libLASi build system. + set(prefix ${CMAKE_INSTALL_PREFIX} +@@ -76,7 +42,7 @@ set(includedir ${CMAKE_INSTALL_INCLUDEDIR} + CACHE PATH "install location for headers" + ) + +-set(docdir ${CMAKE_INSTALL_DATADIR}/doc/libLASi-${VERSION} ++set(docdir ${CMAKE_INSTALL_DOCDIR} + CACHE PATH "install location for documentation" + ) + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index bc963b0..5707826 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -90,7 +90,7 @@ install(FILES + MissingGlyphExample.png + SimpleLASiExample.png + ComplexTextLayoutExample.png +- DESTINATION ${DATA_DIR}/examples ++ DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples + ) + + # Sort out RPATH issues for build of installed examples. +@@ -114,6 +114,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/Makefile.examples + ) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Makefile.examples +-DESTINATION ${DATA_DIR}/examples ++DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples + RENAME Makefile + ) +-- +2.51.0 + diff --git a/media-libs/lasi/lasi-1.1.3-r1.ebuild b/media-libs/lasi/lasi-1.1.3-r1.ebuild new file mode 100644 index 0000000000000..2abc3c2e4bc6d --- /dev/null +++ b/media-libs/lasi/lasi-1.1.3-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P=libLASi-${PV} +inherit cmake + +DESCRIPTION="C++ library for postscript stream output" +HOMEPAGE="https://www.unifont.org/lasi" +SRC_URI="https://downloads.sourceforge.net/${PN}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0/2" +KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc" + +RDEPEND=" + dev-libs/glib:2 + media-libs/freetype:2 + x11-libs/pango" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen )" + +PATCHES=( + "${FILESDIR}"/${P}-gnuinstalldirs.patch + "${FILESDIR}"/${P}-pkgconfig.patch + "${FILESDIR}"/${P}-gcc11.patch # bug 788766, thx to Debian +) + +src_prepare() { + cmake_src_prepare + cmake_comment_add_subdirectory examples # bug 894062 +} + +src_configure() { + local mycmakeargs=( + -DDOXYGEN_EXECUTABLE=$(usex doc "${BROOT}"/usr/bin/doxygen '') + -DUSE_RPATH=OFF + ) + cmake_src_configure +}