summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-14 13:11:15 +0100
committerSam James <sam@gentoo.org>2022-06-14 13:11:15 +0100
commit7966df0d4206f1f85a392e7325048ebe41be40e7 (patch)
tree63b604fc2ded41af4639b31909b791bc191eb514 /dev-libs
parentapp-admin/sudo: fix whitespace (diff)
downloadgentoo-7966df0d4206f1f85a392e7325048ebe41be40e7.tar.gz
gentoo-7966df0d4206f1f85a392e7325048ebe41be40e7.tar.bz2
gentoo-7966df0d4206f1f85a392e7325048ebe41be40e7.zip
dev-libs/cxxtools: fix build with GCC 12; fix build with lld
Closes: https://bugs.gentoo.org/851837 Closes: https://bugs.gentoo.org/829662 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/cxxtools/cxxtools-3.0-r2.ebuild45
-rw-r--r--dev-libs/cxxtools/files/cxxtools-3.0-gcc12-time.patch11
-rw-r--r--dev-libs/cxxtools/files/cxxtools-3.0-lld-linking-openssl.patch11
3 files changed, 67 insertions, 0 deletions
diff --git a/dev-libs/cxxtools/cxxtools-3.0-r2.ebuild b/dev-libs/cxxtools/cxxtools-3.0-r2.ebuild
new file mode 100644
index 000000000000..10143b5f51ad
--- /dev/null
+++ b/dev-libs/cxxtools/cxxtools-3.0-r2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Collection of general purpose C++-classes"
+HOMEPAGE="http://www.tntnet.org/cxxtools.html"
+SRC_URI="http://www.tntnet.org/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+
+RDEPEND="virtual/libiconv"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS )
+
+PATCHES=(
+ "${FILESDIR}"/${P}_gcc11.patch
+ "${FILESDIR}"/${PN}-3.0-gcc12-time.patch
+ "${FILESDIR}"/${PN}-3.0-lld-linking-openssl.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-demos \
+ --disable-unittest
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ einstalldocs
+
+ # remove static libs
+ rm -f "${ED}"/usr/$(get_libdir)/libcxxtools{,-bin,-http,-json,-unit,-xmlrpc}.la || die
+}
diff --git a/dev-libs/cxxtools/files/cxxtools-3.0-gcc12-time.patch b/dev-libs/cxxtools/files/cxxtools-3.0-gcc12-time.patch
new file mode 100644
index 000000000000..d80763dd4c1d
--- /dev/null
+++ b/dev-libs/cxxtools/files/cxxtools-3.0-gcc12-time.patch
@@ -0,0 +1,11 @@
+https://bugs.gentoo.org/851837
+--- a/src/timer.cpp
++++ b/src/timer.cpp
+@@ -27,6 +27,7 @@
+ #include "cxxtools/clock.h"
+ #include "cxxtools/selector.h"
+ #include "cxxtools/datetime.h"
++#include <ctime>
+ #include <stdexcept>
+
+ namespace cxxtools
diff --git a/dev-libs/cxxtools/files/cxxtools-3.0-lld-linking-openssl.patch b/dev-libs/cxxtools/files/cxxtools-3.0-lld-linking-openssl.patch
new file mode 100644
index 000000000000..e2696fd094b0
--- /dev/null
+++ b/dev-libs/cxxtools/files/cxxtools-3.0-lld-linking-openssl.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -173,7 +173,7 @@ libcxxtools_la_LIBADD = $(LIBICONV)
+ libcxxtools_la_LDFLAGS = -version-info @sonumber@ @SHARED_LIB_FLAG@
+
+ if MAKE_OPENSSL
+-libcxxtools_la_LDFLAGS += -lssl
++libcxxtools_la_LIBADD += -lssl -lcrypto
+ libcxxtools_la_SOURCES += \
+ sslcertificateimpl.cpp
+ endif