pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

fltk14-devel: Support for X11 backend



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By:	micha
Date:		Mon Oct 21 12:17:46 2019 +0200
Changeset:	6427e084713aeb0621d9eb00da6d666344a68b28

Modified Files:
	fltk14-devel/DESCR
	fltk14-devel/Makefile
	fltk14-devel/README
	fltk14-devel/buildlink3.mk
	fltk14-devel/distinfo
	fltk14-devel/options.mk
	fltk14-devel/patches/patch-Makefile
	fltk14-devel/patches/patch-test_Makefile

Log Message:
fltk14-devel: Support for X11 backend

- Added options xft2 and xinerama
- Add Xcursor dependency
- Add comments for options

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6427e084713aeb0621d9eb00da6d666344a68b28

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 fltk14-devel/DESCR                       |  4 ++--
 fltk14-devel/Makefile                    | 24 ++++++++++++-------
 fltk14-devel/README                      |  6 ++++-
 fltk14-devel/buildlink3.mk               | 19 ++++++++++++---
 fltk14-devel/distinfo                    |  4 ++--
 fltk14-devel/options.mk                  | 40 ++++++++++++++++++++++++++++++--
 fltk14-devel/patches/patch-Makefile      |  2 +-
 fltk14-devel/patches/patch-test_Makefile | 40 +++++++++++++++++++++-----------
 8 files changed, 105 insertions(+), 34 deletions(-)

diffs:
diff --git a/fltk14-devel/DESCR b/fltk14-devel/DESCR
index 325cc5fc55..e024bbcd82 100644
--- a/fltk14-devel/DESCR
+++ b/fltk14-devel/DESCR
@@ -1,8 +1,8 @@
 FLTK (pronounced "fulltick") is a LGPL'd C++ graphical user interface
 toolkit for X (UNIX), OpenGL, and Win32.  FLTK was designed to be small and
 modular enough to be statically linked, but also works fine as a shared
-library.  FLTK also includes FLUID, an interactive user interface builder
-program.
+library.
+FLTK also includes FLUID, an interactive user interface builder program.
 
 This is a version 1.4 development snapshot.  From the FLTK website:
 
diff --git a/fltk14-devel/Makefile b/fltk14-devel/Makefile
index e1bf327233..5ce0378086 100644
--- a/fltk14-devel/Makefile
+++ b/fltk14-devel/Makefile
@@ -23,28 +23,35 @@ PTHREAD_OPTS+=		require
 GNU_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--enable-libtool=${LIBTOOL:Q}
 CONFIGURE_ARGS+=	--enable-print
+CONFIGURE_ARGS+=	--enable-shared
 CONFIGURE_ARGS+=	--enable-threads
 CONFIGURE_ARGS+=	--enable-xcursor
 CONFIGURE_ARGS+=	--enable-xfixes
-CONFIGURE_ARGS+=	--enable-xft
-CONFIGURE_ARGS+=	--enable-xinerama
 CONFIGURE_ARGS+=	--enable-xrender
-CONFIGURE_ARGS+=	ac_cv_have_overlay=yes
 
+# Use pkgsrc versions of libraries, not package's bundled versions.
+CONFIGURE_ARGS+=	--disable-localjpeg
+CONFIGURE_ARGS+=	--disable-localpng
+CONFIGURE_ARGS+=	--disable-localzlib
+
+# Create symlinks for common misspellings of headerfile names
+# (if filesystem is case-sensitive)
 PLIST_VARS+=		cs	# case-sensitive
 .if !exists(./descr) && ${OPSYS} != "Darwin"
 CONFIGURE_ARGS+=	--with-links
 PLIST.cs=		yes
 .endif
 
-CONFIGURE_ARGS+=	--enable-shared
-# Use pkgsrc versions, not package's bundled versions.
-CONFIGURE_ARGS+=	--disable-localjpeg --disable-localzlib --disable-localpng
+# ------------------------------------------------------
+# No documentation where and why this was needed for FLTK 1.3 package
+# => Comment out for tests. Reenabled if problem still exists.
+#CONFIGURE_ARGS+=	ac_cv_have_overlay=yes
+# ------------------------------------------------------
 
 # ------------------------------------------------------
 # Clean the source tree first for snapshots
 # (CPPFLAGS/LDFLAGS are for modular X)
