diff --git a/dev-lang/nasm/nasm-2.12.recipe b/dev-lang/nasm/nasm-2.12.01.recipe similarity index 82% rename from dev-lang/nasm/nasm-2.12.recipe rename to dev-lang/nasm/nasm-2.12.01.recipe index e0e0a5c27..bda50ca6a 100644 --- a/dev-lang/nasm/nasm-2.12.recipe +++ b/dev-lang/nasm/nasm-2.12.01.recipe @@ -7,11 +7,13 @@ designed to be simple and easy to understand, similar to Intel's but less \ complex. It supports all currently known x86 architectural extensions, and \ has strong support for macros." HOMEPAGE="http://www.nasm.us/" -COPYRIGHT="1996 Simon Tatham and Julian Hall" +COPYRIGHT="1996-2001 Simon Tatham, Julian Hall + 2002-2016 H. Peter Anvin, Jim Kukunas, Cyrill Gorcunov, Frank B. \ +Kotler" LICENSE="BSD (2-clause)" REVISION="1" SOURCE_URI="http://www.nasm.us/pub/nasm/releasebuilds/$portVersion/nasm-$portVersion.tar.bz2" -CHECKSUM_SHA256="0ea005493081540093d1d53eac6ae4da63ce0afcdd102c623f255b8a5067831e" +CHECKSUM_SHA256="f8bebee8107a42f6661526cf9e0bd92fcd33ff0df01ea05093f7650ec60d902b" PATCHES="nasm-$portVersion.patchset" ARCHITECTURES="x86_gcc2 x86 x86_64" @@ -47,3 +49,8 @@ INSTALL() { make install } + +TEST() +{ + make test +} diff --git a/dev-lang/nasm/patches/nasm-2.12.01.patchset b/dev-lang/nasm/patches/nasm-2.12.01.patchset new file mode 100644 index 000000000..922421b5a --- /dev/null +++ b/dev-lang/nasm/patches/nasm-2.12.01.patchset @@ -0,0 +1,43 @@ +From 4b8582300df1cd8107869ad5d4fca95132eac30b Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 10 Mar 2016 18:18:16 +0000 +Subject: gcc2 build fix + + +diff --git a/output/codeview.c b/output/codeview.c +index f9750bf..988475d 100644 +--- a/output/codeview.c ++++ b/output/codeview.c +@@ -375,16 +375,18 @@ static void register_reloc(struct coff_Section *const sect, + r->type = type; + + r->symbol = 0; +- for (int i = 0; i < coff_nsects; i++) { ++{ int i; ++ for (i = 0; i < coff_nsects; i++) { + sec = coff_sects[i]; + if (!strcmp(sym, sec->name)) { + return; + } + r->symbol += 2; + } +- ++} + saa_rewind(coff_syms); +- for (uint32_t i = 0; i < coff_nsyms; i++) { ++{ uint32_t i; ++ for (i = 0; i < coff_nsyms; i++) { + struct coff_Symbol *s = saa_rstruct(coff_syms); + r->symbol++; + if (s->strpos == -1 && !strcmp(sym, s->name)) { +@@ -402,6 +404,7 @@ static void register_reloc(struct coff_Section *const sect, + return; + } + } ++} + nasm_panic(0, "codeview: relocation for unregistered symbol: %s", sym); + } + +-- +2.7.0 + diff --git a/dev-lang/nasm/patches/nasm-2.12.patchset b/dev-lang/nasm/patches/nasm-2.12.patchset deleted file mode 100644 index e4cc470b1..000000000 --- a/dev-lang/nasm/patches/nasm-2.12.patchset +++ /dev/null @@ -1,77 +0,0 @@ -From 4b8582300df1cd8107869ad5d4fca95132eac30b Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Thu, 10 Mar 2016 18:18:16 +0000 -Subject: gcc2 build fix - - -diff --git a/output/codeview.c b/output/codeview.c -index 2f5bb69..84a33fa 100644 ---- a/output/codeview.c -+++ b/output/codeview.c -@@ -59,15 +59,15 @@ static void cv8_output(int type, void *param); - static void cv8_cleanup(void); - - struct dfmt df_cv8 = { -- .fullname = "Codeview 8", -- .shortname = "cv8", -- .init = cv8_init, -- .linenum = cv8_linenum, -- .debug_deflabel = cv8_deflabel, -- .debug_directive = null_debug_directive, -- .debug_typevalue = cv8_typevalue, -- .debug_output = cv8_output, -- .cleanup = cv8_cleanup, -+ "Codeview 8", -+ "cv8", -+ cv8_init, -+ cv8_linenum, -+ cv8_deflabel, -+ null_debug_directive, -+ cv8_typevalue, -+ cv8_output, -+ cv8_cleanup, - }; - - /******************************************************************************* -@@ -89,7 +89,7 @@ enum symbol_type { - SYMTYPE_LDATA, - SYMTYPE_GDATA, - -- SYMTYPE_MAX, -+ SYMTYPE_MAX - }; - - struct cv8_symbol { -@@ -390,16 +390,18 @@ static void register_reloc(struct coff_Section *const sect, - r->type = type; - - r->symbol = 0; -- for (int i = 0; i < coff_nsects; i++) { -+{ int i; -+ for (i = 0; i < coff_nsects; i++) { - sec = coff_sects[i]; - if (!strcmp(sym, sec->name)) { - return; - } - r->symbol += 2; - } -- -+} - saa_rewind(coff_syms); -- for (uint32_t i = 0; i < coff_nsyms; i++) { -+{ uint32_t i; -+ for (i = 0; i < coff_nsyms; i++) { - struct coff_Symbol *s = saa_rstruct(coff_syms); - r->symbol++; - if (s->strpos == -1 && !strcmp(sym, s->name)) { -@@ -417,6 +419,7 @@ static void register_reloc(struct coff_Section *const sect, - return; - } - } -+} - nasm_assert(!"relocation for unregistered symbol"); - } - --- -2.7.0 -