[packages/libmcal] - dropped ical_yyleng patch (yyleng is apparently int); added types patch instead with other type fi

qboosh qboosh at pld-linux.org
Mon Jan 1 13:58:42 CET 2024


commit 6e753675969230e6ed47cecffcde3ac46e05e328
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jan 1 13:59:37 2024 +0100

    - dropped ical_yyleng patch (yyleng is apparently int); added types patch instead with other type fixes; release 7

 ical_yyleng.patch   | 11 -----------
 libmcal-types.patch | 36 ++++++++++++++++++++++++++++++++++++
 libmcal.spec        | 20 ++++++++++++--------
 3 files changed, 48 insertions(+), 19 deletions(-)
---
diff --git a/libmcal.spec b/libmcal.spec
index 77190d8..d346512 100644
--- a/libmcal.spec
+++ b/libmcal.spec
@@ -3,8 +3,8 @@ Summary:	Modular Calendar Access Library
 Summary(pl.UTF-8):	Modularna biblioteka dostępu do kalendarzy
 Name:		libmcal
 Version:	0.7
-Release:	6
-License:	GPL
+Release:	7
+License:	LGPL v2+
 Group:		Libraries
 Source0:	http://downloads.sourceforge.net/libmcal/%{name}-%{version}.tar.gz
 # Source0-md5:	8d8f16e59a7e859c1407df3d72052825
@@ -14,7 +14,7 @@ Patch0:		%{name}-make.patch
 Patch1:		%{name}-define.patch
 Patch2:		%{name}-dirs.patch
 Patch3:		%{name}-gcc4.patch
-Patch4:		ical_yyleng.patch
+Patch4:		%{name}-types.patch
 URL:		http://mcal.chek.com/
 BuildRequires:	flex
 BuildRequires:	libtool
@@ -58,7 +58,7 @@ Statyczna wersja biblioteki MCAL.
 
 %prep
 %setup -q -n %{name} -a1
-mv -f mcal-drivers/* .
+%{__mv} mcal-drivers/* .
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -67,10 +67,14 @@ mv -f mcal-drivers/* .
 
 %build
 chmod +x configure
+
 %{__make} -C icap \
-	CC="%{__cc}" OPTFLAGS="%{rpmcflags}"
+	CC="%{__cc}" \
+	OPTFLAGS="%{rpmcflags}"
+
 %{__make} -C mstore \
-	CC="%{__cc}" OPTFLAGS="%{rpmcflags}"
+	CC="%{__cc}" \
+	OPTFLAGS="%{rpmcflags}"
 
 %configure2_13 \
 	--with-icap \
@@ -87,8 +91,8 @@ install -d $RPM_BUILD_ROOT%{_libdir}
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-mv -f mstore/Changelog Changelog.mstore
-mv -f mstore/README README.mstore
+%{__mv} mstore/Changelog Changelog.mstore
+%{__mv} mstore/README README.mstore
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/ical_yyleng.patch b/ical_yyleng.patch
deleted file mode 100644
index 56ea384..0000000
--- a/ical_yyleng.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libmcal/icalroutines.h.orig	2014-01-13 11:50:30.162975958 +0100
-+++ libmcal/icalroutines.h	2014-01-13 11:51:09.213579887 +0100
-@@ -49,7 +49,7 @@ typedef enum {
- 
- /* ICAL parser. */
- extern char	*ical_yytext;
--extern int	ical_yyleng;
-+extern size_t	ical_yyleng;
- int		ical_yylex(void);
- void		ical_usebuf(const char *buf, size_t size);
- void		ical_preprocess(char *buf, size_t *size);
diff --git a/libmcal-types.patch b/libmcal-types.patch
new file mode 100644
index 0000000..44b5eda
--- /dev/null
+++ b/libmcal-types.patch
@@ -0,0 +1,36 @@
+--- libmcal/icap/icaproutines.c.orig	2003-01-28 18:31:33.000000000 +0100
++++ libmcal/icap/icaproutines.c	2024-01-01 13:47:07.055548083 +0100
+@@ -164,7 +164,7 @@ icap_literal(ICAPNET *net, const char *a
+ 	icapresp_t	resp;
+ 	char		tag[ICAPMAXTAG];
+ 
+-	fprintf(net->out, " {%u}\r\n", strlen(arg));
++	fprintf(net->out, " {%zu}\r\n", strlen(arg));
+ 
+ 	do {
+ 		resp = icap_getresp(net, tag, ICAPMAXTAG);
+--- libmcal/mstore/mstore.c.orig	2024-01-01 11:27:29.577599386 +0100
++++ libmcal/mstore/mstore.c	2024-01-01 13:51:05.197591291 +0100
+@@ -412,11 +412,11 @@ CALEVENT *read_event(FILE *calfile)
+ {
+ 	char		line[100];
+ 	char		*buf;
+-	int		size;
++	size_t		size;
+ 	CALEVENT	*event;
+ 
+ 	fgets(line, sizeof(line), calfile);
+-	if (sscanf(line, "%d", &size) != 1)
++	if (sscanf(line, "%zd", &size) != 1)
+ 		return NULL;
+ 	buf = malloc(size + 2);
+ 	fread(buf, size, 1, calfile);
+@@ -454,7 +454,7 @@ write_event(FILE *calfile, const CALEVEN
+ 	if (buf == NULL)
+ 		return false;
+ 
+-	fprintf(calfile, "%u\r\n", strlen(buf));
++	fprintf(calfile, "%zu\r\n", strlen(buf));
+ 	fputs(buf, calfile);
+ 	free(buf);
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libmcal.git/commitdiff/6e753675969230e6ed47cecffcde3ac46e05e328



More information about the pld-cvs-commit mailing list