-# Remove this for release version
+# => Remove this section for release version
 pre-configure:
 	cd ${WRKSRC} && autoconf
 	cd ${WRKSRC} && \
@@ -52,13 +59,12 @@ pre-configure:
 		${GMAKE} ${MAKE_FLAGS} clean
 # ------------------------------------------------------
 
+# FLTK uses Cocoa backend on macOS/Darwin (X11 backend otherwise)
 .if ${OPSYS} != "Darwin"
 .  include "../../x11/libX11/buildlink3.mk"
 .  include "../../x11/libXcursor/buildlink3.mk"
 .  include "../../x11/libXext/buildlink3.mk"
 .  include "../../x11/libXfixes/buildlink3.mk"
-.  include "../../x11/libXft/buildlink3.mk"
-.  include "../../x11/libXinerama/buildlink3.mk"
 .  include "../../x11/libXrender/buildlink3.mk"
 .endif
 .include "../../mk/jpeg.buildlink3.mk"
diff --git a/fltk14-devel/README b/fltk14-devel/README
index 58170df74b..1155bd0120 100644
--- a/fltk14-devel/README
+++ b/fltk14-devel/README
@@ -1,4 +1,8 @@
 FLTK 1.4.x development snapshot
-(intended to test X11 glyph substitution via pango)
 
+Intended to test glyph substitution via Pango with X11 backend.
 This allows applications to render text using multiple fonts.
+
+Also useful to test compatibility of packages with FLTK 1.4 API.
+In general application using the FLTK 1.3 API should work out-of-the-box
+with FLTK 1.4 too. Note: The ABI of the shared library is not compatible!
diff --git a/fltk14-devel/buildlink3.mk b/fltk14-devel/buildlink3.mk
index b87f5594b8..7ee89b1c1c 100644
--- a/fltk14-devel/buildlink3.mk
+++ b/fltk14-devel/buildlink3.mk
@@ -30,15 +30,28 @@ pkgbase := fltk
 .  endif
 .endif
 
+# For "xft2" option
+.if !empty(PKG_BUILD_OPTIONS.fltk:Mxft2)
+.  if ${OPSYS} != "Darwin"
+#     Untested: Cocoa backend on macOS should use Core Text instead
+.     include "../../x11/libXft/buildlink3.mk"
+.  endif
+.endif
+
+# For "xinerama" option
+.if !empty(PKG_BUILD_OPTIONS.fltk:Mxinerama)
+.  if ${OPSYS} != "Darwin"
+.     include "../../x11/libXinerama/buildlink3.mk"
+.  endif
+.endif
+
+# FLTK uses Cocoa backend on macOS/Darwin (X11 backend otherwise)
 .if ${OPSYS} != "Darwin"
 .  include "../../x11/libX11/buildlink3.mk"
 .  include "../../x11/libXcursor/buildlink3.mk"
 .  include "../../x11/libXext/buildlink3.mk"
 .  include "../../x11/libXfixes/buildlink3.mk"
-.  include "../../x11/libXft/buildlink3.mk"
-.  include "../../x11/libXinerama/buildlink3.mk"
 .  include "../../x11/libXrender/buildlink3.mk"
-
 .endif
 .include "../../mk/jpeg.buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
diff --git a/fltk14-devel/distinfo b/fltk14-devel/distinfo
index 886f158eaf..ee50b650aa 100644
--- a/fltk14-devel/distinfo
+++ b/fltk14-devel/distinfo
@@ -4,10 +4,10 @@ SHA1 (fltk-1.4.x-940b7ba13d26dcde4fbd4574d56167501e598327.zip) = a31bac4f6cc3f45
 RMD160 (fltk-1.4.x-940b7ba13d26dcde4fbd4574d56167501e598327.zip) = 736dfdbba96d8b121a0b8929a943f149c1005393
 SHA512 (fltk-1.4.x-940b7ba13d26dcde4fbd4574d56167501e598327.zip) = 9f7aa0fe4ee515b0bb0d3d7a70d9823b235b53f8ccf98c243522e7e6bdf4f155564e0a611df19dc40d872dc8fe292d4e71435c66e16b6cfb984ad3c3467c39c8
 Size (fltk-1.4.x-940b7ba13d26dcde4fbd4574d56167501e598327.zip) = 6722087 bytes
