Ports: Add nasm port

This commit is contained in:
apio 2022-10-30 18:14:57 +01:00
parent 948361bec5
commit 97df9d8d3a
2 changed files with 55 additions and 0 deletions

13
ports/nasm/nasm.patch Normal file
View File

@ -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 \

42
ports/nasm/package.sh Normal file
View File

@ -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
}