public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde-sunset:master commit in: media-libs/liblastfm/, media-libs/liblastfm/files/
Date: Wed, 12 Sep 2018 20:41:59 +0000 (UTC)	[thread overview]
Message-ID: <1536783639.0799fd1cfa911d3c6fd5d2ccbc9e910581a29f4b.asturm@gentoo> (raw)

commit:     0799fd1cfa911d3c6fd5d2ccbc9e910581a29f4b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 12 20:17:30 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Sep 12 20:20:39 2018 +0000
URL:        https://gitweb.gentoo.org/proj/kde-sunset.git/commit/?id=0799fd1c

media-libs/liblastfm: Add current snapshot with USE=qt4,qt5 multibuild

Import from Gentoo ebuild repository.

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../liblastfm-1.1.0_pre20150206-qt-5.11b3.patch    | 302 +++++++++++++++++++++
 .../liblastfm/liblastfm-1.1.0_pre20150206.ebuild   |  87 ++++++
 media-libs/liblastfm/metadata.xml                  |  11 +
 3 files changed, 400 insertions(+)

diff --git a/media-libs/liblastfm/files/liblastfm-1.1.0_pre20150206-qt-5.11b3.patch b/media-libs/liblastfm/files/liblastfm-1.1.0_pre20150206-qt-5.11b3.patch
new file mode 100644
index 0000000..fc0e9b8
--- /dev/null
+++ b/media-libs/liblastfm/files/liblastfm-1.1.0_pre20150206-qt-5.11b3.patch
@@ -0,0 +1,302 @@
+From 62a08d490a1e75e3ef5d08f3fb37e65c1563e706 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 1 Apr 2018 11:51:42 +0200
+Subject: [PATCH 1/4] Make Qt5 build default and simplify logic, add missing
+ deps
+
+---
+ CMakeLists.txt | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index be88967..e628611 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,19 +27,19 @@ set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/cmake/Module
+ # setup qt stuff
+ set(CMAKE_AUTOMOC ON)
+ 
+-option(BUILD_WITH_QT4 "Build liblastfm with Qt4 no matter if Qt5 was found" OFF)
++option(BUILD_WITH_QT4 "Build liblastfm with Qt4" OFF)
+ 
+-if( NOT BUILD_WITH_QT4 )
+-    # try Qt5 first, and prefer that if found
+-    find_package(Qt5Core QUIET)
+-endif()
++if(NOT BUILD_WITH_QT4)
++    find_package(Qt5 REQUIRED COMPONENTS Core Network Xml CONFIG)
++
++    if(BUILD_FINGERPRINT)
++        find_package(Qt5Sql REQUIRED CONFIG)
++    endif()
+ 
+-if(Qt5Core_DIR)
+     set(LASTFM_LIB_VERSION_SUFFIX 5)
+-    message(STATUS "Found Qt5! Please keep in mind, this is highly experimental and not our main development target..")
+     include_directories(${Qt5Core_INCLUDE_DIRS})
+     if(UNIX AND NOT APPLE)
+-        find_package(Qt5DBus REQUIRED)
++        find_package(Qt5DBus REQUIRED CONFIG)
+     endif()
+ 
+ #     macro(qt_wrap_ui)
+-- 
+2.17.0
+
+
+From ff32d56e5e1bd8b1f86a8e9840c778249ff19118 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 1 Apr 2018 11:56:48 +0200
+Subject: [PATCH 2/4] Make use of FeatureSummary
+
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e628611..dcdfd91 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -20,6 +20,7 @@ option(BUILD_TESTS "Build liblastfm tests" ON)
+ 
+ # installation dirs
+ include(GNUInstallDirs)
++include(FeatureSummary)
+ 
+ #cmake module path
+ set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/cmake/Modules")
+@@ -97,3 +98,5 @@ if(BUILD_TESTS)
+     enable_testing()
+     add_subdirectory(tests)
+ endif()
++
++feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+-- 
+2.17.0
+
+
+From 5762278b29c1ab6559dcca7a1e8fbad1d75134da Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 1 Apr 2018 12:06:48 +0200
+Subject: [PATCH 3/4] Cleanup include dirs
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dcdfd91..52589b5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -38,10 +38,10 @@ if(NOT BUILD_WITH_QT4)
+     endif()
+ 
+     set(LASTFM_LIB_VERSION_SUFFIX 5)
+-    include_directories(${Qt5Core_INCLUDE_DIRS})
+     if(UNIX AND NOT APPLE)
+         find_package(Qt5DBus REQUIRED CONFIG)
+     endif()
++    include_directories(Qt5::Core Qt5::Network Qt5::Xml)
+ 
+ #     macro(qt_wrap_ui)
+ #         qt5_wrap_ui(${ARGN})
+-- 
+2.17.0
+
+
+From aeb0cbc56376021444a56a984613faacefedfea9 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 15 Apr 2018 21:31:14 +0200
+Subject: [PATCH 4/4] Fix build with Qt 5.11_beta3 (drop qt5_use_modules)
+
+---
+ CMakeLists.txt                 |  3 --
+ src/CMakeLists.txt             | 63 +++++++++++++++++++---------------
+ src/fingerprint/CMakeLists.txt | 20 ++++++-----
+ tests/lastfm_add_test.cmake    | 16 +++++----
+ 4 files changed, 55 insertions(+), 47 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 52589b5..c8bc89d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -57,9 +57,6 @@ if(NOT BUILD_WITH_QT4)
+ #     endmacro()
+ else()
+     find_package(Qt4 COMPONENTS QtCore QtNetwork QtXml REQUIRED)
+-
+-    macro(qt5_use_modules)
+-    endmacro()
+ endif()
+ 
+ 
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 0f872fb..22ce506 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -3,16 +3,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/global.h.in ${CMAKE_CURRENT_BINARY_DI
+ 
+ add_definitions(${QT_DEFINITIONS})
+ include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
+-set(liblastfm_LIBRARIES
+-    ${QT_QTCORE_LIBRARY}
+-    ${QT_QTNETWORK_LIBRARY}
+-    ${QT_QTXML_LIBRARY}
+-)
+-
+-list(APPEND liblastfm_QT5_MODULES
+-    Xml
+-    Network
+-)
+ 
+ set(liblastfm_SOURCES
+         ws.cpp
+@@ -49,15 +39,11 @@ if(WIN32)
+     if(NOT MINGW)
+         add_definitions("-D_ATL_DLL -D_CRT_SECURE_NO_WARNINGS")
+ 
+-        list(APPEND liblastfm_SOURCES
++        set(liblastfm_SOURCES ${liblastfm_SOURCES}
+             win/WNetworkConnectionMonitor_win.cpp
+             win/WmiSink.cpp
+             win/NdisEvents.cpp
+         )
+-        list(APPEND liblastfm_LIBRARIES
+-            winhttp
+-            wbemuuid
+-        )
+     endif()
+ endif()
+ 
+@@ -67,30 +53,51 @@ if(APPLE)
+     #set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
+     #set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${CMAKE_OSX_DEPLOYMENT_TARGET}.sdk")
+ 
+-    list(APPEND liblastfm_SOURCES
++    set(liblastfm_SOURCES ${liblastfm_SOURCES}
+         mac/MNetworkConnectionMonitor_mac.cpp
+     )
+-
+-    find_library(SYSTEMCONFIGURATION_LIBRARY SystemConfiguration)
+-    find_library(COREFOUNDATION_LIBRARY CoreFoundation)
+-    list(APPEND liblastfm_LIBRARIES
+-        ${COREFOUNDATION_LIBRARY}
+-        ${SYSTEMCONFIGURATION_LIBRARY}
+-    )
+ endif()
+ 
+ if(UNIX AND NOT APPLE)
+-    list(APPEND liblastfm_SOURCES
++    set(liblastfm_SOURCES ${liblastfm_SOURCES}
+         linux/LNetworkConnectionMonitor_linux.cpp
+     )
+-    list(APPEND liblastfm_LIBRARIES ${QT_QTDBUS_LIBRARY})
+-    list(APPEND liblastfm_QT5_MODULES DBus)
+ endif()
+ 
+ add_library(${LASTFM_LIB_TARGET_NAME} SHARED ${liblastfm_SOURCES})
+-qt5_use_modules(${LASTFM_LIB_TARGET_NAME} ${liblastfm_QT5_MODULES})
+ 
+-target_link_libraries(${LASTFM_LIB_TARGET_NAME} ${liblastfm_LIBRARIES})
++if(Qt5Core_DIR)
++    target_link_libraries(${LASTFM_LIB_TARGET_NAME} Qt5::Network Qt5::Xml)
++    if(UNIX AND NOT APPLE)
++        target_link_libraries(${LASTFM_LIB_TARGET_NAME} Qt5::DBus)
++    endif()
++else()
++    target_link_libraries(${LASTFM_LIB_TARGET_NAME}
++        ${QT_QTCORE_LIBRARY}
++        ${QT_QTNETWORK_LIBRARY}
++        ${QT_QTXML_LIBRARY}
++    )
++    if(UNIX AND NOT APPLE)
++        target_link_libraries(${LASTFM_LIB_TARGET_NAME} ${QT_QTDBUS_LIBRARY})
++    endif()
++endif()
++
++if(WIN32 AND NOT MINGW)
++    target_link_libraries(${LASTFM_LIB_TARGET_NAME}
++        winhttp
++        wbemuuid
++    )
++endif()
++
++if(APPLE)
++    find_library(SYSTEMCONFIGURATION_LIBRARY SystemConfiguration)
++    find_library(COREFOUNDATION_LIBRARY CoreFoundation)
++    target_link_libraries(${LASTFM_LIB_TARGET_NAME}
++        ${COREFOUNDATION_LIBRARY}
++        ${SYSTEMCONFIGURATION_LIBRARY}
++    )
++endif()
++
+ set_target_properties(${LASTFM_LIB_TARGET_NAME} PROPERTIES
+     VERSION ${LASTFM_VERSION_STRING}
+     SOVERSION ${LASTFM_SOVERSION}
+diff --git a/src/fingerprint/CMakeLists.txt b/src/fingerprint/CMakeLists.txt
+index 126f8d9..4a74e0d 100644
+--- a/src/fingerprint/CMakeLists.txt
++++ b/src/fingerprint/CMakeLists.txt
+@@ -26,21 +26,23 @@ set(lastfm_fingerprint_HEADERS
+ 
+ add_library(${FINGERPRINT_LIB_TARGET_NAME} SHARED ${lastfm_fingerprint_SOURCES})
+ 
+-target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME}
+-    ${LASTFM_LIB_TARGET_NAME}
+-    ${QT_QTSQL_LIBRARY}
+-    ${QT_QTCORE_LIBRARY}
+-    ${LIBSAMPLERATE_LIBRARY}
+-    ${LIBFFTW3_LIBRARY}
+-)
+-
+ set_target_properties(${FINGERPRINT_LIB_TARGET_NAME} PROPERTIES
+     COMPILE_DEFINITIONS LASTFM_FINGERPRINT_LIB
+     VERSION ${LASTFM_VERSION_STRING}
+     SOVERSION ${LASTFM_SOVERSION}
+ )
+ 
+-qt5_use_modules(${FINGERPRINT_LIB_TARGET_NAME} Network Sql Xml)
++target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME}
++    ${LASTFM_LIB_TARGET_NAME}
++    ${LIBSAMPLERATE_LIBRARY}
++    ${LIBFFTW3_LIBRARY}
++)
++
++if(Qt5Core_DIR)
++    target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME} Qt5::Network Qt5::Sql Qt5::Xml)
++else()
++    target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME} ${QT_QTCORE_LIBRARY} ${QT_QTSQL_LIBRARY})
++endif()
+ 
+ install(TARGETS ${FINGERPRINT_LIB_TARGET_NAME}
+     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+diff --git a/tests/lastfm_add_test.cmake b/tests/lastfm_add_test.cmake
+index a4a1686..2f0664d 100644
+--- a/tests/lastfm_add_test.cmake
++++ b/tests/lastfm_add_test.cmake
+@@ -6,13 +6,15 @@ macro(lastfm_add_test test_class)
+     configure_file(Test${LASTFM_TEST_CLASS}.h Test${LASTFM_TEST_CLASS}.h)
+     add_executable(${LASTFM_TEST_CLASS}Test Test${LASTFM_TEST_CLASS}.cpp)
+ 
+-    qt5_use_modules(${LASTFM_TEST_CLASS}Test Core Test Xml Network)
+-
+-    target_link_libraries(${LASTFM_TEST_CLASS}Test
+-        ${LASTFM_LIB_TARGET_NAME}
+-        ${QT_QTTEST_LIBRARY}
+-        ${QT_QTCORE_LIBRARY}
+-    )
++    if(Qt5Core_DIR)
++        target_link_libraries(${LASTFM_TEST_CLASS}Test Qt5::Core Qt5::Test Qt5::Xml Qt5::Network
++            ${LASTFM_LIB_TARGET_NAME}
++        )
++    else()
++        target_link_libraries(${LASTFM_TEST_CLASS}Test ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY}
++            ${LASTFM_LIB_TARGET_NAME}
++        )
++    endif()
+ 
+     add_test(NAME ${LASTFM_TEST_CLASS}Test COMMAND ${LASTFM_TEST_CLASS}Test)
+ endmacro()
+-- 
+2.17.0
+

