add package liblastfm_qt4

This commit is contained in:
Pavel Vatagin 2017-01-23 01:49:56 +03:00
parent 95d5df2529
commit aaa8012834
3 changed files with 60 additions and 1 deletions

View File

@ -18,7 +18,7 @@ $(PKG)_URL := https://github.com/clementine-player/clementine/archive/$($(P
$(PKG)_WEBSITE := https://www.clementine-player.org/
$(PKG)_OWNER := https://github.com/pavelvat
$(PKG)_DEPS := gcc boost chromaprint cryptopp dlfcn-win32 fftw glew gst-libav gst-plugins-bad \
gst-plugins-good gst-plugins-ugly libarchive libechonest libid3tag \
gst-plugins-good gst-plugins-ugly libarchive libechonest libid3tag liblastfm_qt4 \
libmpcdec libplist libusb1 protobuf qtsparkle_qt4 sparsehash
define $(PKG)_UPDATE

View File

@ -0,0 +1,13 @@
/*
* This file is part of MXE. See LICENSE.md for licensing information.
*/
#include <lastfm/Track.h>
int main()
{
lastfm::MutableTrack track;
track.setTitle("Track");
return 0;
}

46
src/liblastfm_qt4.mk Normal file
View File

@ -0,0 +1,46 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := liblastfm_qt4
$(PKG)_WEBSITE := https://github.com/lastfm/liblastfm
$(PKG)_DESCR := A Qt C++ library for the Last.fm webservices
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.0.9
$(PKG)_CHECKSUM := 5276b5fe00932479ce6fe370ba3213f3ab842d70a7d55e4bead6e26738425f7b
$(PKG)_SUBDIR := liblastfm-$($(PKG)_VERSION)
$(PKG)_FILE := liblastfm-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/lastfm/liblastfm/archive/$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS := gcc fftw libsamplerate qt
define $(PKG)_UPDATE
$(call MXE_GET_GITHUB_TAGS, lastfm/liblastfm)
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
-DBUILD_WITH_QT4=ON
$(MAKE) -C '$(BUILD_DIR)' -j $(JOBS)
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
# create pkg-config file
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
(echo 'prefix=$(PREFIX)/$(TARGET)'; \
echo 'exec_prefix=$${prefix}'; \
echo 'libdir=$${exec_prefix}/lib'; \
echo 'includedir=$${prefix}/include'; \
echo ''; \
echo 'Name: liblastfm'; \
echo 'Version: $($(PKG)_VERSION)'; \
echo 'Description: A Qt C++ library for the Last.fm webservices'; \
echo 'Requires: QtCore QtNetwork QtXml'; \
echo 'Libs: -L$${libdir} -llastfm'; \
echo 'Cflags: -I$${includedir}';) \
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/liblastfm.pc'
$(TARGET)-g++ \
-W -Wall -Werror -ansi -pedantic \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`$(TARGET)-pkg-config liblastfm --cflags --libs`
endef
$(PKG)_BUILD_STATIC =