[packages/liblouisutdml] - updated liblouis3 patch to cover liblouis 3.2 changes; release 4

qboosh qboosh at pld-linux.org
Tue Jul 18 20:50:13 CEST 2017


commit afb2d346b53f75c6cf9bd485ccadc31db4497ab6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jul 18 20:51:46 2017 +0200

    - updated liblouis3 patch to cover liblouis 3.2 changes; release 4

 liblouisutdml-liblouis3.patch | 150 ++++++++++++++++++++++++++++++++++++++++++
 liblouisutdml.spec            |   6 +-
 2 files changed, 153 insertions(+), 3 deletions(-)
---
diff --git a/liblouisutdml.spec b/liblouisutdml.spec
index 00fc5cd..cf1a9bd 100644
--- a/liblouisutdml.spec
+++ b/liblouisutdml.spec
@@ -6,7 +6,7 @@ Summary:	Braille XML transcriber with UTDML
 Summary(pl.UTF-8):	Biblioteka tłumacząca XML na alfabet Braille'a przy użyciu UTDML
 Name:		liblouisutdml
 Version:	2.6.0
-Release:	3
+Release:	4
 License:	LGPL v3+ (library), GPL v3+ (tools)
 Group:		Libraries
 #Source0Download: http://liblouis.org/downloads/
@@ -19,7 +19,7 @@ URL:		http://liblouis.org/
 %{?with_java:BuildRequires:	ant}
 %{?with_java:BuildRequires:	jdk}
 BuildRequires:	help2man
-BuildRequires:	liblouis-devel >= 3.0
+BuildRequires:	liblouis-devel >= 3.2
 BuildRequires:	libxml2-devel >= 2.0
 BuildRequires:	pkgconfig
 BuildRequires:	rpmbuild(macros) >= 1.714
@@ -48,7 +48,7 @@ Summary:	Header files for liblouisutdml library
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki liblouisutdml
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	liblouis-devel >= 3.0
+Requires:	liblouis-devel >= 3.2
 
 %description devel
 Header files for liblouisutdml library.
diff --git a/liblouisutdml-liblouis3.patch b/liblouisutdml-liblouis3.patch
index 2ae4f89..d2cd73d 100644
--- a/liblouisutdml-liblouis3.patch
+++ b/liblouisutdml-liblouis3.patch
@@ -9,3 +9,153 @@
  
  static logcallback logCallbackFunction = defaultLogCallback;
  void EXPORT_CALL lbu_registerLogCallback(logcallback callback)
