summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-10-04 16:10:18 +0100
committerSam James <sam@gentoo.org>2023-10-04 16:10:45 +0100
commit0bda0617c2f10663b24210f00dea77208f9f59a3 (patch)
treed0921ddb001efaafc2adf410e08aca912b20f244 /net-libs
parentx11-misc/cairo-clock: don't redefine _FORTIFY_SOURCE (diff)
downloadgentoo-0bda0617c2f10663b24210f00dea77208f9f59a3.tar.gz
gentoo-0bda0617c2f10663b24210f00dea77208f9f59a3.tar.bz2
gentoo-0bda0617c2f10663b24210f00dea77208f9f59a3.zip
net-libs/libotr: don't redefine _FORTIFY_SOURCE
Closes: https://bugs.gentoo.org/895680 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libotr/files/libotr-4.1.1-dont-clobber-fortify-source.patch23
-rw-r--r--net-libs/libotr/libotr-4.1.1-r2.ebuild40
2 files changed, 63 insertions, 0 deletions
diff --git a/net-libs/libotr/files/libotr-4.1.1-dont-clobber-fortify-source.patch b/net-libs/libotr/files/libotr-4.1.1-dont-clobber-fortify-source.patch
new file mode 100644
index 000000000000..af9330b97d3a
--- /dev/null
+++ b/net-libs/libotr/files/libotr-4.1.1-dont-clobber-fortify-source.patch
@@ -0,0 +1,23 @@
+Don't clobber our toolchain defaults.
+
+https://bugs.gentoo.org/895680
+--- a/configure.ac
++++ b/configure.ac
+@@ -151,7 +151,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+ ])], have_clang=yes, have_clang=no)
+
+ if test x$enable_gcc_hardening != xno; then
+- CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
++ CFLAGS="$CFLAGS"
+ if test x$have_clang = xyes; then
+ OTR_CHECK_CFLAGS(-Qunused-arguments)
+ fi
+@@ -181,6 +181,8 @@ if test x$enable_linker_hardening != xno; then
+ OTR_CHECK_LDFLAGS(-z relro -z now, "$all_ldflags_for_check", "$all_libs_for_check")
+ fi
+
++AX_ADD_FORTIFY_SOURCE
++
+ AC_OUTPUT([Makefile src/Makefile toolkit/Makefile tests/Makefile tests/utils/Makefile libotr.pc
+ tests/utils/tap/Makefile
+ tests/unit/Makefile
diff --git a/net-libs/libotr/libotr-4.1.1-r2.ebuild b/net-libs/libotr/libotr-4.1.1-r2.ebuild
new file mode 100644
index 000000000000..d1082fa841cc
--- /dev/null
+++ b/net-libs/libotr/libotr-4.1.1-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="(OTR) Messaging allows you to have private conversations over instant messaging"
+HOMEPAGE="https://otr.cypherpunks.ca"
+SRC_URI="https://otr.cypherpunks.ca/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+RDEPEND="
+ dev-libs/libgcrypt:=
+ dev-libs/libgpg-error:=
+"
+DEPEND="${RDEPEND}"
+# autoconf-archive for F_S patch
+BDEPEND="sys-devel/autoconf-archive"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.1.1-fix-build-with-libgcrypt-1.10.patch"
+ "${FILESDIR}/${PN}-4.1.1-dont-clobber-fortify-source.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_install() {
+ default
+ dodoc UPGRADING
+
+ # no static archives, #465686
+ find "${ED}" -name '*.la' -delete || die
+}