wok-next rev 20756

beaver: fix build by adding patch, update deps
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Jun 02 04:42:15 2018 +0300 (2018-06-02)
parents 0c13b742dfb3
children 70c3b956ec2f
files beaver/receipt beaver/stuff/patches/fix-inline.patch beaver/stuff/patches/series
line diff
     1.1 --- a/beaver/receipt	Fri Jun 01 17:37:26 2018 +0300
     1.2 +++ b/beaver/receipt	Sat Jun 02 04:42:15 2018 +0300
     1.3 @@ -31,11 +31,7 @@
     1.4  		beaver)
     1.5  			copy beaver resource/ @ico
     1.6  			GENERIC_PIXMAPS="no"
     1.7 -			DEPENDS="atk bzlib cairo fontconfig freetype gdk-pixbuf glib gtk+ \
     1.8 -			libffi libharfbuzz liblzma libpng16 libxml2 pango pcre \
     1.9 -			util-linux-blkid util-linux-mount util-linux-uuid xorg-libX11 \
    1.10 -			xorg-libXau xorg-libXdmcp xorg-libXext xorg-libXrender xorg-libxcb \
    1.11 -			xorg-pixman zlib"
    1.12 +			DEPENDS="cairo gdk-pixbuf glib gtk+ pango"
    1.13  			TAGS="text-editor"
    1.14  			;;
    1.15  		*-plugins)
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/beaver/stuff/patches/fix-inline.patch	Sat Jun 02 04:42:15 2018 +0300
     2.3 @@ -0,0 +1,67 @@
     2.4 +This fixes link errors:
     2.5 +
     2.6 +  beaver-editor.o: In function `auto_indent_on_insert':
     2.7 +  editor.c:(.text+0x157): undefined reference to `starts_string'
     2.8 +  beaver-editor.o: In function `search_for_keyword_correctly':
     2.9 +  editor.c:(.text+0x7c7): undefined reference to `is_matching_keyword'
    2.10 +  beaver-editor.o: In function `markup_syhi_range':
    2.11 +  editor.c:(.text+0xd33): undefined reference to `starts_string'
    2.12 +  editor.c:(.text+0xdb8): undefined reference to `starts_string'
    2.13 +  editor.c:(.text+0xe3d): undefined reference to `starts_string'
    2.14 +  editor.c:(.text+0xec2): undefined reference to `starts_string'
    2.15 +  editor.c:(.text+0xf47): undefined reference to `starts_string'
    2.16 +  beaver-editor.o:editor.c:(.text+0xfd0): more undefined references to `starts_string' follow
    2.17 +  beaver-editor.o: In function `markup_syhi_range':
    2.18 +  editor.c:(.text+0x1288): undefined reference to `refresh_markers'
    2.19 +  editor.c:(.text+0x137b): undefined reference to `refresh_markers'
    2.20 +  beaver-editor.o: In function `search_for_keyword':
    2.21 +  editor.c:(.text+0x8f4): undefined reference to `search_for_keyword_fastly'
    2.22 +
    2.23 +As gcc5 doc about "Different semantics for inline functions":
    2.24 +
    2.25 +  > C99 extern inline: An externally visible function is generated; \
    2.26 +  > same as GNU89 inline.
    2.27 +
    2.28 +  > To fix this, either mark the function foo as extern, or add the \
    2.29 +  > following declaration: extern inline int foo (void);
    2.30 +
    2.31 +(from https://gcc.gnu.org/gcc-5/porting_to.html)
    2.32 +
    2.33 +--- a/src/editor.c
    2.34 ++++ b/src/editor.c
    2.35 +@@ -487,7 +487,7 @@
    2.36 + /* preconditions:  iter points to possible start of interesting word  
    2.37 + postconditions: end is set to the end of the word in the buffer if it was found.
    2.38 + if word found, returns TRUE, else FALSE*/
    2.39 +-inline gboolean starts_string (gchar * text, gint i, gchar * word, gint * end)
    2.40 ++extern inline gboolean starts_string (gchar * text, gint i, gchar * word, gint * end)
    2.41 + {
    2.42 + 	gunichar ch;
    2.43 + 	gunichar k;
    2.44 +@@ -521,7 +521,7 @@
    2.45 + 
    2.46 + 
    2.47 + /* returns color index of match, or -1 if none */
    2.48 +-inline gint is_matching_keyword (gint Lg, const gchar * str)
    2.49 ++extern inline gint is_matching_keyword (gint Lg, const gchar * str)
    2.50 + {
    2.51 + 	gint rv = -1;
    2.52 + 	gpointer val;
    2.53 +@@ -537,7 +537,7 @@
    2.54 + }
    2.55 + 
    2.56 + 
    2.57 +-inline void refresh_markers (GtkTextBuffer * Buffer)
    2.58 ++extern inline void refresh_markers (GtkTextBuffer * Buffer)
    2.59 + {
    2.60 + 	gint CurrentPage;
    2.61 + 	gint Lg;
    2.62 +@@ -894,7 +894,7 @@
    2.63 + END_FCN}
    2.64 + 
    2.65 + 
    2.66 +-inline void search_for_keyword_fastly (gint page, GtkTextBuffer * Buffer,
    2.67 ++extern inline void search_for_keyword_fastly (gint page, GtkTextBuffer * Buffer,
    2.68 + 									   gchar * text, gint * i, gint offset,
    2.69 + 									   gint Lg)
    2.70 + {
     3.1 --- a/beaver/stuff/patches/series	Fri Jun 01 17:37:26 2018 +0300
     3.2 +++ b/beaver/stuff/patches/series	Sat Jun 02 04:42:15 2018 +0300
     3.3 @@ -1,1 +1,2 @@
     3.4  icon.patch
     3.5 +fix-inline.patch