git: c1bf4b463e1a - main - x11-toolkits/fltk: the port had been improved (+)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 08 Jan 2024 06:42:11 UTC
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=c1bf4b463e1a57ed39db34d914fd32b10cb1fb4a commit c1bf4b463e1a57ed39db34d914fd32b10cb1fb4a Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2024-01-08 06:41:22 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2024-01-08 06:41:22 +0000 x11-toolkits/fltk: the port had been improved (+) - Add an option to enable limited Cairo rendering support - Do not strip static libraries upon installation as this breaks linking against them (the case for `x11/flruler') - Restore `files/patch-src_Makefile' which was ditched in r447379 (commit 2a288980b3dd) in favor of `post-install' target because of the above and now this code is mature enough and should be less fragile to patch statically - Garbage-collect no longer useful patch added in r138020 (commit 2a70195a3279) back in 2005 which now makes `-lm' appear twice in the fltk-config(1)'s LDFLAGS outputs - Shorten local variable name in the `post-patch' target Reported by: pkg-fallout --- x11-toolkits/fltk/Makefile | 18 +++++----- x11-toolkits/fltk/files/patch-cairo_Makefile | 17 +++++++++ x11-toolkits/fltk/files/patch-fltk-config.in | 20 ----------- x11-toolkits/fltk/files/patch-src_Makefile | 52 ++++++++++++++++++++++++++++ x11-toolkits/fltk/pkg-plist | 4 +++ 5 files changed, 82 insertions(+), 29 deletions(-) diff --git a/x11-toolkits/fltk/Makefile b/x11-toolkits/fltk/Makefile index 035326f7622c..533e37882c48 100644 --- a/x11-toolkits/fltk/Makefile +++ b/x11-toolkits/fltk/Makefile @@ -1,5 +1,6 @@ PORTNAME= fltk PORTVERSION= 1.3.9 +PORTREVISION= 1 CATEGORIES= x11-toolkits MASTER_SITES= https://www.fltk.org/pub/${PORTNAME}/${PORTVERSION}/ DISTNAME= ${PORTNAME}-${PORTVERSION}-source @@ -27,21 +28,20 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} PORTEXAMPLES= * -OPTIONS_DEFINE= EXAMPLES +OPTIONS_DEFINE= CAIRO EXAMPLES +OPTIONS_SUB= yes + +CAIRO_CONFIGURE_ON= --enable-cairo +CAIRO_USES= gnome +CAIRO_USE= GNOME=cairo XORG=pixman post-patch: .SILENT - prefix="${PREFIX}" ; plength=$$(($${#prefix}+10)) ; \ - ${REINPLACE_CMD} -e "\|/etc/fltk|{s||${PREFIX}&|;s|10|$${plength}|;}" \ + prefix="${PREFIX}" ; fplen=$$(($${#prefix}+10)) ; \ + ${REINPLACE_CMD} -e "\|/etc/fltk|{s||${PREFIX}&|;s|10|$${fplen}|;}" \ ${WRKSRC}/src/Fl_Preferences.cxx ${REINPLACE_CMD} -e 's,$$(docdir)/examples,${EXAMPLESDIR},' \ ${WRKSRC}/test/Makefile ${REINPLACE_CMD} -e '/^INSTALL_[BL]I/s,-m,${STRIP} &, ; \ s,^\.SILENT,#&,' ${WRKSRC}/makeinclude.in -post-install: -.for x in fltk fltk_forms fltk_gl fltk_images - ${LN} -sf lib${x}.so.${PORTVERSION:R} \ - ${STAGEDIR}${PREFIX}/lib/lib${x}.so.1 -.endfor - .include <bsd.port.mk> diff --git a/x11-toolkits/fltk/files/patch-cairo_Makefile b/x11-toolkits/fltk/files/patch-cairo_Makefile new file mode 100644 index 000000000000..afcc1da78f12 --- /dev/null +++ b/x11-toolkits/fltk/files/patch-cairo_Makefile @@ -0,0 +1,17 @@ +--- cairo/Makefile.orig 2023-12-09 13:58:40 UTC ++++ cairo/Makefile +@@ -98,12 +98,13 @@ clean: + install: $(CAIROLIBNAME) $(CAIRODSONAME) + echo "Installing libfltk_cairo$(LIBEXT) in $(libdir)..." + -$(INSTALL_DIR) $(DESTDIR)$(libdir) +- $(INSTALL_LIB) $(CAIROLIBNAME) $(DESTDIR)$(libdir) ++ $(INSTALL_DATA) $(CAIROLIBNAME) $(DESTDIR)$(libdir) + + if test x$(CAIRODSONAME) = xlibfltk_cairo.so.$(FL_DSO_VERSION); then\ + $(RM) $(DESTDIR)$(libdir)/libfltk_cairo.so*;\ + $(INSTALL_LIB) libfltk_cairo.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir); \ + $(LN) libfltk_cairo.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk_cairo.so;\ ++ $(LN) libfltk_cairo.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk_cairo.so.$(FL_DSO_VERSION:R);\ + fi + if test x$(CAIRODSONAME) = xsrc/libfltk_cairo.sl.$(FL_DSO_VERSION); then\ + $(RM) $(DESTDIR)$(libdir)/libfltk_cairo.sl*;\ diff --git a/x11-toolkits/fltk/files/patch-fltk-config.in b/x11-toolkits/fltk/files/patch-fltk-config.in deleted file mode 100644 index 5be8cdc224ba..000000000000 --- a/x11-toolkits/fltk/files/patch-fltk-config.in +++ /dev/null @@ -1,20 +0,0 @@ ---- fltk-config.in.orig Mon Sep 6 15:20:52 2004 -+++ fltk-config.in Sat Jun 25 11:45:04 2005 -@@ -180,7 +180,7 @@ - fi - - # Calculate needed libraries --LDSTATIC="$libdir/libfltk.a $LDLIBS" -+LDSTATIC="-lm $libdir/libfltk.a $LDLIBS" - LDLIBS="-lfltk$SHAREDSUFFIX $LDLIBS" - LIBS="$libdir/libfltk.a" - -@@ -247,7 +247,7 @@ - fi - - if test "$echo_ldflags" = "yes"; then -- my_libs= -+ my_libs="-lm" - libdirs=$libs - - for i in $LDLIBS ; do diff --git a/x11-toolkits/fltk/files/patch-src_Makefile b/x11-toolkits/fltk/files/patch-src_Makefile new file mode 100644 index 000000000000..3cb89cf6dea1 --- /dev/null +++ b/x11-toolkits/fltk/files/patch-src_Makefile @@ -0,0 +1,52 @@ +--- src/Makefile.orig 2023-12-09 13:58:40 UTC ++++ src/Makefile +@@ -573,13 +573,13 @@ install: $(LIBNAME) $(DSONAME) \ + -$(INSTALL_DIR) $(DESTDIR)$(libdir) + -$(INSTALL_DIR) $(DESTDIR)$(bindir) + $(RM) $(DESTDIR)$(libdir)/$(LIBBASENAME) +- $(INSTALL_LIB) $(LIBNAME) $(DESTDIR)$(libdir) +- $(INSTALL_LIB) $(FLLIBNAME) $(DESTDIR)$(libdir) +- $(INSTALL_LIB) $(IMGLIBNAME) $(DESTDIR)$(libdir) ++ $(INSTALL_DATA) $(LIBNAME) $(DESTDIR)$(libdir) ++ $(INSTALL_DATA) $(FLLIBNAME) $(DESTDIR)$(libdir) ++ $(INSTALL_DATA) $(IMGLIBNAME) $(DESTDIR)$(libdir) + $(RANLIB) $(DESTDIR)$(libdir)/$(LIBBASENAME) + $(RANLIB) $(DESTDIR)$(libdir)/$(FLLIBBASENAME) + if test x$(GLLIBNAME) != x; then \ +- $(INSTALL_LIB) $(GLLIBNAME) $(DESTDIR)$(libdir); \ ++ $(INSTALL_DATA) $(GLLIBNAME) $(DESTDIR)$(libdir); \ + $(RANLIB) $(DESTDIR)$(libdir)/$(GLLIBBASENAME); \ + fi + $(RANLIB) $(DESTDIR)$(libdir)/$(IMGLIBBASENAME) +@@ -587,6 +587,7 @@ install: $(LIBNAME) $(DSONAME) \ + $(RM) $(DESTDIR)$(libdir)/libfltk.so*;\ + $(INSTALL_LIB) libfltk.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir); \ + $(LN) libfltk.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk.so;\ ++ $(LN) libfltk.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk.so.$(FL_DSO_VERSION:R);\ + fi + if test x$(DSONAME) = xlibfltk.sl.$(FL_DSO_VERSION); then\ + $(RM) $(DESTDIR)$(libdir)/libfltk.sl*;\ +@@ -618,6 +619,7 @@ install: $(LIBNAME) $(DSONAME) \ + $(RM) $(DESTDIR)$(libdir)/libfltk_forms.so*;\ + $(INSTALL_LIB) libfltk_forms.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir); \ + $(LN) libfltk_forms.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk_forms.so;\ ++ $(LN) libfltk_forms.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk_forms.so.$(FL_DSO_VERSION:R);\ + fi + if test x$(FLDSONAME) = xlibfltk_forms.sl.$(FL_DSO_VERSION); then\ + $(RM) $(DESTDIR)$(libdir)/libfltk_forms.sl*;\ +@@ -649,6 +651,7 @@ install: $(LIBNAME) $(DSONAME) \ + $(RM) $(DESTDIR)$(libdir)/libfltk_gl.so*;\ + $(INSTALL_LIB) libfltk_gl.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir); \ + $(LN) libfltk_gl.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk_gl.so;\ ++ $(LN) libfltk_gl.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk_gl.so.$(FL_DSO_VERSION:R);\ + fi + if test x$(GLDSONAME) = xlibfltk_gl.sl.$(FL_DSO_VERSION); then\ + $(RM) $(DESTDIR)$(libdir)/libfltk_gl.sl*;\ +@@ -680,6 +683,7 @@ install: $(LIBNAME) $(DSONAME) \ + $(RM) $(DESTDIR)$(libdir)/libfltk_images.so*;\ + $(INSTALL_LIB) libfltk_images.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir); \ + $(LN) libfltk_images.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk_images.so;\ ++ $(LN) libfltk_images.so.$(FL_DSO_VERSION) $(DESTDIR)$(libdir)/libfltk_images.so.$(FL_DSO_VERSION:R);\ + fi + if test x$(IMGDSONAME) = xlibfltk_images.sl.$(FL_DSO_VERSION); then\ + $(RM) $(DESTDIR)$(libdir)/libfltk_images.sl*;\ diff --git a/x11-toolkits/fltk/pkg-plist b/x11-toolkits/fltk/pkg-plist index 6f15df0e1435..46d51d8ba0d4 100644 --- a/x11-toolkits/fltk/pkg-plist +++ b/x11-toolkits/fltk/pkg-plist @@ -149,6 +149,10 @@ lib/libfltk.a lib/libfltk.so lib/libfltk.so.1 lib/libfltk.so.1.3 +%%CAIRO%%lib/libfltk_cairo.a +%%CAIRO%%lib/libfltk_cairo.so +%%CAIRO%%lib/libfltk_cairo.so.1 +%%CAIRO%%lib/libfltk_cairo.so.1.3 lib/libfltk_forms.a lib/libfltk_forms.so lib/libfltk_forms.so.1