From 32e2ee118546347aa395d8460e2bbc12f793ec7d Mon Sep 17 00:00:00 2001 From: robxnano <89391914+robxnano@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:03:56 +0100 Subject: [PATCH] nasm: Update to 2.15.02, fix path separators (#10331) --- ...asm-2.14.02.recipe => nasm-2.15.05.recipe} | 2 +- dev-lang/nasm/patches/nasm-2.14.02.patchset | 44 ------------ dev-lang/nasm/patches/nasm-2.15.05.patchset | 69 +++++++++++++++++++ 3 files changed, 70 insertions(+), 45 deletions(-) rename dev-lang/nasm/{nasm-2.14.02.recipe => nasm-2.15.05.recipe} (95%) delete mode 100644 dev-lang/nasm/patches/nasm-2.14.02.patchset create mode 100644 dev-lang/nasm/patches/nasm-2.15.05.patchset diff --git a/dev-lang/nasm/nasm-2.14.02.recipe b/dev-lang/nasm/nasm-2.15.05.recipe similarity index 95% rename from dev-lang/nasm/nasm-2.14.02.recipe rename to dev-lang/nasm/nasm-2.15.05.recipe index 7d604361a..465d59e6e 100644 --- a/dev-lang/nasm/nasm-2.14.02.recipe +++ b/dev-lang/nasm/nasm-2.15.05.recipe @@ -11,7 +11,7 @@ COPYRIGHT="1996-2018 The NASM Authors" LICENSE="BSD (2-clause)" REVISION="2" SOURCE_URI="https://www.nasm.us/pub/nasm/releasebuilds/$portVersion/nasm-$portVersion.tar.bz2" -CHECKSUM_SHA256="34fd26c70a277a9fdd54cb5ecf389badedaf48047b269d1008fbc819b24e80bc" +CHECKSUM_SHA256="3c4b8339e5ab54b1bcb2316101f8985a5da50a3f9e504d43fa6f35668bee2fd0" PATCHES="nasm-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2 ?x86" diff --git a/dev-lang/nasm/patches/nasm-2.14.02.patchset b/dev-lang/nasm/patches/nasm-2.14.02.patchset deleted file mode 100644 index d9c8199a7..000000000 --- a/dev-lang/nasm/patches/nasm-2.14.02.patchset +++ /dev/null @@ -1,44 +0,0 @@ -From 8636b3a4a54d00d4a45d61bdaffb31dfd0283142 Mon Sep 17 00:00:00 2001 -From: Leorize -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ê - -diff --git a/Makefile.in b/Makefile.in -index 32ef3d9..330a7e7 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@ - LIBS = @LIBS@ --- -2.24.1 - diff --git a/dev-lang/nasm/patches/nasm-2.15.05.patchset b/dev-lang/nasm/patches/nasm-2.15.05.patchset new file mode 100644 index 000000000..df51f9884 --- /dev/null +++ b/dev-lang/nasm/patches/nasm-2.15.05.patchset @@ -0,0 +1,69 @@ +From 8636b3a4a54d00d4a45d61bdaffb31dfd0283142 Mon Sep 17 00:00:00 2001 +From: Leorize +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ê + +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