Merge pull request #1954 from tonytheodore/nasm

Update x264 and use nasm assembler
This commit is contained in:
Tony Theodore 2017-10-31 21:59:52 +11:00 committed by GitHub
commit 62edb86208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 17 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

View File

@ -3,12 +3,12 @@
PKG := x264
$(PKG)_WEBSITE := https://www.videolan.org/developers/x264.html
$(PKG)_IGNORE :=
$(PKG)_VERSION := 20161130-2245
$(PKG)_CHECKSUM := 0825e14945bc373107f9a00e66d45d5389bb86368efd834b92c52cddb2ded1d8
$(PKG)_VERSION := 20170626-2245
$(PKG)_CHECKSUM := 28cf90f63964e24e65b05084c75d114a997004c8d3f72feae7229da3a098988e
$(PKG)_SUBDIR := $(PKG)-snapshot-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-snapshot-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := https://download.videolan.org/pub/videolan/$(PKG)/snapshots/$($(PKG)_FILE)
$(PKG)_DEPS := gcc liblsmash yasm
$(PKG)_DEPS := gcc liblsmash nasm
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://git.videolan.org/?p=x264.git;a=shortlog' | \
@ -18,14 +18,13 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
$(SED) -i 's,yasm,$(TARGET)-yasm,g' '$(1)/configure'
cd '$(1)' && ./configure \
cd '$(BUILD_DIR)' && AS='$(PREFIX)/$(BUILD)/bin/nasm' '$(SOURCE_DIR)/configure'\
$(MXE_CONFIGURE_OPTS) \
--cross-prefix='$(TARGET)'- \
--enable-win32thread \
--disable-lavf \
--disable-swscale # Avoid circular dependency with ffmpeg. Remove if undesired.
$(MAKE) -C '$(1)' -j 1 uninstall
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
$(MAKE) -C '$(BUILD_DIR)' -j 1 uninstall
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
endef

View File

@ -5,6 +5,7 @@ $(PKG)_WEBSITE := http://yasm.tortall.net/
$(PKG)_DESCR := Yasm
$(PKG)_VERSION := 1.3.0
$(PKG)_CHECKSUM := 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f
$(PKG)_GH_CONF := yasm/yasm, v
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://www.tortall.net/projects/$(PKG)/releases/$($(PKG)_FILE)
@ -13,21 +14,18 @@ $(PKG)_DEPS := gcc
$(PKG)_DEPS_$(BUILD) :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://github.com/yasm/yasm/tags' | \
$(SED) -n 's,.*href="/yasm/yasm/archive/v\([0-9][^"]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
# link to native yasm compiler on cross builds
# link to native yasm compiler on cross builds - it isn't
# target-specific but makes it easier to detect our version
$(if $(BUILD_CROSS),
ln -sf '$(PREFIX)/$(BUILD)/bin/yasm' '$(PREFIX)/bin/$(TARGET)-yasm')
# yasm is always static
cd '$(1)' && '$(1)/configure' \
# build libyasm and tools
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS) \
--disable-nls \
--disable-python
$(MAKE) -C '$(1)' -j '$(JOBS)' install
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
endef