net-proxy/torsocks: fix bashism in configure & don't clobber _F_S

Closes: https://bugs.gentoo.org/895874
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2024-03-24 07:12:48 +00:00
parent 31299d8cd5
commit 9ff2562afb
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
3 changed files with 30 additions and 7 deletions

View File

@ -1 +1 @@
DIST torsocks-2.4.0-r1.tar.gz 118991 BLAKE2B e1817c3bbf10f83431292c644d7187e40b62c5f223784074b3f9c082d8d75243090e226ffebb6fd81805fbd887588790833adc4ab8923e8116585c0a29255ad0 SHA512 7d625ce3a4600f87b86ae9ac79dfd206e7709cb0bafe0b7afcf33a6f1825f968cc63ad3e23c584582b244647bdeafbfdbfc54f7c81e521b0a3d278a1483ce86e
DIST torsocks-v2.4.0.tar.bz2 96757 BLAKE2B af21b49623b01c6f70f4103168b2624837ca3c3905f5d39ed85482171ba608f74f4845bc05ad0df8353ce901a82ace1a3152fe6f61bd8ffbcbc74d2d80aa105a SHA512 95a97380d4b0f10296554dd5601e0f640d571454719998229974c4d2269ca636b74b7e8b402dddea68c0cbfce5ca5f2531690e1915167b3c7b87e9066e41bd83

View File

@ -0,0 +1,23 @@
Fix bashism in libc.so filename check, and don't unconditionally set _F_S=2,
as it clobbers e.g. _F_S=3.
--- a/configure.ac
+++ b/configure.ac
@@ -124,7 +124,7 @@ AS_CASE([$host_os],
[linux*|kfreebsd*-gnu|freebsd*],
[
libc_name=`ldd /usr/bin/yes | grep 'libc\.' | cut -d ' ' -f 1 | tr -d '\t'`
- if test "${libc_name}" == ""; then
+ if test "${libc_name}" = ""; then
# Default libc on most system.
libc_name="libc.so.6"
fi
@@ -258,9 +258,6 @@ AX_CHECK_LINK_FLAG([-pie],[LDFLAGS="$LDFLAGS -pie"],[],[])
AX_CHECK_LINK_FLAG([-z relro],[LDFLAGS="$LDFLAGS -z relro"],[],[])
AX_CHECK_LINK_FLAG([-z now],[LDFLAGS="$LDFLAGS -z now"],[],[])
-dnl Add glibc hardening
-CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
-
##############################################################################
# 10. Finish up
##############################################################################

View File

@ -1,16 +1,15 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
UPSTREAM_PF="${PN}-v${PV}"
S=${WORKDIR}/${UPSTREAM_PF}
UPSTREAM_P="${PN}-v${PV}"
DESCRIPTION="Use most socks-friendly applications with Tor"
HOMEPAGE="https://gitlab.torproject.org/tpo/core/torsocks"
SRC_URI="https://gitlab.torproject.org/tpo/core/torsocks/-/archive/v${PV}/${UPSTREAM_PF}.tar.gz -> ${PF}.tar.gz"
SRC_URI="https://gitlab.torproject.org/tpo/core/torsocks/-/archive/v${PV}/${UPSTREAM_P}.tar.bz2"
S="${WORKDIR}"/${UPSTREAM_P}
LICENSE="GPL-2"
SLOT="0"
@ -21,6 +20,7 @@ IUSE="static-libs"
PATCHES=(
"${FILESDIR}"/${PN}-2.4.0-clang16.patch
"${FILESDIR}"/${PN}-2.4.0-configure.patch
)
src_prepare() {
@ -43,5 +43,5 @@ src_install() {
default
# Remove libtool .la files
find "${D}" -name '*.la' -delete || die
find "${ED}" -name '*.la' -delete || die
}