Mercurial > mxe-octave
changeset 6009:8b29cda61d59
Add SDL2
* src/sdl2.mk: new file
* index.html: add ref to new sdl2 targets
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Tue, 07 Dec 2021 08:55:25 -0500 |
parents | 0b1489337e60 |
children | 3aad637952e6 |
files | index.html src/sdl2.mk |
diffstat | 2 files changed, 40 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/index.html Mon Dec 06 08:53:02 2021 -0500 +++ b/index.html Tue Dec 07 08:55:25 2021 -0500 @@ -2722,6 +2722,10 @@ <td class="website"><a href="http://www.libsdl.org/projects/SDL_ttf/">SDL_ttf</a></td> </tr> <tr> + <td class="package">sdl2</td> + <td class="website"><a href="http://www.libsdl.org/">SDL2</a></td> + </tr> + <tr> <td class="package">sm</td> <td class="website"><a href="http://xorg.freedesktop.org/">sm</a></td> </tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/sdl2.mk Tue Dec 07 08:55:25 2021 -0500 @@ -0,0 +1,36 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := sdl2 +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.0.18 +$(PKG)_CHECKSUM := 419c62567d197a52a2136865c158f894939c1adf +$(PKG)_SUBDIR := SDL2-$($(PKG)_VERSION) +$(PKG)_FILE := SDL2-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://www.libsdl.org/release/$($(PKG)_FILE) +$(PKG)_DEPS := libiconv libsamplerate + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://hg.libsdl.org/SDL/tags' | \ + $(SED) -n 's,.*tag/release-\([0-9][^"]*\).*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && aclocal -I acinclude && autoconf && $(SHELL) ./configure \ + $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ + $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ + $(ENABLE_SHARED_OR_STATIC) \ + --prefix='$(HOST_PREFIX)' \ + --enable-libsamplerate \ + --enable-libsamplerate-shared=$(if $(BUILD_SHARED),yes,no) + + $(SED) -i 's,defined(__MINGW64_VERSION_MAJOR),defined(__MINGW64_VERSION_MAJOR) \&\& defined(_WIN64),' '$(1)/include/SDL_cpuinfo.h' + $(SED) -i 's,-XCClinker,,' '$(1)/sdl2.pc' + $(SED) -i 's,-XCClinker,,' '$(1)/sdl2-config' + $(MAKE) -C '$(1)' -j '$(JOBS)' SHELL=$(SHELL) + $(MAKE) -C '$(1)' -j 1 install SHELL=$(SHELL) + if [ "$(MXE_NATIVE_BUILD)" == "no" ]; then \ + $(LN_SF) -sf '$(HOST_BINDIR)/sdl2-config' '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_REFIX)sdl2-config'; \ + fi +endef