From 6c4130dafd87b24d5f6a9fba41e5f4984543bc32 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Tue, 9 Jan 2024 17:50:48 +0100 Subject: [PATCH] fltk, bump version (#9972) --- .../{fltk-1.3.8.recipe => fltk-1.3.9.recipe} | 81 +++++++++-------- x11-libs/fltk/patches/fltk-1.3.8.patchset | 32 ------- x11-libs/fltk/patches/fltk-1.3.9.patchset | 91 +++++++++++++++++++ 3 files changed, 134 insertions(+), 70 deletions(-) rename x11-libs/fltk/{fltk-1.3.8.recipe => fltk-1.3.9.recipe} (63%) delete mode 100644 x11-libs/fltk/patches/fltk-1.3.8.patchset create mode 100644 x11-libs/fltk/patches/fltk-1.3.9.patchset diff --git a/x11-libs/fltk/fltk-1.3.8.recipe b/x11-libs/fltk/fltk-1.3.9.recipe similarity index 63% rename from x11-libs/fltk/fltk-1.3.8.recipe rename to x11-libs/fltk/fltk-1.3.9.recipe index 24bf825d6..ce3e8788e 100644 --- a/x11-libs/fltk/fltk-1.3.8.recipe +++ b/x11-libs/fltk/fltk-1.3.9.recipe @@ -15,7 +15,7 @@ LICENSE="FLTK GNU LGPL v2" REVISION="1" SOURCE_URI="https://www.fltk.org/pub/fltk/$portVersion/fltk-$portVersion-source.tar.bz2" -CHECKSUM_SHA256="1d9832409fc08c908c64ab40ad9fd8b0e8af5d203651eb9690b810f41e2f412d" +CHECKSUM_SHA256="103441134915402808fd45424d4061778609437e804334434e946cfd26b196c2" PATCHES="fltk-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" @@ -28,18 +28,21 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then commandBinDir=$prefix/bin fi -libVersion="1.3" +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion%.*}" PROVIDES=" fltk$secondaryArchSuffix = $portVersion - lib:libfltk$secondaryArchSuffix = $libVersion - lib:libfltk_forms$secondaryArchSuffix = $libVersion - lib:libfltk_images$secondaryArchSuffix = $libVersion + lib:libfltk$secondaryArchSuffix = $libVersionCompat +# lib:libfltk_cairo$secondaryArchSuffix = $libVersionCompat + lib:libfltk_forms$secondaryArchSuffix = $libVersionCompat + lib:libfltk_images$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix - #lib:libgl$secondaryArchSuffix - #lib:libglu$secondaryArchSuffix +# lib:libcairo$secondaryArchSuffix +# lib:libGL$secondaryArchSuffix +# lib:libGLU$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:libpng16$secondaryArchSuffix lib:libX11$secondaryArchSuffix @@ -49,47 +52,46 @@ REQUIRES=" PROVIDES_devel=" fltk${secondaryArchSuffix}_devel = $portVersion - devel:libfltk$secondaryArchSuffix = $libVersion - devel:libfltk_forms$secondaryArchSuffix = $libVersion - devel:libfltk_images$secondaryArchSuffix = $libVersion cmd:fltk_config$commandSuffix = $portVersion cmd:fluid$commandSuffix = $portVersion + devel:libfltk$secondaryArchSuffix = $libVersionCompat +# devel:libfltk_cairo$secondaryArchSuffix = $libVersionCompat + devel:libfltk_forms$secondaryArchSuffix = $libVersionCompat + devel:libfltk_images$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" fltk$secondaryArchSuffix == $portVersion base haiku$secondaryArchSuffix - #lib:libgl$secondaryArchSuffix - #lib:libglu$secondaryArchSuffix +# lib:libcairo$secondaryArchSuffix +# lib:libGL$secondaryArchSuffix +# lib:libGLU$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:libpng16$secondaryArchSuffix lib:libX11$secondaryArchSuffix lib:libXext$secondaryArchSuffix lib:libz$secondaryArchSuffix devel:libX11$secondaryArchSuffix - #devel:libgl$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel - #devel:libgl$secondaryArchSuffix - #devel:libglu$secondaryArchSuffix +# xcairo1.18${secondaryArchSuffix}_devel +# devel:libGL$secondaryArchSuffix +# devel:libGLU$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:libpng16$secondaryArchSuffix devel:libX11$secondaryArchSuffix + devel:libxcb$secondaryArchSuffix devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" - cmd:autoconf - cmd:automake cmd:awk + cmd:cmake cmd:doxygen cmd:g++$secondaryArchSuffix - cmd:grep cmd:ld$secondaryArchSuffix cmd:make - cmd:man cmd:pkg_config$secondaryArchSuffix - cmd:sed " defineDebugInfoPackage fltk$secondaryArchSuffix \ @@ -100,25 +102,20 @@ defineDebugInfoPackage fltk$secondaryArchSuffix \ BUILD() { - NOCONFIGURE=1 sh ./autogen.sh - runConfigure --omit-dirs "docDir binDir" ./configure \ - --bindir=$commandBinDir \ - --docdir=$developDocDir \ - --enable-shared \ - --disable-gl \ - --disable-xft \ - --disable-localjpeg \ - --disable-localpng \ - --disable-localzlib \ - --enable-debug - make $jobArgs - cd documentation && make html - + export LDFLAGS="-lnetwork" + cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=None \ + $cmakeDirArgs \ + -DOPTION_BUILD_SHARED_LIBS=ON \ + -DOPTION_INSTALL_HTML_DOCUMENTATION=ON \ + -DOPTION_CAIRO=OFF \ + -DOPTION_USE_GL=OFF + make -Cbuild $jobArgs + make -Cbuild/documentation html } INSTALL() { - make install + make -Cbuild install # remove static libraries rm $libDir/*.a @@ -126,12 +123,19 @@ INSTALL() # we are not unix rm -rf $dataDir/{applications,icons,mime} + # remove manpages for examples + rm -rf $manDir/man6 + prepareInstalledDevelLibs \ - libfltk libfltk_forms libfltk_images + libfltk libfltk_forms libfltk_images # libfltk_cairo fixPkgconfig + # fixCmake + sed -i 's,${_IMPORT_PREFIX}/lib',$developLibDir, \ + $libDir/cmake/FLTK-Targets-none.cmake + # install does not copy attributes and strips resources!? - copyattr -d fluid/fluid $commandBinDir/fluid + copyattr -d build/bin/fluid $commandBinDir/fluid addAppDeskbarSymlink $commandBinDir/fluid "FLUID" @@ -139,7 +143,8 @@ INSTALL() $developDir \ $commandBinDir \ $manDir \ - $dataDir/{deskbar,doc} + $dataDir/{deskbar,doc} \ + $libDir/cmake } TEST() diff --git a/x11-libs/fltk/patches/fltk-1.3.8.patchset b/x11-libs/fltk/patches/fltk-1.3.8.patchset deleted file mode 100644 index 8d0cf142d..000000000 --- a/x11-libs/fltk/patches/fltk-1.3.8.patchset +++ /dev/null @@ -1,32 +0,0 @@ -From 0acb6ec2f0b48182ed835d19056e0ada65b92d34 Mon Sep 17 00:00:00 2001 -From: Begasus -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.37.3 - diff --git a/x11-libs/fltk/patches/fltk-1.3.9.patchset b/x11-libs/fltk/patches/fltk-1.3.9.patchset new file mode 100644 index 000000000..d7eb3d9cb --- /dev/null +++ b/x11-libs/fltk/patches/fltk-1.3.9.patchset @@ -0,0 +1,91 @@ +From cb7860d48a6ee614b541c3896665063ecb21b320 Mon Sep 17 00:00:00 2001 +From: Begasus +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 +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 +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 + +-# include ++# include + + /** + \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 ++# include + # elif defined(WIN32) + # include + # elif defined(__APPLE_QUARTZ__) +-- +2.42.1 +