commit 72fe2c3e68173aabc6b7fe1e88bbc4c352570cc1
Author: Danny Rawlins <monster.romster(a)gmail.com>
Date: Fri Apr 1 16:53:42 2016 +1100
fltk: various bug fixes and visibility fix
diff --git a/fltk/.footprint b/fltk/.footprint
index 5fd2276..5409d69 100644
--- a/fltk/.footprint
+++ b/fltk/.footprint
@@ -160,9 +160,10 @@ lrwxrwxrwx root/root usr/lib/libfltk_gl.so -> libfltk_gl.so.1.3
-rw-r--r-- root/root usr/lib/libfltk_images.a
lrwxrwxrwx root/root usr/lib/libfltk_images.so -> libfltk_images.so.1.3
-rwxr-xr-x root/root usr/lib/libfltk_images.so.1.3
-drwxr-xr-x root/root usr/man/
-drwxr-xr-x root/root usr/man/man1/
--rw-r--r-- root/root usr/man/man1/fltk-config.1.gz
--rw-r--r-- root/root usr/man/man1/fluid.1.gz
-drwxr-xr-x root/root usr/man/man3/
--rw-r--r-- root/root usr/man/man3/fltk.3.gz
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/man/
+drwxr-xr-x root/root usr/share/man/man1/
+-rw-r--r-- root/root usr/share/man/man1/fltk-config.1.gz
+-rw-r--r-- root/root usr/share/man/man1/fluid.1.gz
+drwxr-xr-x root/root usr/share/man/man3/
+-rw-r--r-- root/root usr/share/man/man3/fltk.3.gz
diff --git a/fltk/.md5sum b/fltk/.md5sum
index 4483790..6718377 100644
--- a/fltk/.md5sum
+++ b/fltk/.md5sum
@@ -1 +1,9 @@
+5a4e3cc47e0f96d104f15df9886f5973 fltk-1.3.0-share.patch
+a55c0913b68e38e501d1ee9a562b0015 fltk-1.3.2-conf-tests.patch
+4b9d76f538f768e013f438ec5ad3a138 fltk-1.3.2-desktop.patch
+33c7217a328253d9d21d4341ae5721b9 fltk-1.3.2-jpeg-9a.patch
+de5f7482023bd3976e20dbf51826c941 fltk-1.3.3-fl_open_display.patch
+96cefaadc8c0524e0f4acae6974288c0 fltk-1.3.3-fltk-config.patch
9ccdb0d19dc104b87179bd9fd10822e3 fltk-1.3.3-source.tar.gz
+aecd85b9508b5971f68f4f4905118ce6 fltk-1.3.3-visibility.patch
+23d2da0d79f5b0d17c8ae0b6c0511d28 fltk-1.3.3-xutf8-visibility.patch
diff --git a/fltk/Pkgfile b/fltk/Pkgfile
index 4a90fc3..835c102 100644
--- a/fltk/Pkgfile
+++ b/fltk/Pkgfile
@@ -6,21 +6,39 @@
name=fltk
version=1.3.3
-release=1
-source=(http://fltk.org/pub/fltk/$version/$name-$version-source.tar.gz)
+release=2
+source=(http://fltk.org/pub/fltk/$version/$name-$version-source.tar.gz
+ fltk-1.3.2-desktop.patch
+ fltk-1.3.0-share.patch
+ fltk-1.3.2-conf-tests.patch
+ fltk-1.3.2-jpeg-9a.patch
+ fltk-1.3.3-visibility.patch
+ fltk-1.3.3-fl_open_display.patch
+ fltk-1.3.3-fltk-config.patch
+ fltk-1.3.3-xutf8-visibility.patch)
build() {
cd fltk-$version
+ patch -p1 -i $SRC/fltk-1.3.2-desktop.patch
+ patch -p1 -i $SRC/fltk-1.3.0-share.patch
+ patch -p1 -i $SRC/fltk-1.3.2-conf-tests.patch
+ patch -p0 -i $SRC/fltk-1.3.2-jpeg-9a.patch
+ patch -p1 -i $SRC/fltk-1.3.3-visibility.patch
+ patch -p1 -i $SRC/fltk-1.3.3-fl_open_display.patch
+ patch -p1 -i $SRC/fltk-1.3.3-fltk-config.patch
+ patch -p1 -i $SRC/fltk-1.3.3-xutf8-visibility.patch
+
./configure \
--prefix=/usr \
- --mandir=/usr/man \
--enable-threads \
--enable-shared \
--enable-xft
make
make DESTDIR=$PKG install
+
chmod a-x $PKG/usr/lib/*.a
- rm -r $PKG/usr/{share,man/cat?}
+
+ rm -r $PKG/usr/share/doc
}
diff --git a/fltk/fltk-1.3.0-share.patch b/fltk/fltk-1.3.0-share.patch
new file mode 100644
index 0000000..4b4267a
--- /dev/null
+++ b/fltk/fltk-1.3.0-share.patch
@@ -0,0 +1,44 @@
+ fluid/Makefile | 20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/fluid/Makefile b/fluid/Makefile
+index 1cb3210..9d438a5 100644
+--- a/fluid/Makefile
++++ b/fluid/Makefile
+@@ -82,16 +82,16 @@ install: all
+ $(INSTALL_BIN) $(FLUID) $(DESTDIR)$(bindir)/fluid$(EXEEXT)
+
+ install-linux:
+- -$(INSTALL_DIR) $(DESTDIR)/usr/share/applications
+- $(INSTALL_DATA) fluid.desktop $(DESTDIR)/usr/share/applications
++ -$(INSTALL_DIR) $(DESTDIR)$(datadir)/applications
++ $(INSTALL_DATA) fluid.desktop $(DESTDIR)$(datadir)/applications
+ for size in 16 32 48 64 128; do \
+- if test ! -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; then \
+- $(INSTALL_DIR) $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \
++ if test ! -d $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps; then \
++ $(INSTALL_DIR) $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps; \
+ fi; \
+- $(INSTALL_DATA) icons/fluid-$$size.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/fluid.png; \
++ $(INSTALL_DATA) icons/fluid-$$size.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/fluid.png; \
+ done
+- -$(INSTALL_DIR) $(DESTDIR)/usr/share/mimelnk/application
+- $(INSTALL_DATA) x-fluid.desktop $(DESTDIR)/usr/share/mimelnk/application
++ -$(INSTALL_DIR) $(DESTDIR)$(datadir)/mimelnk/application
++ $(INSTALL_DATA) x-fluid.desktop $(DESTDIR)$(datadir)/mimelnk/application
+
+ install-osx:
+ echo Installing Fluid in $(DESTDIR)/Applications...
+@@ -109,9 +109,9 @@ uninstall:
+ $(RM) $(DESTDIR)$(bindir)/fluid$(EXEEXT)
+
+ uninstall-linux:
+- $(RM) $(DESTDIR)/usr/share/applications/fluid.desktop
+- $(RM) $(DESTDIR)/usr/share/icons/hicolor/*/fluid.png
+- $(RM) $(DESTDIR)/usr/share/mimelnk/application/x-fluid.desktop
++ $(RM) $(DESTDIR)$(datadir)/applications/fluid.desktop
++ $(RM) $(DESTDIR)$(datadir)/icons/hicolor/*/fluid.png
++ $(RM) $(DESTDIR)$(datadir)/mimelnk/application/x-fluid.desktop
+
+ uninstall-osx:
+ $(RM) -r $(DESTDIR)/Applications/fluid.app
diff --git a/fltk/fltk-1.3.2-conf-tests.patch b/fltk/fltk-1.3.2-conf-tests.patch
new file mode 100644
index 0000000..74022a7
--- /dev/null
+++ b/fltk/fltk-1.3.2-conf-tests.patch
@@ -0,0 +1,55 @@
+--- a/Makefile
++++ b/Makefile
+@@ -100,9 +103,6 @@
+ touch config.h
+ chmod +x fltk-config
+
+-configure: configure.in
+- autoconf
+-
+ config.guess config.sub:
+ -automake --add-missing 2> /dev/null
+ if [ ! -e config.sub ]; then echo NOTE: Using frozen copy of config.sub; cp misc/config.sub . ; fi
+--- a/documentation/Makefile
++++ b/documentation/Makefile
+@@ -84,11 +84,6 @@
+ $(INSTALL_DATA) fltk.pdf $(DESTDIR)$(docdir); \
+ fi
+ echo "Installing man pages in $(DESTDIR)$(mandir) ..."
+- -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat1
+- $(INSTALL_MAN) $(SRC_DOCDIR)/fluid.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
+- $(INSTALL_MAN) $(SRC_DOCDIR)/fltk-config.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
+- -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat3
+- $(INSTALL_MAN) $(SRC_DOCDIR)/fltk.$(CAT3EXT) $(DESTDIR)$(mandir)/cat3
+ -$(INSTALL_DIR) $(DESTDIR)$(mandir)/man1
+ $(INSTALL_MAN) $(SRC_DOCDIR)/fluid.man $(DESTDIR)$(mandir)/man1/fluid.1
+ $(INSTALL_MAN) $(SRC_DOCDIR)/fltk-config.man $(DESTDIR)$(mandir)/man1/fltk-config.1
+@@ -96,10 +91,6 @@
+ $(INSTALL_MAN) $(SRC_DOCDIR)/fltk.man $(DESTDIR)$(mandir)/man3/fltk.3
+
+ install-linux install-osx:
+- -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat6
+- $(INSTALL_MAN) $(SRC_DOCDIR)/blocks.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
+- $(INSTALL_MAN) $(SRC_DOCDIR)/checkers.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
+- $(INSTALL_MAN) $(SRC_DOCDIR)/sudoku.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
+ -$(INSTALL_DIR) $(DESTDIR)$(mandir)/man6
+ $(INSTALL_MAN) $(SRC_DOCDIR)/blocks.man $(DESTDIR)$(mandir)/man6/blocks.6
+ $(INSTALL_MAN) $(SRC_DOCDIR)/checkers.man $(DESTDIR)$(mandir)/man6/checkers.6
+@@ -108,17 +99,11 @@
+
+ uninstall:
+ $(RMDIR) $(DESTDIR)$(docdir)
+- $(RM) $(DESTDIR)$(mandir)/cat1/fluid.$(CAT1EXT)
+ $(RM) $(DESTDIR)$(mandir)/man1/fluid.1
+- $(RM) $(DESTDIR)$(mandir)/cat1/fltk-config.$(CAT1EXT)
+ $(RM) $(DESTDIR)$(mandir)/man1/fltk-config.1
+- $(RM) $(DESTDIR)$(mandir)/cat3/fltk.$(CAT3EXT)
+ $(RM) $(DESTDIR)$(mandir)/man3/fltk.3
+
+ uninstall-linux uninstall-osx:
+- $(RM) $(DESTDIR)$(mandir)/cat6/blocks.$(CAT6EXT)
+- $(RM) $(DESTDIR)$(mandir)/cat6/checkers.$(CAT6EXT)
+- $(RM) $(DESTDIR)$(mandir)/cat6/sudoku.$(CAT6EXT)
+ $(RM) $(DESTDIR)$(mandir)/man6/blocks.6
+ $(RM) $(DESTDIR)$(mandir)/man6/checkers.6
+ $(RM) $(DESTDIR)$(mandir)/man6/sudoku.6
diff --git a/fltk/fltk-1.3.2-desktop.patch b/fltk/fltk-1.3.2-desktop.patch
new file mode 100644
index 0000000..abec41a
--- /dev/null
+++ b/fltk/fltk-1.3.2-desktop.patch
@@ -0,0 +1,19 @@
+--- fltk-1.3.2/fluid/fluid.desktop
++++ fltk-1.3.2/fluid/fluid.desktop
+@@ -6,5 +6,5 @@
+ Icon=fluid
+ Terminal=false
+ Type=Application
+-MimeType=application/x-fluid
++MimeType=application/x-fluid;
+ Categories=Development;GUIDesigner;
+--- fltk-1.3.2/fluid/x-fluid.desktop
++++ fltk-1.3.2/fluid/x-fluid.desktop
+@@ -1,6 +1,6 @@
+ [Desktop Entry]
+ Type=MimeType
+-MimeType=application/x-fluid
++MimeType=application/x-fluid;
+ Icon=fluid.png
+ Patterns=*.fl
+ Name=FLUID
diff --git a/fltk/fltk-1.3.2-jpeg-9a.patch b/fltk/fltk-1.3.2-jpeg-9a.patch
new file mode 100644
index 0000000..701f04c
--- /dev/null
+++ b/fltk/fltk-1.3.2-jpeg-9a.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/479774
+
+--- src/Fl_JPEG_Image.cxx
++++ src/Fl_JPEG_Image.cxx
+@@ -155,7 +155,7 @@
+
+ jpeg_create_decompress(&dinfo);
+ jpeg_stdio_src(&dinfo, fp);
+- jpeg_read_header(&dinfo, 1);
++ jpeg_read_header(&dinfo, TRUE);
+
+ dinfo.quantize_colors = (boolean)FALSE;
+ dinfo.out_color_space = JCS_RGB;
+@@ -337,7 +337,7 @@
+
+ jpeg_create_decompress(&dinfo);
+ jpeg_mem_src(&dinfo, data);
+- jpeg_read_header(&dinfo, 1);
++ jpeg_read_header(&dinfo, TRUE);
+
+ dinfo.quantize_colors = (boolean)FALSE;
+ dinfo.out_color_space = JCS_RGB;
diff --git a/fltk/fltk-1.3.3-fl_open_display.patch b/fltk/fltk-1.3.3-fl_open_display.patch
new file mode 100644
index 0000000..562f115
--- /dev/null
+++ b/fltk/fltk-1.3.3-fl_open_display.patch
@@ -0,0 +1,10 @@
+--- a/src/Fl_x.cxx
++++ b/src/Fl_x.cxx
+@@ -2211,6 +2211,7 @@
+ static int result = -1;
+
+ if (result == -1) {
++ fl_open_display();
+ result = 0;
+ unsigned long nitems;
+ unsigned long *words = 0;
diff --git a/fltk/fltk-1.3.3-fltk-config.patch b/fltk/fltk-1.3.3-fltk-config.patch
new file mode 100644
index 0000000..ca7607a
--- /dev/null
+++ b/fltk/fltk-1.3.3-fltk-config.patch
@@ -0,0 +1,14 @@
+--- a/fltk-config.in
++++ b/fltk-config.in
+@@ -42,9 +42,8 @@
+
+ # flags for C++ compiler:
+ ARCHFLAGS="@ARCHFLAGS@"
+-CFLAGS="@CFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@"
+-CXXFLAGS="@CXXFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@"
+-LDFLAGS="@LDFLAGS@"
++CFLAGS=" @LARGEFILE@ @PTHREAD_FLAGS@"
++CXXFLAGS=" @LARGEFILE@ @PTHREAD_FLAGS@"
+ LDLIBS="@LIBS@"
+ OPTIM="@OPTIM@"
+ CAIROFLAGS="@CAIROFLAGS@"
diff --git a/fltk/fltk-1.3.3-visibility.patch b/fltk/fltk-1.3.3-visibility.patch
new file mode 100644
index 0000000..491e0a1
--- /dev/null
+++ b/fltk/fltk-1.3.3-visibility.patch
@@ -0,0 +1,22 @@
+--- a/src/Fl.cxx
++++ b/src/Fl.cxx
+@@ -928,7 +928,7 @@
+
+ ////////////////////////////////////////////////////////////////
+
+-Fl_Widget* fl_oldfocus; // kludge for Fl_Group...
++FL_EXPORT Fl_Widget* fl_oldfocus; // kludge for Fl_Group...
+
+ /**
+ Sets the widget that will receive FL_KEYBOARD events.
+--- a/FL/x.H
++++ b/FL/x.H
+@@ -114,7 +114,7 @@ FL_EXPORT Fl_Region XRectangleRegion(int x, int y, int w, int h); // in fl_rect.
+ // With Xlib / X11 fonts, fl_xfont will return the current selected font.
+ // With XFT / X11 fonts, fl_xfont will attempt to return the bitmap "core" font most
+ // similar to (usually the same as) the current XFT font.
+-class Fl_XFont_On_Demand
++class FL_EXPORT Fl_XFont_On_Demand
+ {
+ public:
+ Fl_XFont_On_Demand(XFontStruct* p = NULL) : ptr(p) { }
diff --git a/fltk/fltk-1.3.3-xutf8-visibility.patch b/fltk/fltk-1.3.3-xutf8-visibility.patch
new file mode 100644
index 0000000..f30105e
--- /dev/null
+++ b/fltk/fltk-1.3.3-xutf8-visibility.patch
@@ -0,0 +1,165 @@
+--- a/src/xutf8/utf8Input.c
++++ b/src/xutf8/utf8Input.c
+@@ -18,6 +18,7 @@
+
+ #include <config.h>
+ #include "../Xutf8.h"
++#include "../../FL/Fl_Export.H"
+ #include <X11/X.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+@@ -53,7 +54,7 @@ typedef struct {
+ #include "lcUniConv/jisx0212.h"
+ #include "lcUniConv/ksc5601.h"
+
+-static int
++FL_EXPORT static int
+ XConvertEucTwToUtf8(char* buffer_return, int len) {
+ /* FIXME */
+ #if HAVE_LIBC_ICONV
+@@ -120,7 +121,7 @@ XConvertEucTwToUtf8(char* buffer_return,
+ return l;
+ }
+
+-static int
++FL_EXPORT static int
+ XConvertEucKrToUtf8(char* buffer_return, int len) {
+ int i = 0, l = 0;
+ char *buf;
+@@ -160,7 +161,7 @@ XConvertEucKrToUtf8(char* buffer_return,
+ return l;
+ }
+
+-static int
++FL_EXPORT static int
+ XConvertBig5ToUtf8(char* buffer_return, int len) {
+ int i = 0, l = 0;
+ char *buf;
+@@ -189,7 +190,7 @@ XConvertBig5ToUtf8(char* buffer_return,
+ return l;
+ }
+
+-static int
++FL_EXPORT static int
+ XConvertCp936extToUtf8(char* buffer_return, int len)
+ {
+ int i = 0, l = 0;
+@@ -226,7 +227,7 @@ XConvertCp936extToUtf8(char* buffer_retu
+ return l;
+ }
+
+-static int
++FL_EXPORT static int
+ XConvertGb2312ToUtf8(char* buffer_return, int len) {
+ int i = 0, l = 0;
+ char *buf;
+@@ -261,7 +262,7 @@ XConvertGb2312ToUtf8(char* buffer_return
+ return l;
+ }
+
+-static int
++FL_EXPORT static int
+ XConvertEucCnToUtf8(char* buffer_return, int len) {
+ int i = 0, l = 0;
+ char *buf;
+@@ -300,7 +301,7 @@ XConvertEucCnToUtf8(char* buffer_return,
+ return l;
+ }
+
+-static int
++FL_EXPORT static int
+ XConvertEucJpToUtf8(char* buffer_return, int len) {
+ int i = 0, l = 0;
+ char *buf;
+@@ -373,7 +374,7 @@ XConvertEucJpToUtf8(char* buffer_return,
+ return l;
+ }
+
+-static int
++FL_EXPORT static int
+ XConvertEucToUtf8(const char* locale,
+ char* buffer_return,
+ int len,
+@@ -408,7 +409,7 @@ XConvertEucToUtf8(const char* locale,
+ return len;
+ }
+
+-int
++FL_EXPORT int
+ XUtf8LookupString(XIC ic,
+ XKeyPressedEvent* event,
+ char* buffer_return,
+--- a/src/xutf8/utf8Utils.c
++++ b/src/xutf8/utf8Utils.c
+@@ -21,6 +21,7 @@
+ #if !defined(WIN32) && !defined(__APPLE__)
+
+ #include "../Xutf8.h"
++#include "../../FL/Fl_Export.H"
+
+ /*** NOTE : all functions are LIMITED to 24 bits Unicode values !!! ***/
+
+@@ -29,7 +30,7 @@
+ * Returns the byte length of the converted UTF-8 char
+ * Returns -1 if the UTF-8 string is not valid
+ */
+-int
++FL_EXPORT int
+ XConvertUtf8ToUcs(const unsigned char *buf,
+ int len,
+ unsigned int *ucs) {
+@@ -137,7 +138,7 @@ XConvertUcsToUtf8(unsigned int ucs,
+ * returns the byte length of the first UTF-8 char
+ * (returns -1 if not valid)
+ */
+-int
++FL_EXPORT int
+ XUtf8CharByteLen(const unsigned char *buf,
+ int len) {
+ unsigned int ucs;
+@@ -165,7 +166,7 @@ XCountUtf8Char(const unsigned char *buf
+ /*
+ * Same as XConvertUtf8ToUcs but no sanity check is done.
+ */
+-int
++FL_EXPORT int
+ XFastConvertUtf8ToUcs(const unsigned char *buf,
+ int len,
+ unsigned int *ucs) {
+--- a/src/xutf8/utf8Wrap.c
++++ b/src/xutf8/utf8Wrap.c
+@@ -20,6 +20,7 @@
+ #if !defined(WIN32) && !defined(__APPLE__)
+
+ #include "../Xutf8.h"
++#include "../../FL/Fl_Export.H"
+ #include <X11/Xlib.h>
+ #include <ctype.h>
+ #include <stdlib.h>
+@@ -705,7 +706,7 @@ XUtf8_measure_extents(
+ /*****************************************************************************/
+ /** returns the pixel width of a UTF-8 string **/
+ /*****************************************************************************/
+-int
++FL_EXPORT int
+ XUtf8TextWidth(XUtf8FontStruct *font_set,
+ const char *string,
+ int num_bytes) {
+@@ -815,7 +816,7 @@ XUtf8TextWidth(XUtf8FontStruct *font_se
+ /*****************************************************************************/
+ /** get the X font and glyph ID of a UCS char **/
+ /*****************************************************************************/
+-int
++FL_EXPORT int
+ XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set,
+ unsigned int ucs,
+ XFontStruct **fnt,
+@@ -886,7 +887,7 @@ XGetUtf8FontAndGlyph(XUtf8FontStruct *f
+ /*****************************************************************************/
+ /** returns the pixel width of a UCS char **/
+ /*****************************************************************************/
+-int
++FL_EXPORT int
+ XUtf8UcsWidth(XUtf8FontStruct *font_set,
+ unsigned int ucs) {
+