nasm: update to 2.16.03.

Better patch for avoiding running non-working perl scripts.
This commit is contained in:
PulkoMandy
2025-06-21 15:58:02 +02:00
parent 49fda094a5
commit d022e9ea02
3 changed files with 132 additions and 74 deletions

View File

@@ -7,11 +7,11 @@ 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="https://www.nasm.us/"
COPYRIGHT="1996-2018 The NASM Authors"
COPYRIGHT="1996-2025 The NASM Authors"
LICENSE="BSD (2-clause)"
REVISION="2"
REVISION="1"
SOURCE_URI="https://www.nasm.us/pub/nasm/releasebuilds/$portVersion/nasm-$portVersion.tar.bz2"
CHECKSUM_SHA256="3c4b8339e5ab54b1bcb2316101f8985a5da50a3f9e504d43fa6f35668bee2fd0"
CHECKSUM_SHA256="bef3de159bcd61adf98bb7cc87ee9046e944644ad76b7633f18ab063edb29e57"
PATCHES="nasm-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2 ?x86"
@@ -47,6 +47,7 @@ BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl
cmd:sed
"
@@ -62,12 +63,13 @@ BUILD()
{
runConfigure --omit-dirs "binDir" ./configure \
--bindir="$commandBinDir"
make $jobArgs PERL=true
make $jobArgs
}
INSTALL()
{
make install PERL=true
make install
}
TEST()

View File

