diff options
author | Sam James <sam@gentoo.org> | 2023-10-04 15:44:15 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-10-04 16:10:44 +0100 |
commit | 1700c3fd712b4bf742cb7340d807d6aa28b23691 (patch) | |
tree | db4dbeb7146202b313af5eab152dc5bbdc91ac2c /media-libs/svt-hevc | |
parent | dev-perl/Text-BibTeX: don't redefine _FORTIFY_SOURCE (diff) | |
download | gentoo-1700c3fd712b4bf742cb7340d807d6aa28b23691.tar.gz gentoo-1700c3fd712b4bf742cb7340d807d6aa28b23691.tar.bz2 gentoo-1700c3fd712b4bf742cb7340d807d6aa28b23691.zip |
media-libs/svt-hevc: don't redefine _FORTIFY_SOURCE
Closes: https://bugs.gentoo.org/895260
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/svt-hevc')
-rw-r--r-- | media-libs/svt-hevc/files/svt-hevc-1.5.1-dont-clobber-fortify_source.patch | 35 | ||||
-rw-r--r-- | media-libs/svt-hevc/svt-hevc-1.5.1-r1.ebuild | 32 | ||||
-rw-r--r-- | media-libs/svt-hevc/svt-hevc-9999.ebuild | 4 |
3 files changed, 71 insertions, 0 deletions
diff --git a/media-libs/svt-hevc/files/svt-hevc-1.5.1-dont-clobber-fortify_source.patch b/media-libs/svt-hevc/files/svt-hevc-1.5.1-dont-clobber-fortify_source.patch new file mode 100644 index 000000000000..1cc2974b393c --- /dev/null +++ b/media-libs/svt-hevc/files/svt-hevc-1.5.1-dont-clobber-fortify_source.patch @@ -0,0 +1,35 @@ +Don't clobber our toolchain defaults. + +https://bugs.gentoo.org/895260 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -100,7 +100,6 @@ set(flags_to_test + -Wformat-security + -fPIE + -fPIC +- -D_FORTIFY_SOURCE=2 + /GS + /sdl) + if(MSVC) +--- a/gstreamer-plugin/CMakeLists.txt ++++ b/gstreamer-plugin/CMakeLists.txt +@@ -25,8 +25,7 @@ set(flags_to_test + -fstack-protector-strong + -fPIE + -fPIC +- -flto +- -D_FORTIFY_SOURCE=2) ++ -flto) + if(NOT MSVC) + list(INSERT flags_to_test 0 -Wall) + else() +--- a/gstreamer-plugin/meson.build ++++ b/gstreamer-plugin/meson.build +@@ -22,7 +22,6 @@ svthevcenc_dep = dependency('SvtHevcEnc') + cc = meson.get_compiler('c') + cc_flags = [ + '-O2', +- '-D_FORTIFY_SOURCE=2', + '-Wformat', + '-Wformat-security', + '-fPIE', diff --git a/media-libs/svt-hevc/svt-hevc-1.5.1-r1.ebuild b/media-libs/svt-hevc/svt-hevc-1.5.1-r1.ebuild new file mode 100644 index 000000000000..07281bb8299b --- /dev/null +++ b/media-libs/svt-hevc/svt-hevc-1.5.1-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic cmake + +DESCRIPTION="Scalable Video Technology for HEVC (SVT-HEVC Encoder)" +HOMEPAGE="https://github.com/OpenVisualCloud/SVT-HEVC" + +if [ ${PV} = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/OpenVisualCloud/SVT-HEVC.git" +else + SRC_URI="https://github.com/OpenVisualCloud/SVT-HEVC/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/SVT-HEVC-${PV}" +fi + +LICENSE="BSD-2" +SLOT="0" + +BDEPEND="dev-lang/nasm" + +PATCHES=( + "${FILESDIR}"/${PN}-1.5.1-dont-clobber-fortify_source.patch +) + +src_prepare() { + append-ldflags -Wl,-z,noexecstack + cmake_src_prepare +} diff --git a/media-libs/svt-hevc/svt-hevc-9999.ebuild b/media-libs/svt-hevc/svt-hevc-9999.ebuild index 5729a3499a49..07281bb8299b 100644 --- a/media-libs/svt-hevc/svt-hevc-9999.ebuild +++ b/media-libs/svt-hevc/svt-hevc-9999.ebuild @@ -22,6 +22,10 @@ SLOT="0" BDEPEND="dev-lang/nasm" +PATCHES=( + "${FILESDIR}"/${PN}-1.5.1-dont-clobber-fortify_source.patch +) + src_prepare() { append-ldflags -Wl,-z,noexecstack cmake_src_prepare |