Skip to content

Commit

Permalink
gnome-base/gnome-vfs: Fixed build with openssl-1.1
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/592540
Signed-off-by: Lars Wendler <[email protected]>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
  • Loading branch information
Lars Wendler committed Oct 24, 2018
1 parent 7b61b7b commit ac43ef9
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 14 deletions.
26 changes: 26 additions & 0 deletions gnome-base/gnome-vfs/files/gnome-vfs-2.24.4-openssl-1.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$NetBSD: patch-libgnomevfs_gnome-vfs-ssl.c,v 1.1 2018/02/16 13:18:26 wiz Exp $

struct SSL is opaque in openssl-1.1; and the SSL_free() man page
says that one should not free members of it manually (in both
the openssl-1.0 and openssl-1.1 man pages).

--- libgnomevfs/gnome-vfs-ssl.c.orig 2010-02-09 12:16:14.000000000 +0000
+++ libgnomevfs/gnome-vfs-ssl.c
@@ -400,9 +400,6 @@ gnome_vfs_ssl_create_from_fd (GnomeVFSSS
}
}

- if (ssl->private->ssl->ctx)
- SSL_CTX_free (ssl->private->ssl->ctx);
-
SSL_free (ssl->private->ssl);
g_free (ssl->private);
g_free (ssl);
@@ -705,7 +702,6 @@ gnome_vfs_ssl_destroy (GnomeVFSSSL *ssl,
}
}

- SSL_CTX_free (ssl->private->ssl->ctx);
SSL_free (ssl->private->ssl);
close (ssl->private->sockfd);
if (ssl->private->timeout)
35 changes: 21 additions & 14 deletions gnome-base/gnome-vfs/gnome-vfs-2.24.4-r5.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5
Expand Down Expand Up @@ -47,43 +47,50 @@ DEPEND="${RDEPEND}
>=dev-util/gtk-doc-am-1.13
"

src_prepare() {
PATCHES=(
# Allow the Trash on afs filesystems (#106118)
epatch "${FILESDIR}"/${PN}-2.12.0-afs.patch
"${FILESDIR}"/${PN}-2.12.0-afs.patch

# Fix compiling with headers missing
epatch "${FILESDIR}"/${PN}-2.15.2-headers-define.patch
"${FILESDIR}"/${PN}-2.15.2-headers-define.patch

# Fix for crashes running programs via sudo
epatch "${FILESDIR}"/${PN}-2.16.0-no-dbus-crash.patch
"${FILESDIR}"/${PN}-2.16.0-no-dbus-crash.patch

# Fix automagic dependencies, upstream bug #493475
epatch "${FILESDIR}"/${PN}-2.20.0-automagic-deps.patch
epatch "${FILESDIR}"/${PN}-2.20.1-automagic-deps.patch
"${FILESDIR}"/${PN}-2.20.0-automagic-deps.patch
"${FILESDIR}"/${PN}-2.20.1-automagic-deps.patch

# Fix to identify ${HOME} (#200897)
# thanks to debian folks
epatch "${FILESDIR}"/${PN}-2.24.4-home_dir_fakeroot.patch
"${FILESDIR}"/${PN}-2.24.4-home_dir_fakeroot.patch

# Configure with gnutls-2.7, bug #253729
# Fix building with gnutls-2.12, bug #388895
epatch "${FILESDIR}"/${PN}-2.24.4-gnutls27.patch
"${FILESDIR}"/${PN}-2.24.4-gnutls27.patch

# Prevent duplicated volumes, bug #193083
epatch "${FILESDIR}"/${PN}-2.24.0-uuid-mount.patch
"${FILESDIR}"/${PN}-2.24.0-uuid-mount.patch

# Do not build tests with FEATURES="-test", bug #226221
epatch "${FILESDIR}"/${PN}-2.24.4-build-tests-asneeded.patch
"${FILESDIR}"/${PN}-2.24.4-build-tests-asneeded.patch

# Disable broken test, bug #285706
epatch "${FILESDIR}"/${PN}-2.24.4-disable-test-async-cancel.patch
"${FILESDIR}"/${PN}-2.24.4-disable-test-async-cancel.patch

# Fix for automake-1.13 compatibility, #466944
epatch "${FILESDIR}"/${P}-automake-1.13.patch
"${FILESDIR}"/${P}-automake-1.13.patch

# Fix gnutls-3.4+ compatibility, #560084
# always use system defaults (patch from Arch Linux)
epatch "${FILESDIR}"/${P}-gnutls34.patch
"${FILESDIR}"/${P}-gnutls34.patch

# Fix build with openssl-1.1 #592540
"${FILESDIR}"/${PN}-2.24.4-openssl-1.1.patch
)

src_prepare() {
epatch "${PATCHES[@]}"

sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.in || die

Expand Down

0 comments on commit ac43ef9

Please sign in to comment.