mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 14:07:01 +01:00
gnu: fltk: Update to 1.3.4-2.
* gnu/packages/fltk.scm (fltk): Update to 1.3.4-2. [source]: Remove patches. [inputs]: Switch from libjpeg-8 to libjpeg. * gnu/packages/patches/fltk-shared-lib-defines.patch, gnu/packages/patches/fltk-xfont-on-demand.patch: Remove files. * gnu/local.mk (dist_patch_DATA): Remove them.
This commit is contained in:
parent
cfe255684c
commit
0728f60074
4 changed files with 13 additions and 111 deletions
|
@ -676,8 +676,6 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/findutils-test-xargs.patch \
|
||||
%D%/packages/patches/flann-cmake-3.11.patch \
|
||||
%D%/packages/patches/flint-ldconfig.patch \
|
||||
%D%/packages/patches/fltk-shared-lib-defines.patch \
|
||||
%D%/packages/patches/fltk-xfont-on-demand.patch \
|
||||
%D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \
|
||||
%D%/packages/patches/foomatic-filters-CVE-2015-8560.patch \
|
||||
%D%/packages/patches/freeimage-CVE-2015-0852.patch \
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
;;; Copyright © 2015, 2018 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
|
||||
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -34,27 +35,27 @@ (define-module (gnu packages fltk)
|
|||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system waf))
|
||||
#:use-module (guix build-system waf)
|
||||
#:use-module (srfi srfi-1))
|
||||
|
||||
(define-public fltk
|
||||
(package
|
||||
(name "fltk")
|
||||
(version "1.3.3")
|
||||
(version "1.3.4-2")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://fltk.org/pub/fltk/" version
|
||||
(uri (string-append "http://fltk.org/pub/fltk/"
|
||||
(first (string-split version #\-))
|
||||
"/fltk-" version "-source.tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"15qd7lkz5d5ynz70xhxhigpz3wns39v9xcf7ggkl0792syc8sfgq"))
|
||||
(patches (search-patches "fltk-shared-lib-defines.patch"
|
||||
"fltk-xfont-on-demand.patch"))))
|
||||
"0459rm1gl5x3famiqma7ja7k6hvan8p5l8lgshvqfl4rik0lklr5"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(inputs
|
||||
`(("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9
|
||||
`(("libjpeg" ,libjpeg)
|
||||
("libpng" ,libpng)
|
||||
("libx11" ,libx11)
|
||||
("libxft" ,libxft)
|
||||
|
@ -76,12 +77,11 @@ (define-public fltk
|
|||
;; Provide -L flags for image libraries when querying fltk-config to
|
||||
;; avoid propagating inputs.
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(use-modules (srfi srfi-26))
|
||||
(let* ((conf (string-append (assoc-ref outputs "out")
|
||||
"/bin/fltk-config"))
|
||||
(jpeg (assoc-ref inputs "libjpeg"))
|
||||
(png (assoc-ref inputs "libpng"))
|
||||
(zlib (assoc-ref inputs "zlib")))
|
||||
(let ((conf (string-append (assoc-ref outputs "out")
|
||||
"/bin/fltk-config"))
|
||||
(jpeg (assoc-ref inputs "libjpeg"))
|
||||
(png (assoc-ref inputs "libpng"))
|
||||
(zlib (assoc-ref inputs "zlib")))
|
||||
(substitute* conf
|
||||
(("-ljpeg") (string-append "-L" jpeg "/lib -ljpeg"))
|
||||
(("-lpng") (string-append "-L" png "/lib -lpng"))
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
This patch from upstream revision 10588.
|
||||
|
||||
--- fltk-1.3.3/src/Xutf8.h
|
||||
+++ fltk-1.3.3/src/Xutf8.h
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xlocale.h>
|
||||
#include <X11/Xutil.h>
|
||||
+#include <FL/Fl_Export.H>
|
||||
|
||||
typedef struct {
|
||||
int nb_font;
|
||||
@@ -98,8 +99,8 @@
|
||||
XUtf8FontStruct *font_set,
|
||||
unsigned int ucs);
|
||||
|
||||
-int
|
||||
-XGetUtf8FontAndGlyph(
|
||||
+FL_EXPORT int
|
||||
+fl_XGetUtf8FontAndGlyph(
|
||||
XUtf8FontStruct *font_set,
|
||||
unsigned int ucs,
|
||||
XFontStruct **fnt,
|
||||
--- fltk-1.3.3/src/gl_draw.cxx
|
||||
+++ fltk-1.3.3/src/gl_draw.cxx
|
||||
@@ -114,7 +114,7 @@
|
||||
for (int i = 0; i < 0x400; i++) {
|
||||
XFontStruct *font = NULL;
|
||||
unsigned short id;
|
||||
- XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id);
|
||||
+ fl_XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id);
|
||||
if (font) glXUseXFont(font->fid, id, 1, gl_fontsize->listbase+ii);
|
||||
ii++;
|
||||
}
|
||||
--- fltk-1.3.3/src/xutf8/utf8Wrap.c
|
||||
+++ fltk-1.3.3/src/xutf8/utf8Wrap.c
|
||||
@@ -816,10 +816,10 @@
|
||||
/** get the X font and glyph ID of a UCS char **/
|
||||
/*****************************************************************************/
|
||||
int
|
||||
-XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set,
|
||||
- unsigned int ucs,
|
||||
- XFontStruct **fnt,
|
||||
- unsigned short *id) {
|
||||
+fl_XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set,
|
||||
+ unsigned int ucs,
|
||||
+ XFontStruct **fnt,
|
||||
+ unsigned short *id) {
|
||||
|
||||
/* int x; */
|
||||
int *encodings; /* encodings array */
|
|
@ -1,45 +0,0 @@
|
|||
Fixes undefined reference to `Fl_XFont_On_Demand::value()'.
|
||||
From <http://www.fltk.org/str.php?L3156+P0+S0+C0+I0+E0+V1+QOn_Demand>.
|
||||
|
||||
Index: src/fl_font.cxx
|
||||
===================================================================
|
||||
--- fltk-1.3.3/src/fl_font.cxx (revision 10503)
|
||||
+++ fltk-1.3.3/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
|
||||
===================================================================
|
||||
--- fltk-1.3.3/src/gl_draw.cxx (revision 10503)
|
||||
+++ fltk-1.3.3/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
|
||||
===================================================================
|
||||
--- fltk-1.3.3/FL/x.H (revision 10503)
|
||||
+++ fltk-1.3.3/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!
|
Loading…
Reference in a new issue