diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-04-03 08:13:59 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-04-03 08:13:59 +0100 |
commit | 2df2e0ebc717aa53904c920c1a361423dfc3a5f7 (patch) | |
tree | d81b257b3923100dc55a999dd12b2198a6d35b99 /media-libs/lastfmlib | |
parent | 75abd8d3830449158bdd27f9c4701bcbadc55080 (diff) |
gentoo auto-resync : 03:04:2024 - 08:13:58
Diffstat (limited to 'media-libs/lastfmlib')
4 files changed, 108 insertions, 0 deletions
diff --git a/media-libs/lastfmlib/Manifest b/media-libs/lastfmlib/Manifest index 23ab9532f5fb..78113bf9abb0 100644 --- a/media-libs/lastfmlib/Manifest +++ b/media-libs/lastfmlib/Manifest @@ -1,4 +1,7 @@ +AUX lastfmlib-0.4.0-autotools-tests.patch 1067 BLAKE2B 26f4b9a2c9bbb9e7c9a4d82edf270885d2d3508350cd7bd9aa73eb948f4bcc85d94e027ec71b46fa1f81e920ab066ba8313acd41abf89b1bec80748bcadae600 SHA512 f542744da540e89c5189c07bbd7b1711ad8905d9fa760c0437588935600ab70ac35da81805358f5f709ea666363010876b83ffcf7b14c5799f5b6a319e5adac7 +AUX lastfmlib-0.4.0-out-of-bounds-trim.patch 749 BLAKE2B 600aac6c952a568481d6a06abdc8f65f1e9d9e1c0018a88478d9ad4d867a41286365c169b6777bcfb0d906caad89f1b76c528957cbbd2e4b3a3569d7bded8205 SHA512 1de3951811bf0bd2862875232cbd5c457f5e3702c5cff8dccd76f029f528f91bc6846a0eee205463933fc0ffffa98158e546a34ba4bd37967295d1df7c0c533a AUX lastfmlib-0.4.0-string-conv.patch 510 BLAKE2B 088c8deb83ad96450b21e1d7a8e99d34a5421ccaa72ad75e102f89f011d494ee4e54c9799a1a6296543f7d230dcb41dec48a083d4c0a09a8a52f87744c7256ab SHA512 cd212e173559822586c97fe175791b7ca2ca7239cc511d5b4d07ff7dfc9ec87b5f3a126acf58c4bd95a7cb19cfc04b067ecb99fab6cb1815e59f56fe9c70ee4f DIST lastfmlib-0.4.0.tar.gz 333224 BLAKE2B 2e38adb90a468eccf959950d89e2e0b903e7e96c871b4d20216ee233933392fda7cd3bd86d90472e0f305922dc11e1dc998206c669a13be76eab7fdd07e6b45b SHA512 88e26bab04eda06f77f4684a5fe14aa9761acfcb5d7d8726c4d3ae5e1a4acd73e6b0c9bedff5d51bce07afd7b883085f1adba98714e8ebfc5bbd20b8aca66748 EBUILD lastfmlib-0.4.0-r1.ebuild 710 BLAKE2B c234e5d75dc5511b741bc18d58bd5247ac47305bd02897983cac8620db176bbfe237f9035fd308e965c1232718083d9aade0e90493121c9f6358d865863c0e6b SHA512 d02034422add0eb6203083d54c1d9a2868d535e575e323562dcfd57d2eb552fe5cd4e7ba93a3e78939e80c385037465c859beb669a5c4259490903fcdc46d9b4 +EBUILD lastfmlib-0.4.0-r2.ebuild 993 BLAKE2B 1f7c70de6b94f0cc8c54ef2841081fcadcc1f99b47f2efa6f4da2473693fdfd1c7d3bff96a7dae7aa3550a57f23c9fb3b5294ec3888e7a392a116e50b663df5b SHA512 bbb02635fe0c5838c8c24396f857903198bd9533e7a9d2dc13b4461a6f116f0087aa4e472e76f9c925b0aa3bb5165151570b03531aa97e883d17a7b743e5b393 MISC metadata.xml 336 BLAKE2B fd794c8e082ec8d25b4c103741b4c016b9e3dba543b1353cee0ca079258dfaff1957c6ed7a9a71e8c86552f46f8b6e5239ad61fffc0a4aa1880ebf3d26db44f5 SHA512 0c6b3d19043fa1b36dc0d9b00391bd8e271cbee6f2f98dfbe06f985bddcf7db2214c332d0a53045dde9b29024cc99ec34cf7272ee3b4591221c5884a743c67db 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" +} |