pkgsrc-WIP-changes archive

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

fltk14-devel: Improve option handling



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By:	micha
Date:		Wed Oct 16 15:42:59 2019 +0200
Changeset:	c89626128a9ee05e222f9b23b96d0d88a04fdaa8

Modified Files:
	fltk14-devel/Makefile
	fltk14-devel/buildlink3.mk
Added Files:
	fltk14-devel/options.mk

Log Message:
fltk14-devel: Improve option handling

- Moved option handling to options.mk
- Include MesaLib and glu only for opengl option
- Sync bl3

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

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

diffstat:
 fltk14-devel/Makefile      | 35 ++---------------------------------
 fltk14-devel/buildlink3.mk | 19 +++++++++++++++----
 fltk14-devel/options.mk    | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 37 deletions(-)

diffs:
diff --git a/fltk14-devel/Makefile b/fltk14-devel/Makefile
index 866d072bb0..ee20895928 100644
--- a/fltk14-devel/Makefile
+++ b/fltk14-devel/Makefile
@@ -14,39 +14,10 @@ LICENSE=	gnu-lgpl-v2
 USE_LANGUAGES=		c c++
 USE_LIBTOOL=		yes
 USE_TOOLS+=		autoconf gmake nroff
+# Doesn't run tests, only build them (because they are GUI programs)
 TEST_TARGET=		test
 
-# ------------------------------------------------------
-# Options
-PKG_OPTIONS_VAR=	PKG_OPTIONS.fltk14
-PKG_SUPPORTED_OPTIONS=	cairo opengl pango
-PKG_SUGGESTED_OPTIONS=	opengl pango
-PLIST_VARS+=		opengl
-
-.include "../../mk/bsd.prefs.mk"
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Mcairo)
-.  include "../../graphics/cairo/buildlink3.mk"
-CONFIGURE_ARGS+=	--enable-cairo
-.else
-CONFIGURE_ARGS+=	--disable-cairo
-.endif
-
-.if !empty(PKG_OPTIONS:Mopengl)
-CONFIGURE_ARGS+=	--enable-gl
-PLIST.opengl=		yes
-.else
-CONFIGURE_ARGS+=	--disable-gl
-.endif
-
-.if !empty(PKG_OPTIONS:Mpango)
-.  include "../../devel/pango/buildlink3.mk"
-CONFIGURE_ARGS+=	--enable-pango
-.else
-CONFIGURE_ARGS+=	--disable-pango
-.endif
-# ------------------------------------------------------
+.include "options.mk"
 
 PTHREAD_OPTS+=		require
 GNU_CONFIGURE=		yes
@@ -76,8 +47,6 @@ pre-configure:
 # ------------------------------------------------------
 
 .if ${OPSYS} != "Darwin"
-.include "../../graphics/MesaLib/buildlink3.mk"
-.include "../../graphics/glu/buildlink3.mk"
 .include "../../x11/libXext/buildlink3.mk"
 .include "../../x11/libXft/buildlink3.mk"
 .include "../../x11/libXinerama/buildlink3.mk"
diff --git a/fltk14-devel/buildlink3.mk b/fltk14-devel/buildlink3.mk
index 3b496be263..d9fd772761 100644
--- a/fltk14-devel/buildlink3.mk
+++ b/fltk14-devel/buildlink3.mk
@@ -11,20 +11,31 @@ BUILDLINK_PKGSRCDIR.fltk?=	../../wip/fltk14-devel
 BUILDLINK_FILES.fltk+=		include/Fl/*
 
 pkgbase := fltk
+.include "../../mk/bsd.fast.prefs.mk"
 .include "../../mk/pkg-build-options.mk"
 
+# For "cairo" option
 .if !empty(PKG_BUILD_OPTIONS.fltk:Mcairo)
 .  include "../../graphics/cairo/buildlink3.mk"
 .endif
 
+# For "opengl" option
+.if !empty(PKG_BUILD_OPTIONS.fltk:Mopengl)
+.  if ${OPSYS} != "Darwin"
+.     include "../../graphics/MesaLib/buildlink3.mk"
+.     include "../../graphics/glu/buildlink3.mk"
+.  endif
+.endif
+
+# For "pango" option
 .if !empty(PKG_BUILD_OPTIONS.fltk:Mpango)
-.  include "../../devel/pango/buildlink3.mk"
+.  if ${OPSYS} != "Darwin"
+      # Untested: Cocoa backend on macOS should use Core Text instead
+.     include "../../devel/pango/buildlink3.mk"
+.  endif
 .endif
 
-.include "../../mk/bsd.fast.prefs.mk"
 .if ${OPSYS} != "Darwin"
-.  include "../../graphics/MesaLib/buildlink3.mk"
-.  include "../../graphics/glu/buildlink3.mk"
 .  include "../../x11/libXext/buildlink3.mk"
 .  include "../../x11/libXft/buildlink3.mk"
 .  include "../../x11/libXinerama/buildlink3.mk"
diff --git a/fltk14-devel/options.mk b/fltk14-devel/options.mk
new file mode 100644
index 0000000000..2627c08df5
--- /dev/null
+++ b/fltk14-devel/options.mk
@@ -0,0 +1,34 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.fltk14
+PKG_SUPPORTED_OPTIONS=	cairo opengl pango
+PKG_SUGGESTED_OPTIONS=	opengl pango
+PLIST_VARS+=		opengl
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mcairo)
+.  include "../../graphics/cairo/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-cairo
+.else
+CONFIGURE_ARGS+=	--disable-cairo
+.endif
+
+.if !empty(PKG_OPTIONS:Mopengl)
+.  if ${OPSYS} != "Darwin"
+.     include "../../graphics/MesaLib/buildlink3.mk"
+.     include "../../graphics/glu/buildlink3.mk"
+.  endif
+CONFIGURE_ARGS+=	--enable-gl
+PLIST.opengl=		yes
+.else
+CONFIGURE_ARGS+=	--disable-gl
+.endif
+
+.if !empty(PKG_OPTIONS:Mpango)
+.  include "../../devel/pango/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-pango
+.else
+CONFIGURE_ARGS+=	--disable-pango
+.endif


Home | Main Index | Thread Index | Old Index