mxml: update 2.10 --> 2.11 and enable shared

This commit is contained in:
Tony Theodore 2017-10-30 19:29:31 +11:00
parent a0360915ae
commit f6621190d8
1 changed files with 18 additions and 13 deletions

View File

@ -4,31 +4,36 @@ PKG := mxml
$(PKG)_WEBSITE := https://michaelrsweet.github.io/mxml/
$(PKG)_DESCR := Mini-XML
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.10
$(PKG)_CHECKSUM := 267ff58b64ddc767170d71dab0c729c06f45e1df9a9b6f75180b564f09767891
$(PKG)_GH_CONF := michaelrsweet/mxml, release-
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/michaelrsweet/mxml/releases/download/release-$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_VERSION := 2.11
$(PKG)_CHECKSUM := 7d3dfe661e50908fe41aef9b97ba6f7f158cab5208515c6be9f5bc9daf032329
$(PKG)_GH_CONF := michaelrsweet/mxml, v
$(PKG)_DEPS := gcc pthreads
define $(PKG)_BUILD
cd '$(1)' && ./configure \
--host='$(TARGET)' \
# doesn't support out-of-source builds
# https://github.com/michaelrsweet/mxml/issues/135
cd '$(SOURCE_DIR)' && $(SOURCE_DIR)/configure \
$(MXE_CONFIGURE_OPTS) \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
--enable-static \
--enable-threads
$(MAKE) -C '$(1)' -j '$(JOBS)' libmxml.a
$(MAKE) -C '$(1)' -j 1 install-libmxml.a
$(MAKE) -C '$(SOURCE_DIR)' -j '$(JOBS)' libmxml.a
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m644 '$(1)/mxml.h' '$(PREFIX)/$(TARGET)/include/'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
$(INSTALL) -m644 '$(1)/mxml.pc' '$(PREFIX)/$(TARGET)/lib/pkgconfig/'
# shared libs are easier to do ourselves in the case where all
# functions are exported.
# https://github.com/michaelrsweet/mxml/issues/188
# https://github.com/michaelrsweet/mxml/issues/192
$(if $(BUILD_STATIC),\
$(MAKE) -C '$(SOURCE_DIR)' -j 1 install-libmxml.a \
$(else), \
$(MAKE_SHARED_FROM_STATIC) '$(SOURCE_DIR)/libmxml.a' -lpthread)
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-mxml.exe' \
`'$(TARGET)-pkg-config' mxml --cflags --libs`
endef
$(PKG)_BUILD_SHARED =