summaryrefslogtreecommitdiff
path: root/extra/source/fltk
diff options
context:
space:
mode:
Diffstat (limited to 'extra/source/fltk')
-rw-r--r--extra/source/fltk/Fl_XFont_On_Demand.patch42
-rwxr-xr-xextra/source/fltk/fltk.SlackBuild20
-rw-r--r--extra/source/fltk/fltk.fltk-config.in.diff98
-rw-r--r--extra/source/fltk/slack-desc10
4 files changed, 117 insertions, 53 deletions
diff --git a/extra/source/fltk/Fl_XFont_On_Demand.patch b/extra/source/fltk/Fl_XFont_On_Demand.patch
deleted file mode 100644
index b61def2a..00000000
--- a/extra/source/fltk/Fl_XFont_On_Demand.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Index: src/fl_font.cxx
-===================================================================
---- src/fl_font.cxx (revision 10503)
-+++ src/fl_font.cxx (revision 10504)
-@@ -55,6 +55,12 @@
- # include "fl_font_x.cxx"
- #endif // WIN32
-
-+#if ! (defined(WIN32) || defined(__APPLE__))
-+XFontStruct *fl_X_core_font()
-+{
-+ return fl_xfont.value();
-+}
-+#endif
-
- double fl_width(const char* c) {
- if (c) return fl_width(c, (int) strlen(c));
-Index: src/gl_draw.cxx
-===================================================================
---- src/gl_draw.cxx (revision 10503)
-+++ src/gl_draw.cxx (revision 10504)
-@@ -81,7 +81,7 @@
- * then sorting through them at draw time (for normal X rendering) to find which one can
- * render the current glyph... But for now, just use the first font in the list for GL...
- */
-- XFontStruct *font = fl_xfont;
-+ XFontStruct *font = fl_X_core_font();
- int base = font->min_char_or_byte2;
- int count = font->max_char_or_byte2-base+1;
- fl_fontsize->listbase = glGenLists(256);
-Index: FL/x.H
-===================================================================
---- FL/x.H (revision 10503)
-+++ FL/x.H (revision 10504)
-@@ -132,6 +132,7 @@
- XFontStruct *ptr;
- };
- extern FL_EXPORT Fl_XFont_On_Demand fl_xfont;
-+extern FL_EXPORT XFontStruct* fl_X_core_font();
-
- // this object contains all X-specific stuff about a window:
- // Warning: this object is highly subject to change!
diff --git a/extra/source/fltk/fltk.SlackBuild b/extra/source/fltk/fltk.SlackBuild
index 7ed940e3..c866daf1 100755
--- a/extra/source/fltk/fltk.SlackBuild
+++ b/extra/source/fltk/fltk.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2015, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,9 +20,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=fltk
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 2 -d - | rev)}
+VERSION=$(basename $(echo $PKGNAM-*.tar.lz | cut -f 2- -d -) -source.tar.lz)
BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
@@ -36,6 +37,14 @@ if [ -z "$ARCH" ]; then
export ARCH
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
if [ "$ARCH" = "i386" ]; then
@@ -64,7 +73,6 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -73,10 +81,10 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-${VERSION}-source.tar.?z* || exit 1
+tar xvf $CWD/$PKGNAM-${VERSION}-source.tar.lz || exit 1
cd $PKGNAM-$VERSION || exit 1
-zcat $CWD/Fl_XFont_On_Demand.patch.gz | patch -p0 --verbose || exit 1
+zcat $CWD/fltk.fltk-config.in.diff.gz | patch -p1 --verbose || exit 1
chown -R root:root .
find . \
@@ -152,5 +160,5 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
diff --git a/extra/source/fltk/fltk.fltk-config.in.diff b/extra/source/fltk/fltk.fltk-config.in.diff
new file mode 100644
index 00000000..1125f61b
--- /dev/null
+++ b/extra/source/fltk/fltk.fltk-config.in.diff
@@ -0,0 +1,98 @@
+diff -Naur fltk-1.3.3-orig/fltk-config.in fltk-1.3.3/fltk-config.in
+--- fltk-1.3.3-orig/fltk-config.in 2014-12-31 15:43:07.203519633 -0500
++++ fltk-1.3.3/fltk-config.in 2014-12-31 15:49:01.636277725 -0500
+@@ -54,21 +54,6 @@
+ bindir="$selfdir/fluid"
+ includedir="$selfdir"
+ libdir="$selfdir/lib"
+-
+- if test -f "$libdir/libfltk_jpeg.a"; then
+- CFLAGS="-I$includedir/jpeg $CFLAGS"
+- CXXFLAGS="-I$includedir/jpeg $CXXFLAGS"
+- fi
+-
+- if test -f "$libdir/libfltk_z.a"; then
+- CFLAGS="-I$includedir/zlib $CFLAGS"
+- CXXFLAGS="-I$includedir/zlib $CXXFLAGS"
+- fi
+-
+- if test -f "$libdir/libfltk_png.a"; then
+- CFLAGS="-I$includedir/png $CFLAGS"
+- CXXFLAGS="-I$includedir/png $CXXFLAGS"
+- fi
+ fi
+
+ if test -d $includedir/FL/images; then
+@@ -76,11 +61,6 @@
+ CXXFLAGS="-I$includedir/FL/images $CXXFLAGS"
+ fi
+
+-if test -f "$libdir/libfltk_cairo.a"; then
+- CFLAGS="$CAIROFLAGS $CFLAGS"
+- CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
+-fi
+-
+ # libraries to link with:
+ LIBNAME="@LIBNAME@"
+ DSONAME="@DSONAME@"
+@@ -230,25 +210,20 @@
+ fi
+
+ # Calculate needed libraries
+-LDSTATIC="$libdir/libfltk.a $LDLIBS"
+ LDLIBS="-lfltk$SHAREDSUFFIX $LDLIBS"
+
+ if test x$use_forms = xyes; then
+ LDLIBS="-lfltk_forms$SHAREDSUFFIX $LDLIBS"
+- LDSTATIC="$libdir/libfltk_forms.a $LDSTATIC"
+ fi
+ if test x$use_gl = xyes; then
+ LDLIBS="-lfltk_gl$SHAREDSUFFIX @GLLIB@ $LDLIBS"
+- LDSTATIC="$libdir/libfltk_gl.a @GLLIB@ $LDSTATIC"
+ fi
+ if test x$use_images = xyes; then
+ LDLIBS="-lfltk_images$SHAREDSUFFIX $IMAGELIBS $LDLIBS"
+- LDSTATIC="$libdir/libfltk_images.a $STATICIMAGELIBS $LDSTATIC"
+ fi
+
+ if test x$use_cairo = xyes; then
+ LDLIBS="-lfltk_cairo$SHAREDSUFFIX $CAIROLIBS $LDLIBS"
+- LDSTATIC="$libdir/libfltk_cairo.a $CAIROLIBS $LDSTATIC"
+ fi
+
+ LDLIBS="$DSOLINK $LDFLAGS $libs $LDLIBS"
+@@ -359,26 +334,26 @@
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- USELIBS="$libdir/libfltk.a"
++ USELIBS="$libdir/libfltk.so"
+
+ if test x$use_forms = xyes; then
+- USELIBS="$libdir/libfltk_forms.a $USELIBS"
++ USELIBS="$libdir/libfltk_forms.so $USELIBS"
+ fi
+
+ if test x$use_gl = xyes; then
+- USELIBS="$libdir/libfltk_gl.a $USELIBS"
++ USELIBS="$libdir/libfltk_gl.so $USELIBS"
+ fi
+
+ if test x$use_cairo = xyes; then
+- USELIBS="$libdir/libfltk_cairo.a $USELIBS"
++ USELIBS="$libdir/libfltk_cairo.so $USELIBS"
+ fi
+
+ if test x$use_images = xyes; then
+- USELIBS="$libdir/libfltk_images.a $USELIBS"
++ USELIBS="$libdir/libfltk_images.so $USELIBS"
+
+ for lib in fltk_jpeg fltk_png fltk_z; do
+- if test -f $libdir/lib$lib.a; then
+- USELIBS="$libdir/lib$lib.a $USELIBS"
++ if test -f $libdir/lib$lib.so; then
++ USELIBS="$libdir/lib$lib.so $USELIBS"
+ fi
+ done
+ fi
+
diff --git a/extra/source/fltk/slack-desc b/extra/source/fltk/slack-desc
index 3175b3e8..4779089a 100644
--- a/extra/source/fltk/slack-desc
+++ b/extra/source/fltk/slack-desc
@@ -1,8 +1,8 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
@@ -10,9 +10,9 @@ fltk: fltk (The Fast Light Tool Kit)
fltk:
fltk: The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a a cross-
fltk: platform C++ GUI toolkit for UNIX(r)/Linux(r) (X11), Microsoft(r)
-fltk: Windows(r), and MacOS(r) X. FLTK provides modern GUI functionality
+fltk: Windows(r), and MacOS(r) X. FLTK provides modern GUI functionality
fltk: without the bloat and supports 3D graphics via OpenGL(r) and its
-fltk: built-in GLUT emulation. The Fast Light Tool Kit was originally
+fltk: built-in GLUT emulation. The Fast Light Tool Kit was originally
fltk: developed by Mr. Bill Spitzak.
fltk:
fltk: fltk home: http://www.fltk.org