@@ -1,69 +0,0 @@
From 8636b3a4a54d00d4a45d61bdaffb31dfd0283142 Mon Sep 17 00:00:00 2001
From: Leorize <leorize+oss@disroot.org>
Date: Thu, 23 Jan 2020 12:13:55 -0600
Subject: Makefile.in: use iquote for include paths
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The -I flag used causes gcc to pick headers from NASM instead of system
headers for system includes. Since NASM have headers with names
overlapping with the ones in the C standard library (ie. float.h). This
breaks compilation on certain systems (ie. Haiku).
This commit swap out the -I flags for -iquote, to only prioritise NASM
include paths for quoted includes.
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
diff --git a/Makefile.in b/Makefile.in
index 5725ed3..988779b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -22,12 +22,12 @@ CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
BUILD_CFLAGS = $(CPPFLAGS) $(CFLAGS) @DEFS@
-INTERNAL_CFLAGS = -I$(srcdir) -I$(objdir) \
- -I$(srcdir)/include -I$(objdir)/include \
- -I$(srcdir)/x86 -I$(objdir)/x86 \
- -I$(srcdir)/asm -I$(objdir)/asm \
- -I$(srcdir)/disasm -I$(objdir)/disasm \
- -I$(srcdir)/output -I$(objdir)/output
+INTERNAL_CFLAGS = -iquote$(srcdir) -iquote$(objdir) \
+ -iquote$(srcdir)/include -iquote$(objdir)/include \
+ -iquote$(srcdir)/x86 -iquote$(objdir)/x86 \
+ -iquote$(srcdir)/asm -iquote$(objdir)/asm \
+ -iquote$(srcdir)/disasm -iquote$(objdir)/disasm \
+ -iquote$(srcdir)/output -iquote$(objdir)/output
ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
LDFLAGS = @LDFLAGS@
ALL_LDFLAGS = $(ALL_CFLAGS) $(LDFLAGS)
--
2.24.1
From c93f1e9590d46b5c644ec3e56e9857ad63b928f7 Mon Sep 17 00:00:00 2001
From: robxnano <89391914+robxnano@users.noreply.github.com>
Date: Sun, 24 Mar 2024 22:59:15 +0000
Subject: [PATCH] Add Haiku definition for path separators
---
nasmlib/path.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nasmlib/path.c b/nasmlib/path.c
index d228ed1e..5d6a5f2a 100644
--- a/nasmlib/path.c
+++ b/nasmlib/path.c
@@ -53,7 +53,7 @@
# define curdir "."
#elif defined(unix) || defined(__unix) || defined(__unix__) || \
defined(__UNIX__) || defined(__Unix__) || \
- defined(__MACH__) || defined(__BEOS__)
+ defined(__MACH__) || defined(__BEOS__) || defined(__HAIKU__)
/* Unix and Unix-like operating systems and others using
* the equivalent syntax (slashes as only separators, no concept of volume)
*
--
2.44.0

View File

@@ -0,0 +1,125 @@
From 0b9ea5bb55fdbe5ab770f18b2854857afc17df18 Mon Sep 17 00:00:00 2001
From: Leorize <leorize+oss@disroot.org>
Date: Thu, 23 Jan 2020 12:13:55 -0600
Subject: Makefile.in: use iquote for include paths
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The -I flag used causes gcc to pick headers from NASM instead of system
headers for system includes. Since NASM have headers with names
overlapping with the ones in the C standard library (ie. float.h). This
breaks compilation on certain systems (ie. Haiku).
This commit swap out the -I flags for -iquote, to only prioritise NASM
include paths for quoted includes.
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
diff --git a/Makefile.in b/Makefile.in
index 601ad68..ff70bc7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -22,12 +22,12 @@ CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
BUILD_CFLAGS = $(CPPFLAGS) $(CFLAGS) @DEFS@
-INTERNAL_CFLAGS = -I$(srcdir) -I$(objdir) \
- -I$(srcdir)/include -I$(objdir)/include \
- -I$(srcdir)/x86 -I$(objdir)/x86 \
- -I$(srcdir)/asm -I$(objdir)/asm \
- -I$(srcdir)/disasm -I$(objdir)/disasm \
- -I$(srcdir)/output -I$(objdir)/output
+INTERNAL_CFLAGS = -iquote$(srcdir) -iquote$(objdir) \
+ -iquote$(srcdir)/include -iquote$(objdir)/include \
+ -iquote$(srcdir)/x86 -iquote$(objdir)/x86 \
+ -iquote$(srcdir)/asm -iquote$(objdir)/asm \
+ -iquote$(srcdir)/disasm -iquote$(objdir)/disasm \
+ -iquote$(srcdir)/output -iquote$(objdir)/output
ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
LDFLAGS = @LDFLAGS@
ALL_LDFLAGS = $(ALL_CFLAGS) $(LDFLAGS)
--
2.48.1
From d284c98444bbbcaec44eb682de7dfd0774efd92d Mon Sep 17 00:00:00 2001
From: robxnano <89391914+robxnano@users.noreply.github.com>
Date: Sun, 24 Mar 2024 22:59:15 +0000
Subject: Add Haiku definition for path separators
diff --git a/nasmlib/path.c b/nasmlib/path.c
index d228ed1..5d6a5f2 100644
--- a/nasmlib/path.c
+++ b/nasmlib/path.c
@@ -53,7 +53,7 @@
# define curdir "."
#elif defined(unix) || defined(__unix) || defined(__unix__) || \
defined(__UNIX__) || defined(__Unix__) || \
- defined(__MACH__) || defined(__BEOS__)
+ defined(__MACH__) || defined(__BEOS__) || defined(__HAIKU__)
/* Unix and Unix-like operating systems and others using
* the equivalent syntax (slashes as only separators, no concept of volume)
*
--
2.48.1
From 5a06a0552e3ee6fafe668e52df041026bfc8e4b4 Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Sat, 21 Jun 2025 15:55:00 +0200
Subject: Remove warnings generation
Not needed, the files are present in the source archive. Seems to cause
problems with make and perl.
diff --git a/Makefile.in b/Makefile.in
index ff70bc7..d080882 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -292,41 +292,6 @@ x86/regs.h: x86/regs.dat x86/regs.pl
$(RUNPERL) $(srcdir)/x86/regs.pl h \
$(srcdir)/x86/regs.dat > x86/regs.h
-# Extract warnings from source code. This is done automatically if any
-# C files have changed; the script is fast enough that that is
-# reasonable, but doesn't update the time stamp if the files aren't
-# changed, to avoid rebuilding everything every time. Track the actual
-# dependency by the empty file asm/warnings.time.
-.PHONY: warnings
-warnings: dirs
- $(RM_F) $(WARNFILES) $(WARNTIMES) asm/warnings.time
- $(MAKE) asm/warnings.time
-
-asm/warnings.time: $(WARNSRCS) asm/warnings.pl
- $(EMPTY) asm/warnings.time
- $(MAKE) $(WARNTIMES)
-
-asm/warnings_c.h.time: asm/warnings.pl asm/warnings.time
- $(RUNPERL) $(srcdir)/asm/warnings.pl c asm/warnings_c.h $(srcdir)
- $(EMPTY) asm/warnings_c.h.time
-
-asm/warnings_c.h: asm/warnings_c.h.time
- @: Side effect
-
-include/warnings.h.time: asm/warnings.pl asm/warnings.time
- $(RUNPERL) $(srcdir)/asm/warnings.pl h include/warnings.h $(srcdir)
- $(EMPTY) include/warnings.h.time
-
-include/warnings.h: include/warnings.h.time
- @: Side effect
-
-doc/warnings.src.time: asm/warnings.pl asm/warnings.time
- $(RUNPERL) $(srcdir)/asm/warnings.pl doc doc/warnings.src $(srcdir)
- $(EMPTY) doc/warnings.src.time
-
-doc/warnings.src : doc/warnings.src.time
- @: Side effect
-
# Assembler token hash
asm/tokhash.c: x86/insns.dat x86/insnsn.c asm/tokens.dat asm/tokhash.pl \
perllib/phash.ph
--
2.48.1