rebuilt with patches from Arch Linux [release 2.7.2-3mamba;Fri Dec 24 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 07:01:46 +01:00
parent b7e654ba54
commit aeeef71430
5 changed files with 139 additions and 94 deletions

View File

@ -1,15 +1,8 @@
# mcpp # mcpp
C/C++ preprocessor defines and expands macros and processes '#if', C/C++ preprocessor defines and expands macros and processes '#if', '#include' and some other directives.
'#include' and some other directives.
MCPP is an alternative C/C++ preprocessor with the highest conformance. MCPP is an alternative C/C++ preprocessor with the highest conformance.
It supports multiple standards: K&R, ISO C90, ISO C99, and ISO C++98. It supports multiple standards: K&R, ISO C90, ISO C99, and ISO C++98.
MCPP is especially useful for debugging a source program which uses MCPP is especially useful for debugging a source program which uses complicated macros and also useful for checking portability of a source.
complicated macros and also useful for checking portability of a source. Though mcpp could be built as a replacement of GCC's resident proprocessor or as a stand-alone program without using library build of mcpp, this package installs only a program named 'mcpp' which links shared library of mcpp and behaves independent from GCC.
Though mcpp could be built as a replacement of GCC's resident
proprocessor or as a stand-alone program without using library build of
mcpp, this package installs only a program named 'mcpp' which links
shared library of mcpp and behaves independent from GCC.

100
mcpp-2.7.2-fs28284.patch Normal file
View File

@ -0,0 +1,100 @@
diff -c -r -N ../mcpp-2.7.2/src/internal.H ./src/internal.H
*** ../mcpp-2.7.2/src/internal.H 2008-08-27 10:31:16.000000000 -0230
--- ./src/internal.H 2009-12-17 21:01:35.000000000 -0330
***************
*** 390,395 ****
--- 390,397 ----
extern char identifier[]; /* Lastly scanned name */
extern IFINFO ifstack[]; /* Information of #if nesting */
extern char work_buf[];
+ extern FILEINFO * sh_file;
+ extern int sh_line;
/* Temporary buffer for directive line and macro expansion */
/* main.c */
***************
*** 557,562 ****
#endif
#endif
! #if HOST_HAVE_STPCPY
extern char * stpcpy( char * dest, const char * src);
#endif
--- 559,564 ----
#endif
#endif
! #if HOST_HAVE_STPCPY && !defined(stpcpy)
extern char * stpcpy( char * dest, const char * src);
#endif
diff -c -r -N ../mcpp-2.7.2/src/main.c ./src/main.c
*** ../mcpp-2.7.2/src/main.c 2008-11-05 05:04:46.000000000 -0330
--- ./src/main.c 2009-12-17 20:42:42.000000000 -0330
***************
*** 326,331 ****
--- 326,333 ----
= FALSE;
option_flags.trig = TRIGRAPHS_INIT;
option_flags.dig = DIGRAPHS_INIT;
+ sh_file = NULL;
+ sh_line = 0;
}
int mcpp_lib_main
diff -c -r -N ../mcpp-2.7.2/src/support.c ./src/support.c
*** ../mcpp-2.7.2/src/support.c 2008-06-10 06:02:33.000000000 -0230
--- ./src/support.c 2009-12-17 20:42:39.000000000 -0330
***************
*** 188,194 ****
size_t length
)
{
! if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */
size_t size = MAX( BUF_INCR_SIZE, length);
if (mem_buf_p->buffer == NULL) { /* 1st append */
--- 188,194 ----
size_t length
)
{
! if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */
size_t size = MAX( BUF_INCR_SIZE, length);
if (mem_buf_p->buffer == NULL) { /* 1st append */
***************
*** 1722,1727 ****
--- 1722,1729 ----
sp -= 2;
while (*sp != '\n') /* Until end of line */
mcpp_fputc( *sp++, OUT);
+ mcpp_fputc( '\n', OUT);
+ wrong_line = TRUE;
}
goto end_line;
default: /* Not a comment */
diff -c -r -N ../mcpp-2.7.2/src/system.c ./src/system.c
*** ../mcpp-2.7.2/src/system.c 2008-11-26 06:23:51.000000000 -0330
--- ./src/system.c 2009-12-17 20:42:42.000000000 -0330
***************
*** 3858,3863 ****
--- 3858,3866 ----
}
#endif
+ FILEINFO* sh_file;
+ int sh_line;
+
void sharp(
FILEINFO * sharp_file,
int flag /* Flag to append to the line for GCC */
***************
*** 3868,3875 ****
* else (i.e. 'sharp_file' is NULL) 'infile'.
*/
{
- static FILEINFO * sh_file;
- static int sh_line;
FILEINFO * file;
int line;
--- 3871,3876 ----

11
mcpp-2.7.2-namlen.patch Normal file
View File

@ -0,0 +1,11 @@
--- mcpp-2.7.2/src/mbchar.c 2008-03-08 13:06:13.000000000 +0000
+++ mcpp-2.7.2/src/mbchar.c 2009-03-08 13:14:17.000000000 +0000
@@ -345,7 +345,7 @@
static size_t mb_read_utf8( int c1, char ** in_pp, char ** out_pp);
/* For UTF8 mbchar encoding */
-#define NAMLEN 20
+#define NAMLEN 40
#define UPPER 1 /* To upper */
#define LOWER 0 /* To lower */

View File

@ -1,36 +1,28 @@
Name: mcpp Name: mcpp
Version: 2.7.2 Version: 2.7.2
Release: 2mamba Release: 3mamba
Summary: Alternative C/C++ preprocessor Summary: Alternative C/C++ preprocessor
Group: Development/Languages Group: Development/Languages
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: gil <puntogil@libero.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://mcpp.sourceforge.net/ URL: http://mcpp.sourceforge.net/
Source: http://downloads.sourceforge.net/project/mcpp/mcpp/V.%{version}/mcpp-%{version}.tar.gz Source: http://downloads.sourceforge.net/project/mcpp/mcpp/V.%{version}/mcpp-%{version}.tar.gz
Patch0: mcpp-manual.html.patch Patch0: mcpp-manual.html.patch
# from http://www.zeroc.com/forums/patches/4445-patch-1-mcpp-2-7-2-a.html Patch2: mcpp-2.7.2-fs28284.patch
Patch1: patch.mcpp.2.7.2.txt Patch3: mcpp-2.7.2-namlen.patch
License: BSD License: BSD
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
Requires: libmcpp = %{?epoch:%epoch:}%{version}-%{release} Requires: libmcpp = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
C/C++ preprocessor defines and expands macros and processes '#if', C/C++ preprocessor defines and expands macros and processes '#if', '#include' and some other directives.
'#include' and some other directives.
MCPP is an alternative C/C++ preprocessor with the highest conformance. MCPP is an alternative C/C++ preprocessor with the highest conformance.
It supports multiple standards: K&R, ISO C90, ISO C99, and ISO C++98. It supports multiple standards: K&R, ISO C90, ISO C99, and ISO C++98.
MCPP is especially useful for debugging a source program which uses MCPP is especially useful for debugging a source program which uses complicated macros and also useful for checking portability of a source.
complicated macros and also useful for checking portability of a source. Though mcpp could be built as a replacement of GCC's resident proprocessor or as a stand-alone program without using library build of mcpp, this package installs only a program named 'mcpp' which links shared library of mcpp and behaves independent from GCC.
Though mcpp could be built as a replacement of GCC's resident
proprocessor or as a stand-alone program without using library build of
mcpp, this package installs only a program named 'mcpp' which links
shared library of mcpp and behaves independent from GCC.
%package -n libmcpp %package -n libmcpp
Group: System/Libraries Group: System/Libraries
@ -38,7 +30,6 @@ Summary: Libraries for MCPP
%description -n libmcpp %description -n libmcpp
MCPP is an alternative C/C++ preprocessor with the highest conformance. MCPP is an alternative C/C++ preprocessor with the highest conformance.
This package provides a library build of mcpp. This package provides a library build of mcpp.
%package -n libmcpp-devel %package -n libmcpp-devel
@ -48,8 +39,7 @@ Requires: libmcpp = %{?epoch:%epoch:}%{version}-%{release}
%description -n libmcpp-devel %description -n libmcpp-devel
MCPP is an alternative C/C++ preprocessor with the highest conformance. MCPP is an alternative C/C++ preprocessor with the highest conformance.
This package contains libraries and header files needed for development.
This package contains libraries and header files need for development.
%package doc %package doc
Summary: Documentation for MCPP Summary: Documentation for MCPP
@ -57,19 +47,22 @@ Group: Documentation
%description doc %description doc
MCPP is an alternative C/C++ preprocessor with the highest conformance. MCPP is an alternative C/C++ preprocessor with the highest conformance.
The %{name}-doc package contains the documentation for MCPP. The %{name}-doc package contains the documentation for MCPP.
%prep %debug_packages
%prep
%setup -q -n mcpp-%{version} %setup -q -n mcpp-%{version}
%patch0 -p0 -b -z.euc-jp %patch0 -p0 -b -z.euc-jp
%patch1 -p1 %patch2 -p1 -b .fs28284
%patch3 -p1 -b .namlen
sed -i "s,| arm-\* |,| aarch64-\* | arm-\* |," config/config.sub
%build %build
%configure \ %configure \
--enable-mcpplib \ --enable-mcpplib \
--disable-static --disable-static
make CFLAGS="%{optflags}" make CFLAGS="%{optflags}"
%install %install
@ -84,20 +77,19 @@ install -m 644 mcpp-gcc.1 %{buildroot}%{_mandir}/man1/
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/mcpp
%{_mandir}/man1/mcpp.1.gz
%{_mandir}/man1/mcpp-gcc.1.gz
%doc ChangeLog ChangeLog.old LICENSE NEWS README
%post -n libmcpp -p /sbin/ldconfig %post -n libmcpp -p /sbin/ldconfig
%postun -n libmcpp -p /sbin/ldconfig %postun -n libmcpp -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/mcpp
%{_mandir}/man1/mcpp.1*
%{_mandir}/man1/mcpp-gcc.1*
%files -n libmcpp %files -n libmcpp
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libmcpp.so.0 %{_libdir}/libmcpp.so.*
%{_libdir}/libmcpp.so.0.3.0 %doc LICENSE
%files -n libmcpp-devel %files -n libmcpp-devel
%defattr(-,root,root) %defattr(-,root,root)
@ -111,6 +103,9 @@ install -m 644 mcpp-gcc.1 %{buildroot}%{_mandir}/man1/
%lang(en) %doc doc/mcpp-manual.html %lang(en) %doc doc/mcpp-manual.html
%changelog %changelog
* Fri Dec 24 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.2-3mamba
- rebuilt with patches from Arch Linux
* Mon Jan 17 2011 gil <puntogil@libero.it> 2.7.2-2mamba * Mon Jan 17 2011 gil <puntogil@libero.it> 2.7.2-2mamba
- rebuilt devel - rebuilt devel

View File

@ -1,54 +0,0 @@
diff -c -r -N ../mcpp-2.7.2-old/src/internal.H ./src/internal.H
*** ../mcpp-2.7.2-old/src/internal.H 2008-08-27 10:31:16.000000000 -0230
--- ./src/internal.H 2009-05-21 09:49:31.000000000 -0230
***************
*** 390,395 ****
--- 390,397 ----
extern char identifier[]; /* Lastly scanned name */
extern IFINFO ifstack[]; /* Information of #if nesting */
extern char work_buf[];
+ extern FILEINFO * sh_file;
+ extern int sh_line;
/* Temporary buffer for directive line and macro expansion */
/* main.c */
diff -c -r -N ../mcpp-2.7.2-old/src/main.c ./src/main.c
*** ../mcpp-2.7.2-old/src/main.c 2008-11-05 05:04:46.000000000 -0330
--- ./src/main.c 2009-05-21 09:47:50.000000000 -0230
***************
*** 326,331 ****
--- 326,333 ----
= FALSE;
option_flags.trig = TRIGRAPHS_INIT;
option_flags.dig = DIGRAPHS_INIT;
+ sh_file = NULL;
+ sh_line = 0;
}
int mcpp_lib_main
diff -c -r -N ../mcpp-2.7.2-old/src/system.c ./src/system.c
*** ../mcpp-2.7.2-old/src/system.c 2008-11-26 06:23:51.000000000 -0330
--- ./src/system.c 2009-05-21 09:48:50.000000000 -0230
***************
*** 3858,3863 ****
--- 3858,3866 ----
}
#endif
+ FILEINFO* sh_file;
+ int sh_line;
+
void sharp(
FILEINFO * sharp_file,
int flag /* Flag to append to the line for GCC */
***************
*** 3868,3875 ****
* else (i.e. 'sharp_file' is NULL) 'infile'.
*/
{
- static FILEINFO * sh_file;
- static int sh_line;
FILEINFO * file;
int line;
--- 3871,3876 ----