mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2026-05-06 07:27:03 -04:00
x11-libs/fltk: add 1.4.5
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST fltk-1.3.8-source.tar.gz 5335306 BLAKE2B 8c2d2fca4243c0e7c5a8aa46083940f99c8b3e7873d39d6e590a4b66587876393f209e5e7e5eaf4a4cc13f0f97cb03671d97129853b0146eeab409aaf687935e SHA512 5c1cbfc156c49888e25b90dcb9b1ab86a03447e08e00864c3c7ae8a0e32cfbd9154ee630054235c9edfd29fd1d0371ae77eff7b78094fb660dbbdec5cecfc8fb
|
||||
DIST fltk-1.4.4-source.tar.bz2 8465974 BLAKE2B 5f1577daee0b058d63f652baf6d5abacc03fc24f3f96b26710a5e1e40233a1a2f79c08012bb00c1520c0350ba1b9f1e3544eee0f3464f7076d3ccd5aea07ba7c SHA512 4890bee3093bf53adf2c127713b4e338ce7c587ff5371778e05cb987676eb9a248e221d98a60a1a9aec023a4cf9d180b84e973dd7b0b177ef37a902c4b3cf4b7
|
||||
DIST fltk-1.4.5-source.tar.bz2 8464904 BLAKE2B adf9496eb7b196fab8d042565b3402a96e6fd3695613212b5de1e404681c76c181ba9bf398412b765a602719f2c1abd13317e6bc06680820707faee72cf784db SHA512 ed0c692c1abe6c1675eb75c8562d9d0449c6db39b53d26423bc6fc6e1b97602e727eadf7d58f8a1f9bfb7d088d7f5aeba01619de626f6728a72469b0feea47aa
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
# Copyright 2024-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake dot-a 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"
|
||||
IUSE="+X +cairo +dbus doc examples opengl static-libs test wayland"
|
||||
REQUIRED_USE="
|
||||
|| ( X wayland )
|
||||
wayland? ( cairo )
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/libjpeg-turbo:=
|
||||
media-libs/libpng:=
|
||||
virtual/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
|
||||
x11-libs/libxkbcommon
|
||||
dbus? ( sys-apps/dbus )
|
||||
)
|
||||
"
|
||||
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() {
|
||||
lto-guarantee-fat
|
||||
|
||||
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
|
||||
$(usev wayland -DFLTK_USE_DBUS=$(usex dbus))
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
# these are installed twice, symlink over the static fltk copy
|
||||
# (both still need to exist due to cmake expecting them, bug #966334)
|
||||
dosym fluid-shared /usr/bin/fluid
|
||||
dosym fltk-options-shared /usr/bin/fltk-options
|
||||
|
||||
strip-lto-bytecode
|
||||
}
|
||||
Reference in New Issue
Block a user