+--- liblouisutdml-2.6.0/liblouisutdml/louisutdml.h.orig	2015-05-07 14:31:31.000000000 +0200
++++ liblouisutdml-2.6.0/liblouisutdml/louisutdml.h	2017-07-18 19:59:35.241446536 +0200
+@@ -33,7 +33,8 @@
+ #define liblouisutdml_h
+ #include <libxml/parser.h>
+ #include "liblouisutdml.h"
+-#include <louis.h>
++#include <liblouis.h>
++#include <liblouis/internal.h>
+ #include "sem_enum.h"
+ 
+ typedef enum
+@@ -311,7 +312,7 @@
+   int sync_text_length;
+   int positions_array[2 * BUFSIZE];
+   widechar translated_buffer[2 * BUFSIZE];
+-  unsigned char typeform[2 * BUFSIZE];
++  formtype typeform[2 * BUFSIZE];
+   char string_buffer[2 * BUFSIZE];
+ } UserData;
+ extern UserData *ud;
+@@ -428,5 +429,5 @@
+ 
+ void logWidecharBuf(logLevels level, const char *msg, const widechar *wbuf, int wlen);
+ 
+-// void logMessage(logLevels level, const char *format, ...);
++void logMessage(logLevels level, const char *format, ...);
+ #endif /*louisutdml_h */
+--- liblouisutdml-2.6.0/liblouisutdml/readconfig.c.orig	2017-07-18 20:00:40.258112455 +0200
++++ liblouisutdml-2.6.0/liblouisutdml/readconfig.c	2017-07-18 20:34:39.891422518 +0200
+@@ -36,7 +36,7 @@
+ #include <stdarg.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <louis.h>
++#include <liblouis.h>
+ #include "louisutdml.h"
+ #include "sem_names.h"
+ #include <ctype.h>
+@@ -241,7 +241,7 @@
+   if (trialPath[0] == 0)
+     {
+       if (lou_getTable (nested->value) != NULL)
+-	strcpy (trialPath, getLastTableList ());
++	strcpy (trialPath, _lou_getLastTableList ());
+     }
+   if (trialPath[0] == 0)
+     {
+--- liblouisutdml-2.6.0/liblouisutdml/transcribe_math.c.orig	2015-05-07 14:31:29.000000000 +0200
++++ liblouisutdml-2.6.0/liblouisutdml/transcribe_math.c	2017-07-18 20:26:29.161428104 +0200
+@@ -138,7 +138,7 @@
+ 			 &ud->
+ 			 translated_buffer[ud->translated_length],
+ 			 &translatedLength,
+-			 (char *) ud->typeform, NULL, NULL,
++			 ud->typeform, NULL, NULL,
+ 			 NULL, NULL, dotsIO);
+       ud->in_sync = 0;
+       memset (ud->typeform, 0, sizeof (ud->typeform));
+--- liblouisutdml-2.6.0/liblouisutdml/transcribe_paragraph.c.orig	2015-05-07 14:31:32.000000000 +0200
++++ liblouisutdml-2.6.0/liblouisutdml/transcribe_paragraph.c	2017-07-18 20:28:22.098093482 +0200
+@@ -85,7 +85,7 @@
+ static widechar saved_braille_page_string[MAXNUMLEN];
+ static widechar saved_running_head[MAXNAMELEN / 2];
+ static widechar saved_footer[MAXNAMELEN / 2];
+-static unsigned char saved_typeform[2 * BUFSIZE];
++static formtype saved_typeform[2 * BUFSIZE];
+ 
+ static void
+ saveState (void)
+@@ -120,7 +120,7 @@
+   widecharcpy (saved_running_head, ud->running_head,
+ 	       saved_running_head_length);
+   widecharcpy (saved_footer, ud->footer, saved_footer_length);
+-  unsignedcharcpy (saved_typeform, ud->typeform, saved_text_length);
++  memcpy (saved_typeform, ud->typeform, saved_text_length * sizeof(formtype));
+ 
+   widestrcpy (saved_page_separator_number_first,
+ 	      ud->page_separator_number_first);
+@@ -167,7 +167,7 @@
+   widecharcpy (ud->running_head, saved_running_head,
+ 	       saved_running_head_length);
+   widecharcpy (ud->footer, saved_footer, saved_footer_length);
+-  unsignedcharcpy (ud->typeform, saved_typeform, saved_text_length);
++  memcpy (ud->typeform, saved_typeform, saved_text_length * sizeof(formtype));
+ 
+   widestrcpy (ud->page_separator_number_first,
+ 	      saved_page_separator_number_first);
+--- liblouisutdml-2.6.0/liblouisutdml/transcriber.c.orig	2015-05-07 14:31:32.000000000 +0200
++++ liblouisutdml-2.6.0/liblouisutdml/transcriber.c	2017-07-18 20:31:05.391424947 +0200
+@@ -670,7 +670,7 @@
+ 	{
+ 	case code:
+ 	  table = ud->compbrl_table_name;
+-	  memset (ud->typeform, computer_braille, ud->text_length);
++	  memset (ud->typeform, computer_braille, ud->text_length * sizeof(formtype));
+ 	  break;
+ 	default:
+ 	  table = ud->main_braille_table;
+@@ -728,10 +728,10 @@
+ translate_possibly_prehyphenated (const char *table,
+ 				  const widechar * inbuf, int *inlen,
+ 				  widechar * outbuf, int *outlen,
+-				  char *typeform, int *indices, int mode)
++				  formtype *typeform, int *indices, int mode)
+ {
+   static widechar tmp_outbuf[2 * BUFSIZE];
+-  static char tmp_typeform[2 * BUFSIZE];
++  static formtype tmp_typeform[2 * BUFSIZE];
+   static int tmp_indices_1[2 * BUFSIZE];
+   static int tmp_indices_2[2 * BUFSIZE];
+   int tmp_outlen;
+@@ -816,7 +816,7 @@
+ 					&ud->translated_buffer[ud->
+ 							       translated_length],
+ 					&translatedLength,
+-					(char *) &ud->typeform[0],
++					&ud->typeform[0],
+ 					ud->in_sync ? &ud->
+ 					positions_array[ud->
+ 							translated_length] :
+@@ -1093,8 +1093,8 @@
+ {
+   int k;
+   int top = ud->top;
+-  memset (&ud->typeform[ud->old_text_length], 0, ud->text_length -
+-	  ud->old_text_length);
++  memset (&ud->typeform[ud->old_text_length], 0, (ud->text_length -
++	  ud->old_text_length) * sizeof(formtype));
+   while (top >= 0 && (ud->stack[top] == italicx || ud->stack[top] == boldx
+ 		      || ud->stack[top] == underlinex
+ 		      || ud->stack[top] == compbrl))
+@@ -3230,7 +3230,7 @@
+ 				ud->text_buffer, &translationLength,
+ 				&ud->translated_buffer[0],
+ 				&translatedLength,
+-				(char *) ud->typeform, NULL, 0))
++				ud->typeform, NULL, 0))
+     return 0;
+   if (ud->back_text == html)
+     {
+@@ -4948,7 +4948,7 @@
+ 		     &ud->
+ 		     translated_buffer[ud->translated_length],
+ 		     &translatedLength,
+-		     (char *) ud->typeform, NULL, NULL,
++		     ud->typeform, NULL, NULL,
+ 		     setIndices, NULL, dotsIO);
+   ud->in_sync = 0;
+   memset (ud->typeform, 0, sizeof (ud->typeform));
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/liblouisutdml.git/commitdiff/afb2d346b53f75c6cf9bd485ccadc31db4497ab6



More information about the pld-cvs-commit mailing list