add package nasm

Based on:
https://github.com/mxe/mxe/pull/1900#issue-258213692
This commit is contained in:
Tony Theodore 2017-10-31 19:34:30 +11:00
parent 626d11b7da
commit b181bc8d04
1 changed files with 28 additions and 0 deletions

28
src/nasm.mk Normal file
View File

@ -0,0 +1,28 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := nasm
$(PKG)_WEBSITE := http://www.nasm.us/
$(PKG)_DESCR := NASM - The Netwide Assembler
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.13.01
$(PKG)_CHECKSUM := aa0213008f0433ecbe07bb628506a5c4be8079be20fc3532a5031fd639db9a5e
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := http://www.nasm.us/pub/$(PKG)/releasebuilds/$($(PKG)_VERSION)/$($(PKG)_FILE)
# add cross targets for explicit deps even though nothing is built
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
$(PKG)_DEPS :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://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_$(BUILD)
# build nasm compiler
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
endef