[packages/microcom] Rel 3

arekm arekm at pld-linux.org
Mon Mar 9 17:15:44 CET 2026


commit 9c15dd6bdb1d6a319fddf177656837bf43e5ac87
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 9 17:15:31 2026 +0100

    Rel 3

 microcom-gcc14.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
 microcom-make.patch  | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 microcom.spec        | 12 ++++++++++--
 3 files changed, 105 insertions(+), 2 deletions(-)
---
diff --git a/microcom.spec b/microcom.spec
index f9c12e4..4296d40 100644
--- a/microcom.spec
+++ b/microcom.spec
@@ -2,12 +2,15 @@ Summary:	minicom-like serial terminal emulator
 Summary(pl.UTF-8):	Podobny do minicoma emulator terminala szeregowego
 Name:		microcom
 Version:	1.02
-Release:	2
+Release:	4
 License:	GPL v2
 Group:		Applications/Communications
 Source0:	http://microcom.port5.com/m102.tar.gz
 # Source0-md5:	c7817035dc41cb02e7cfb565cf9b7401
 URL:		http://microcom.port5.com/
+# use CC/CFLAGS/LDFLAGS variables instead of hardcoded gcc
+Patch0:		%{name}-make.patch
+Patch1:		%{name}-gcc14.patch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -24,9 +27,14 @@ wywodząca się z Linux Router Project.
 
 %prep
 %setup -q -c
+%patch -P0 -p1
+%patch -P1 -p1
 
 %build
-%{__make}
+%{__make} \
+	CC="%{__cc}" \
+	CFLAGS="%{rpmcflags}" \
+	LDFLAGS="%{rpmldflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/microcom-gcc14.patch b/microcom-gcc14.patch
new file mode 100644
index 0000000..a1266f5
--- /dev/null
+++ b/microcom-gcc14.patch
@@ -0,0 +1,44 @@
+diff -urN microcom-orig/autodet.c microcom-fix/autodet.c
+--- microcom-orig/autodet.c	2000-07-30 06:15:47.000000000 +0200
++++ microcom-fix/autodet.c	2026-03-09 17:10:36.106696603 +0100
+@@ -73,7 +73,7 @@
+ 
+   if (i > 0) {
+     buf[i + 1] = '\0';
+-    printf(buf);
++    printf("%s", buf);
+     if (strstr(buf, "OK") != NULL) {
+       printf("Modem found on %s\n\n", device);
+       retval = 1;
+diff -urN microcom-orig/microcom.h microcom-fix/microcom.h
+--- microcom-orig/microcom.h	2000-07-30 06:15:52.000000000 +0200
++++ microcom-fix/microcom.h	2026-03-09 17:10:36.108333645 +0100
+@@ -48,6 +48,7 @@
+ int script_process(S_ORIGINATOR orig, char* buf, int size); /* script.c */
+ void script_init(char* s); /* script.c */
+ void mux_clear_sflag(void); /* mus.c */
++int autodetect(int port); /* autodet.c */
+ void cleanup_termios(int signal);
+ void init_stdin(struct termios *sts);
+ void init_comm(struct termios *pts);
+diff -urN microcom-orig/script.c microcom-fix/script.c
+--- microcom-orig/script.c	2000-07-30 06:15:47.000000000 +0200
++++ microcom-fix/script.c	2026-03-09 17:10:36.111753692 +0100
+@@ -347,7 +347,7 @@
+ /* KEYWORDS */
+ struct kw {
+   char *command;
+-  char* (*fn)();
++  char* (*fn)(char *);
+ } keywords[] = {
+   { "expect",	doexpect },
+   { "send",	dosend },
+@@ -367,7 +367,7 @@
+ //  { "sleep",	dosleep },
+ //  { "break",	dobreak },
+ //  { "call",	docall },
+-  { (char *)0,	(char*(*)())0 }
++  { (char *)0,	(char*(*)(char *))0 }
+ };
+  
+ /*
diff --git a/microcom-make.patch b/microcom-make.patch
new file mode 100644
index 0000000..9b3d3eb
--- /dev/null
+++ b/microcom-make.patch
@@ -0,0 +1,51 @@
+diff -urN microcom-orig/Makefile microcom-fix/Makefile
+--- microcom-orig/Makefile	2000-07-30 06:16:05.000000000 +0200
++++ microcom-fix/Makefile	2026-03-09 17:07:24.996358652 +0100
+@@ -1,37 +1,21 @@
+-#/******************************************************************
+-#** File: Makefile
+-#** Description: the makefile for microcom project
+-#**
+-#** Copyright (C)1999 Anca and Lucian Jurubita <ljurubita at hotmail.com>.
+-#** All rights reserved.
+-#****************************************************************************
+-#** This program is free software; you can redistribute it and/or
+-#** modify it under the terms of the GNU General Public License
+-#** as published by the Free Software Foundation; either version 2
+-#** of the License, or (at your option) any later version.
+-#**
+-#** This program is distributed in the hope that it will be useful,
+-#** but WITHOUT ANY WARRANTY; without even the implied warranty of
+-#** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-#** GNU General Public License for more details at www.gnu.org
+-#****************************************************************************
+-#** Rev. 0.9 - Sept. 1999
+-#** Rev. 0.91 - Jan. 2000 - minor fixes, compiled under Mandrake 6.0
+-#****************************************************************************/
++CC = gcc
++CFLAGS = -O -g
++LDFLAGS =
++
+ microcom: microcom.o mux.o script.o help.o autodet.o
+-	gcc -o microcom microcom.o mux.o script.o help.o autodet.o
++	$(CC) $(LDFLAGS) -o microcom microcom.o mux.o script.o help.o autodet.o
+
+ autodet.o: autodet.c microcom.h
+-	gcc -O -c autodet.c
++	$(CC) $(CFLAGS) -c autodet.c
+
+ script.o: script.c script.h microcom.h
+-	gcc -O -c script.c
++	$(CC) $(CFLAGS) -c script.c
+
+ mux.o: mux.c microcom.h
+-	gcc -O -c mux.c
++	$(CC) $(CFLAGS) -c mux.c
+
+ microcom.o: microcom.c microcom.h
+-	gcc -O -c microcom.c
++	$(CC) $(CFLAGS) -c microcom.c
+
+ help.o: help.c microcom.h
+-	gcc -O -c help.c
++	$(CC) $(CFLAGS) -c help.c
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/microcom.git/commitdiff/9c15dd6bdb1d6a319fddf177656837bf43e5ac87



More information about the pld-cvs-commit mailing list