mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-libs/skyutils: new revision to fix build bugs.
This new revision updates to EAPI=6, and adds a patch that enables the build to complete with -Werror=format-security. It also adds an "sslv3" USE flag, because there is at least one package (app-mobilephone/smssend) which should require skyutils to be build against OpenSSL with sslv3 support. Gentoo-Bug: 521114 Gentoo-Bug: 588326 Package-Manager: portage-2.2.28
This commit is contained in:
40
dev-libs/skyutils/files/fix-Wformat-security-warnings.patch
Normal file
40
dev-libs/skyutils/files/fix-Wformat-security-warnings.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 40a157d2161fdd8709a777de6625fbd1b93efed3 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Orlitzky <michael@orlitzky.com>
|
||||
Date: Sat, 6 Aug 2016 19:23:48 -0400
|
||||
Subject: [PATCH 1/1] src/skyutils.h: fix two missing format strings in
|
||||
SU_SYSLOG_FN.
|
||||
|
||||
The SU_SYSLOG_FN(x,y) macro could be defined as either syslog(x,y) or
|
||||
printf(y), both of which are missing the trivial format string
|
||||
"%s". This commit adds it, so that the project builds with no
|
||||
-Wformat-security warnings.
|
||||
|
||||
Gentoo-Bug: 521114
|
||||
---
|
||||
src/skyutils.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/skyutils.h b/src/skyutils.h
|
||||
index 8b7d59d..f77c9fd 100644
|
||||
--- a/src/skyutils.h
|
||||
+++ b/src/skyutils.h
|
||||
@@ -279,14 +279,14 @@ void SU_PrintDebug(int Level,char *Txt, ...);
|
||||
#ifdef __unix__
|
||||
#define SU_PrintDebug(x,...) /* If you have an error here, remove 'x,...' from the () */
|
||||
#include <syslog.h>
|
||||
-#define SU_SYSLOG_FN(x,y) syslog(x,y)
|
||||
+#define SU_SYSLOG_FN(x,y) syslog(x,"%s",y)
|
||||
#else /* !__unix__ */
|
||||
#define SU_PrintDebug() /* Avoid compilation warnings */
|
||||
extern FILE *SU_LogFile;
|
||||
#define SU_SYSLOG_FN(x,y) SU_WriteToLogFile(SU_LogFile,y)
|
||||
#endif /* __unix__ */
|
||||
#else /* DEBUG */
|
||||
-#define SU_SYSLOG_FN(x,y) printf(y)
|
||||
+#define SU_SYSLOG_FN(x,y) printf("%s",y)
|
||||
#endif /* !DEBUG */
|
||||
#ifdef _WIN32
|
||||
#define SU_SLEEP(x) Sleep(x*1000)
|
||||
--
|
||||
2.7.3
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<!-- maintainer-needed -->
|
||||
<longdescription>This library contains many useful functions such as
|
||||
chained lists, string manipulation, socket, and the HTTP protocol.</longdescription>
|
||||
<!-- maintainer-needed -->
|
||||
<longdescription>
|
||||
This library contains many useful functions such as chained lists,
|
||||
string manipulation, socket, and the HTTP protocol.
|
||||
</longdescription>
|
||||
|
||||
<use>
|
||||
<flag name="sslv3">
|
||||
Require OpenSSL to be built with the old SSLv3 protocol enabled.
|
||||
</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
DESCRIPTION="Library of assorted C utility functions"
|
||||
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" # was "http://zekiller.skytech.org/coders_en.html"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="libressl ssl"
|
||||
|
||||
DEPEND="ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)"
|
||||
|
||||
src_prepare() {
|
||||
sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.in || die
|
||||
epatch "${FILESDIR}"/${P}-libs.patch
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-flags -D_GNU_SOURCE
|
||||
econf `use_enable ssl` || die "./configure failed"
|
||||
}
|
||||
|
||||
src_install () {
|
||||
emake DESTDIR="${D}" install || die "make install failed"
|
||||
dodoc AUTHORS ChangeLog
|
||||
}
|
||||
41
dev-libs/skyutils/skyutils-2.8-r4.ebuild
Normal file
41
dev-libs/skyutils/skyutils-2.8-r4.ebuild
Normal file
@@ -0,0 +1,41 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
inherit flag-o-matic autotools
|
||||
|
||||
DESCRIPTION="Library of assorted C utility functions"
|
||||
# Was: http://zekiller.skytech.org/coders_en.html
|
||||
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="libressl ssl sslv3"
|
||||
REQUIRED_USE="sslv3? ( ssl? ( !libressl ) )"
|
||||
|
||||
DEPEND="ssl? (
|
||||
!libressl? ( dev-libs/openssl:0=[sslv3?] )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-libs.patch"
|
||||
"${FILESDIR}/fix-Wformat-security-warnings.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.in \
|
||||
|| die 'failed to rename AM_CONFIG_HEADER macro'
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-flags -D_GNU_SOURCE
|
||||
econf $(use_enable ssl)
|
||||
}
|
||||
Reference in New Issue
Block a user