From ecdac123787b96ce6649f0f91da12ea6458cc2b1 Mon Sep 17 00:00:00 2001 From: Palica Date: Tue, 23 Jun 2020 22:35:08 +0200 Subject: Updating liguros repo --- dev-cpp/libmcpp/Manifest | 1 + .../files/libmcpp-2.7.2-fix-build-system.patch | 30 +++++++++ dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch | 33 ++++++++++ dev-cpp/libmcpp/files/libmcpp-2.7.2-zeroc.patch | 75 ++++++++++++++++++++++ dev-cpp/libmcpp/libmcpp-2.7.2-r2.ebuild | 43 +++++++++++++ dev-cpp/libmcpp/libmcpp-2.7.2-r3.ebuild | 44 +++++++++++++ dev-cpp/libmcpp/metadata.xml | 9 +++ 7 files changed, 235 insertions(+) create mode 100644 dev-cpp/libmcpp/Manifest create mode 100644 dev-cpp/libmcpp/files/libmcpp-2.7.2-fix-build-system.patch create mode 100644 dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch create mode 100644 dev-cpp/libmcpp/files/libmcpp-2.7.2-zeroc.patch create mode 100644 dev-cpp/libmcpp/libmcpp-2.7.2-r2.ebuild create mode 100644 dev-cpp/libmcpp/libmcpp-2.7.2-r3.ebuild create mode 100644 dev-cpp/libmcpp/metadata.xml (limited to 'dev-cpp/libmcpp') diff --git a/dev-cpp/libmcpp/Manifest b/dev-cpp/libmcpp/Manifest new file mode 100644 index 000000000000..c70198b721eb --- /dev/null +++ b/dev-cpp/libmcpp/Manifest @@ -0,0 +1 @@ +DIST mcpp-2.7.2.tar.gz 1533457 BLAKE2B 4368fd1c667923ab3b60ce79f8421c549a9d9105957ca87b9ba49be513cb1be7f220a3ddbaf306e860014d5211af480d07170d912d3d4a80345d8eab45fd6c00 SHA512 1ca885cb13fdb684de9d0595a9215b52f48a93a69077d82cdcacafe40d9a61fb77b00a3ff2b8890e7bc0a0fcc0c8d70d4093c00c280351cd4459aba67c573235 diff --git a/dev-cpp/libmcpp/files/libmcpp-2.7.2-fix-build-system.patch b/dev-cpp/libmcpp/files/libmcpp-2.7.2-fix-build-system.patch new file mode 100644 index 000000000000..95cefadd3fe8 --- /dev/null +++ b/dev-cpp/libmcpp/files/libmcpp-2.7.2-fix-build-system.patch @@ -0,0 +1,30 @@ +Specify and install files using idiomatic Automake +conventions instead of manually installing with cp. + +--- a/Makefile.am ++++ b/Makefile.am +@@ -23,16 +23,12 @@ + $(top_srcdir)/test-c $(top_srcdir)/test-l $(top_srcdir)/tool \ + $(top_srcdir)/doc $(top_srcdir)/doc-jp + +-if ! REPLACE_CPP +-install-exec-hook: +- $(top_srcdir)/config/install-sh -d "$(DESTDIR)$(prefix)/share/doc/mcpp" +- cp -pf $(top_srcdir)/LICENSE $(top_srcdir)/README $(top_srcdir)/NEWS \ +- $(DESTDIR)$(prefix)/share/doc/mcpp +- cp -pf $(top_srcdir)/doc/mcpp-manual.html \ +- $(DESTDIR)$(prefix)/share/doc/mcpp +- cp -pf $(top_srcdir)/doc-jp/mcpp-manual.html \ +- $(DESTDIR)$(prefix)/share/doc/mcpp/mcpp-manual-jp.html +-uninstall-hook: +- rm -rf $(DESTDIR)$(prefix)/share/doc/mcpp +-endif ++dist_doc_DATA = README NEWS doc/mcpp-summary.pdf + ++dist_html_DATA = \ ++ doc/cpp-test.html \ ++ doc/mcpp-manual.html \ ++ doc/mcpp-porting.html ++ ++htmljadir = $(htmldir)/doc-jp ++dist_htmlja_DATA = doc-jp/mcpp-manual.html diff --git a/dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch b/dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch new file mode 100644 index 000000000000..cb5aa6c345ce --- /dev/null +++ b/dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch @@ -0,0 +1,33 @@ +Description: Simple fixes + * Fix freeing unmalloced memory + The memory of 'in_file' is not malloced, but points to argv[]. + It is wrong to free it. + * When there is no input file specified by argv, it causes error + and fp_in == NULL. Check is needed to call fclose for fp_in. +Author: NIIBE Yutaka + +## Fixes the issue reported at: +## http://www.forallsecure.com/bug-reports/6b11b6fccda17cc467e055ccf7fec3fa2d89ec00/ + +Index: mcpp-2.7.2/src/main.c +=================================================================== +--- mcpp-2.7.2.orig/src/main.c 2013-07-09 03:03:05.610947658 +0000 ++++ mcpp-2.7.2/src/main.c 2013-07-09 03:03:05.534947624 +0000 +@@ -428,16 +428,11 @@ + + fatal_error_exit: + #if MCPP_LIB +- /* Free malloced memory */ +- if (mcpp_debug & MACRO_CALL) { +- if (in_file != stdin_name) +- free( in_file); +- } + clear_filelist(); + clear_symtable(); + #endif + +- if (fp_in != stdin) ++ if (fp_in && fp_in != stdin) + fclose( fp_in); + if (fp_out != stdout) + fclose( fp_out); diff --git a/dev-cpp/libmcpp/files/libmcpp-2.7.2-zeroc.patch b/dev-cpp/libmcpp/files/libmcpp-2.7.2-zeroc.patch new file mode 100644 index 000000000000..fff5d321fe98 --- /dev/null +++ b/dev-cpp/libmcpp/files/libmcpp-2.7.2-zeroc.patch @@ -0,0 +1,75 @@ +Description: Fixes by ZeroC, Inc. +Author: ZeroC, Inc. +Bug-Debian: http://bugs.debian.org/611749 + +--- mcpp-2.7.2.orig/src/main.c ++++ mcpp-2.7.2/src/main.c +@@ -326,6 +326,8 @@ static void init_main( void) + = FALSE; + option_flags.trig = TRIGRAPHS_INIT; + option_flags.dig = DIGRAPHS_INIT; ++ sh_file = NULL; ++ sh_line = 0; + } + + int mcpp_lib_main +--- mcpp-2.7.2.orig/src/support.c ++++ mcpp-2.7.2/src/support.c +@@ -188,7 +188,7 @@ static char * append_to_buffer( + size_t length + ) + { +- if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ ++ 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,6 +1722,8 @@ com_start: + 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 */ +--- mcpp-2.7.2.orig/src/internal.H ++++ mcpp-2.7.2/src/internal.H +@@ -390,6 +390,8 @@ extern char * const work_end; /* E + 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,6 +559,6 @@ extern void init_system( void); + #endif + #endif + +-#if HOST_HAVE_STPCPY ++#if HOST_HAVE_STPCPY && !defined(stpcpy) + extern char * stpcpy( char * dest, const char * src); + #endif +--- mcpp-2.7.2.orig/src/system.c ++++ mcpp-2.7.2/src/system.c +@@ -3858,6 +3858,9 @@ static int chk_dirp( + } + #endif + ++FILEINFO* sh_file; ++int sh_line; ++ + void sharp( + FILEINFO * sharp_file, + int flag /* Flag to append to the line for GCC */ +@@ -3868,8 +3871,6 @@ void sharp( + * else (i.e. 'sharp_file' is NULL) 'infile'. + */ + { +- static FILEINFO * sh_file; +- static int sh_line; + FILEINFO * file; + int line; + diff --git a/dev-cpp/libmcpp/libmcpp-2.7.2-r2.ebuild b/dev-cpp/libmcpp/libmcpp-2.7.2-r2.ebuild new file mode 100644 index 000000000000..0f8a8f23a825 --- /dev/null +++ b/dev-cpp/libmcpp/libmcpp-2.7.2-r2.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools + +MY_P=${P/lib/} + +DESCRIPTION="A portable C++ preprocessor" +HOMEPAGE="http://mcpp.sourceforge.net" +SRC_URI="mirror://sourceforge/mcpp/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm ~ia64 x86 ~x86-linux ~x64-macos" +IUSE="static-libs" + +DEPEND="" +RDEPEND="" + +S=${WORKDIR}/${MY_P} + +PATCHES=( "${FILESDIR}"/${PN}-2.7.2-fix-build-system.patch ) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --enable-mcpplib \ + $(use_enable static-libs static) +} + +src_install() { + default + + if ! use static-libs; then + find "${D}" -name '*.la' -delete || die + fi +} diff --git a/dev-cpp/libmcpp/libmcpp-2.7.2-r3.ebuild b/dev-cpp/libmcpp/libmcpp-2.7.2-r3.ebuild new file mode 100644 index 000000000000..69aa40621369 --- /dev/null +++ b/dev-cpp/libmcpp/libmcpp-2.7.2-r3.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools + +MY_P=${P/lib/} + +DESCRIPTION="A portable C++ preprocessor" +HOMEPAGE="http://mcpp.sourceforge.net" +SRC_URI="mirror://sourceforge/mcpp/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ia64 ~x86 ~x86-linux ~x64-macos" +IUSE="static-libs" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}"/${PN}-2.7.2-fix-build-system.patch + "${FILESDIR}"/${PN}-2.7.2-zeroc.patch + "${FILESDIR}"/${PN}-2.7.2-gniibe.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --enable-mcpplib \ + $(use_enable static-libs static) +} + +src_install() { + default + + if ! use static-libs; then + find "${D}" -name '*.la' -delete || die + fi +} diff --git a/dev-cpp/libmcpp/metadata.xml b/dev-cpp/libmcpp/metadata.xml new file mode 100644 index 000000000000..dcf9d04cecb0 --- /dev/null +++ b/dev-cpp/libmcpp/metadata.xml @@ -0,0 +1,9 @@ + + + + + + mcpp + + gentoo-staging + -- cgit v1.3.1