pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
fltk14-devel: Add x11 option
Module Name: pkgsrc-wip
Committed By: Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By: micha
Date: Fri Oct 25 13:01:21 2019 +0200
Changeset: 79b1c844aeb0a32786f459bf57d72700e94ab795
Modified Files:
fltk14-devel/Makefile
fltk14-devel/buildlink3.mk
fltk14-devel/options.mk
Log Message:
fltk14-devel: Add x11 option
Suggest only if FLTK has no native backend for current system.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=79b1c844aeb0a32786f459bf57d72700e94ab795
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
fltk14-devel/Makefile | 12 ++--------
fltk14-devel/buildlink3.mk | 32 ++++++++++++++------------
fltk14-devel/options.mk | 56 ++++++++++++++++++++++++++++++++--------------
3 files changed, 59 insertions(+), 41 deletions(-)
diffs:
diff --git a/fltk14-devel/Makefile b/fltk14-devel/Makefile
index a6f2454860..7a545113af 100644
--- a/fltk14-devel/Makefile
+++ b/fltk14-devel/Makefile
@@ -17,8 +17,6 @@ USE_TOOLS+= autoconf gmake nroff
# Doesn't run tests, only build them (because they are GUI programs)
TEST_TARGET= test
-.include "options.mk"
-
PTHREAD_OPTS+= require
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-libtool=${LIBTOOL:Q}
@@ -35,6 +33,8 @@ CONFIGURE_ARGS+= --disable-localjpeg
CONFIGURE_ARGS+= --disable-localpng
CONFIGURE_ARGS+= --disable-localzlib
+.include "options.mk"
+
# Create symlinks for common misspellings of headerfile names
# (if filesystem is case-sensitive)
PLIST_VARS+= cs # case-sensitive
@@ -60,14 +60,6 @@ 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/libXrender/buildlink3.mk"
-.endif
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
diff --git a/fltk14-devel/buildlink3.mk b/fltk14-devel/buildlink3.mk
index 7ee89b1c1c..682e489f48 100644
--- a/fltk14-devel/buildlink3.mk
+++ b/fltk14-devel/buildlink3.mk
@@ -16,7 +16,7 @@ pkgbase := fltk
# For "opengl" option
.if !empty(PKG_BUILD_OPTIONS.fltk:Mopengl)
-. if ${OPSYS} != "Darwin"
+. if !empty(PKG_BUILD_OPTIONS.fltk:Mx11)
. include "../../graphics/MesaLib/buildlink3.mk"
. include "../../graphics/glu/buildlink3.mk"
. endif
@@ -24,35 +24,39 @@ pkgbase := fltk
# For "pango" option
.if !empty(PKG_BUILD_OPTIONS.fltk:Mpango)
-. if ${OPSYS} != "Darwin"
-# Untested: Cocoa backend on macOS should use Core Text instead
+. if !empty(PKG_BUILD_OPTIONS.fltk:Mx11)
. include "../../devel/pango/buildlink3.mk"
. endif
.endif
+# For "x11" option
+.if !empty(PKG_BUILD_OPTIONS.fltk:Mx11)
+. include "../../x11/libX11/buildlink3.mk"
+. include "../../x11/libXcursor/buildlink3.mk"
+. include "../../x11/libXext/buildlink3.mk"
+. include "../../x11/libXfixes/buildlink3.mk"
+. include "../../x11/libXrender/buildlink3.mk"
+.endif
+
+# For "xdbe" option
+.if !empty(PKG_BUILD_OPTIONS.fltk:Mxdbe)
+# No client library required
+.endif
+
# For "xft2" option
.if !empty(PKG_BUILD_OPTIONS.fltk:Mxft2)
-. if ${OPSYS} != "Darwin"
-# Untested: Cocoa backend on macOS should use Core Text instead
+. if !empty(PKG_BUILD_OPTIONS.fltk:Mx11)
. include "../../x11/libXft/buildlink3.mk"
. endif
.endif
# For "xinerama" option
.if !empty(PKG_BUILD_OPTIONS.fltk:Mxinerama)
-. if ${OPSYS} != "Darwin"
+. if !empty(PKG_BUILD_OPTIONS.fltk:Mx11)
. 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/libXrender/buildlink3.mk"
-.endif
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
diff --git a/fltk14-devel/options.mk b/fltk14-devel/options.mk
index cbb52a2739..cf8adaebf6 100644
--- a/fltk14-devel/options.mk
+++ b/fltk14-devel/options.mk
@@ -1,18 +1,26 @@
# $NetBSD$
+.include "../../mk/bsd.prefs.mk"
+
PKG_OPTIONS_VAR= PKG_OPTIONS.fltk14
-PKG_SUPPORTED_OPTIONS= opengl pango xdbe xft2 xinerama
+PKG_SUPPORTED_OPTIONS= opengl pango xdbe x11 xft2 xinerama
+# FLTK has native backends for macOS and Windows (Cygwin)
+# Enabling the "x11" option forces X11 backend on such systems.
+# Most users want the native backends.
+.if ${OPSYS} == "Darwin" || ${OPSYS} == "Cygwin"
PKG_SUGGESTED_OPTIONS= opengl pango xdbe xft2 xinerama
+.else
+PKG_SUGGESTED_OPTIONS= opengl pango x11 xdbe xft2 xinerama
+.endif
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.
+# Disabling this option removes expensive dependencies for X11 backend.
# Attention: Some packages that use FLTK need this option (disable with care)
.if !empty(PKG_OPTIONS:Mopengl)
-. if ${OPSYS} != "Darwin"
+. if !empty(PKG_OPTIONS:Mx11)
. include "../../graphics/MesaLib/buildlink3.mk"
. include "../../graphics/glu/buildlink3.mk"
. endif
@@ -22,17 +30,16 @@ 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).
+# "pango" option [X11 backend]: Use Pango for client side font rendering
+# This option enables glyph substitution (mixing of multiple fonts).
+# 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
+. if !empty(PKG_OPTIONS:Mx11)
. include "../../devel/pango/buildlink3.mk"
. endif
CONFIGURE_ARGS+= --enable-pango
@@ -40,25 +47,39 @@ CONFIGURE_ARGS+= --enable-pango
CONFIGURE_ARGS+= --disable-pango
.endif
-# "xdbe" option: Use X11 double buffer extension
+# "x11" option [X11 backend]: Use X11 backend
+# For some systems there are native backends available, do not use them.
+# Attention: Forcing X11 backend requires X Window system to be installed.
+.if !empty(PKG_OPTIONS:Mx11)
+. include "../../x11/libX11/buildlink3.mk"
+. include "../../x11/libXcursor/buildlink3.mk"
+. include "../../x11/libXext/buildlink3.mk"
+. include "../../x11/libXfixes/buildlink3.mk"
+. include "../../x11/libXrender/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-x11
+.else
+CONFIGURE_ARGS+= --disable-x11
+.endif
+
+# "xdbe" option [X11 backend]: Use X double buffer extension (DBE)
# On older systems double buffering can be very slow. Disabling this option can
# make the GUI more responsive. The drawback is potential flickering, e.g. in
# a text field while a scrollbar is moved.
-# Note: This extension is implemented in X servers, no client library required.
.if !empty(PKG_OPTIONS:Mxdbe)
CONFIGURE_ARGS+= --enable-xdbe
.else
CONFIGURE_ARGS+= --disable-xdbe
.endif
-# "xft2" option: Use client side font rendering for X11 backend
+# "xft2" option [X11 backend]: Use X FreeType interface library
+# Enables client side font rendering. Most users want that, because it works
+# better with Unicode.
# 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
+. if !empty(PKG_OPTIONS:Mx11)
. include "../../x11/libXft/buildlink3.mk"
. endif
CONFIGURE_ARGS+= --enable-xft
@@ -66,9 +87,10 @@ CONFIGURE_ARGS+= --enable-xft
CONFIGURE_ARGS+= --disable-xft
.endif
-# "xinerama" option: Enable support for two or more physical displays
+# "xinerama" option [X11 backend]: Use X11 XINERAMA extension
+# Enables support for two or more physical displays.
.if !empty(PKG_OPTIONS:Mxinerama)
-. if ${OPSYS} != "Darwin"
+. if !empty(PKG_OPTIONS:Mx11)
. include "../../x11/libXinerama/buildlink3.mk"
. endif
CONFIGURE_ARGS+= --enable-xinerama
Home |
Main Index |
Thread Index |
Old Index