Gentoo Archives: gentoo-commits

From: John Helmert III <ajak@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libmcpp/files/, dev-cpp/libmcpp/
Date: Sat, 12 Jun 2021 17:30:25
Message-Id: 1623518996.95af7c77e3687fb248aeec1c40682ae78d8e64b2.ajak@gentoo
1 commit: 95af7c77e3687fb248aeec1c40682ae78d8e64b2
2 Author: John Helmert III <ajak <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 12 17:29:35 2021 +0000
4 Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 12 17:29:56 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95af7c77
7
8 dev-cpp/libmcpp: drop 2.7.2-r3
9
10 Bug: https://bugs.gentoo.org/718808
11 Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
12
13 dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch | 33 -----------
14 dev-cpp/libmcpp/files/libmcpp-2.7.2-zeroc.patch | 75 ------------------------
15 dev-cpp/libmcpp/libmcpp-2.7.2-r3.ebuild | 47 ---------------
16 3 files changed, 155 deletions(-)
17
18 diff --git a/dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch b/dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch
19 deleted file mode 100644
20 index cb5aa6c345c..00000000000
21 --- a/dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch
22 +++ /dev/null
23 @@ -1,33 +0,0 @@
24 -Description: Simple fixes
25 - * Fix freeing unmalloced memory
26 - The memory of 'in_file' is not malloced, but points to argv[].
27 - It is wrong to free it.
28 - * When there is no input file specified by argv, it causes error
29 - and fp_in == NULL. Check is needed to call fclose for fp_in.
30 -Author: NIIBE Yutaka
31 -
32 -## Fixes the issue reported at:
33 -## http://www.forallsecure.com/bug-reports/6b11b6fccda17cc467e055ccf7fec3fa2d89ec00/
34 -
35 -Index: mcpp-2.7.2/src/main.c
36 -===================================================================
37 ---- mcpp-2.7.2.orig/src/main.c 2013-07-09 03:03:05.610947658 +0000
38 -+++ mcpp-2.7.2/src/main.c 2013-07-09 03:03:05.534947624 +0000
39 -@@ -428,16 +428,11 @@
40 -
41 - fatal_error_exit:
42 - #if MCPP_LIB
43 -- /* Free malloced memory */
44 -- if (mcpp_debug & MACRO_CALL) {
45 -- if (in_file != stdin_name)
46 -- free( in_file);
47 -- }
48 - clear_filelist();
49 - clear_symtable();
50 - #endif
51 -
52 -- if (fp_in != stdin)
53 -+ if (fp_in && fp_in != stdin)
54 - fclose( fp_in);
55 - if (fp_out != stdout)
56 - fclose( fp_out);
57
58 diff --git a/dev-cpp/libmcpp/files/libmcpp-2.7.2-zeroc.patch b/dev-cpp/libmcpp/files/libmcpp-2.7.2-zeroc.patch
59 deleted file mode 100644
60 index fff5d321fe9..00000000000
61 --- a/dev-cpp/libmcpp/files/libmcpp-2.7.2-zeroc.patch
62 +++ /dev/null
63 @@ -1,75 +0,0 @@
64 -Description: Fixes by ZeroC, Inc.
65 -Author: ZeroC, Inc.
66 -Bug-Debian: http://bugs.debian.org/611749
67 -
68 ---- mcpp-2.7.2.orig/src/main.c
69 -+++ mcpp-2.7.2/src/main.c
70 -@@ -326,6 +326,8 @@ static void init_main( void)
71 - = FALSE;
72 - option_flags.trig = TRIGRAPHS_INIT;
73 - option_flags.dig = DIGRAPHS_INIT;
74 -+ sh_file = NULL;
75 -+ sh_line = 0;
76 - }
77 -
78 - int mcpp_lib_main
79 ---- mcpp-2.7.2.orig/src/support.c
80 -+++ mcpp-2.7.2/src/support.c
81 -@@ -188,7 +188,7 @@ static char * append_to_buffer(
82 - size_t length
83 - )
84 - {
85 -- if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */
86 -+ if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */
87 - size_t size = MAX( BUF_INCR_SIZE, length);
88 -
89 - if (mem_buf_p->buffer == NULL) { /* 1st append */
90 -@@ -1722,6 +1722,8 @@ com_start:
91 - sp -= 2;
92 - while (*sp != '\n') /* Until end of line */
93 - mcpp_fputc( *sp++, OUT);
94 -+ mcpp_fputc( '\n', OUT);
95 -+ wrong_line = TRUE;
96 - }
97 - goto end_line;
98 - default: /* Not a comment */
99 ---- mcpp-2.7.2.orig/src/internal.H
100 -+++ mcpp-2.7.2/src/internal.H
101 -@@ -390,6 +390,8 @@ extern char * const work_end; /* E
102 - extern char identifier[]; /* Lastly scanned name */
103 - extern IFINFO ifstack[]; /* Information of #if nesting */
104 - extern char work_buf[];
105 -+extern FILEINFO * sh_file;
106 -+extern int sh_line;
107 - /* Temporary buffer for directive line and macro expansion */
108 -
109 - /* main.c */
110 -@@ -557,6 +559,6 @@ extern void init_system( void);
111 - #endif
112 - #endif
113 -
114 --#if HOST_HAVE_STPCPY
115 -+#if HOST_HAVE_STPCPY && !defined(stpcpy)
116 - extern char * stpcpy( char * dest, const char * src);
117 - #endif
118 ---- mcpp-2.7.2.orig/src/system.c
119 -+++ mcpp-2.7.2/src/system.c
120 -@@ -3858,6 +3858,9 @@ static int chk_dirp(
121 - }
122 - #endif
123 -
124 -+FILEINFO* sh_file;
125 -+int sh_line;
126 -+
127 - void sharp(
128 - FILEINFO * sharp_file,
129 - int flag /* Flag to append to the line for GCC */
130 -@@ -3868,8 +3871,6 @@ void sharp(
131 - * else (i.e. 'sharp_file' is NULL) 'infile'.
132 - */
133 - {
134 -- static FILEINFO * sh_file;
135 -- static int sh_line;
136 - FILEINFO * file;
137 - int line;
138 -
139
140 diff --git a/dev-cpp/libmcpp/libmcpp-2.7.2-r3.ebuild b/dev-cpp/libmcpp/libmcpp-2.7.2-r3.ebuild
141 deleted file mode 100644
142 index b2aa110f188..00000000000
143 --- a/dev-cpp/libmcpp/libmcpp-2.7.2-r3.ebuild
144 +++ /dev/null
145 @@ -1,47 +0,0 @@
146 -# Copyright 1999-2021 Gentoo Authors
147 -# Distributed under the terms of the GNU General Public License v2
148 -
149 -EAPI=7
150 -
151 -inherit autotools
152 -
153 -MY_P=${P/lib/}
154 -
155 -DESCRIPTION="A portable C++ preprocessor"
156 -HOMEPAGE="http://mcpp.sourceforge.net"
157 -SRC_URI="mirror://sourceforge/mcpp/${MY_P}.tar.gz"
158 -S="${WORKDIR}"/${MY_P}
159 -
160 -LICENSE="BSD"
161 -SLOT="0"
162 -KEYWORDS="amd64 ~arm ~ia64 x86 ~x86-linux ~x64-macos"
163 -IUSE="static-libs"
164 -
165 -PATCHES=(
166 - "${FILESDIR}"/${PN}-2.7.2-fix-build-system.patch
167 - "${FILESDIR}"/${PN}-2.7.2-zeroc.patch
168 - "${FILESDIR}"/${PN}-2.7.2-gniibe.patch
169 -)
170 -
171 -src_prepare() {
172 - default
173 -
174 - # bug #778461
175 - sed -i 's/-lmcpp/libmcpp.la/' src/Makefile.am || die
176 -
177 - eautoreconf
178 -}
179 -
180 -src_configure() {
181 - econf \
182 - --enable-mcpplib \
183 - $(use_enable static-libs static)
184 -}
185 -
186 -src_install() {
187 - default
188 -
189 - if ! use static-libs; then
190 - find "${D}" -name '*.la' -delete || die
191 - fi
192 -}