pkgsrc-WIP-changes archive

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

fltk2: Update to version 2.1 from FLTK git repository



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

Modified Files:
	Makefile
Added Files:
	fltk2/DESCR
	fltk2/Makefile
	fltk2/PLIST
	fltk2/TODO
	fltk2/buildlink3.mk
	fltk2/distinfo
	fltk2/options.mk
	fltk2/patches/patch-configure.in
	fltk2/patches/patch-fltk2-config.in
	fltk2/patches/patch-fltk_string.h
	fltk2/patches/patch-fltk_x11.h
	fltk2/patches/patch-fluid_FluidType.h
	fltk2/patches/patch-images_fl__png.cxx
	fltk2/patches/patch-src_Browser.cxx
	fltk2/patches/patch-src_filename__list.cxx

Log Message:
fltk2: Update to version 2.1 from FLTK git repository

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

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

diffstat:
 Makefile                                   |   1 +
 fltk2/DESCR                                |  10 ++
 fltk2/Makefile                             |  41 ++++++
 fltk2/PLIST                                | 197 +++++++++++++++++++++++++++++
 fltk2/TODO                                 |  25 ++++
 fltk2/buildlink3.mk                        |  29 +++++
 fltk2/distinfo                             |  14 ++
 fltk2/options.mk                           |  26 ++++
 fltk2/patches/patch-configure.in           |  58 +++++++++
 fltk2/patches/patch-fltk2-config.in        |  19 +++
 fltk2/patches/patch-fltk_string.h          |  34 +++++
 fltk2/patches/patch-fltk_x11.h             |  15 +++
 fltk2/patches/patch-fluid_FluidType.h      |  15 +++
 fltk2/patches/patch-images_fl__png.cxx     |  16 +++
 fltk2/patches/patch-src_Browser.cxx        |  15 +++
 fltk2/patches/patch-src_filename__list.cxx |  17 +++
 16 files changed, 532 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 997af82d05..6d60ef3371 100644
--- a/Makefile
+++ b/Makefile
@@ -853,6 +853,7 @@ SUBDIR+=	flnews-devel
 SUBDIR+=	flowblade
 SUBDIR+=	flpsed
 SUBDIR+=	fltk14-devel
+SUBDIR+=	fltk2
 SUBDIR+=	fluxbox
 SUBDIR+=	fluxspace
 SUBDIR+=	flvmeta