-SHA1 (patch-Makefile) = 7db024b114282797a0b1b20df70f73a487fec0e2
+SHA1 (patch-Makefile) = b6f6fee9f7d164f568bfcc7f7c119324052c4e1b
 SHA1 (patch-configure.ac) = d4bfad45fefa60ce6a62ba2c429ac8c1f1552397
 SHA1 (patch-documentation_Makefile) = ce2872dae289672a8bc603e1c10225df8d06f126
 SHA1 (patch-fluid_Makefile) = 8a727140bbcea9ca3bd8ce16ec3cb9b37cef3bb4
 SHA1 (patch-makeinclude.in) = b79a32c2d7571f79078f8ec6036a0e41604f6fac
 SHA1 (patch-src_Makefile) = 33923c156f8cb589868578217c96c035847aa9d5
-SHA1 (patch-test_Makefile) = e0cd5d35a1dc11060637cf8eeff2c0458c5ab46a
+SHA1 (patch-test_Makefile) = 4f6da5c42db6c06703b72522551172fb873efb01
diff --git a/fltk14-devel/options.mk b/fltk14-devel/options.mk
index 613bd173c6..11da121f98 100644
--- a/fltk14-devel/options.mk
+++ b/fltk14-devel/options.mk
@@ -1,13 +1,16 @@
 # $NetBSD$
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.fltk14
-PKG_SUPPORTED_OPTIONS=	opengl pango
-PKG_SUGGESTED_OPTIONS=	opengl pango
+PKG_SUPPORTED_OPTIONS=	opengl pango xft2 xinerama
+PKG_SUGGESTED_OPTIONS=	opengl pango xft2 xinerama
 PLIST_VARS+=		opengl
 
 .include "../../mk/bsd.prefs.mk"
 .include "../../mk/bsd.options.mk"
 
+# "opengl" option: Enable support for OpenGL based rendering
+# Disabling this option removes the expensive Mesa dependency.
+# Attention: Some packages that use FLTK need this option (disable with care)
 .if !empty(PKG_OPTIONS:Mopengl)
 .  if ${OPSYS} != "Darwin"
 .     include "../../graphics/MesaLib/buildlink3.mk"
@@ -19,7 +22,15 @@ PLIST.opengl=		yes
 CONFIGURE_ARGS+=	--disable-gl
 .endif
 
+# "pango" option: Use Pango for client side font rendering with X11 backend
+# This option enables glyph substitution (mixing of multiple fonts) for the X11
+# backend. Most users want that, but it adds additional dependencies compared
+# to FLTK 1.3 (disable this option to get the former behaviour).
+# Attention: This option requires the "xft2" option to be enabled too.
 .if !empty(PKG_OPTIONS:Mpango)
+.  if empty(PKG_OPTIONS:Mxft2)
+PKG_FAIL_REASON+=	"pango option requires xft2 option."
+.  endif
 .  if ${OPSYS} != "Darwin"
 #     Untested: Cocoa backend on macOS should use Core Text instead
 .     include "../../devel/pango/buildlink3.mk"
@@ -28,3 +39,28 @@ CONFIGURE_ARGS+=	--enable-pango
 .else
 CONFIGURE_ARGS+=	--disable-pango
 .endif
+
+# "xft2" option: Use client side font rendering for X11 backend
+# Disabling this option uses the original core X11 font system and removes all
+# font related dependencies (the X server is used for font rendering and client
+# programs become extremely lightweight).
+# Attention: X servers may be misconfigured for core fonts (disable with care).
+.if !empty(PKG_OPTIONS:Mxft2)
+.  if ${OPSYS} != "Darwin"
+#     Untested: Cocoa backend on macOS should use Core Text instead
+.     include "../../x11/libXft/buildlink3.mk"
+.  endif
+CONFIGURE_ARGS+=	--enable-xft
+.else
+CONFIGURE_ARGS+=	--disable-xft
+.endif
+
+# "xinerama" option: Enable support for two or more physical displays
+.if !empty(PKG_OPTIONS:Mxinerama)
+.  if ${OPSYS} != "Darwin"
+.     include "../../x11/libXinerama/buildlink3.mk"
+.  endif
+CONFIGURE_ARGS+=	--enable-xinerama
+.else
+CONFIGURE_ARGS+=	--disable-xinerama
+.endif
diff --git a/fltk14-devel/patches/patch-Makefile b/fltk14-devel/patches/patch-Makefile
index b8fd18b3af..6d0e73bea6 100644
--- a/fltk14-devel/patches/patch-Makefile
+++ b/fltk14-devel/patches/patch-Makefile
@@ -1,7 +1,7 @@
 $NetBSD$
 
 Remove tests from directory list.
