diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-28 06:30:54 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-28 06:30:54 +0000 |
commit | 72fd2b48b7154274a1d2009cdaab54e7f49fb3aa (patch) | |
tree | 9c6ce981e8f924eb5f24e71e13c91b37aafb8616 /media-sound/gogglesmm | |
parent | 721e451ec418e1712f6962404e111f0ebd487389 (diff) |
gentoo auto-resync : 28:12:2024 - 06:30:54
Diffstat (limited to 'media-sound/gogglesmm')
-rw-r--r-- | media-sound/gogglesmm/Manifest | 2 | ||||
-rw-r--r-- | media-sound/gogglesmm/files/gogglesmm-1.2.1-fix-build-taglib2.patch | 357 | ||||
-rw-r--r-- | media-sound/gogglesmm/gogglesmm-1.2.1-r3.ebuild | 53 |
3 files changed, 412 insertions, 0 deletions
diff --git a/media-sound/gogglesmm/Manifest b/media-sound/gogglesmm/Manifest index cb51565bbc8f..9f8082ae00fe 100644 --- a/media-sound/gogglesmm/Manifest +++ b/media-sound/gogglesmm/Manifest @@ -1,4 +1,6 @@ +AUX gogglesmm-1.2.1-fix-build-taglib2.patch 11093 BLAKE2B db9efa55420f3594d78f66de4e212e4a2b77f7d2f4fea8b2f91df413ba13fb568ff8657aa3f150d47334662b5c3d8cdd7ab444edd59c7e0c14d23137dbda1e6a SHA512 898d26784cd35e100f7f3f465ac26ae46e4a33f03919a7728d75ea8c05f07435f854a45e7c53d308eeab1fea2cf9d2c11ceb592d38d4ea03c61b45163ed83277 AUX gogglesmm-1.2.1-use-fox-1.7.67.patch 3708 BLAKE2B 6a19c7ca433f726b1fb06bb24c892571215760479d35f46905c0235940e47cbc7b55945ff01dbc73a0bd7aef836871a807a7eff93410e538da7a596a9b1c6848 SHA512 55c97f9cb3126bb641c4ef38cb27adaeb8d0711646374c4aa797230df7d50d692f2299db3f2123fac6595f163c75811d4f5b71be349701f0befb921897dc2288 DIST gogglesmm-1.2.1.tar.gz 3015072 BLAKE2B 6a33ba6b678bc23e449898e4f492064301ca9c37239d713fa5ccb857d51bb4c4cf5dc1d4576f2f6dc745eaff607f4400e5600f45c4cbdde8c43cee5ca1fc34f4 SHA512 c165ddde463afcf863b74f00dfa1566077007f51617fa00a95dfcdeeab49da9ee87406f6bdc7779c597002d1e587886c7992e9e892ce4988f3bb14f015336547 EBUILD gogglesmm-1.2.1-r2.ebuild 1127 BLAKE2B 078c99b843a7225edac9512709b02c8bb93ebfbbc409071cd442fdd68996790a829ddb4b00b695a5d6da7ad2f77a3ade61279025d612c20b152151966657a415 SHA512 c23eb70c6261da550b3c55b322893d55b73c23fe462c0e72335e9c416e00fda6d8cd311f1476bf28da4d68e46a24b9e400cc609ff69eaacf825a3e1d67da040e +EBUILD gogglesmm-1.2.1-r3.ebuild 1129 BLAKE2B b833535418246484e4725a6d77fcfe3b2ad9012cdce3cfff0cc8aacb31ee4b38446649cf452055a518f6f3b0c26f231687be4ec6155e40b3aef981ea202a81c2 SHA512 88d3eef3fb1cc88495f382791f0d1a661e68421c1fbc4c6e13aca08ef3265de38d4090dc1bd4b7335a06bc28deeebf98e9bc5862dc0dece52a1e2a4f0ce78010 MISC metadata.xml 449 BLAKE2B d24f0a1420039b6907c60057d9c6ccdf78ad1a3264320b33483b77b11fea8716873eb36b7bbc2a5911855be6d5e3b96294b9acace223ca999c007d5300b9012a SHA512 1bece21add3dd0a3b43ac06ae4aece124112d15937d799f72783d90642678f54eebb171a87f3a16c8f74a31b286b0f5ea62ff85af04909fb0282f4c69bb32395 diff --git a/media-sound/gogglesmm/files/gogglesmm-1.2.1-fix-build-taglib2.patch b/media-sound/gogglesmm/files/gogglesmm-1.2.1-fix-build-taglib2.patch new file mode 100644 index 000000000000..fd53ea74c4f1 --- /dev/null +++ b/media-sound/gogglesmm/files/gogglesmm-1.2.1-fix-build-taglib2.patch @@ -0,0 +1,357 @@ +https://github.com/gogglesmm/gogglesmm/commit/abd6ec6b8270feb1841a97f9be5364541f4a939c.patch +https://github.com/gogglesmm/gogglesmm/commit/9f7110b0950a2862016e18163b9c2737a2a935d6.patch + +diff --git a/src/GMAbout.cpp b/src/GMAbout.cpp +index eb2c565..0b625cb 100644 +--- a/src/GMAbout.cpp ++++ b/src/GMAbout.cpp +@@ -27,7 +27,6 @@ + #endif + #include <FXPNGIcon.h> + #include <sqlite3.h> +-#include <tag.h> + + #define UTF8_COPYRIGHT_SIGN "\xc2\xa9" + +diff --git a/src/GMTag.cpp b/src/GMTag.cpp +index 2add466..a32ce46 100644 +--- a/src/GMTag.cpp ++++ b/src/GMTag.cpp +@@ -26,9 +26,9 @@ + #include "GMTag.h" + #include "GMAudioPlayer.h" + +-/// TagLib +- + ++// taglib Variant enum Type { Bool } conflicts with Xlib ++#undef Bool + #include <fileref.h> + #include <tstring.h> + #include <id3v1tag.h> +@@ -339,6 +339,7 @@ static void gm_strip_tags(TagLib::File * file,FXuint opts) { + /******************************************************************************/ + + GMFileTag::GMFileTag() : ++ fileref(nullptr), + file(nullptr), + tag(nullptr), + mp4(nullptr), +@@ -349,20 +350,35 @@ GMFileTag::GMFileTag() : + } + + GMFileTag::~GMFileTag() { ++#if TAGLIB_VERSION >= TAGVERSION(2,0,0) ++ if (fileref) delete fileref; ++#else + if (file) delete file; ++#endif + } + + + FXbool GMFileTag::open(const FXString & filename,FXuint opts) { +- +- file = TagLib::FileRef::create(filename.text(),(opts&FILETAG_AUDIOPROPERTIES)); +- if (file==nullptr || !file->isValid() || file->tag()==nullptr) { +- if (file) { +- delete file; +- file=nullptr; ++#if TAGLIB_VERSION >= TAGVERSION(2,0,0) ++ fileref = new TagLib::FileRef(filename.text(),(opts&FILETAG_AUDIOPROPERTIES)); ++ file = fileref->file(); ++ if (file==nullptr || !file->isValid() || file->tag()==nullptr) { ++ if (fileref) { ++ delete fileref; ++ fileref=nullptr; ++ } ++ return false; + } +- return false; +- } ++#else ++ file = TagLib::FileRef::create(filename.text(),(opts&FILETAG_AUDIOPROPERTIES)); ++ if (file==nullptr || !file->isValid() || file->tag()==nullptr) { ++ if (file) { ++ delete file; ++ file=nullptr; ++ } ++ return false; ++ } ++#endif + + TagLib::MPEG::File * mpgfile = nullptr; + TagLib::Ogg::Vorbis::File * oggfile = nullptr; +@@ -521,7 +537,11 @@ FXbool GMFileTag::ape_get_field(const FXchar * field,FXStringList & list) const + FXASSERT(field); + FXASSERT(ape); + if (ape->itemListMap().contains(field)) { ++#if TAGLIB_VERSION >= TAGVERSION(2,0,0) ++ const TagLib::StringList fieldlist = ape->itemListMap()[field].values(); ++#else + const TagLib::StringList fieldlist = ape->itemListMap()[field].toStringList(); ++#endif + list.no(fieldlist.size()); + FXint item=0; + for(TagLib::StringList::ConstIterator it = fieldlist.begin(); it != fieldlist.end(); it++) { +@@ -635,16 +655,35 @@ FXbool GMFileTag::id3v2_get_field(const FXchar * field,FXStringList & list) con + void GMFileTag::mp4_update_field(const FXchar * field,const FXString & value) { + FXASSERT(field); + FXASSERT(mp4); ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ if (!value.empty()) ++ mp4->setItem(field,TagLib::StringList(TagLib::String(value.text(),TagLib::String::UTF8))); ++ else ++ mp4->removeItem(field); ++#else + if (!value.empty()) + mp4->itemListMap().insert(field,TagLib::StringList(TagLib::String(value.text(),TagLib::String::UTF8))); + else + mp4->itemListMap().erase(field); ++#endif + } + + + void GMFileTag::mp4_update_field(const FXchar * field,const FXStringList & list) { + FXASSERT(field); + FXASSERT(mp4); ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ if (list.no()==0) { ++ mp4->removeItem(field); ++ } ++ else { ++ TagLib::StringList values; ++ for (FXint i=0;i<list.no();i++) { ++ values.append(TagLib::String(list[i].text(),TagLib::String::UTF8)); ++ } ++ mp4->setItem(field,values); ++ } ++#else + if (list.no()==0) { + mp4->itemListMap().erase(field); + } +@@ -655,12 +694,24 @@ void GMFileTag::mp4_update_field(const FXchar * field,const FXStringList & list) + } + mp4->itemListMap().insert(field,values); + } ++#endif + } + + + FXbool GMFileTag::mp4_get_field(const FXchar * field,FXString & value) const { + FXASSERT(field); + FXASSERT(mp4); ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ if (mp4->contains(field)) { ++ value=mp4->item(field).toStringList().toString(", ").toCString(true); ++ value.trim(); ++ return !value.empty(); ++ } ++ else { ++ value.clear(); ++ return false; ++ } ++#else + if (mp4->itemListMap().contains(field)) { + value=mp4->itemListMap()[field].toStringList().toString(", ").toCString(true); + value.trim(); +@@ -670,14 +721,20 @@ FXbool GMFileTag::mp4_get_field(const FXchar * field,FXString & value) const { + value.clear(); + return false; + } ++#endif + } + + + FXbool GMFileTag::mp4_get_field(const FXchar * field,FXStringList & list) const{ + FXASSERT(field); + FXASSERT(mp4); ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ if (mp4->contains(field)) { ++ const TagLib::StringList fieldlist = mp4->item(field).toStringList(); ++#else + if (mp4->itemListMap().contains(field)) { + const TagLib::StringList fieldlist = mp4->itemListMap()[field].toStringList(); ++#endif + list.no(fieldlist.size()); + FXint item=0; + for(TagLib::StringList::ConstIterator it = fieldlist.begin(); it != fieldlist.end(); it++) { +@@ -936,12 +993,21 @@ void GMFileTag::setDiscNumber(FXushort disc) { + else + id3v2_update_field("TPOS",FXString::null); + } ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ if (mp4) { ++ if (disc>0) ++ mp4->setItem("disk",TagLib::MP4::Item(disc,0)); ++ else ++ mp4->removeItem("disk"); ++ } ++#else + if (mp4) { + if (disc>0) + mp4->itemListMap().insert("disk",TagLib::MP4::Item(disc,0)); + else + mp4->itemListMap().erase("disk"); + } ++#endif + } + + +@@ -959,9 +1025,15 @@ FXushort GMFileTag::getDiscNumber() const{ + else if (id3v2 && id3v2_get_field("TPOS",disc)) { + return string_to_disc_number(disc); + } ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ else if (mp4 && mp4->contains("disk")) { ++ return FXMIN(mp4->item("disk").toIntPair().first,0xFFFF); ++ } ++#else + else if (mp4 && mp4->itemListMap().contains("disk")) { + return FXMIN(mp4->itemListMap()["disk"].toIntPair().first,0xFFFF); + } ++#endif + return 0; + } + +@@ -969,7 +1041,11 @@ FXint GMFileTag::getTime() const{ + FXASSERT(file); + TagLib::AudioProperties * properties = file->audioProperties(); + if (properties) ++#if TAGLIB_VERSION >= TAGVERSION(2,0,0) ++ return properties->lengthInSeconds(); ++#else + return properties->length(); ++#endif + else + return 0; + } +@@ -1007,7 +1083,11 @@ FXint GMFileTag::getSampleSize() const{ + FXASSERT(file); + TagLib::FLAC::File * flacfile = dynamic_cast<TagLib::FLAC::File*>(file); + if (flacfile && flacfile->audioProperties()) { ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ return flacfile->audioProperties()->bitsPerSample(); ++#else + return flacfile->audioProperties()->sampleWidth(); ++#endif + } + else + return 0; +@@ -1081,6 +1161,16 @@ GMCover * GMFileTag::getFrontCover() const { + #endif + } + else if (mp4) { /// MP4 ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ if (mp4->contains("covr")) { ++ TagLib::MP4::CoverArtList coverlist = mp4->item("covr").toCoverArtList(); ++ for(TagLib::MP4::CoverArtList::Iterator it = coverlist.begin(); it != coverlist.end(); it++) { ++ if (it->data().size()) ++ return new GMCover(it->data().data(),it->data().size()); ++ } ++ } ++ } ++#else + if (mp4->itemListMap().contains("covr")) { + TagLib::MP4::CoverArtList coverlist = mp4->itemListMap()["covr"].toCoverArtList(); + for(TagLib::MP4::CoverArtList::Iterator it = coverlist.begin(); it != coverlist.end(); it++) { +@@ -1089,6 +1179,7 @@ GMCover * GMFileTag::getFrontCover() const { + } + } + } ++#endif + return nullptr; + } + +@@ -1134,6 +1225,15 @@ FXint GMFileTag::getCovers(GMCoverList & covers) const { + } + } + else if (mp4) { ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ if (mp4->contains("covr")) { ++ TagLib::MP4::CoverArtList coverlist = mp4->item("covr").toCoverArtList(); ++ for(TagLib::MP4::CoverArtList::Iterator it = coverlist.begin(); it != coverlist.end(); it++) { ++ if (it->data().size()) ++ covers.append(new GMCover(it->data().data(),it->data().size(),0)); ++ } ++ } ++#else + if (mp4->itemListMap().contains("covr")) { + TagLib::MP4::CoverArtList coverlist = mp4->itemListMap()["covr"].toCoverArtList(); + for(TagLib::MP4::CoverArtList::Iterator it = coverlist.begin(); it != coverlist.end(); it++) { +@@ -1141,6 +1241,7 @@ FXint GMFileTag::getCovers(GMCoverList & covers) const { + covers.append(new GMCover(it->data().data(),it->data().size(),0)); + } + } ++#endif + } + return covers.no(); + } +@@ -1191,7 +1292,7 @@ void GMFileTag::replaceCover(GMCover*cover,FXuint mode){ + } + else if (mp4) { + // mp4 has no type information so we erase all +- mp4->itemListMap().erase("covr"); ++ clearCovers(); + } + } + else { // COVER_REPLACE_ALL +@@ -1216,7 +1317,11 @@ void GMFileTag::clearCovers() { + #endif + } + else if (mp4) { +- mp4->itemListMap().erase("covr"); ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ mp4->removeItem("covr"); ++#else ++ mp4->itemListMap().erase("covr"); ++#endif + } + } + +@@ -1303,6 +1408,18 @@ void GMFileTag::appendCover(GMCover* cover){ + case FILETYPE_GIF: format = TagLib::MP4::CoverArt::GIF; break; + default: return; break; + } ++#if TAGLIB_VERSION >= TAGVERSION(1,12,0) ++ if (!mp4->contains("covr")) { ++ TagLib::MP4::CoverArtList list; ++ list.append(TagLib::MP4::CoverArt(format,TagLib::ByteVector((const FXchar*)cover->data,cover->size))); ++ mp4->setItem("covr",list); ++ } ++ else { ++ TagLib::MP4::CoverArtList list = mp4->item("covr").toCoverArtList(); ++ list.append(TagLib::MP4::CoverArt(format,TagLib::ByteVector((const FXchar*)cover->data,cover->size))); ++ mp4->setItem("covr",list); ++ } ++#else + if (!mp4->itemListMap().contains("covr")) { + TagLib::MP4::CoverArtList list; + list.append(TagLib::MP4::CoverArt(format,TagLib::ByteVector((const FXchar*)cover->data,cover->size))); +@@ -1313,6 +1430,7 @@ void GMFileTag::appendCover(GMCover* cover){ + list.append(TagLib::MP4::CoverArt(format,TagLib::ByteVector((const FXchar*)cover->data,cover->size))); + mp4->itemListMap().insert("covr",list); + } ++#endif + } + } + +diff --git a/src/GMTag.h b/src/GMTag.h +index 26b76f2..1c5fd77 100644 +--- a/src/GMTag.h ++++ b/src/GMTag.h +@@ -21,6 +21,7 @@ + + + namespace TagLib { ++ class FileRef; + class File; + class Tag; + namespace MP4 { +@@ -54,6 +55,7 @@ typedef FXArray<GMCover*> GMCoverList; + + class GMFileTag { + protected: ++ TagLib::FileRef * fileref; + TagLib::File * file; + TagLib::Tag * tag; + TagLib::MP4::Tag * mp4; diff --git a/media-sound/gogglesmm/gogglesmm-1.2.1-r3.ebuild b/media-sound/gogglesmm/gogglesmm-1.2.1-r3.ebuild new file mode 100644 index 000000000000..37c4e7576662 --- /dev/null +++ b/media-sound/gogglesmm/gogglesmm-1.2.1-r3.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake xdg + +DESCRIPTION="Fast and light music player" +HOMEPAGE="https://gogglesmm.github.io" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+aac +dbus +flac +mad nls +ogg +opengl +opus +pulseaudio +vorbis" + +RDEPEND=" + dev-db/sqlite + dev-libs/expat + dev-libs/libgcrypt:= + media-libs/taglib:= + x11-libs/fox:1.7 + x11-libs/libICE + x11-libs/libSM + aac? ( media-libs/faad2 ) + dbus? ( sys-apps/dbus ) + flac? ( media-libs/flac:= ) + mad? ( media-libs/libmad ) + ogg? ( media-libs/libogg ) + opengl? ( + media-libs/libepoxy + virtual/glu + ) + opus? ( media-libs/opus ) + pulseaudio? ( media-libs/libpulse ) + vorbis? ( media-libs/libvorbis ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/"${P}"-use-fox-1.7.67.patch + "${FILESDIR}"/"${P}"-fix-build-taglib2.patch +) + +src_configure() { + local mycmakeargs=( + -DWITH_DBUS="$(usex dbus)" + -DWITH_NLS="$(usex nls)" + -DWITH_OPENGL="$(usex opengl)" + -DWITH_CFOX=OFF + ) + cmake_src_configure +} |