From 97df9d8d3a3206c2fd60093ff8bd3ea7ffc617fa Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 30 Oct 2022 18:14:57 +0100 Subject: [PATCH] Ports: Add nasm port --- ports/nasm/nasm.patch | 13 +++++++++++++ ports/nasm/package.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 ports/nasm/nasm.patch create mode 100644 ports/nasm/package.sh diff --git a/ports/nasm/nasm.patch b/ports/nasm/nasm.patch new file mode 100644 index 00000000..49e2d0fc --- /dev/null +++ b/ports/nasm/nasm.patch @@ -0,0 +1,13 @@ +diff --color -rN -u nasm-vanilla/Makefile.in nasm-2.15.05/Makefile.in +--- a/nasm-2.15.05/Makefile.in 2020-08-28 18:04:43.000000000 +0200 ++++ b/nasm-2.15.05/Makefile.in 2022-10-30 18:00:40.386258721 +0100 +@@ -389,9 +389,6 @@ + $(MKDIR_P) $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) nasm$(X) $(DESTDIR)$(bindir)/nasm$(X) + $(INSTALL_PROGRAM) ndisasm$(X) $(DESTDIR)$(bindir)/ndisasm$(X) +- $(MKDIR_P) $(DESTDIR)$(mandir)/man1 +- $(INSTALL_DATA) $(srcdir)/nasm.1 $(DESTDIR)$(mandir)/man1/nasm.1 +- $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(DESTDIR)$(mandir)/man1/ndisasm.1 + + clean: + for d in . $(SUBDIRS) $(XSUBDIRS); do \ diff --git a/ports/nasm/package.sh b/ports/nasm/package.sh new file mode 100644 index 00000000..e099120b --- /dev/null +++ b/ports/nasm/package.sh @@ -0,0 +1,42 @@ +pkgname="nasm" +pkgver="2.15.05" +pkgurl="https://www.nasm.us/pub/nasm/releasebuilds/$pkgver/nasm-$pkgver.tar.gz" + +pkgmode="web" + +setupdir="$workdir" +builddir="$workdir/build" +installdir="$workdir/build" +srcdir="$workdir/nasm-$pkgver" + +port_unpack() +{ + tar xvf nasm-$pkgver.tar.gz +} + +port_patch() +{ + patch -u -i $portdir/nasm.patch -p 1 -d $workdir +} + +port_configure() +{ + $srcdir/configure --host=x86_64-luna --prefix="" +} + +port_build() +{ + make -j$(nproc) +} + +port_install() +{ + make install + $STRIP $DESTDIR/bin/{nasm,ndisasm} +} + +port_uninstall() # nasm's Makefile does not provide an uninstall target. +{ + rm -f $DESTDIR/bin/nasm + rm -f $DESTDIR/bin/ndisasm +} \ No newline at end of file