-Added makeinclude as dependency for test target.
+Add target "test" to build test programs.
 
 --- Makefile.orig	2016-09-30 11:33:14.000000000 +0000
 +++ Makefile
diff --git a/fltk14-devel/patches/patch-test_Makefile b/fltk14-devel/patches/patch-test_Makefile
index 8dd1482eff..b5cc21178c 100644
--- a/fltk14-devel/patches/patch-test_Makefile
+++ b/fltk14-devel/patches/patch-test_Makefile
@@ -1,10 +1,22 @@
 $NetBSD$
 
 Use libtool to link test programs.
+Add note that GUI test programs are not executed automatically.
 
 --- test/Makefile.orig	2019-09-24 10:57:29.000000000 +0000
 +++ test/Makefile
-@@ -333,7 +333,7 @@ buttons$(EXEEXT): buttons.o
+@@ -182,6 +182,10 @@ GLALL = \
+ 	shape$(EXEEXT)
+ 
+ all:	$(ALL) $(GLDEMOS)
++	echo "-------------------------------------------"
++	echo 'Test programs were built in $${WRKSRC}/test.'
++	echo "You have to start them manually."
++	echo "-------------------------------------------"
+ 
+ gldemos:	$(GLALL)
+ 
+@@ -333,7 +337,7 @@ buttons$(EXEEXT): buttons.o
  
  blocks$(EXEEXT): blocks.o
  	echo Linking $@...
@@ -13,7 +25,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) $(RM) -f -r blocks.app/Contents/MacOS
  	$(OSX_ONLY) mkdir blocks.app/Contents/MacOS
  	$(OSX_ONLY) $(INSTALL_BIN) blocks$(EXEEXT) blocks.app/Contents/MacOS
-@@ -344,7 +344,7 @@ checkers$(EXEEXT): pixmaps/black_checker
+@@ -344,7 +348,7 @@ checkers$(EXEEXT): pixmaps/black_checker
  		   pixmaps/white_checker_king_png.h \
  		   checkers.o
  	echo Linking $@...
@@ -22,7 +34,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) $(RM) -f -r checkers.app/Contents/MacOS
  	$(OSX_ONLY) mkdir checkers.app/Contents/MacOS
  	$(OSX_ONLY) $(INSTALL_BIN) checkers$(EXEEXT) checkers.app/Contents/MacOS
-@@ -353,7 +353,7 @@ clock$(EXEEXT): clock.o
+@@ -353,7 +357,7 @@ clock$(EXEEXT): clock.o
  
  colbrowser$(EXEEXT): colbrowser.o
  	echo Linking $@...
@@ -31,7 +43,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) ../fltk-config --post $@
  	$(OSX_ONLY) mkdir -p colbrowser.app/Contents/Resources
  	$(OSX_ONLY) cp -f rgb.txt colbrowser.app/Contents/Resources/
-@@ -366,21 +366,21 @@ curve$(EXEEXT): curve.o
+@@ -366,21 +370,21 @@ curve$(EXEEXT): curve.o
  
  demo$(EXEEXT): demo.o
  	echo Linking $@...
@@ -56,7 +68,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) ../fltk-config --post $@
  	$(OSX_ONLY) cp -f editor-Info.plist editor.app/Contents/Info.plist
  
-@@ -389,21 +389,21 @@ fast_slow.cxx:	fast_slow.fl ../fluid/flu
+@@ -389,21 +393,21 @@ fast_slow.cxx:	fast_slow.fl ../fluid/flu
  
  file_chooser$(EXEEXT): file_chooser.o $(IMGLIBNAME)
  	echo Linking $@...
@@ -81,7 +93,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) ../fltk-config --post $@
  	$(OSX_ONLY) mkdir -p help_dialog.app/Contents/Resources
  	$(OSX_ONLY) cp -f help_dialog.html help_dialog.app/Contents/Resources/
