mxe/src/smpeg2.mk

40 lines
1.4 KiB
Makefile
Raw Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2013-07-27 09:47:34 +01:00
PKG := smpeg2
2017-03-05 03:41:39 +00:00
$(PKG)_WEBSITE := https://icculus.org/smpeg/
$(PKG)_DESCR := smpeg
2013-07-27 09:47:34 +01:00
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.0.0
$(PKG)_CHECKSUM := 979a65b211744a44fa641a9b6e4d64e64a12ff703ae776bafe3c4c4cd85494b3
2013-07-27 09:47:34 +01:00
$(PKG)_SUBDIR := smpeg2-$($(PKG)_VERSION)
$(PKG)_FILE := smpeg2-$($(PKG)_VERSION).tar.gz
2017-03-05 03:41:39 +00:00
$(PKG)_URL := https://www.libsdl.org/projects/smpeg/release/$($(PKG)_FILE)
$(PKG)_DEPS := cc sdl2
2013-07-27 09:47:34 +01:00
define $(PKG)_UPDATE
2017-03-05 03:41:39 +00:00
$(WGET) -q -O- 'https://www.libsdl.org/projects/smpeg/release' | \
2014-10-09 18:59:30 +01:00
$(SED) -n 's,.*smpeg2-\([0-9][^>]*\)\.tar.*,\1,p' | \
2013-07-27 09:47:34 +01:00
head -1
endef
define $(PKG)_BUILD
$(SED) -i 's,\(-lsmpeg2\),\1 -lstdc++,' '$(1)/smpeg2-config.in'
cd '$(1)' && ./configure \
AR='$(TARGET)-ar' \
NM='$(TARGET)-nm' \
2014-10-09 18:59:30 +01:00
$(MXE_CONFIGURE_OPTS) \
2013-07-27 09:47:34 +01:00
--disable-debug \
--with-sdl-prefix='$(PREFIX)/$(TARGET)' \
--disable-sdltest \
--disable-gtk-player \
--disable-opengl-player \
CFLAGS='-ffriend-injection -Wno-narrowing'
2014-10-09 18:59:30 +01:00
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT)
2013-07-27 09:47:34 +01:00
2014-10-09 18:59:30 +01:00
'$(TARGET)-gcc' \
-W -Wall -Werror -std=c99 -pedantic \
'$(TOP_DIR)/src/smpeg-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-smpeg2.exe' \
`'$(PREFIX)/$(TARGET)/bin/smpeg2-config' --cflags --libs`
2013-07-27 09:47:34 +01:00
endef