dev-libs/log4cpp: add 1.1.4

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
Arthur Zamarin 2024-02-23 20:33:14 +02:00
parent bd66847c4d
commit aef0ef66bf
No known key found for this signature in database
GPG Key ID: 02A0AF503D120504
4 changed files with 91 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST log4cpp-1.1.3.tar.gz 595639 BLAKE2B fc7d643aa70d739e38ec5aba127b4e760a47a064f4032690586c4698ec83a2b7f219d8476650d3bfc5e25563de0852869429ec45171233c6bd5c08b69476b169 SHA512 88e5e10bce8d7d6421c3dcf14aa25385159c4ae52becdc1f3666ab86e1ad3f633786d82afe398c517d4faaa57b3e7b7c0b524361d81c6b9040dbded5cecc19de
DIST log4cpp-1.1.4.tar.gz 637440 BLAKE2B fe7d3cf5ea8ff8f9bdd86691195c02473bd21a90ebfe2d9cd7a32c2fa30e17b5a104c6181601cf2dce19b703496bb6038e7b0a782a24dfd55415ecd462e49841 SHA512 0cdbd46ccd048d70bea3c35d22080dc5dd21fc3b9c415fe464847e60775954f57e9c8344506f0f94f16e90e8bdaa9cc6d84d3aa65191501e52ee8dfc639f0398

View File

@ -0,0 +1,20 @@
clang16 throws an error because of the implicit function declaration of exit().
This leads to the wrong assumption that snprintf is not present on the system.
Bug: https://bugs.gentoo.org/906535
Upstream PR: https://sourceforge.net/p/log4cpp/codegit/merge-requests/10/
# Pascal Jäger <pascal.jaeger@leimstift.de> (2023-09-22)
--- a/m4/AC_FUNC_SNPRINTF.m4
+++ b/m4/AC_FUNC_SNPRINTF.m4
@@ -12,7 +12,8 @@ dnl @author Caolan McNamara <caolan@skynet.ie>
dnl
AC_DEFUN([AC_FUNC_SNPRINTF],
[AC_CACHE_CHECK(for working snprintf, ac_cv_func_snprintf,
-[AC_TRY_RUN([#include <stdio.h>
+[AC_TRY_RUN([#include <stdlib.h>
+#include <stdio.h>
int main () { int l = snprintf(NULL,0,"%d",100); return !((3 <= l) || (-1 == l)); }
], ac_cv_func_snprintf=yes, ac_cv_func_snprintf=no,
ac_cv_func_snprintf=no)])

View File

@ -0,0 +1,11 @@
--- a/src/PatternLayout.cpp
+++ b/src/PatternLayout.cpp
@@ -373,7 +373,7 @@
literal = "";
}
if ((minWidth != 0) || (maxWidth != 0)) {
- component = new FormatModifierComponent(component, std::abs(minWidth), maxWidth, minWidth < 0);
+ component = new FormatModifierComponent(component, std::abs((float)minWidth), maxWidth, minWidth < 0);
minWidth = maxWidth = 0;
}
_components.push_back(component);

View File

@ -0,0 +1,59 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools flag-o-matic
DESCRIPTION="C++ classes for flexible logging to files, syslog and other destinations"
HOMEPAGE="https://log4cpp.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
S="${WORKDIR}/${PN}"
LICENSE="LGPL-2.1"
SLOT="0/5"
KEYWORDS="~amd64 ~arm ~ppc ~riscv ~s390 ~x86"
IUSE="doc test"
RESTRICT="!test? ( test )"
BDEPEND="doc? ( app-text/doxygen )"
PATCHES=(
"${FILESDIR}"/1.0-doc_install_path.patch
"${FILESDIR}"/1.0-asneeded.patch
"${FILESDIR}"/${PN}-1.1-cmath-fix.patch
"${FILESDIR}"/${PN}-1.1-automake-1.13.patch
"${FILESDIR}"/${PN}-1.1.3-fix-version.patch
"${FILESDIR}"/${PN}-1.1.4-fix-implicit-func-in-configure.patch
"${FILESDIR}"/${PN}-1.1.4-gcc43.patch
)
src_prepare() {
default
mv configure.{in,ac} || die
# Build tests conditionally
if ! use test; then
sed -i -e '/^SUBDIRS/s/ tests//' Makefile.am || die
fi
eautoreconf
}
src_configure() {
append-cxxflags -Wno-register # https://bugs.gentoo.org/895054
# Bashisms call configure tests to malfunction / config.h to be misgenerated
# which then causes a build failure later on in the package (w/ GCC 12,
# anyway).
CONFIG_SHELL="${BROOT}"/bin/bash econf \
--without-idsa \
$(use_enable doc doxygen)
}
src_install() {
default
# Package installs .pc files
find "${ED}" -name '*.la' -delete || die
}