-@@ -423,14 +423,14 @@ input_choice$(EXEEXT): input_choice.o
+@@ -423,14 +427,14 @@ input_choice$(EXEEXT): input_choice.o
  
  keyboard$(EXEEXT): keyboard_ui.o keyboard.o
  	echo Linking $@...
@@ -98,7 +110,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) ../fltk-config --post $@
  
  line_style$(EXEEXT): line_style.o
-@@ -439,7 +439,7 @@ list_visuals$(EXEEXT): list_visuals.o
+@@ -439,7 +443,7 @@ list_visuals$(EXEEXT): list_visuals.o
  
  mandelbrot$(EXEEXT): mandelbrot_ui.o mandelbrot.o
  	echo Linking $@...
@@ -107,7 +119,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) ../fltk-config --post $@
  mandelbrot_ui.o:	mandelbrot_ui.h
  mandelbrot_ui.cxx:	mandelbrot_ui.fl ../fluid/fluid$(EXEEXT)
-@@ -452,7 +452,7 @@ minimum$(EXEEXT): minimum.o
+@@ -452,7 +456,7 @@ minimum$(EXEEXT): minimum.o
  
  native-filechooser$(EXEEXT): native-filechooser.o $(IMGLIBNAME)
  	echo Linking $@...
@@ -116,7 +128,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) ../fltk-config --post $@
  
  navigation$(EXEEXT): navigation.o
-@@ -461,7 +461,7 @@ offscreen$(EXEEXT): offscreen.o
+@@ -461,7 +465,7 @@ offscreen$(EXEEXT): offscreen.o
  
  output$(EXEEXT): output.o $(FLLIBNAME)
  	echo Linking $@...
@@ -125,7 +137,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) ../fltk-config --post $@
  
  overlay$(EXEEXT): overlay.o
-@@ -472,7 +472,7 @@ pixmap$(EXEEXT): pixmap.o
+@@ -472,7 +476,7 @@ pixmap$(EXEEXT): pixmap.o
  
  pixmap_browser$(EXEEXT): pixmap_browser.o $(IMGLIBNAME)
  	echo Linking $@...
@@ -134,7 +146,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) ../fltk-config --post $@
  
  preferences$(EXEEXT):	preferences.o
-@@ -496,7 +496,7 @@ subwindow$(EXEEXT): subwindow.o
+@@ -496,7 +500,7 @@ subwindow$(EXEEXT): subwindow.o
  
  sudoku: sudoku.o
  	echo Linking $@...
@@ -143,7 +155,7 @@ Use libtool to link test programs.
  	$(OSX_ONLY) $(RM) -r -f sudoku.app/Contents/MacOS
  	$(OSX_ONLY) mkdir sudoku.app/Contents/MacOS
  	$(OSX_ONLY) $(INSTALL_BIN) sudoku$(EXEEXT) sudoku.app/Contents/MacOS
-@@ -504,7 +504,7 @@ sudoku: sudoku.o
+@@ -504,7 +508,7 @@ sudoku: sudoku.o
  sudoku.exe: sudoku.o sudoku.rc
  	echo Linking $@...
  	$(RC) sudoku.rc sudokures.o
@@ -152,7 +164,7 @@ Use libtool to link test programs.
  
  symbols$(EXEEXT): symbols.o
  
-@@ -536,7 +536,7 @@ $(GLALL): $(LIBNAME) $(GLLIBNAME)
+@@ -536,7 +540,7 @@ $(GLALL): $(LIBNAME) $(GLLIBNAME)
  # OpenGL demos...
  CubeView$(EXEEXT): CubeMain.o CubeView.o CubeViewUI.o
  	echo Linking $@...
@@ -161,7 +173,7 @@ Use libtool to link test programs.
  		CubeMain.o CubeView.o CubeViewUI.o \
  		$(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
  	$(OSX_ONLY) ../fltk-config --post $@
-@@ -547,37 +547,37 @@ CubeViewUI.cxx:	CubeViewUI.fl ../fluid/f
+@@ -547,37 +551,37 @@ CubeViewUI.cxx:	CubeViewUI.fl ../fluid/f
  
  cube$(EXEEXT): cube.o
  	echo Linking $@...


Home | Main Index | Thread Index | Old Index