Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/nasm/, dev-lang/nasm/files/
Date: Sat, 08 Dec 2018 18:54:57
Message-Id: 1544295283.416dae40d938b83ecdc44de5e76f04721d5cf066.slyfox@gentoo
1 commit: 416dae40d938b83ecdc44de5e76f04721d5cf066
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 8 18:50:01 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 8 18:54:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=416dae40
7
8 dev-lang/nasm: backport default filename fix, bug #670944
9
10 Pulled upstream fix for input==output for single-argument
11 invocation from https://bugzilla.nasm.us/show_bug.cgi?id=3392529
12
13 Reported-by: Toralf Förster
14 Bug: https://bugs.gentoo.org/670944
15 Package-Manager: Portage-2.3.52, Repoman-2.3.12
16 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
17
18 .../files/nasm-2.14-default-path-BR-3392529.patch | 41 ++++++++++++++++++++++
19 .../nasm/{nasm-2.14.ebuild => nasm-2.14-r1.ebuild} | 1 +
20 2 files changed, 42 insertions(+)
21
22 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
23 new file mode 100644
24 index 00000000000..57cbb741505
25 --- /dev/null
26 +++ b/dev-lang/nasm/files/nasm-2.14-default-path-BR-3392529.patch
27 @@ -0,0 +1,41 @@
28 +https://bugzilla.nasm.us/show_bug.cgi?id=3392529
29 +https://bugs.gentoo.org/670944
30 +
31 +From 7b6371b9d35705ee3800082ca245f8dd289bb216 Mon Sep 17 00:00:00 2001
32 +From: "H. Peter Anvin (Intel)" <hpa@×××××.com>
33 +Date: Tue, 20 Nov 2018 10:56:57 -0800
34 +Subject: [PATCH] BR 3392529: if the default output name is the same as input
35 + -> nasm.out
36 +
37 +If no output filename is specified, then a default filename is used
38 +based on the input filename. If that ends up the *same* as the input
39 +filename, change the output filename to "nasm.out".
40 +
41 +Signed-off-by: H. Peter Anvin (Intel) <hpa@×××××.com>
42 +---
43 + asm/nasm.c | 11 ++++++++---
44 + 1 file changed, 8 insertions(+), 3 deletions(-)
45 +
46 +--- a/asm/nasm.c
47 ++++ b/asm/nasm.c
48 +@@ -514,9 +514,14 @@ int main(int argc, char **argv)
49 + * is a preprocess mode, we're perfectly
50 + * fine to output into stdout.
51 + */
52 +- if (!outname) {
53 +- if (!(operating_mode & OP_PREPROCESS))
54 +- outname = filename_set_extension(inname, ofmt->extension);
55 ++ if (!outname && !(operating_mode & OP_PREPROCESS)) {
56 ++ outname = filename_set_extension(inname, ofmt->extension);
57 ++ if (!strcmp(outname, inname)) {
58 ++ outname = "nasm.out";
59 ++ nasm_error(ERR_WARNING,
60 ++ "default output file same as input, using `%s' for output\n",
61 ++ inname, outname);
62 ++ }
63 + }
64 +
65 + depend_ptr = (depend_file || (operating_mode & OP_DEPEND))
66 +--
67 +2.19.2
68 +
69
70 diff --git a/dev-lang/nasm/nasm-2.14.ebuild b/dev-lang/nasm/nasm-2.14-r1.ebuild
71 similarity index 95%
72 rename from dev-lang/nasm/nasm-2.14.ebuild
73 rename to dev-lang/nasm/nasm-2.14-r1.ebuild
74 index 46c8d440a40..7a17a31be97 100644
75 --- a/dev-lang/nasm/nasm-2.14.ebuild
76 +++ b/dev-lang/nasm/nasm-2.14-r1.ebuild
77 @@ -34,6 +34,7 @@ S=${WORKDIR}/${P/_}
78
79 PATCHES=(
80 "${FILESDIR}"/${PN}-2.13.03-bsd-cp-doc.patch
81 + "${FILESDIR}"/${P}-default-path-BR-3392529.patch
82 )
83
84 src_configure() {