diff --git a/fltk2/DESCR b/fltk2/DESCR
new file mode 100644
index 0000000000..3d5d28a839
--- /dev/null
+++ b/fltk2/DESCR
@@ -0,0 +1,10 @@
+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.
+
+FLTK 2.0 is an experimental branch and has been declared inactive,
+superseded by 3.0. Later FLTK 3.0 has been declared inactive too.
+
+New applications should use the FLTK 1.3 API.
diff --git a/fltk2/Makefile b/fltk2/Makefile
new file mode 100644
index 0000000000..01eb07e082
--- /dev/null
+++ b/fltk2/Makefile
@@ -0,0 +1,41 @@
+# $NetBSD: Makefile$
+
+DISTNAME=	fltk-legacy-2.0
+# Last distribution snapshot was 6129. New version should be higher.
+# FLTK library itself defines version 2.1.0 in headerfile (use that).
+PKGNAME=	fltk2-2.1git
+CATEGORIES=	x11
+MASTER_SITES=	${MASTER_SITE_GITHUB:=fltk/}
+GITHUB_TAG=	branch-2.0
+EXTRACT_SUFX=	.zip
+# The LGPL license is relaxed to allow static linking
+LICENSE=	gnu-lgpl-v2
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://www.fltk.org/
+COMMENT=	Fast Light Tool Kit for graphical user interfaces
+
+USE_LANGUAGES=		c c++03
+USE_TOOLS+=		autoconf gmake
+
+WRKSRC=			${WRKDIR}/fltk-legacy-branch-2.0
+
+PTHREAD_OPTS+=		require
+GNU_CONFIGURE=		yes
+CONFIGURE_ARGS+=	--enable-threads
+CONFIGURE_ARGS+=	ac_cv_have_overlay=yes
+LDFLAGS+=		-lfontconfig -lXrender -lfreetype
+
+pre-configure:
+	cd ${WRKSRC} && autoconf
+
+.include "options.mk"
+
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../x11/libXft/buildlink3.mk"
+.include "../../x11/libXi/buildlink3.mk"
+.include "../../x11/libXinerama/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/fltk2/PLIST b/fltk2/PLIST
new file mode 100644
index 0000000000..fa4b000484
--- /dev/null
+++ b/fltk2/PLIST
@@ -0,0 +1,197 @@
+@comment $NetBSD$
+bin/fltk2-config
+bin/fluid2
+include/fltk/Adjuster.h
+include/fltk/AlignGroup.h
+include/fltk/AnsiWidget.h
+include/fltk/BarGroup.h
+include/fltk/Box.h
+include/fltk/Browser.h
+include/fltk/Button.h
+include/fltk/CheckButton.h
+include/fltk/Choice.h
+include/fltk/Clock.h
+include/fltk/Color.h
+include/fltk/ColorChooser.h
+include/fltk/ComboBox.h
+include/fltk/Cursor.h
+include/fltk/CycleButton.h
+include/fltk/Dial.h
+include/fltk/Divider.h
+include/fltk/DoubleBufferWindow.h
+include/fltk/FL_API.h
+include/fltk/FL_VERSION.h
+include/fltk/FileBrowser.h
+include/fltk/FileChooser.h
+include/fltk/FileIcon.h
+include/fltk/FileInput.h
+include/fltk/FillDial.h
+include/fltk/FillSlider.h
+include/fltk/Flags.h
+include/fltk/FloatInput.h
+include/fltk/Font.h
+include/fltk/GlWindow.h
+include/fltk/Group.h
+include/fltk/HelpDialog.h
+include/fltk/HelpView.h
+include/fltk/HighlightButton.h
+include/fltk/Image.h
+include/fltk/Input.h
+include/fltk/InputBrowser.h
+include/fltk/IntInput.h
+include/fltk/InvisibleBox.h
+include/fltk/Item.h
+include/fltk/ItemGroup.h
+include/fltk/LabelType.h
+include/fltk/LightButton.h
+include/fltk/LineDial.h
+include/fltk/Menu.h
+include/fltk/MenuBar.h
+include/fltk/MenuBuild.h
+include/fltk/MenuWindow.h
+include/fltk/Monitor.h
+include/fltk/MultiBrowser.h
+include/fltk/MultiImage.h
+include/fltk/MultiLineInput.h
+include/fltk/MultiLineOutput.h
+include/fltk/NumericInput.h
+include/fltk/Output.h
+include/fltk/PackedGroup.h
+include/fltk/PixelType.h
+include/fltk/PopupMenu.h
+include/fltk/Preferences.h
+include/fltk/ProgressBar.h
+include/fltk/RadioButton.h
+include/fltk/RadioItem.h
+include/fltk/RadioLightButton.h
+include/fltk/Rectangle.h
+include/fltk/RepeatButton.h
+include/fltk/ReturnButton.h
+include/fltk/ScrollGroup.h
+include/fltk/Scrollbar.h
+include/fltk/SecretInput.h
+include/fltk/ShapedWindow.h
+include/fltk/SharedImage.h
+include/fltk/Slider.h
+include/fltk/StatusBarGroup.h
+include/fltk/StringList.h
+include/fltk/Style.h
+include/fltk/StyleSet.h
+include/fltk/Symbol.h
+include/fltk/SystemMenuBar.h
+include/fltk/TabGroup.h
+include/fltk/TextBuffer.h
+include/fltk/TextDisplay.h
+include/fltk/TextEditor.h
+include/fltk/Threads.h
+include/fltk/ThumbWheel.h
+include/fltk/TiledGroup.h
+include/fltk/TiledImage.h
+include/fltk/ToggleButton.h
+include/fltk/ToggleItem.h
+include/fltk/Tooltip.h
+include/fltk/Valuator.h
+include/fltk/ValueInput.h
+include/fltk/ValueOutput.h
+include/fltk/ValueSlider.h
+include/fltk/Widget.h
+include/fltk/WidgetAssociation.h
+include/fltk/Window.h
+include/fltk/WizardGroup.h
+include/fltk/WordwrapInput.h
+include/fltk/WordwrapOutput.h
+include/fltk/ask.h
+include/fltk/compat/FL/Enumerations.H
+include/fltk/compat/FL/Fl.H
+include/fltk/compat/FL/Fl_Adjuster.H
+include/fltk/compat/FL/Fl_Box.H
+include/fltk/compat/FL/Fl_Browser.H
+include/fltk/compat/FL/Fl_Button.H
+include/fltk/compat/FL/Fl_Chart.H
+include/fltk/compat/FL/Fl_Check_Button.H
+include/fltk/compat/FL/Fl_Choice.H
+include/fltk/compat/FL/Fl_Clock.H
+include/fltk/compat/FL/Fl_Color_Chooser.H
+include/fltk/compat/FL/Fl_Counter.H
+include/fltk/compat/FL/Fl_Dial.H
+include/fltk/compat/FL/Fl_Double_Window.H
+include/fltk/compat/FL/Fl_File_Chooser.H
+include/fltk/compat/FL/Fl_Gl_Window.H
+include/fltk/compat/FL/Fl_Group.H
+include/fltk/compat/FL/Fl_Hold_Browser.H
+include/fltk/compat/FL/Fl_Hor_Slider.H
+include/fltk/compat/FL/Fl_Hor_Value_Slider.H
+include/fltk/compat/FL/Fl_Input.H
+include/fltk/compat/FL/Fl_Int_Input.H
+include/fltk/compat/FL/Fl_Light_Button.H
+include/fltk/compat/FL/Fl_Menu_.H
+include/fltk/compat/FL/Fl_Menu_Bar.H
+include/fltk/compat/FL/Fl_Menu_Button.H
+include/fltk/compat/FL/Fl_Menu_Item.H
+include/fltk/compat/FL/Fl_Output.H
+include/fltk/compat/FL/Fl_Overlay_Window.H
+include/fltk/compat/FL/Fl_Pack.H
+include/fltk/compat/FL/Fl_Pixmap.H
+include/fltk/compat/FL/Fl_Return_Button.H
+include/fltk/compat/FL/Fl_Roller.H
+include/fltk/compat/FL/Fl_Scroll.H
+include/fltk/compat/FL/Fl_Scrollbar.H
+include/fltk/compat/FL/Fl_Select_Browser.H
+include/fltk/compat/FL/Fl_Shared_Image.H
+include/fltk/compat/FL/Fl_Single_Window.H
+include/fltk/compat/FL/Fl_Slider.H
+include/fltk/compat/FL/Fl_Tabs.H
+include/fltk/compat/FL/Fl_Text_Buffer.H
+include/fltk/compat/FL/Fl_Text_Editor.H
+include/fltk/compat/FL/Fl_Tile.H
+include/fltk/compat/FL/Fl_Toggle_Button.H
+include/fltk/compat/FL/Fl_Toggle_Light_Button.H
+include/fltk/compat/FL/Fl_Valuator.H
+include/fltk/compat/FL/Fl_Value_Input.H
+include/fltk/compat/FL/Fl_Value_Output.H
+include/fltk/compat/FL/Fl_Value_Slider.H
+include/fltk/compat/FL/Fl_Widget.H
+include/fltk/compat/FL/Fl_Window.H
+include/fltk/compat/FL/filename.H
+include/fltk/compat/FL/fl_ask.H
+include/fltk/compat/FL/fl_draw.H
+include/fltk/compat/FL/fl_message.H
+include/fltk/compat/FL/forms.H
+include/fltk/compat/FL/gl.h
+include/fltk/compat/FL/glut.H
+include/fltk/compat/FL/math.h
+include/fltk/compat/FL/menubar.h
+include/fltk/compat/FL/x.H
+include/fltk/damage.h
+include/fltk/dirent.h
+include/fltk/draw.h
+include/fltk/error.h
+include/fltk/events.h
+include/fltk/file_chooser.h
+include/fltk/filename.h
+include/fltk/fltk_cairo.h
+include/fltk/forms.h
+include/fltk/gl.h
+include/fltk/gl2opengl.h
+include/fltk/glut.h
+include/fltk/layout.h
+include/fltk/load_plugin.h
+include/fltk/mac.r
+include/fltk/math.h
+include/fltk/osx.h
+include/fltk/pnmImage.h
+include/fltk/rgbImage.h
+include/fltk/run.h
+include/fltk/show_colormap.h
+include/fltk/string.h
+include/fltk/utf.h
+include/fltk/visual.h
+include/fltk/win32.h
+include/fltk/x.h
+include/fltk/x11.h
+include/fltk/xbmImage.h
+include/fltk/xpmImage.h
+lib/libfltk2.a
+${PLIST.opengl}lib/libfltk2_gl.a
+${PLIST.opengl}lib/libfltk2_glut.a
+lib/libfltk2_images.a
diff --git a/fltk2/TODO b/fltk2/TODO
new file mode 100644
index 0000000000..331a63f4af
--- /dev/null
+++ b/fltk2/TODO
@@ -0,0 +1,25 @@
+[X] Include MesaLib conditionally (opengl option)
+[X] Declare License in Makefile
+[X] Remove MASTER_SITES no longer working
+    Snapshots for FLTK 2.0 branch are no longer provided.
+    FLTK homepage recommends to use Git.
+    => Use Git
+[X] FL_MINOR_VERSION is defined to 1
+    => Use Version 2.1 for package
+    => Patch fltk2-config script to report version 2.1.0
+[X] Generate (no longer shipped) configure script via autoconf
+    => Add autoconf to USE_TOOLS
+[X] Rework patches
+    - patch-ac removed
+      Git release has no configure script (we generate it via autoconf)
+      => patch-ab is therefore sufficient.
+    - patch-ad reduced
+    - patch-ae removed (now uses DESTDIR out-of-the-box)
+    - patch-ag reduced (setjmp() part already merged)
+    - patch-ah reduced (the HP-UX and DragonFly mappings are now catched by
+      the POSIX check)
+    => Rebuild patches and add comments
+[X] Update PLIST
+    => Add "include/fltk/WidgetAssociation.h"
+[X] Remove test target
+    => There is no test rule in top level Makefile
diff --git a/fltk2/buildlink3.mk b/fltk2/buildlink3.mk
new file mode 100644
index 0000000000..36208edac0
--- /dev/null
+++ b/fltk2/buildlink3.mk
@@ -0,0 +1,29 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	fltk2
+
+.if !defined(FLTK2_BUILDLINK3_MK)
+FLTK2_BUILDLINK3_MK:=
+
+BUILDLINK_DEPMETHOD.fltk2?=	build
+BUILDLINK_API_DEPENDS.fltk2+=	fltk2>=2.0pre6129
+BUILDLINK_ABI_DEPENDS.fltk2+=	fltk2>=2.0pre6129nb14
+BUILDLINK_PKGSRCDIR.fltk2?=	../../x11/fltk2
+
+pkgbase := fltk2
+.include "../../mk/pkg-build-options.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.fltk2:Mopengl)
+.  include "../../graphics/MesaLib/buildlink3.mk"
+.  include "../../graphics/glu/buildlink3.mk"
+.endif
+
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../x11/libXft/buildlink3.mk"
+.include "../../x11/libXi/buildlink3.mk"
+.include "../../x11/libXinerama/buildlink3.mk"
+.endif # FLTK2_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-fltk2
diff --git a/fltk2/distinfo b/fltk2/distinfo
new file mode 100644
index 0000000000..76ebf2535d
--- /dev/null
+++ b/fltk2/distinfo
@@ -0,0 +1,14 @@
+$NetBSD$
+
+SHA1 (fltk-legacy-2.0.zip) = 04c517a89309e72fc229a43cdfc3c5d591c46148
+RMD160 (fltk-legacy-2.0.zip) = 1f38753d10c58433d9d8a33c62dd144d13445dce
+SHA512 (fltk-legacy-2.0.zip) = e8e1c05d95b8817b5ce716558422f79bc8232c03f7d103be4c9b743d5c2890fc9e283b23d761e239a3e0adc8041d67d6d11a17166eecce1743a310537784875e
+Size (fltk-legacy-2.0.zip) = 3852183 bytes
+SHA1 (patch-configure.in) = e480f0b540bd28354bf4865b121fdfa0b3ec94d3
+SHA1 (patch-fltk2-config.in) = 51619aaec73e3800ce7668eed0c067a610199f21
+SHA1 (patch-fltk_string.h) = f9adba4ec0fc1b5fcf70c4e9ea4b6eeea1d0c5ea
+SHA1 (patch-fltk_x11.h) = e2ebb95ccc593572a4aebcbbe31362f90f2d10fd
+SHA1 (patch-fluid_FluidType.h) = 219ff80331caf295e29285ea5e46700a0a018b20
+SHA1 (patch-images_fl__png.cxx) = 6409f70c5ed1882863a3d72f8ccab79053042ac1
+SHA1 (patch-src_Browser.cxx) = b13ccb50b347c31aaae47b2c713df05869ba127f
+SHA1 (patch-src_filename__list.cxx) = bcde6999a273904c2723588fb116c076058aecb9
diff --git a/fltk2/options.mk b/fltk2/options.mk
new file mode 100644
index 0000000000..9bb1000f37
--- /dev/null
+++ b/fltk2/options.mk
@@ -0,0 +1,26 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.fltk2
+PKG_SUPPORTED_OPTIONS=	opengl
+PKG_SUGGESTED_OPTIONS=
+
+# Default
+.if ${MACHINE_ARCH} != "m68k" && ${MACHINE_ARCH} != "m68000" && \
+	${MACHINE_ARCH} != "vax"
+PKG_SUGGESTED_OPTIONS+=	opengl
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=	opengl
+.if !empty(PKG_OPTIONS:Mopengl)
+PLIST.opengl=	yes
+.  include "../../graphics/MesaLib/buildlink3.mk"
+.  include "../../graphics/glu/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--disable-gl
+SUBST_CLASSES+=		opengl
+SUBST_STAGE.opengl=	post-configure
+SUBST_FILES.opengl=	Makefile
+SUBST_SED.opengl=	-e 's|OpenGL fluid glut test|fluid|g'
+.endif
diff --git a/fltk2/patches/patch-configure.in b/fltk2/patches/patch-configure.in
new file mode 100644
index 0000000000..f361d454e4
--- /dev/null
+++ b/fltk2/patches/patch-configure.in
@@ -0,0 +1,58 @@
+$NetBSD$
+
+FL_MINOR_VERSION is defined to 1 in headerfile. Use same value here.
+Fix string comparison with "==" to portable "=" sh syntax.
+Remove check for libsupc++.
+
+--- configure.in.orig	2012-03-23 05:49:17.000000000 +0000
++++ configure.in
+@@ -35,7 +35,7 @@ AC_INIT(src/Widget.cxx)
+ 
+ dnl FLTK library versions...
+ FL_MAJOR_VERSION=2
+-FL_MINOR_VERSION=0
++FL_MINOR_VERSION=1
+ FL_PATCH_VERSION=0
+ FL_RELEASE_VERSION=a0
+ FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
+@@ -727,7 +727,7 @@ case $uname in
+ 	)
+ 	dnl Check for the Xshm extension unless disabled...
+         AC_ARG_ENABLE(xshm, [  --enable-xshm           turn on MIT-SHM support (default=no)])
+-	if test x$enable_xshm == xyes; then
++	if test x$enable_xshm = xyes; then
+ 	  AC_CHECK_HEADER(X11/extensions/XShm.h, AC_DEFINE(USE_XSHM),,
+ 	    [#include <X11/Xlib.h>])
+ 	fi
+@@ -854,31 +854,6 @@ if test -n "$GCC"; then
+     # Previous versions of GCC do not have the reliance on the stdc++
+     # or g++ libraries, so the extra supc++ library is not needed.
+ 
+-    AC_MSG_CHECKING(if libsupc++ is required)
+-
+-    SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`"
+-    case "$SUPC" in
+-    	libsupc++.a*)
+-	    # Library not found, so this is and older GCC...
+-	    AC_MSG_RESULT(no)
+-	    ;;
+-	*)
+-            # This is gcc 3.x, and it knows of libsupc++, so we need it
+-	case "$uname" in
+-	    # do not add for Darwin as it is already linked with it
+-	    Darwin*)
+-	    ;;
+-	    *)
+-            LIBS="$LIBS -lsupc++"
+-            AC_MSG_RESULT(yes)
+-	    ;;
+-	esac
+-    esac
+-
+-    if test x$uname != xDarwin; then
+-        CXX="$CC"
+-    fi
+-
+     AC_ARG_ENABLE(exceptions, [  --enable-exceptions     turn on GCC exceptions (default=yes)])
+     if test x$enable_exceptions != xno; then
+         AC_DEFINE(HAVE_EXCEPTIONS)
diff --git a/fltk2/patches/patch-fltk2-config.in b/fltk2/patches/patch-fltk2-config.in
new file mode 100644
index 0000000000..81f5c73669
--- /dev/null
+++ b/fltk2/patches/patch-fltk2-config.in
@@ -0,0 +1,19 @@
+$NetBSD$
+
+Fix string comparison with "==" to portable "=" sh syntax.
+
+--- fltk2-config.in.orig	2012-03-23 05:49:17.000000000 +0000
++++ fltk2-config.in
+@@ -254,10 +254,10 @@ fi
+ #
+ case `uname -s` in
+     MINGW*)
+-	if test "$includedir" == /usr/include; then
++	if test "$includedir" = /usr/include; then
+ 	  includes=-I$includedir
+ 	fi
+-	if test "$libdir" == /usr/lib; then
++	if test "$libdir" = /usr/lib; then
+ 	  libs=-L$libdir
+ 	fi
+ 	;;
diff --git a/fltk2/patches/patch-fltk_string.h b/fltk2/patches/patch-fltk_string.h
new file mode 100644
index 0000000000..88c2c750a7
--- /dev/null
+++ b/fltk2/patches/patch-fltk_string.h
@@ -0,0 +1,34 @@
+$NetBSD$
+
+Use results from configure scripts instead of dedicated conditions.
+
+--- fltk/string.h.orig	2012-03-23 05:49:17.000000000 +0000
++++ fltk/string.h
+@@ -45,6 +45,7 @@
+ # include <string.h>
+ # include <stdarg.h> /* for va_list */
+ # include <stdio.h> /* for sprintf, vsprintf, snprintf and vsnprintf */
++# include <config.h>
+ 
+ /* Windows has equivalent functions, but being Microsoft they added
+    gratuitoius changes to the names to stop code from being portable: */
+@@ -70,13 +71,17 @@ FL_API extern int strcasecmp(const char 
+ FL_API extern int strncasecmp(const char *, const char *, size_t);
+ #endif
+ 
+-#if defined(DOXYGEN) || !defined(__linux) && !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__APPLE__)
++#if !HAVE_SNPRINTF && defined(DOXYGEN)
+ FL_API extern int snprintf(char *, size_t, const char *, ...);
++#endif
++#if !HAVE_VSNPRINTF && defined(DOXYGEN)
+ FL_API extern int vsnprintf(char *, size_t, const char *, va_list ap);
+ #endif
+ 
+-#if defined(DOXYGEN) || !defined(__FreeBSD__) && !defined(__APPLE__)
++#if !HAVE_STRLCAT && defined(DOXYGEN)
+ FL_API extern size_t strlcat(char *, const char *, size_t);
++#endif
++#if !HAVE_STRLCPY && defined(DOXYGEN)
+ FL_API extern size_t strlcpy(char *, const char *, size_t);
+ #endif
+ 
diff --git a/fltk2/patches/patch-fltk_x11.h b/fltk2/patches/patch-fltk_x11.h
new file mode 100644
index 0000000000..34c3fe8279
--- /dev/null
+++ b/fltk2/patches/patch-fltk_x11.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add DragonFly to conditions list.
+
+--- fltk/x11.h.orig	2012-03-23 05:49:17.000000000 +0000
++++ fltk/x11.h
+@@ -69,7 +69,7 @@ header files directly.
+ 
+ #   undef Window
+ 
+-#   if defined(__FreeBSD__) || defined(__APPLE__) || defined(__CYGWIN__)
++#   if defined(__FreeBSD__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__DragonFly__)
+      typedef unsigned long	ulong;
+      typedef unsigned int      	uint;
+      typedef unsigned char	uchar;
diff --git a/fltk2/patches/patch-fluid_FluidType.h b/fltk2/patches/patch-fluid_FluidType.h
new file mode 100644
index 0000000000..70a55a3f40
--- /dev/null
+++ b/fltk2/patches/patch-fluid_FluidType.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Remove default value for parameter.
+
+--- fluid/FluidType.h.orig	2012-03-23 05:49:17.000000000 +0000
++++ fluid/FluidType.h
+@@ -44,7 +44,7 @@
+ class FLUID_API FluidType {
+ 
+   friend class Widget_Browser;
+-  friend fltk::Widget *make_type_browser(int,int,int,int,const char *l=0);
++  friend fltk::Widget *make_type_browser(int,int,int,int,const char *l);
+   friend class WindowType;
+   virtual void setlabel(const char *); // virtual part of label(char*)
+ 
diff --git a/fltk2/patches/patch-images_fl__png.cxx b/fltk2/patches/patch-images_fl__png.cxx
new file mode 100644
index 0000000000..1df109d99e
--- /dev/null
+++ b/fltk2/patches/patch-images_fl__png.cxx
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Include additional headerfiles.
+
+--- images/fl_png.cxx.orig	2012-03-23 05:49:17.000000000 +0000
++++ images/fl_png.cxx
+@@ -40,7 +40,8 @@ extern "C"
+ #endif
+ }
+ 
+-# include <stdlib.h>
++#include <stdlib.h>
++#include <string.h>
+ 
+ static png_bytep cur_datas;
+ 
diff --git a/fltk2/patches/patch-src_Browser.cxx b/fltk2/patches/patch-src_Browser.cxx
new file mode 100644
index 0000000000..1c59fabbc5
--- /dev/null
+++ b/fltk2/patches/patch-src_Browser.cxx
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Fix parameter of callback function.
+
+--- src/Browser.cxx.orig	2012-03-23 05:49:17.000000000 +0000
++++ src/Browser.cxx
+@@ -1900,7 +1900,7 @@ void Browser::column_labels(const char *
+       if (i<nHeader) sides |= 2;
+       header_[i] = new BButton(sides, column_labels_[i]);
+       header_[i]->parent(this);
+-      header_[i]->callback(column_click_cb_, (void*)i);
++      header_[i]->callback(column_click_cb_, &i);
+     }
+     Group::current(g);
+   }
diff --git a/fltk2/patches/patch-src_filename__list.cxx b/fltk2/patches/patch-src_filename__list.cxx
new file mode 100644
index 0000000000..ac7dd5fe12
--- /dev/null
+++ b/fltk2/patches/patch-src_filename__list.cxx
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Add a version check for NetBSD. The nonstandard scandir() parameter types are
+no longer required since version 8. Newer versions will be catched by check
+of configure script and the HAVE_SCANDIR_POSIX condition.
+
+--- src/filename_list.cxx.orig	2012-03-23 05:49:17.000000000 +0000
++++ src/filename_list.cxx
+@@ -67,7 +67,7 @@ int fltk::filename_list(const char *d, d
+ #elif defined(HAVE_SCANDIR_POSIX)
+   // POSIX (2008) defines the comparison function like this:
+   int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
+-#elif defined(__linux) || defined (__FreeBSD__) || defined (__NetBSD__)
++#elif defined(__linux) || defined (__FreeBSD__) || (defined (__NetBSD__) && __NetBSD_Version__-0 < 799005100)
+   int n = scandir(d, list, 0, (int(*)(const void*,const void*))sort);
+ #elif defined(__osf__) || defined(__sgi)
+   // OSF, DU 4.0x


Home | Main Index | Thread Index | Old Index