fltk_1.3, enable base package, required by LMMS (#12887)

This commit is contained in:
Schrijvers Luc
2025-09-01 12:23:31 +02:00
committed by GitHub
parent 3279e98eee
commit aa246fe6bd
3 changed files with 184 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ HOMEPAGE="https://www.fltk.org/"
COPYRIGHT="1998-2021 by Bill Spitzak and others."
LICENSE="FLTK
GNU LGPL v2"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/fltk/fltk/releases/download/release-$portVersion/fltk-$portVersion-source.tar.bz2"
CHECKSUM_SHA256="2b302c80b7ea937a8bdc01ed6718fd995035bf63e9a2895491c1001821725f1f"
PATCHES="fltk-$portVersion.patchset"
@@ -108,6 +108,7 @@ BUILD()
export LDFLAGS="-lnetwork"
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=None \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
-DFLTK_DOCDIR=$docDir \
-DFLTK_BUILD_EXAMPLES=OFF \
-DFLTK_BUILD_SHARED_LIBS=ON \

View File

@@ -0,0 +1,91 @@
SUMMARY="A cross-platform C++ GUI toolkit for X11, MS Windows, OSX and Haiku"
DESCRIPTION="FLTK (pronounced \"fulltick\") is a cross-platform C++ GUI \
toolkit for UNIX®/Linux® (X11), Microsoft® Windows®, and MacOS® X. \
FLTK provides modern GUI functionality without the bloat and \
supports 3D graphics via OpenGL® and its built-in GLUT emulation.
NOTE: OpenGL is not supported yet.
FLTK is designed to be small and modular enough to be statically linked, \
but works fine as a shared library. \
FLTK also includes an excellent UI builder called FLUID that can be used \
to create applications in minutes."
HOMEPAGE="https://www.fltk.org/"
COPYRIGHT="1998-2021 by Bill Spitzak and others."
LICENSE="FLTK
GNU LGPL v2"
REVISION="2"
SOURCE_URI="https://www.fltk.org/pub/fltk/$portVersion/fltk-$portVersion-source.tar.bz2"
CHECKSUM_SHA256="103441134915402808fd45424d4061778609437e804334434e946cfd26b196c2"
SOURCE_DIR="fltk-$portVersion"
PATCHES="fltk-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
PROVIDES="
fltk_1.3$secondaryArchSuffix = $portVersion
lib:libfltk$secondaryArchSuffix = $libVersionCompat
lib:libfltk_forms$secondaryArchSuffix = $libVersionCompat
lib:libfltk_images$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libX11$secondaryArchSuffix
lib:libXext$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libjpeg$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libX11$secondaryArchSuffix
devel:libxcb$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
export LDFLAGS="-lnetwork"
cmake -B build -S . -DCMAKE_BUILD_TYPE=None \
$cmakeDirArgs \
-DOPTION_BUILD_SHARED_LIBS=ON \
-DOPTION_CAIRO=OFF \
-DOPTION_USE_GL=OFF \
-DFLTK_BUILD_TEST=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# remove static libraries
rm $libDir/*.a
# we are not unix
rm -rf $dataDir/{applications,icons,mime}
prepareInstalledDevelLibs \
libfltk libfltk_forms libfltk_images
fixPkgconfig
rm -rf $binDir \
$developDir \
$manDir \
$libDir/cmake
}

View File

@@ -0,0 +1,91 @@
From cb7860d48a6ee614b541c3896665063ecb21b320 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Thu, 11 May 2023 10:28:34 +0200
Subject: Fix crash, kudos to waddlesplash
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index c75ff47..61e0d07 100644
--- a/src/Fl_Pixmap.cxx
+++ b/src/Fl_Pixmap.cxx
@@ -206,6 +206,7 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int H
// make X use the bitmap as a mask:
XSetClipMask(fl_display, fl_gc, pxm->mask_);
XSetClipOrigin(fl_display, fl_gc, X-cx, Y-cy);
+#ifndef __HAIKU__
if (clip_region()) {
// At this point, XYWH is the bounding box of the intersection between
// the current clip region and the (portion of the) pixmap we have to draw.
@@ -227,7 +228,9 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int H
copy_offscreen(X1, Y1, W1, H1, pxm->id_, cx + (X1 - X), cy + (Y1 - Y));
}
XDestroyRegion(r);
- } else {
+ } else
+#endif
+ {
copy_offscreen(X, Y, W, H, pxm->id_, cx, cy);
}
// put the old clip region back
--
2.42.1
From a8f7b3266bfcb969d26d94337fd18e59bba5e71d Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Tue, 9 Jan 2024 12:45:20 +0100
Subject: Install cmake config files in $libDir
diff --git a/CMake/setup.cmake b/CMake/setup.cmake
index ea1a6ea..44dd495 100644
--- a/CMake/setup.cmake
+++ b/CMake/setup.cmake
@@ -61,6 +61,8 @@ if (WIN32 AND NOT CYGWIN)
set (FLTK_CONFIG_PATH CMake)
elseif (APPLE)
set (FLTK_CONFIG_PATH FLTK.framework/Resources/CMake)
+elseif (HAIKU)
+ set (FLTK_CONFIG_PATH ${FLTK_LIBDIR}/cmake)
else ()
set (FLTK_CONFIG_PATH ${FLTK_DATADIR}/fltk)
endif (WIN32 AND NOT CYGWIN)
--
2.42.1
From c4dc57c17bbdb59f056c1392722217ed4dc4c2bf Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Tue, 9 Jan 2024 16:15:51 +0100
Subject: set correct xcairo header path
diff --git a/FL/Fl_Cairo.H b/FL/Fl_Cairo.H
index d832c5e..982c1fd 100644
--- a/FL/Fl_Cairo.H
+++ b/FL/Fl_Cairo.H
@@ -29,7 +29,7 @@
# include <FL/Fl_Export.H>
-# include <cairo.h>
+# include <cairo/cairo.h>
/**
\addtogroup group_cairo
diff --git a/cairo/Fl_Cairo.cxx b/cairo/Fl_Cairo.cxx
index 53dfac9..19dae1e 100644
--- a/cairo/Fl_Cairo.cxx
+++ b/cairo/Fl_Cairo.cxx
@@ -30,7 +30,7 @@
// Win32, Apple Quartz, X11
# if defined(USE_X11) // X11
-# include <cairo-xlib.h>
+# include <cairo/cairo-xlib.h>
# elif defined(WIN32)
# include <cairo-win32.h>
# elif defined(__APPLE_QUARTZ__)
--
2.42.1