changeset 6408:e3d5c8a7bc4f

Add build-nasm * src/build-nasm.mk: new file * dist-files.mk, index.html: add ref to new target * Makefile.in: add as optional build tool
author John Donoghue <john.donoghue@ieee.org>
date Fri, 16 Sep 2022 10:05:59 -0400
parents c3a99fe40c7a
children a41bc595077f
files Makefile.in dist-files.mk index.html src/build-nasm.mk
diffstat 4 files changed, 31 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Fri Sep 16 08:35:38 2022 -0400
+++ b/Makefile.in	Fri Sep 16 10:05:59 2022 -0400
@@ -275,7 +275,7 @@
 # some build tools are optional and added as explicit dependencies
 # to packages that need them
 BUILD_TOOLS_OPT := \
-  build-libffi build-mako build-markupsafe build-meson build-ninja \
+  build-libffi build-mako build-markupsafe build-meson build-nasm build-ninja \
   build-python build-octave build-setuptools build-scons
 BUILD_TOOLS := $(filter-out $(BUILD_TOOLS_OPT), $(BUILD_TOOLS))
 # Building flex for native mingw fails, so disable it.
--- a/dist-files.mk	Fri Sep 16 08:35:38 2022 -0400
+++ b/dist-files.mk	Fri Sep 16 10:05:59 2022 -0400
@@ -40,6 +40,7 @@
   build-markupsafe.mk \
   build-meson.mk \
   build-msvctools.mk \
+  build-nasm.mk \
   build-ninja.mk \
   build-octave.mk \
   build-perl.mk \
--- a/index.html	Fri Sep 16 08:35:38 2022 -0400
+++ b/index.html	Fri Sep 16 10:05:59 2022 -0400
@@ -1050,6 +1050,10 @@
         <td class="website"></td>
     </tr>
     <tr>
+        <td class="package">build-nasm</td>
+        <td class="website"><a href="https://www.nasm.us/">build-nasm</a></td>
+    </tr>
+    <tr>
         <td class="package">build-ninja</td>
         <td class="website"><a href="https://ninja-build.org/">build-ninja</a></td>
     </tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/build-nasm.mk	Fri Sep 16 10:05:59 2022 -0400
@@ -0,0 +1,25 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := build-nasm
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 2.14.02
+$(PKG)_CHECKSUM := 7e9cb20d49ca279c72125b2701b3457c9d1609a5
+$(PKG)_SUBDIR   := nasm-$($(PKG)_VERSION)
+$(PKG)_FILE     := nasm-$($(PKG)_VERSION).tar.xz
+$(PKG)_URL      := https://www.nasm.us/pub/nasm/releasebuilds/$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_DEPS     := 
+
+define $(PKG)_UPDATE
+    $(WGET) -q -O- 'https://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D' | \
+    $(SED) -n 's,.*href="\([0-9\.]*[^a-z]\)/".*,\1,p' | \
+    head -1
+endef
+
+define $(PKG)_BUILD
+    mkdir '$(1).build'
+    cd '$(1).build' && '$(1)/configure' \
+        --prefix='$(BUILD_TOOLS_PREFIX)' 
+    $(MAKE) -C '$(1).build' -j '$(JOBS)' 
+    $(MAKE) -C '$(1).build' -j 1 install DESTDIR='$(3)'
+endef