summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-libs/fltk')
-rw-r--r--x11-libs/fltk/Manifest2
-rw-r--r--x11-libs/fltk/files/FLTKConfig.cmake37
-rw-r--r--x11-libs/fltk/files/fltk-1.3.0-conf-tests.patch79
-rw-r--r--x11-libs/fltk/files/fltk-1.3.0-share.patch44
-rw-r--r--x11-libs/fltk/files/fltk-1.3.1-as-needed.patch154
-rw-r--r--x11-libs/fltk/files/fltk-1.3.2-conf-tests.patch55
-rw-r--r--x11-libs/fltk/files/fltk-1.3.2-desktop.patch19
-rw-r--r--x11-libs/fltk/files/fltk-1.3.2-jpeg-9a.patch22
-rw-r--r--x11-libs/fltk/files/fltk-1.3.3-fl_open_display.patch10
-rw-r--r--x11-libs/fltk/files/fltk-1.3.3-fltk-config.patch14
-rw-r--r--x11-libs/fltk/files/fltk-1.3.3-visibility.patch22
-rw-r--r--x11-libs/fltk/files/fltk-1.3.3-xutf8-visibility.patch165
-rw-r--r--x11-libs/fltk/fltk-1.3.2.ebuild153
-rw-r--r--x11-libs/fltk/fltk-1.3.3-r3.ebuild170
-rw-r--r--x11-libs/fltk/fltk-1.3.9999.ebuild173
-rw-r--r--x11-libs/fltk/metadata.xml15
16 files changed, 1134 insertions, 0 deletions
diff --git a/x11-libs/fltk/Manifest b/x11-libs/fltk/Manifest
new file mode 100644
index 000000000000..66b6807a9543
--- /dev/null
+++ b/x11-libs/fltk/Manifest
@@ -0,0 +1,2 @@
+DIST fltk-1.3.2-source.tar.gz 4260874 SHA256 176044df94f31bd53a5806cf5054ca78b180bf9ae27ce47649608833695ee4a4 SHA512 9372a34d8dfc4b4ece7632683c1c92f9ea9e538ba6eec08bec69615e2b2c885957d229a5ec495830f673b6a059f55a94b61727e8eb1fb7b3bd37005dc0b8312e WHIRLPOOL 10c85d1ae50ccd3d9f66285483d39bc0e61b9f3306f87412841ceed9a45fd45f0476b28f7e7652658f6fcc48533d1ec4974a9eb98ca0f535b662a70209c1f781
+DIST fltk-1.3.3-source.tar.gz 4986376 SHA256 f8398d98d7221d40e77bc7b19e761adaf2f1ef8bb0c30eceb7beb4f2273d0d97 SHA512 277ba27e35c20e2d4fc5296bf418c5ab78c821870476e21d49f723765b99b3a559eed4ecd5215ac26d53a1091ada003e17f1553194cebaa97dd854809dd2885d WHIRLPOOL 876a92e44dac20e6a2d86e4339a87185e708718d4cc59983bd81d5c3f0100d52230ef34d9c92800a2a07f6e7ed26e2ba9212c01ce898e7a184a7a35c40837761
diff --git a/x11-libs/fltk/files/FLTKConfig.cmake b/x11-libs/fltk/files/FLTKConfig.cmake
new file mode 100644
index 000000000000..09427aac2aa5
--- /dev/null
+++ b/x11-libs/fltk/files/FLTKConfig.cmake
@@ -0,0 +1,37 @@
+#-----------------------------------------------------------------------------
+#
+# FLTKConfig.cmake - FLTK CMake configuration file for external projects.
+#
+# This file is configured by FLTK and used by the UseFLTK.cmake module
+# to load FLTK's settings for an external project.
+
+# The FLTK source tree.
+# SET(FLTK_SOURCE_DIR "@FLTK_SOURCE_DIR@")
+
+# The FLTK include file directories.
+SET(FLUID_COMMAND "/usr/bin/fluid")
+SET(FLTK_EXECUTABLE_DIRS "/usr/bin")
+SET(FLTK_LIBRARY_DIRS "/usr/lib")
+SET(FLTK_LIBRARIES "fltk_images;fltk_gl;fltk_forms;fltk")
+SET(FLTK_INCLUDE_DIRS "/usr/include")
+
+# The C and C++ flags added by FLTK to the cmake-configured flags.
+SET(FLTK_REQUIRED_C_FLAGS "")
+SET(FLTK_REQUIRED_CXX_FLAGS "")
+
+# The FLTK version number
+SET(FLTK_VERSION_MAJOR "1")
+SET(FLTK_VERSION_MINOR "1")
+SET(FLTK_VERSION_PATCH "7")
+
+# Is FLTK using shared libraries?
+SET(FLTK_BUILD_SHARED_LIBS "ON")
+# SET(FLTK_BUILD_SETTINGS_FILE "@FLTK_BUILD_SETTINGS_FILE@")
+
+# The location of the UseFLTK.cmake file.
+SET(FLTK11_USE_FILE "/usr/share/cmake/Modules/FLTKUse.cmake")
+
+# # The ExodusII library dependencies.
+# IF(NOT FLTK_NO_LIBRARY_DEPENDS)
+# INCLUDE("@FLTK_LIBRARY_DEPENDS_FILE@")
+# ENDIF(NOT FLTK_NO_LIBRARY_DEPENDS)
diff --git a/x11-libs/fltk/files/fltk-1.3.0-conf-tests.patch b/x11-libs/fltk/files/fltk-1.3.0-conf-tests.patch
new file mode 100644
index 000000000000..f5e2a1fdbfe2
--- /dev/null
+++ b/x11-libs/fltk/files/fltk-1.3.0-conf-tests.patch
@@ -0,0 +1,79 @@
+diff --git a/Makefile b/Makefile
+index ccec15c..747625e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -27,7 +27,7 @@
+
+ include makeinclude
+
+-DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid test documentation
++DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid
+
+ all: makeinclude fltk-config
+ for dir in $(DIRS); do\
+@@ -35,6 +35,10 @@ all: makeinclude fltk-config
+ (cd $$dir; $(MAKE) $(MFLAGS)) || exit 1;\
+ done
+
++check: all
++ $(MAKE) $(MFLAGS) -C test || exit 1
++
++
+ install: makeinclude
+ -mkdir -p $(DESTDIR)$(bindir)
+ $(RM) $(DESTDIR)$(bindir)/fltk-config
+@@ -109,9 +113,6 @@ makeinclude: configure configh.in makeinclude.in
+ touch config.h
+ chmod +x fltk-config
+
+-configure: configure.in
+- autoconf
+-
+ portable-dist:
+ epm -v -s fltk.xpm fltk
+
+diff --git a/documentation/Makefile b/documentation/Makefile
+index 1742cfa..8102c43 100644
+--- a/documentation/Makefile
++++ b/documentation/Makefile
+@@ -92,11 +92,6 @@ install: $(MANPAGES)
+ $(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
+@@ -104,10 +99,6 @@ install: $(MANPAGES)
+ $(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
+@@ -116,17 +107,11 @@ install-linux install-osx:
+
+ 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/x11-libs/fltk/files/fltk-1.3.0-share.patch b/x11-libs/fltk/files/fltk-1.3.0-share.patch
new file mode 100644
index 000000000000..4b4267a4986c
--- /dev/null
+++ b/x11-libs/fltk/files/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/x11-libs/fltk/files/fltk-1.3.1-as-needed.patch b/x11-libs/fltk/files/fltk-1.3.1-as-needed.patch
new file mode 100644
index 000000000000..c6539fc7ec21
--- /dev/null
+++ b/x11-libs/fltk/files/fltk-1.3.1-as-needed.patch
@@ -0,0 +1,154 @@
+ cairo/Makefile | 4 ++--
+ configure.in | 9 +++------
+ src/Makefile | 24 ++++++++++++------------
+ 3 files changed, 17 insertions(+), 20 deletions(-)
+
+diff --git a/cairo/Makefile b/cairo/Makefile
+index 3cefc9f..445cd9c 100644
+--- a/cairo/Makefile
++++ b/cairo/Makefile
+@@ -48,13 +48,13 @@ $(CAIROLIBNAME): $(CAIROOBJECTS)
+
+ libfltk_cairo.so.1.3: $(CAIROOBJECTS) ../src/libfltk.so.1.3
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(CAIROOBJECTS) -L../src -lfltk
++ $(DSOCOMMAND) $@ $(CAIROOBJECTS) -L../src -lfltk $(CAIROLIBS)
+ $(RM) libfltk_cairo.so
+ $(LN) $(CAIRODSONAME) libfltk_cairo.so
+
+ libfltk_cairo.sl.1.3: $(CAIROOBJECTS) ../src/libfltk.sl.1.3
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(CAIROOBJECTS) -L../src -lfltk
++ $(DSOCOMMAND) $@ $(CAIROOBJECTS) -L../src -lfltk $(CAIROLIBS)
+ $(RM) libfltk_cairo.sl
+ $(LN) libfltk_cairo.sl.1.3 libfltk_cairo.sl
+
+diff --git a/configure.in b/configure.in
+index 762d3f9..56a5d97 100644
+--- a/configure.in
++++ b/configure.in
+@@ -166,7 +166,7 @@ else
+ dnl we do not rely on pkg-config .
+ CAIRODIR="cairo"
+ CAIROFLAGS="`pkg-config --cflags cairo`"
+- CAIROLIBS="-lcairo -lpixman-1"
++ CAIROLIBS="`pkg-config --libs cairo pixman-1`"
+ CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
+ LINKFLTKCAIRO="../lib/libfltk_cairo.a"
+ FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
+@@ -280,10 +280,7 @@ if test x$enable_shared = xyes; then
+ GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
+ IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
+ CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
+- DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
+- if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then
+- DSOLINK="-Wl,-rpath,$libdir"
+- fi
++ DSOCOMMAND="\$(CXX) \$(DSOFLAGS) \$(LDFLAGS) -Wl,-soname,\$@ -shared -fPIC $DEBUGFLAG -o"
+ ;;
+ AIX*)
+ DSONAME="libfltk_s.a"
+diff --git a/src/Makefile b/src/Makefile
+index 7806854..a43106e 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -240,13 +240,13 @@ $(LIBNAME): $(OBJECTS)
+
+ libfltk.so.1.3: $(OBJECTS)
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(OBJECTS)
++ $(DSOCOMMAND) $@ $(OBJECTS) $(LDLIBS)
+ $(RM) libfltk.so
+ $(LN) libfltk.so.1.3 libfltk.so
+
+ libfltk.sl.1.3: $(OBJECTS)
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(OBJECTS)
++ $(DSOCOMMAND) $@ $(OBJECTS) $(LDLIBS)
+ $(RM) libfltk.sl
+ $(LN) libfltk.sl.1.3 libfltk.sl
+
+@@ -262,7 +262,7 @@ libfltk.1.3.dylib: $(OBJECTS)
+
+ libfltk_s.a: $(OBJECTS)
+ echo $(DSOCOMMAND) libfltk_s.o ...
+- $(DSOCOMMAND) libfltk_s.o $(OBJECTS) $(IMAGELIBS)
++ $(DSOCOMMAND) libfltk_s.o $(OBJECTS) $(IMAGELIBS) $(LDLIBS)
+ echo $(LIBCOMMAND) libfltk_s.a libfltk_s.o
+ $(RM) $@
+ $(LIBCOMMAND) libfltk_s.a libfltk_s.o
+@@ -276,13 +276,13 @@ $(FLLIBNAME): $(FLOBJECTS)
+
+ libfltk_forms.so.1.3: $(FLOBJECTS) libfltk.so.1.3
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(FLOBJECTS) -L. -lfltk
++ $(DSOCOMMAND) $@ $(FLOBJECTS) $(LDLIBS) -L. -lfltk
+ $(RM) libfltk_forms.so
+ $(LN) libfltk_forms.so.1.3 libfltk_forms.so
+
+ libfltk_forms.sl.1.3: $(FLOBJECTS) libfltk.sl.1.3
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(FLOBJECTS) -L. -lfltk
++ $(DSOCOMMAND) $@ $(FLOBJECTS) $(LDLIBS) -L. -lfltk
+ $(RM) libfltk_forms.sl
+ $(LN) libfltk_forms.sl.1.3 libfltk_forms.sl
+
+@@ -298,7 +298,7 @@ libfltk_forms.1.3.dylib: $(FLOBJECTS) libfltk.1.3.dylib
+
+ libfltk_forms_s.a: $(FLOBJECTS)
+ echo $(DSOCOMMAND) libfltk_forms_s.o ...
+- $(DSOCOMMAND) libfltk_forms_s.o $(FLOBJECTS)
++ $(DSOCOMMAND) libfltk_forms_s.o $(FLOBJECTS) $(LDLIBS)
+ echo $(LIBCOMMAND) libfltk_forms_s.a libfltk_forms_s.o
+ $(RM) $@
+ $(LIBCOMMAND) libfltk_forms_s.a libfltk_forms_s.o
+@@ -312,13 +312,13 @@ $(GLLIBNAME): $(GLOBJECTS)
+
+ libfltk_gl.so.1.3: $(GLOBJECTS) libfltk.so.1.3
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(GLOBJECTS) -L. -lfltk
++ $(DSOCOMMAND) $@ $(GLOBJECTS) $(LDLIBS) -L. -lfltk $(GLDLIBS) $(GLLIB)
+ $(RM) libfltk_gl.so
+ $(LN) libfltk_gl.so.1.3 libfltk_gl.so
+
+ libfltk_gl.sl.1.3: $(GLOBJECTS) libfltk.sl.1.3
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(GLOBJECTS) -L. -lfltk
++ $(DSOCOMMAND) $@ $(GLOBJECTS) $(LDLIBS) -L. -lfltk
+ $(RM) libfltk_gl.sl
+ $(LN) libfltk_gl.sl.1.3 libfltk_gl.sl
+
+@@ -334,7 +334,7 @@ libfltk_gl.1.3.dylib: $(GLOBJECTS) libfltk.1.3.dylib
+
+ libfltk_gl_s.a: $(GLOBJECTS)
+ echo $(DSOCOMMAND) libfltk_gl_s.o ...
+- $(DSOCOMMAND) libfltk_gl_s.o $(GLOBJECTS)
++ $(DSOCOMMAND) libfltk_gl_s.o $(GLOBJECTS) $(LDLIBS) $(GLLIB)
+ echo $(LIBCOMMAND) libfltk_gl_s.a libfltk_gl_s.o
+ $(RM) $@
+ $(LIBCOMMAND) libfltk_gl_s.a libfltk_gl_s.o
+@@ -348,13 +348,13 @@ $(IMGLIBNAME): $(IMGOBJECTS)
+
+ libfltk_images.so.1.3: $(IMGOBJECTS) libfltk.so.1.3
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(IMGOBJECTS) -L. $(IMAGELIBS) -lfltk
++ $(DSOCOMMAND) $@ $(IMGOBJECTS) -L. $(IMAGELIBS) $(LDLIBS) -lfltk
+ $(RM) libfltk_images.so
+ $(LN) libfltk_images.so.1.3 libfltk_images.so
+
+ libfltk_images.sl.1.3: $(IMGOBJECTS) libfltk.sl.1.3
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(IMGOBJECTS) -L. $(IMAGELIBS) -lfltk
++ $(DSOCOMMAND) $@ $(IMGOBJECTS) -L. $(IMAGELIBS) $(LDLIBS) -lfltk
+ $(RM) libfltk_images.sl
+ $(LN) libfltk_images.sl.1.3 libfltk_images.sl
+
+@@ -370,7 +370,7 @@ libfltk_images.1.3.dylib: $(IMGOBJECTS) libfltk.1.3.dylib
+
+ libfltk_images_s.a: $(IMGOBJECTS)
+ echo $(DSOCOMMAND) libfltk_images_s.o ...
+- $(DSOCOMMAND) libfltk_images_s.o $(IMGOBJECTS)
++ $(DSOCOMMAND) libfltk_images_s.o $(IMGOBJECTS) $(LDLIBS)
+ echo $(LIBCOMMAND) libfltk_images_s.a libfltk_images_s.o
+ $(RM) $@
+ $(LIBCOMMAND) libfltk_images_s.a libfltk_images_s.o
diff --git a/x11-libs/fltk/files/fltk-1.3.2-conf-tests.patch b/x11-libs/fltk/files/fltk-1.3.2-conf-tests.patch
new file mode 100644
index 000000000000..74022a72ffb9
--- /dev/null
+++ b/x11-libs/fltk/files/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/x11-libs/fltk/files/fltk-1.3.2-desktop.patch b/x11-libs/fltk/files/fltk-1.3.2-desktop.patch
new file mode 100644
index 000000000000..abec41a4b057
--- /dev/null
+++ b/x11-libs/fltk/files/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/x11-libs/fltk/files/fltk-1.3.2-jpeg-9a.patch b/x11-libs/fltk/files/fltk-1.3.2-jpeg-9a.patch
new file mode 100644
index 000000000000..701f04ca6168
--- /dev/null
+++ b/x11-libs/fltk/files/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/x11-libs/fltk/files/fltk-1.3.3-fl_open_display.patch b/x11-libs/fltk/files/fltk-1.3.3-fl_open_display.patch
new file mode 100644
index 000000000000..562f1157038f
--- /dev/null
+++ b/x11-libs/fltk/files/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/x11-libs/fltk/files/fltk-1.3.3-fltk-config.patch b/x11-libs/fltk/files/fltk-1.3.3-fltk-config.patch
new file mode 100644
index 000000000000..ca7607afa4fc
--- /dev/null
+++ b/x11-libs/fltk/files/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/x11-libs/fltk/files/fltk-1.3.3-visibility.patch b/x11-libs/fltk/files/fltk-1.3.3-visibility.patch
new file mode 100644
index 000000000000..491e0a18876d
--- /dev/null
+++ b/x11-libs/fltk/files/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/x11-libs/fltk/files/fltk-1.3.3-xutf8-visibility.patch b/x11-libs/fltk/files/fltk-1.3.3-xutf8-visibility.patch
new file mode 100644
index 000000000000..f30105e18c06
--- /dev/null
+++ b/x11-libs/fltk/files/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) {
+
diff --git a/x11-libs/fltk/fltk-1.3.2.ebuild b/x11-libs/fltk/fltk-1.3.2.ebuild
new file mode 100644
index 000000000000..19d8ac5db179
--- /dev/null
+++ b/x11-libs/fltk/fltk-1.3.2.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils fdo-mime flag-o-matic versionator
+
+MY_P=${P/_}
+
+DESCRIPTION="C++ user interface toolkit for X and OpenGL"
+HOMEPAGE="http://www.fltk.org/"
+SRC_URI="http://fltk.org/pub/${PN}/${PV/_}/${P/_}-source.tar.gz"
+
+SLOT="1"
+LICENSE="FLTK LGPL-2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="cairo debug doc examples games +opengl pdf static-libs +threads +xft +xinerama"
+
+RDEPEND="
+ >=media-libs/libpng-1.2:0
+ virtual/jpeg:0
+ sys-libs/zlib
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXt
+ cairo? ( x11-libs/cairo )
+ opengl? ( virtual/opengl )
+ xinerama? ( x11-libs/libXinerama )
+ xft? ( x11-libs/libXft )"
+DEPEND="${RDEPEND}
+ x11-proto/xextproto
+ doc? (
+ app-doc/doxygen
+ pdf? ( dev-texlive/texlive-latex )
+ )
+ xinerama? ( x11-proto/xineramaproto )"
+
+INCDIR=${EPREFIX}/usr/include/fltk-${SLOT}
+LIBDIR=${EPREFIX}/usr/$(get_libdir)/fltk-${SLOT}
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ rm -rf zlib jpeg png || die
+ epatch \
+ "${FILESDIR}"/${PN}-1.3.1-as-needed.patch \
+ "${FILESDIR}"/${PN}-1.3.2-desktop.patch \
+ "${FILESDIR}"/${PN}-1.3.0-share.patch \
+ "${FILESDIR}"/${PN}-1.3.0-conf-tests.patch
+ sed \
+ -e 's:@HLINKS@::g' -i FL/Makefile.in || die
+ sed -i \
+ -e '/C\(XX\)\?FLAGS=/s:@C\(XX\)\?FLAGS@::' \
+ -e '/^LDFLAGS=/d' \
+ "${S}/fltk-config.in" || die
+ # some fixes introduced because slotting
+ sed -i \
+ -e '/RANLIB/s:$(libdir)/\(.*LIBNAME)\):$(libdir)/`basename \1`:g' \
+ src/Makefile || die
+ # docs in proper docdir
+ sed -i \
+ -e "/^docdir/s:fltk:${PF}/html:" \
+ -e "/SILENT:/d" \
+ makeinclude.in || die
+ sed -e "s/7/$(get_version_component_range 3)/" \
+ "${FILESDIR}"/FLTKConfig.cmake > CMake/FLTKConfig.cmake
+ sed -e 's:-Os::g' -i configure.in || die
+ use prefix && append-ldflags -Wl,-rpath -Wl,"${LIBDIR}"
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ --includedir=${INCDIR}\
+ --libdir=${LIBDIR} \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --enable-largefile \
+ --enable-shared \
+ --enable-xdbe \
+ --disable-localjpeg \
+ --disable-localpng \
+ --disable-localzlib \
+ $(use_enable debug) \
+ $(use_enable cairo) \
+ $(use_enable opengl gl) \
+ $(use_enable threads) \
+ $(use_enable xft) \
+ $(use_enable xinerama)
+}
+
+src_compile() {
+ default
+ if use doc; then
+ cd "${S}"/documentation
+ emake html
+ if use pdf; then
+ emake pdf
+ fi
+ fi
+ if use games; then
+ cd "${S}"/test
+ emake blocks checkers sudoku
+ fi
+}
+
+src_install() {
+ default
+ emake -C fluid \
+ DESTDIR="${D}" install-linux
+ if use doc; then
+ emake -C documentation \
+ DESTDIR="${D}" install
+ fi
+ local apps="fluid"
+ if use games; then
+ emake -C test \
+ DESTDIR="${D}" install-linux
+ emake -C documentation \
+ DESTDIR="${D}" install-linux
+ apps="${apps} sudoku blocks checkers"
+ fi
+ for app in ${apps}; do
+ dosym /usr/share/icons/hicolor/32x32/apps/${app}.png \
+ /usr/share/pixmaps/${app}.png
+ done
+ dodoc CHANGES README CREDITS ANNOUNCEMENT
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins test/*.{h,cxx,fl} test/demo.menu
+ fi
+
+ insinto /usr/share/cmake/Modules
+ doins CMake/FLTK*.cmake
+
+ echo "LDPATH=${LIBDIR}" > 99fltk-${SLOT}
+ echo "FLTK_DOCDIR=${EPREFIX}/usr/share/doc/${PF}/html" >> 99fltk-${SLOT}
+ doenvd 99fltk-${SLOT}
+
+ if ! use static-libs; then
+ rm "${ED}"/usr/lib*/fltk-1/*.a || die
+ fi
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/x11-libs/fltk/fltk-1.3.3-r3.ebuild b/x11-libs/fltk/fltk-1.3.3-r3.ebuild
new file mode 100644
index 000000000000..a046f82668ad
--- /dev/null
+++ b/x11-libs/fltk/fltk-1.3.3-r3.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils fdo-mime flag-o-matic
+
+DESCRIPTION="C++ user interface toolkit for X and OpenGL"
+HOMEPAGE="http://www.fltk.org/"
+SRC_URI="http://fltk.org/pub/${PN}/${PV}/${P}-source.tar.gz"
+
+SLOT="1"
+LICENSE="FLTK LGPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="cairo debug doc examples games +opengl pdf static-libs +threads +xft +xinerama"
+
+RDEPEND="
+ >=media-libs/libpng-1.2:0
+ virtual/jpeg:0
+ sys-libs/zlib
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXt
+ cairo? ( x11-libs/cairo )
+ opengl? ( virtual/opengl )
+ xinerama? ( x11-libs/libXinerama )
+ xft? ( x11-libs/libXft )"
+DEPEND="${RDEPEND}
+ x11-proto/xextproto
+ doc? (
+ app-doc/doxygen
+ pdf? (
+ dev-texlive/texlive-fontutils
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )
+ )
+ xinerama? ( x11-proto/xineramaproto )"
+
+FLTK_INCDIR=${EPREFIX}/usr/include/fltk
+FLTK_LIBDIR=${EPREFIX}/usr/$(get_libdir)/fltk
+
+src_prepare() {
+ rm -rf zlib jpeg png || die
+ epatch \
+ "${FILESDIR}"/${PN}-1.3.2-desktop.patch \
+ "${FILESDIR}"/${PN}-1.3.0-share.patch \
+ "${FILESDIR}"/${PN}-1.3.2-conf-tests.patch \
+ "${FILESDIR}"/${PN}-1.3.2-jpeg-9a.patch \
+ "${FILESDIR}"/${PN}-1.3.3-visibility.patch \
+ "${FILESDIR}"/${PN}-1.3.3-fl_open_display.patch \
+ "${FILESDIR}"/${PN}-1.3.3-fltk-config.patch \
+ "${FILESDIR}"/${PN}-1.3.3-xutf8-visibility.patch
+
+ sed -i \
+ -e 's:@HLINKS@::g' FL/Makefile.in || die
+ # some fixes introduced because slotting
+ sed -i \
+ -e '/RANLIB/s:$(libdir)/\(.*LIBNAME)\):$(libdir)/`basename \1`:g' \
+ src/Makefile || die
+ # docs in proper docdir
+ sed -i \
+ -e "/^docdir/s:fltk:${PF}/html:" \
+ -e "/SILENT:/d" \
+ makeinclude.in || die
+ sed -e "s/7/${PV}/" \
+ < "${FILESDIR}"/FLTKConfig.cmake \
+ > CMake/FLTKConfig.cmake || die
+ sed -e 's:-Os::g' -i configure.in || die
+
+ use prefix && append-ldflags -Wl,-rpath -Wl,"${FLTK_LIBDIR}"
+
+ # also in Makefile:config.guess config.sub:
+ cp misc/config.{guess,sub} . || die
+
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ --includedir=${FLTK_INCDIR}\
+ --libdir=${FLTK_LIBDIR} \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --enable-largefile \
+ --enable-shared \
+ --enable-xdbe \
+ --disable-localjpeg \
+ --disable-localpng \
+ --disable-localzlib \
+ $(use_enable debug) \
+ $(use_enable cairo) \
+ $(use_enable opengl gl) \
+ $(use_enable threads) \
+ $(use_enable xft) \
+ $(use_enable xinerama)
+}
+
+src_compile() {
+ default
+ if use doc; then
+ emake -C documentation html
+ if use pdf; then
+ emake -C documentation pdf
+ fi
+ fi
+ if use games; then
+ emake -C test blocks checkers sudoku
+ fi
+}
+
+src_test() {
+ emake -C test
+}
+
+src_install() {
+ default
+
+ emake -C fluid \
+ DESTDIR="${D}" install-linux
+ if use doc; then
+ emake -C documentation \
+ DESTDIR="${D}" install
+ fi
+
+ local apps="fluid"
+ if use games; then
+ emake -C test \
+ DESTDIR="${D}" install-linux
+ emake -C documentation \
+ DESTDIR="${D}" install-linux
+ apps+=" sudoku blocks checkers"
+ fi
+
+ for app in ${apps}; do
+ dosym /usr/share/icons/hicolor/32x32/apps/${app}.png \
+ /usr/share/pixmaps/${app}.png
+ done
+
+ dodoc CHANGES README CREDITS ANNOUNCEMENT
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins test/*.{h,cxx,fl} test/demo.menu
+ fi
+
+ insinto /usr/share/cmake/Modules
+ doins CMake/FLTK*.cmake
+
+ echo "LDPATH=${FLTK_LIBDIR}" > 99fltk
+ echo "FLTK_DOCDIR=${EPREFIX}/usr/share/doc/${PF}/html" >> 99fltk
+ doenvd 99fltk
+
+ # FIXME: This is bad, but building only shared libraries is hardly supported
+ # FIXME: The executables in test/ are linking statically against libfltk
+ if ! use static-libs; then
+ rm "${ED}"/usr/lib*/fltk/*.a || die
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/x11-libs/fltk/fltk-1.3.9999.ebuild b/x11-libs/fltk/fltk-1.3.9999.ebuild
new file mode 100644
index 000000000000..ba25ae8969a7
--- /dev/null
+++ b/x11-libs/fltk/fltk-1.3.9999.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils fdo-mime flag-o-matic subversion
+
+DESCRIPTION="C++ user interface toolkit for X and OpenGL"
+HOMEPAGE="http://www.fltk.org/"
+ESVN_REPO_URI="http://seriss.com/public/fltk/fltk/branches/branch-1.3/"
+ESVN_USER=""
+ESVN_PASSWORD=""
+
+SLOT="1"
+LICENSE="FLTK LGPL-2"
+KEYWORDS=""
+IUSE="cairo debug doc examples games +opengl pdf static-libs +threads +xft +xinerama"
+
+RDEPEND="
+ >=media-libs/libpng-1.2:0
+ virtual/jpeg:0
+ sys-libs/zlib
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXt
+ cairo? ( x11-libs/cairo )
+ opengl? ( virtual/opengl )
+ xinerama? ( x11-libs/libXinerama )
+ xft? ( x11-libs/libXft )"
+DEPEND="${RDEPEND}
+ x11-proto/xextproto
+ doc? (
+ app-doc/doxygen
+ pdf? (
+ dev-texlive/texlive-fontutils
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )
+ )
+ xinerama? ( x11-proto/xineramaproto )"
+
+FLTK_INCDIR=${EPREFIX}/usr/include/fltk
+FLTK_LIBDIR=${EPREFIX}/usr/$(get_libdir)/fltk
+
+src_prepare() {
+ rm -rf zlib jpeg png || die
+ epatch \
+ "${FILESDIR}"/${PN}-1.3.2-desktop.patch \
+ "${FILESDIR}"/${PN}-1.3.0-share.patch \
+ "${FILESDIR}"/${PN}-1.3.2-conf-tests.patch \
+ "${FILESDIR}"/${PN}-1.3.2-jpeg-9a.patch \
+ "${FILESDIR}"/${PN}-1.3.3-visibility.patch
+
+ sed -i \
+ -e 's:@HLINKS@::g' FL/Makefile.in || die
+ sed -i \
+ -e '/C\(XX\)\?FLAGS=/s:@C\(XX\)\?FLAGS@::' \
+ -e '/^LDFLAGS=/d' \
+ "${S}/fltk-config.in" || die
+ # some fixes introduced because slotting
+ sed -i \
+ -e '/RANLIB/s:$(libdir)/\(.*LIBNAME)\):$(libdir)/`basename \1`:g' \
+ src/Makefile || die
+ # docs in proper docdir
+ sed -i \
+ -e "/^docdir/s:fltk:${PF}/html:" \
+ -e "/SILENT:/d" \
+ makeinclude.in || die
+ sed -e "s/7/${PV}/" \
+ < "${FILESDIR}"/FLTKConfig.cmake \
+ > CMake/FLTKConfig.cmake || die
+ sed -e 's:-Os::g' -i configure.in || die
+
+ use prefix && append-ldflags -Wl,-rpath -Wl,"${FLTK_LIBDIR}"
+
+ # also in Makefile:config.guess config.sub:
+ cp misc/config.{guess,sub} . || die
+
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ --includedir=${FLTK_INCDIR}\
+ --libdir=${FLTK_LIBDIR} \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --enable-largefile \
+ --enable-shared \
+ --enable-xdbe \
+ --disable-localjpeg \
+ --disable-localpng \
+ --disable-localzlib \
+ $(use_enable debug) \
+ $(use_enable cairo) \
+ $(use_enable opengl gl) \
+ $(use_enable threads) \
+ $(use_enable xft) \
+ $(use_enable xinerama)
+}
+
+src_compile() {
+ default
+ if use doc; then
+ emake -C documentation html
+ if use pdf; then
+ emake -C documentation pdf
+ fi
+ fi
+ if use games; then
+ emake -C test blocks checkers sudoku
+ fi
+}
+
+src_test() {
+ emake -C test
+}
+
+src_install() {
+ default
+
+ emake -C fluid \
+ DESTDIR="${D}" install-linux
+ if use doc; then
+ emake -C documentation \
+ DESTDIR="${D}" install
+ fi
+
+ local apps="fluid"
+ if use games; then
+ emake -C test \
+ DESTDIR="${D}" install-linux
+ emake -C documentation \
+ DESTDIR="${D}" install-linux
+ apps+=" sudoku blocks checkers"
+ fi
+
+ for app in ${apps}; do
+ dosym /usr/share/icons/hicolor/32x32/apps/${app}.png \
+ /usr/share/pixmaps/${app}.png
+ done
+
+ dodoc CHANGES README CREDITS ANNOUNCEMENT
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins test/*.{h,cxx,fl} test/demo.menu
+ fi
+
+ insinto /usr/share/cmake/Modules
+ doins CMake/FLTK*.cmake
+
+ echo "LDPATH=${FLTK_LIBDIR}" > 99fltk
+ echo "FLTK_DOCDIR=${EPREFIX}/usr/share/doc/${PF}/html" >> 99fltk
+ doenvd 99fltk
+
+ # FIXME: This is bad, but building only shared libraries is hardly supported
+ # FIXME: The executables in test/ are linking statically against libfltk
+ if ! use static-libs; then
+ rm "${ED}"/usr/lib*/fltk/*.a || die
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/x11-libs/fltk/metadata.xml b/x11-libs/fltk/metadata.xml
new file mode 100644
index 000000000000..754b3e44ad58
--- /dev/null
+++ b/x11-libs/fltk/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>desktop-misc</herd>
+<longdescription>
+ The Fast Light ToolKit is a cross-platform C++ user interface
+ toolkit for X and OpenGL. FLTK (pronounced "fulltick") provides GUI
+ functionality and supports 3D graphics via OpenGL and its built-in
+ GLUT emulation. FLTK also includes a UI builder called FLUID that
+ can be used to create applications.
+</longdescription>
+<use>
+ <flag name='games'>Builds and installs some extra games</flag>
+</use>
+</pkgmetadata>