From aaa8012834e1bf98c786b2b0bbbc1da3f6295b65 Mon Sep 17 00:00:00 2001 From: Pavel Vatagin Date: Mon, 23 Jan 2017 01:49:56 +0300 Subject: add package liblastfm_qt4 --- plugins/apps/clementine_qt4.mk | 2 +- src/liblastfm_qt4-test.cpp | 13 ++++++++++++ src/liblastfm_qt4.mk | 46 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/liblastfm_qt4-test.cpp create mode 100644 src/liblastfm_qt4.mk diff --git a/plugins/apps/clementine_qt4.mk b/plugins/apps/clementine_qt4.mk index 4df7ebc..99fdde4 100644 --- a/plugins/apps/clementine_qt4.mk +++ b/plugins/apps/clementine_qt4.mk @@ -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 diff --git a/src/liblastfm_qt4-test.cpp b/src/liblastfm_qt4-test.cpp new file mode 100644 index 0000000..270a800 --- /dev/null +++ b/src/liblastfm_qt4-test.cpp @@ -0,0 +1,13 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include + +int main() +{ + lastfm::MutableTrack track; + track.setTitle("Track"); + + return 0; +} diff --git a/src/liblastfm_qt4.mk b/src/liblastfm_qt4.mk new file mode 100644 index 0000000..a1a7f4d --- /dev/null +++ b/src/liblastfm_qt4.mk @@ -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 = -- cgit v0.12