# This file is part of MXE.
# See index.html for further information.
PKG := pkgconf
$(PKG)_IGNORE :=
$(PKG)_VERSION := da179fd
$(PKG)_CHECKSUM := 1e7b5ffe35ca4580a9b801307c3bc919fd77a4fd
$(PKG)_SUBDIR := $(PKG)-$(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://github.com/$(PKG)/$(PKG)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS :=
$(PKG)_DEPS_$(BUILD) := automake
$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, pkgconf/pkgconf, master)
define $(PKG)_UPDATE
echo 'Warning: Updates are temporarily disabled for package pkgconf.' >&2;
echo $(pkgconf_VERSION)
endef
define $(PKG)_BUILD
cd '$(1)' && ./autogen.sh
cd '$(1)' && ./configure \
--prefix='$(PREFIX)/$(TARGET)'
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
# create pkg-config script
(echo '#!/bin/sh'; \
echo 'PKG_CONFIG_PATH="$(PREFIX)/$(TARGET)/qt5/lib/pkgconfig":"$$PKG_CONFIG_PATH_$(subst .,_,$(subst -,_,$(TARGET)))" PKG_CONFIG_LIBDIR='\''$(PREFIX)/$(TARGET)/lib/pkgconfig'\'' exec '$(PREFIX)/$(TARGET)/bin/pkgconf' $(if $(BUILD_STATIC),--static) "$$@"') \
> '$(PREFIX)/bin/$(TARGET)-pkg-config'
chmod 0755 '$(PREFIX)/bin/$(TARGET)-pkg-config'
# create cmake file
echo 'set(PKG_CONFIG_EXECUTABLE $(PREFIX)/bin/$(TARGET)-pkg-config)' \
> '$(CMAKE_TOOLCHAIN_DIR)/pkgconf.cmake'
endef