* [gentoo-commits] repo/gentoo:master commit in: media-libs/lastfmlib/files/, media-libs/lastfmlib/
@ 2020-12-28 11:39 Ian Whyman
0 siblings, 0 replies; 2+ messages in thread
From: Ian Whyman @ 2020-12-28 11:39 UTC (permalink / raw
To: gentoo-commits
commit: 0d38fec50a3f30afbf08a433f6778d9a6b69fbcc
Author: Ian Whyman <thev00d00 <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 28 11:39:24 2020 +0000
Commit: Ian Whyman <thev00d00 <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 11:39:24 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d38fec5
media-libs/lastfmlib: Fix build failure
Thanks to Steven Newbury for the patch.
Fixes: 664760
Package-Manager: Portage-3.0.11, Repoman-3.0.2
Signed-off-by: Ian Whyman <thev00d00 <AT> gentoo.org>
.../files/lastfmlib-0.4.0-string-conv.patch | 20 +++++++++++++
media-libs/lastfmlib/lastfmlib-0.4.0-r1.ebuild | 34 ++++++++++++++++++++++
2 files changed, 54 insertions(+)
diff --git a/media-libs/lastfmlib/files/lastfmlib-0.4.0-string-conv.patch b/media-libs/lastfmlib/files/lastfmlib-0.4.0-string-conv.patch
new file mode 100644
index 00000000000..381e731d9f6
--- /dev/null
+++ b/media-libs/lastfmlib/files/lastfmlib-0.4.0-string-conv.patch
@@ -0,0 +1,20 @@
+# Fix string conversions
+# Author: Steven Newbury <steve@snewbury.org.uk>
+# Gentoo Bug: 664760
+--- ./lastfmlib/utils/stringoperations.h~ 2020-02-27 11:50:53.000000000 +0000
++++ ./lastfmlib/utils/stringoperations.h 2020-02-27 11:55:49.228128570 +0000
+@@ -53,14 +53,6 @@
+ ss << numeric;
+ return ss.str();
+ }
+-
+- template<typename T>
+- inline std::string toWstring(T& numeric)
+- {
+- std::wstringstream ss;
+- ss << numeric;
+- return ss.str();
+- }
+ }
+
+ #endif
diff --git a/media-libs/lastfmlib/lastfmlib-0.4.0-r1.ebuild b/media-libs/lastfmlib/lastfmlib-0.4.0-r1.ebuild
new file mode 100644
index 00000000000..f1029063647
--- /dev/null
+++ b/media-libs/lastfmlib/lastfmlib-0.4.0-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="C++ library to scrobble tracks on Last.fm"
+HOMEPAGE="https://github.com/dirkvdb/lastfmlib/releases"
+SRC_URI="https://github.com/dirkvdb/lastfmlib/archive/lastfmlib-0.4.0.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug syslog"
+
+RDEPEND="net-misc/curl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-string-conv.patch"
+)
+
+src_configure() {
+ econf \
+ --disable-static \
+ $(use_enable debug) \
+ $(use_enable syslog logging) \
+ --disable-unittests
+}
+
+src_install() {
+ default
+ find "${D}"/usr -name '*.la' -delete || die "Pruning failed"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/lastfmlib/files/, media-libs/lastfmlib/
@ 2024-04-03 5:11 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-04-03 5:11 UTC (permalink / raw
To: gentoo-commits
commit: a56f53313c576244d9c4dab4577c5b554d828298
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 29 09:32:21 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 3 05:10:36 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a56f5331
media-libs/lastfmlib: update EAPI 7 -> 8, wire up & fix tests
That said, we should really last-rite this anyway, per bug #928115, it's
just that I started working on this before I noticed that bug...
Bug: https://bugs.gentoo.org/928115
Closes: https://bugs.gentoo.org/889298
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/lastfmlib-0.4.0-autotools-tests.patch | 31 ++++++++++++++
.../files/lastfmlib-0.4.0-out-of-bounds-trim.patch | 24 +++++++++++
media-libs/lastfmlib/lastfmlib-0.4.0-r2.ebuild | 50 ++++++++++++++++++++++
3 files changed, 105 insertions(+)
diff --git a/media-libs/lastfmlib/files/lastfmlib-0.4.0-autotools-tests.patch b/media-libs/lastfmlib/files/lastfmlib-0.4.0-autotools-tests.patch
new file mode 100644
index 000000000000..506d5a37693b
--- /dev/null
+++ b/media-libs/lastfmlib/files/lastfmlib-0.4.0-autotools-tests.patch
@@ -0,0 +1,31 @@
+* Run the tests as part of 'make check' (not just building testrunner).
+* Use pkg-config to find gtest, not the now-removed gtest-config.
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -59,6 +59,7 @@ pkgconfig_DATA = liblastfmlib.pc
+
+ if ENABLE_UNITTEST
+ check_PROGRAMS = testrunner
++TESTS = $(check_PROGRAMS)
+ endif
+
+ testrunner_SOURCES = lastfmlib/unittest/testrunner.cpp \
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,13 +51,10 @@ AC_ARG_ENABLE(unittests,
+ [ --enable-unittests Enables build of unittests ],
+ ENABLE_UNITTEST=$enableval)
+
+-if test "$ENABLE_UNITTEST" = "yes"; then
+- AC_CHECK_HEADERS(
+- [gtest/gtest.h],,
+- [AC_MSG_ERROR([Missing gtest library, install the google unittest framework])])
+- UNITTEST_LIBS="$(gtest-config --libs)"
++AS_IF([test "$ENABLE_UNITTEST" = "yes"], [
++ PKG_CHECK_MODULES([UNITTEST], [gtest], [], [AC_MSG_ERROR([Missing gtest library, install the google unittest framework])])
+ AC_SUBST(UNITTEST_LIBS)
+-fi
++])
+ AM_CONDITIONAL(ENABLE_UNITTEST, test "$enable_unittests" = "yes")
+
+ AC_SUBST([pkgconfigdir])
diff --git a/media-libs/lastfmlib/files/lastfmlib-0.4.0-out-of-bounds-trim.patch b/media-libs/lastfmlib/files/lastfmlib-0.4.0-out-of-bounds-trim.patch
new file mode 100644
index 000000000000..6c01a59269d4
--- /dev/null
+++ b/media-libs/lastfmlib/files/lastfmlib-0.4.0-out-of-bounds-trim.patch
@@ -0,0 +1,24 @@
+Fix out of bounds assertion with -D_GLIBCXX_ASSERTIONS on empty string in testsuite.
+--- a/lastfmlib/utils/stringoperations.cpp
++++ b/lastfmlib/utils/stringoperations.cpp
+@@ -40,7 +40,7 @@ void trim(std::string& aString)
+ {
+ size_t begin = 0;
+ size_t end = aString.size() - 1;
+-
++
+ while ( aString[begin] == ' ' || aString[begin] == '\t'
+ || aString[begin] == '\r' || aString[begin] == '\n')
+ {
+@@ -50,8 +50,10 @@ void trim(std::string& aString)
+ break;
+ }
+
+- if (begin == aString.size())
++ if (begin == aString.size()) {
+ aString = "";
++ return;
++ }
+
+ while ( aString[end] == ' ' || aString[end] == '\t'
+ || aString[end] == '\r' || aString[end] == '\n')
diff --git a/media-libs/lastfmlib/lastfmlib-0.4.0-r2.ebuild b/media-libs/lastfmlib/lastfmlib-0.4.0-r2.ebuild
new file mode 100644
index 000000000000..590503f295ec
--- /dev/null
+++ b/media-libs/lastfmlib/lastfmlib-0.4.0-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="C++ library to scrobble tracks on Last.fm"
+HOMEPAGE="https://github.com/dirkvdb/lastfmlib/releases"
+SRC_URI="https://github.com/dirkvdb/lastfmlib/archive/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug syslog test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="net-misc/curl"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-string-conv.patch"
+ "${FILESDIR}/${PN}-0.4.0-autotools-tests.patch"
+ "${FILESDIR}/${PN}-0.4.0-out-of-bounds-trim.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ CONFIG_SHELL="${BROOT}"/bin/bash econf \
+ $(use_enable debug) \
+ $(use_enable syslog logging) \
+ $(use_enable test unittests)
+}
+
+src_test() {
+ emake check VERBOSE=1
+}
+
+src_install() {
+ default
+ find "${D}"/usr -name '*.la' -delete || die "Pruning failed"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-03 5:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-28 11:39 [gentoo-commits] repo/gentoo:master commit in: media-libs/lastfmlib/files/, media-libs/lastfmlib/ Ian Whyman
-- strict thread matches above, loose matches on Subject: below --
2024-04-03 5:11 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox