commit:     b2f95fafa4ca3999267374948ab7b3a4a6acffa4
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 29 13:10:12 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Apr 29 13:43:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2f95faf

x11-libs/fltk: add 1.4.3

Possible missed something given build system has a lot of
noisy refactoring that makes it hard to see other changes.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 x11-libs/fltk/Manifest                        |   1 +
 x11-libs/fltk/files/fltk-1.4.3-no-games.patch |  11 +++
 x11-libs/fltk/fltk-1.4.3.ebuild               | 114 ++++++++++++++++++++++++++
 3 files changed, 126 insertions(+)

diff --git a/x11-libs/fltk/Manifest b/x11-libs/fltk/Manifest
index 44900609e339..bd35be2af906 100644
--- a/x11-libs/fltk/Manifest
+++ b/x11-libs/fltk/Manifest
@@ -1,2 +1,3 @@
 DIST fltk-1.3.8-source.tar.gz 5335306 BLAKE2B 
8c2d2fca4243c0e7c5a8aa46083940f99c8b3e7873d39d6e590a4b66587876393f209e5e7e5eaf4a4cc13f0f97cb03671d97129853b0146eeab409aaf687935e
 SHA512 
5c1cbfc156c49888e25b90dcb9b1ab86a03447e08e00864c3c7ae8a0e32cfbd9154ee630054235c9edfd29fd1d0371ae77eff7b78094fb660dbbdec5cecfc8fb
 DIST fltk-1.4.2-source.tar.bz2 8462860 BLAKE2B 
4bc4e0cddf41b7173047ce07cee7f9428192058cf25217aa9651fccb422ad2625ac2b9913d9d0cfff12aeefcf289a83c989dbbc4e664331b3c2721e3bba5e5f4
 SHA512 
65f4546c3b80c48a39cd719a7bdfd8bbb46c670b1606af22ebfaf67a60f1f2b5b01b111c0eea7729506038613c75dcec15efb93607973d3845181e0e8444f81e
+DIST fltk-1.4.3-source.tar.bz2 8460603 BLAKE2B 
cd97b93a469be644cca3245c000964fdb2f07d1d543a3d07bb311e385d11ba925b97d6b20a9c0b5b2fdc152ada78e7eb473a40f24ff25678f30c9d2f3d66cee6
 SHA512 
4a497142456121a853b96490dc864a17c1232e3e7a102feeabf55418e9626d4f80bf24e0b65a5ae3096e7048d9c40ae4190ceed96015de74a9cfd929c2bacdd8

diff --git a/x11-libs/fltk/files/fltk-1.4.3-no-games.patch 
b/x11-libs/fltk/files/fltk-1.4.3-no-games.patch
new file mode 100644
index 000000000000..4e6f3203a745
--- /dev/null
+++ b/x11-libs/fltk/files/fltk-1.4.3-no-games.patch
@@ -0,0 +1,11 @@
+Games files have rather generic names and are more like demos
+that most people likely won't care to have installed. Patch
+this out for now so does not install extra files with tests
+(may possibly improve with future FLTK_BUILD_GAMES).
+--- a/CMake/install.cmake
++++ b/CMake/install.cmake
+@@ -126,3 +126,3 @@
+ 
+-if(FLTK_BUILD_TEST) # "OR FLTK_BUILD_GAMES" (not yet implemented)
++if(0) # "OR FLTK_BUILD_GAMES" (not yet implemented)
+ 

diff --git a/x11-libs/fltk/fltk-1.4.3.ebuild b/x11-libs/fltk/fltk-1.4.3.ebuild
new file mode 100644
index 000000000000..94ea5cd3bf46
--- /dev/null
+++ b/x11-libs/fltk/fltk-1.4.3.ebuild
@@ -0,0 +1,114 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake edo xdg
+
+DESCRIPTION="Fast Light GUI Toolkit"
+HOMEPAGE="https://www.fltk.org/";
+SRC_URI="https://github.com/fltk/fltk/releases/download/release-${PV}/${P}-source.tar.bz2";
+
+LICENSE="FLTK LGPL-2 MIT ZLIB"
+SLOT="1/$(ver_cut 1-2)" # README.abi-version.txt
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv 
~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+X +cairo doc examples opengl static-libs test wayland"
+REQUIRED_USE="
+       || ( X wayland )
+       wayland? ( cairo )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       media-libs/libjpeg-turbo:=
+       media-libs/libpng:=
+       sys-libs/zlib:=
+       X? (
+               x11-libs/libX11
+               x11-libs/libXcursor
+               x11-libs/libXfixes
+               x11-libs/libXinerama
+               !cairo? (
+                       media-libs/fontconfig
+                       x11-libs/libXft
+                       x11-libs/libXrender
+               )
+       )
+       cairo? (
+               dev-libs/glib:2
+               x11-libs/cairo
+               x11-libs/pango[X?]
+       )
+       opengl? (
+               media-libs/glu
+               media-libs/libglvnd[X]
+       )
+       wayland? (
+               dev-libs/wayland
+               gui-libs/libdecor
+               sys-apps/dbus
+               x11-libs/libxkbcommon
+       )
+"
+DEPEND="
+       ${RDEPEND}
+       X? ( x11-base/xorg-proto )
+       wayland? ( dev-libs/wayland-protocols )
+"
+BDEPEND="
+       doc? ( app-text/doxygen )
+       wayland? ( dev-util/wayland-scanner )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.4.1-fltk-config.patch
+       "${FILESDIR}"/${PN}-1.4.1-tests-odr.patch
+       "${FILESDIR}"/${PN}-1.4.3-no-games.patch
+)
+
+src_prepare() {
+       cmake_src_prepare
+
+       # fluid can optionally use html docs at runtime, adjust path
+       sed -i "s|\${FLTK_DOCDIR}/fltk|&-${PVR}/html|" CMake/export.cmake || die
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DFLTK_BACKEND_WAYLAND=$(usex wayland)
+               -DFLTK_BACKEND_X11=$(usex X)
+               -DFLTK_BUILD_FLUID=yes
+               -DFLTK_BUILD_FLUID_DOCS=no
+               -DFLTK_BUILD_GL=$(usex opengl)
+               -DFLTK_BUILD_HTML_DOCS=$(usex doc)
+               -DFLTK_BUILD_PDF_DOCS=no
+               -DFLTK_BUILD_SHARED_LIBS=yes
+               -DFLTK_BUILD_TEST=$(usex test)
+               -DFLTK_GRAPHICS_CAIRO=$(usex cairo)
+               -DFLTK_OPTION_STD=yes # will be removed & forced ON in fltk-1.5
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile all $(usev doc docs)
+}
+
+src_test() {
+       # same that upstream's CI does except with the shared version
+       edo "${BUILD_DIR}"/bin/test/unittests-shared --core
+}
+
+src_install() {
+       local DOCS=(
+               ANNOUNCEMENT CHANGES* CREDITS.txt README*
+               $(usev examples)
+               # simpler than using -DFLTK_INSTALL_HTML_DOCS for the location
+               $(usev doc "${BUILD_DIR}"/documentation/html)
+       )
+       cmake_src_install
+
+       # currently no option to disable building static libs
+       use static-libs || rm -- "${ED}"/usr/$(get_libdir)/*.a || die
+}

Reply via email to