From 416dae40d938b83ecdc44de5e76f04721d5cf066 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 8 Dec 2018 18:50:01 +0000 Subject: dev-lang/nasm: backport default filename fix, bug #670944 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pulled upstream fix for input==output for single-argument invocation from https://bugzilla.nasm.us/show_bug.cgi?id=3392529 Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/670944 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich --- .../files/nasm-2.14-default-path-BR-3392529.patch | 41 +++++++++++++++++ dev-lang/nasm/nasm-2.14-r1.ebuild | 53 ++++++++++++++++++++++ dev-lang/nasm/nasm-2.14.ebuild | 52 --------------------- 3 files changed, 94 insertions(+), 52 deletions(-) create mode 100644 dev-lang/nasm/files/nasm-2.14-default-path-BR-3392529.patch create mode 100644 dev-lang/nasm/nasm-2.14-r1.ebuild delete mode 100644 dev-lang/nasm/nasm-2.14.ebuild diff --git a/dev-lang/nasm/files/nasm-2.14-default-path-BR-3392529.patch b/dev-lang/nasm/files/nasm-2.14-default-path-BR-3392529.patch new file mode 100644 index 000000000000..57cbb741505a --- /dev/null +++ b/dev-lang/nasm/files/nasm-2.14-default-path-BR-3392529.patch @@ -0,0 +1,41 @@ +https://bugzilla.nasm.us/show_bug.cgi?id=3392529 +https://bugs.gentoo.org/670944 + +From 7b6371b9d35705ee3800082ca245f8dd289bb216 Mon Sep 17 00:00:00 2001 +From: "H. Peter Anvin (Intel)" +Date: Tue, 20 Nov 2018 10:56:57 -0800 +Subject: [PATCH] BR 3392529: if the default output name is the same as input + -> nasm.out + +If no output filename is specified, then a default filename is used +based on the input filename. If that ends up the *same* as the input +filename, change the output filename to "nasm.out". + +Signed-off-by: H. Peter Anvin (Intel) +--- + asm/nasm.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +--- a/asm/nasm.c ++++ b/asm/nasm.c +@@ -514,9 +514,14 @@ int main(int argc, char **argv) + * is a preprocess mode, we're perfectly + * fine to output into stdout. + */ +- if (!outname) { +- if (!(operating_mode & OP_PREPROCESS)) +- outname = filename_set_extension(inname, ofmt->extension); ++ if (!outname && !(operating_mode & OP_PREPROCESS)) { ++ outname = filename_set_extension(inname, ofmt->extension); ++ if (!strcmp(outname, inname)) { ++ outname = "nasm.out"; ++ nasm_error(ERR_WARNING, ++ "default output file same as input, using `%s' for output\n", ++ inname, outname); ++ } + } + + depend_ptr = (depend_file || (operating_mode & OP_DEPEND)) +-- +2.19.2 + diff --git a/dev-lang/nasm/nasm-2.14-r1.ebuild b/dev-lang/nasm/nasm-2.14-r1.ebuild new file mode 100644 index 000000000000..7a17a31be972 --- /dev/null +++ b/dev-lang/nasm/nasm-2.14-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="groovy little assembler" +HOMEPAGE="https://www.nasm.us/" +SRC_URI="https://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos" +IUSE="doc" + +RDEPEND="" +DEPEND="" +# [fonts note] doc/psfonts.ph defines ordered list of font preference. +# Currently 'media-fonts/source-pro' is most preferred and is able to +# satisfy all 6 font flavours: tilt, chapter, head, etc. +BDEPEND=" + dev-lang/perl + doc? ( + app-text/ghostscript-gpl + dev-perl/Font-TTF + dev-perl/Sort-Versions + media-fonts/source-pro + virtual/perl-File-Spec + ) +" + +S=${WORKDIR}/${P/_} + +PATCHES=( + "${FILESDIR}"/${PN}-2.13.03-bsd-cp-doc.patch + "${FILESDIR}"/${P}-default-path-BR-3392529.patch +) + +src_configure() { + strip-flags + default +} + +src_compile() { + default + use doc && emake doc +} + +src_install() { + default + emake DESTDIR="${D}" install_rdf $(usex doc install_doc '') +} diff --git a/dev-lang/nasm/nasm-2.14.ebuild b/dev-lang/nasm/nasm-2.14.ebuild deleted file mode 100644 index 46c8d440a406..000000000000 --- a/dev-lang/nasm/nasm-2.14.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic - -DESCRIPTION="groovy little assembler" -HOMEPAGE="https://www.nasm.us/" -SRC_URI="https://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz" - -LICENSE="BSD-2" -SLOT="0" -KEYWORDS="~amd64 ~ia64 ~x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos" -IUSE="doc" - -RDEPEND="" -DEPEND="" -# [fonts note] doc/psfonts.ph defines ordered list of font preference. -# Currently 'media-fonts/source-pro' is most preferred and is able to -# satisfy all 6 font flavours: tilt, chapter, head, etc. -BDEPEND=" - dev-lang/perl - doc? ( - app-text/ghostscript-gpl - dev-perl/Font-TTF - dev-perl/Sort-Versions - media-fonts/source-pro - virtual/perl-File-Spec - ) -" - -S=${WORKDIR}/${P/_} - -PATCHES=( - "${FILESDIR}"/${PN}-2.13.03-bsd-cp-doc.patch -) - -src_configure() { - strip-flags - default -} - -src_compile() { - default - use doc && emake doc -} - -src_install() { - default - emake DESTDIR="${D}" install_rdf $(usex doc install_doc '') -} -- cgit v1.2.3-18-g5258