sfml: use new-style options BUILD_DIR, SOURCE_DIR, GH_CONF

This commit is contained in:
Tony Theodore 2018-08-13 17:45:42 +10:00
parent 8912905d69
commit 4b3fc30da9
1 changed files with 5 additions and 14 deletions

View File

@ -5,28 +5,19 @@ $(PKG)_WEBSITE := https://www.sfml-dev.org/
$(PKG)_DESCR := SFML
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.4.2
$(PKG)_CHECKSUM := 8ba04f6fde6a7b42527d69742c49da2ac529354f71f553409f9f821d618de4b6
$(PKG)_SUBDIR := SFML-$($(PKG)_VERSION)
$(PKG)_FILE := SFML-$($(PKG)_VERSION)-sources.zip
$(PKG)_URL := https://sfml-dev.org/download/sfml/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_CHECKSUM := cf268fb487e4048c85e5b2f53d62596854762c98cba1c1b61ccd91f78253ef4b
$(PKG)_GH_CONF := SFML/SFML/tags
$(PKG)_DEPS := cc freetype glew jpeg libsndfile openal
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://www.sfml-dev.org/download.php' | \
$(SED) -n 's,.*download/sfml/\([^"]\+\).*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
mkdir '$(1)/build'
cd '$(1)/build' && '$(TARGET)-cmake' .. \
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
-DSFML_BUILD_EXAMPLES=FALSE \
-DSFML_BUILD_DOC=FALSE
# build and install libs
$(MAKE) -C '$(1)/build/src/SFML' -j '$(JOBS)' install VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)/src/SFML' -j '$(JOBS)' install VERBOSE=1
# install headers
'$(TARGET)-cmake' -DCOMPONENT=devel -P '$(1)/build/cmake_install.cmake'
'$(TARGET)-cmake' -DCOMPONENT=devel -P '$(BUILD_DIR)/cmake_install.cmake'
# create pkg-config file
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'