diff --git a/media-libs/liblastfm/liblastfm-1.1.0_pre20150206.ebuild b/media-libs/liblastfm/liblastfm-1.1.0_pre20150206.ebuild
new file mode 100644
index 0000000..ceeabe2
--- /dev/null
+++ b/media-libs/liblastfm/liblastfm-1.1.0_pre20150206.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+COMMIT=44331654256df83bc1d3cbb271a8ce3d4c464686
+inherit cmake-utils multibuild vcs-snapshot
+
+DESCRIPTION="Collection of libraries to integrate Last.fm services"
+HOMEPAGE="https://github.com/lastfm/liblastfm"
+SRC_URI="https://github.com/lastfm/liblastfm/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+KEYWORDS="amd64 ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="fingerprint test +qt4 qt5"
+
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+COMMON_DEPEND="
+	qt4? (
+		dev-qt/qtcore:4[ssl]
+		dev-qt/qtdbus:4
+	)
+	qt5? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtnetwork:5[ssl]
+		dev-qt/qtxml:5
+	)
+	fingerprint? (
+		media-libs/libsamplerate
+		sci-libs/fftw:3.0
+		qt4? ( dev-qt/qtsql:4 )
+		qt5? ( dev-qt/qtsql:5 )
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	test? (
+		qt4? ( dev-qt/qttest:4 )
+		qt5? ( dev-qt/qttest:5 )
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!<media-libs/lastfmlib-0.4.0
+"
+
+# 1 of 2 (UrlBuilderTest) is failing, last checked version 1.0.9
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}/${P}-qt-5.11b3.patch" )
+
+pkg_setup() {
+	MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+	myconfigure() {
+		# demos not working
+		local mycmakeargs=(
+			-DBUILD_DEMOS=OFF
+			-DBUILD_FINGERPRINT=$(usex fingerprint)
+			-DBUILD_TESTS=$(usex test)
+		)
+		if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
+			mycmakeargs+=(-DBUILD_WITH_QT4=ON)
+		fi
+		if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+			mycmakeargs+=(-DBUILD_WITH_QT4=OFF)
+		fi
+		cmake-utils_src_configure
+	}
+
+	multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+	multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+	multibuild_foreach_variant cmake-utils_src_test
+}
+
+src_install() {
+	multibuild_foreach_variant cmake-utils_src_install
+}

diff --git a/media-libs/liblastfm/metadata.xml b/media-libs/liblastfm/metadata.xml
new file mode 100644
index 0000000..0ad9360
--- /dev/null
+++ b/media-libs/liblastfm/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<!-- maintainer-needed -->
+	<use>
+		<flag name="fingerprint">Build the lastfm-fingerprint library</flag>
+	</use>
+	<upstream>
+		<remote-id type="github">lastfm/liblastfm</remote-id>
+	</upstream>
+</pkgmetadata>


             reply	other threads:[~2018-09-12 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 20:41 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-07 23:30 [gentoo-commits] proj/kde-sunset:master commit in: media-libs/liblastfm/, media-libs/liblastfm/files/ Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1536783639.0799fd1cfa911d3c6fd5d2ccbc9e910581a29f4b.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox