diff --git a/audio/gogglesmm/Makefile b/audio/gogglesmm/Makefile index 7a166f883516..d54e0476509d 100644 --- a/audio/gogglesmm/Makefile +++ b/audio/gogglesmm/Makefile @@ -1,110 +1,110 @@ PORTNAME= gogglesmm PORTVERSION= 1.2.2 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= audio MAINTAINER= jhale@FreeBSD.org COMMENT= Music collection manager and player WWW= https://gogglesmm.github.io/ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING BROKEN_powerpc64= fails to compile: ap_mad.cpp:358:2: \#error fixme LIB_DEPENDS= libtag.so:audio/taglib \ libexpat.so:textproc/expat2 \ libFOX-1.7.so:x11-toolkits/fox17 USES= cmake compiler:c++11-lib desktop-file-utils gnome \ localbase:ldflags pkgconfig sqlite xorg USE_GITHUB= yes USE_XORG= ice sm x11 CMAKE_OFF= WITH_CFOX WITH_IMPORT PORTDOCS= AUTHORS ChangeLog README OPTIONS_DEFINE= A52 ALSA DBUS DCA DOCS FAAD FLAC MAD NLS \ OGG OPENGL OPUS PULSEAUDIO SNDIO ZLIB OPTIONS_RADIO= SSL VORBISDEC OPTIONS_RADIO_SSL= GCRYPT GNUTLS OPENSSL VORBISDEC_DESC= Vorbis decoder library OPTIONS_RADIO_VORBISDEC= TREMOR VORBIS OPTIONS_DEFAULT= DBUS FAAD FLAC MAD OGG OPENGL OPENSSL OPUS VORBIS ZLIB OPTIONS_SUB= yes A52_LIB_DEPENDS= liba52.so:audio/liba52 A52_CMAKE_BOOL= WITH_A52 ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_CMAKE_BOOL= WITH_ALSA DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DBUS_CMAKE_BOOL= WITH_DBUS DCA_LIB_DEPENDS= libdca.so:multimedia/libdca DCA_CMAKE_BOOL= WITH_DCA FAAD_LIB_DEPENDS= libfaad.so:audio/faad FAAD_CMAKE_BOOL= WITH_FAAD FLAC_LIB_DEPENDS= libFLAC.so:audio/flac FLAC_CMAKE_BOOL= WITH_FLAC FLAC_IMPLIES= OGG GCRYPT_DESC= MD5 calculation via libgcrypt (no https) GCRYPT_LIB_DEPENDS= libgcrypt.so:security/libgcrypt GCRYPT_CMAKE_BOOL= WITH_GCRYPT GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls GNUTLS_CMAKE_BOOL= WITH_GNUTLS MAD_LIB_DEPENDS= libmad.so:audio/libmad MAD_CMAKE_BOOL= WITH_MAD NLS_USES= gettext NLS_CMAKE_BOOL= WITH_NLS OGG_LIB_DEPENDS= libogg.so:audio/libogg OGG_CMAKE_BOOL= WITH_OGG OPENGL_LIB_DEPENDS= libepoxy.so:graphics/libepoxy OPENGL_USES= gl OPENGL_USE= GL=gl,glu OPENGL_CMAKE_BOOL= WITH_OPENGL OPENSSL_USES= ssl OPENSSL_CMAKE_BOOL= WITH_OPENSSL OPUS_LIB_DEPENDS= libopus.so:audio/opus OPUS_CMAKE_BOOL= WITH_OPUS OPUS_IMPLIES= OGG PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_CMAKE_BOOL= WITH_PULSE SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_CMAKE_BOOL= WITH_SNDIO TREMOR_LIB_DEPENDS= libvorbisidec.so:audio/libtremor TREMOR_CMAKE_BOOL= WITH_TREMOR TREMOR_IMPLIES= OGG VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis VORBIS_CMAKE_BOOL= WITH_VORBIS VORBIS_IMPLIES= OGG ZLIB_CMAKE_BOOL= WITH_ZLIB .include .if ${PORT_OPTIONS:MOGG} && !${PORT_OPTIONS:MTREMOR} && !${PORT_OPTIONS:MVORBIS} IGNORE= you have selected an option that requires a Vorbis decoder. Run 'make config' and select one .endif post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .include diff --git a/audio/gogglesmm/files/patch-CMakeLists.txt b/audio/gogglesmm/files/patch-CMakeLists.txt index d14109c8ce17..73376258ab1c 100644 --- a/audio/gogglesmm/files/patch-CMakeLists.txt +++ b/audio/gogglesmm/files/patch-CMakeLists.txt @@ -1,42 +1,42 @@ ---- CMakeLists.txt.orig 2017-06-10 02:18:06 UTC +--- CMakeLists.txt.orig 2020-12-27 21:40:54 UTC +++ CMakeLists.txt -@@ -57,6 +57,11 @@ if(HAS_CXX_OPTIMIZE_DEBUG AND CMAKE_BUILD_TYPE MATCHES +@@ -67,6 +67,11 @@ endif() add_compile_options(-Og) endif() +CHECK_CXX_COMPILER_FLAG(-Wno-inconsistent-missing-override HAS_CXX_NOOVERRIDE) +if(HAS_CXX_NOOVERRIDE AND NOT CMAKE_BUILD_TYPE MATCHES Debug) + add_compile_options(-Wno-inconsistent-missing-override) +endif() + # FIXME Doesn't work on all platforms. #CHECK_CXX_COMPILER_FLAG(-flto HAS_CXX_OPTIMIZE_LINKTIME) if(HAS_CXX_OPTIMIZE_LINKTIME AND NOT CMAKE_BUILD_TYPE MATCHES Debug) -@@ -81,11 +86,13 @@ add_subdirectory(src) +@@ -100,11 +105,13 @@ add_subdirectory(src) #------------------------------------------------------------------------------- # Extra Installation Files -install(PROGRAMS extra/import_banshee_stats.py - extra/import_gogglesmm12.py - extra/import_gogglesmm12_stats.py - DESTINATION - share/gogglesmm) +if(WITH_IMPORT) + install(PROGRAMS extra/import_banshee_stats.py + extra/import_gogglesmm12.py + extra/import_gogglesmm12_stats.py + DESTINATION + share/gogglesmm) +endif() install(FILES icons/gogglesmm_16.png DESTINATION share/icons/hicolor/16x16/apps RENAME gogglesmm.png) install(FILES extra/gogglesmm_22.png DESTINATION share/icons/hicolor/22x22/apps RENAME gogglesmm.png) -@@ -96,7 +103,7 @@ install(FILES extra/gogglesmm_64.png DESTINATION share +@@ -115,7 +122,7 @@ install(FILES extra/gogglesmm.desktop DESTINATION shar install(FILES extra/gogglesmm.svg DESTINATION share/icons/hicolor/scalable/apps RENAME gogglesmm.svg) - install(FILES extra/gogglesmm.appdata.xml DESTINATION share/appdata) + install(FILES extra/gogglesmm.appdata.xml DESTINATION share/metainfo) install(FILES extra/gogglesmm.desktop DESTINATION share/applications) -install(FILES extra/gogglesmm.1 DESTINATION share/man/man1) +install(FILES extra/gogglesmm.1 DESTINATION man/man1) # Install translations when native language support has been enabled if(WITH_NLS) diff --git a/audio/gogglesmm/files/patch-gap_CMakeLists.txt b/audio/gogglesmm/files/patch-gap_CMakeLists.txt index 35f8b2c7aef5..d295beae7774 100644 --- a/audio/gogglesmm/files/patch-gap_CMakeLists.txt +++ b/audio/gogglesmm/files/patch-gap_CMakeLists.txt @@ -1,11 +1,11 @@ ---- gap/CMakeLists.txt.orig 2017-02-08 01:48:39 UTC +--- gap/CMakeLists.txt.orig 2020-12-27 21:40:54 UTC +++ gap/CMakeLists.txt -@@ -215,7 +215,7 @@ else() +@@ -242,7 +242,7 @@ else() endif() if(WITH_OPENSSL) - pkg_check_modules(OPENSSL openssl>=1.0.1) + find_package(OpenSSL 1.0.1) elseif(WITH_GNUTLS) pkg_check_modules(GNUTLS gnutls>=3.4.0) elseif(WITH_GCRYPT) diff --git a/audio/gogglesmm/files/patch-gap_fox.h b/audio/gogglesmm/files/patch-gap_fox.h new file mode 100644 index 000000000000..c9d375c0b72a --- /dev/null +++ b/audio/gogglesmm/files/patch-gap_fox.h @@ -0,0 +1,40 @@ +Fix build with FOX 1.7.80 + +--- gap/fox.h.orig 2020-12-27 21:40:54 UTC ++++ gap/fox.h +@@ -35,6 +35,9 @@ + #define FXVERSION(major,minor,release) ((release)+(minor*1000)+(major*100000)) + + #include ++#if FOXVERSION >= FXVERSION(1, 7, 80) ++#include ++#endif + #include + #include + #include +@@ -121,6 +124,25 @@ constexpr FXTime operator"" _ms(unsigned long long int + { + return value * NANOSECONDS_PER_MILLISECOND; + } ++ ++#if FOXVERSION >= FXVERSION(1, 7, 80) ++#include ++#define FX_ALIAS_SPEC(SPECS, NEW_NAME, ...) \ ++ template \ ++ SPECS auto NEW_NAME(Args &&... args) \ ++ noexcept(noexcept(__VA_ARGS__(std::forward(args)...))) \ ++ -> decltype(__VA_ARGS__(std::forward(args)...)) { \ ++ return __VA_ARGS__(std::forward(args)...); \ ++ } ++ ++#define FX_ALIAS(NEW_NAME, ...) \ ++ FX_ALIAS_SPEC(inline, NEW_NAME, __VA_ARGS__) ++ ++FX_ALIAS(compare, FXString::compare) ++FX_ALIAS(comparecase, FXString::comparecase) ++FX_ALIAS(compareversion, FXString::comparenatural) ++#define FXISFOLLOWUTF8 followUTF8 ++#endif + + #endif + diff --git a/audio/gogglesmm/files/patch-src_GMFilename.cpp b/audio/gogglesmm/files/patch-src_GMFilename.cpp new file mode 100644 index 000000000000..96f978ded968 --- /dev/null +++ b/audio/gogglesmm/files/patch-src_GMFilename.cpp @@ -0,0 +1,40 @@ +Fix build with FOX 1.7.80 + +--- src/GMFilename.cpp.orig 2022-10-28 03:22:22 UTC ++++ src/GMFilename.cpp +@@ -102,7 +102,11 @@ FXString TextConverter::apply_filters(const FXString & + else if (modifiers&UPPERCASE) + n+=wc2utf(Unicode::toUpper(src.wc(i))); + else ++#if FOXVERSION >= FXVERSION(1,7, 80) ++ n+=lenUTF8(src[i]); ++#else + n+=src.extent(i); ++#endif + } + } + +@@ -167,7 +171,11 @@ FXString TextConverter::apply_codec(const FXString & s + else if (Unicode::isPrint(src.wc(i))) { + if (codec->wc2mb(&c,1,src.wc(i))==1) { + if (c==undefined_character) { ++#if FOXVERSION >= FXVERSION(1,7,80) ++ FXString dcm = FXString::decompose(src.mid(i,lenUTF8(src[i])),false); ++#else + FXString dcm = FXString::decompose(src.mid(i,src.extent(i)),false); ++#endif + for (FXint j=0;jwc2mb(&c,1,dcm.wc(j)) && c!=0x1a) { + n++; +@@ -190,7 +198,11 @@ FXString TextConverter::apply_codec(const FXString & s + if (c==undefined_character) { + /* If codec didn't contain a mapping to the required character, + do a compatibility decomposition and try mapping those */ ++#if FOXVERSION >= FXVERSION(1,7,80) ++ FXString dcm = FXString::decompose(src.mid(i,lenUTF8(src[i])),false); ++#else + FXString dcm = FXString::decompose(src.mid(i,src.extent(i)),false); ++#endif + for (FXint j=0;jwc2mb(&c,1,dcm.wc(j)) && c!=undefined_character) { + dst[n++]=c; diff --git a/audio/gogglesmm/files/patch-src_GMIconTheme.cpp b/audio/gogglesmm/files/patch-src_GMIconTheme.cpp new file mode 100644 index 000000000000..72d2d976b545 --- /dev/null +++ b/audio/gogglesmm/files/patch-src_GMIconTheme.cpp @@ -0,0 +1,16 @@ +Fix build with FOX 1.7.80 + +--- src/GMIconTheme.cpp.orig 2022-10-28 03:25:41 UTC ++++ src/GMIconTheme.cpp +@@ -569,7 +569,11 @@ void GMIconTheme::loadLarge(FXIconPtr & icon,const FXc + loadIcon(icon,FXString::null,largesize,value,blendcolor); + } + ++#if FOXVERSION >= FXVERSION(1, 7, 80) ++void GMIconTheme::loadResource(FXIconPtr & icon,const FXuchar * data,const FXColor blendcolor,const char * type) { ++#else + void GMIconTheme::loadResource(FXIconPtr & icon,const void * data,const FXColor blendcolor,const char * type) { ++#endif + FXIconSource source; + FXIcon * newicon = source.loadIconData(app,data,type); + FXASSERT(newicon); diff --git a/audio/gogglesmm/files/patch-src_GMIconTheme.h b/audio/gogglesmm/files/patch-src_GMIconTheme.h new file mode 100644 index 000000000000..09f947bb85f3 --- /dev/null +++ b/audio/gogglesmm/files/patch-src_GMIconTheme.h @@ -0,0 +1,16 @@ +Fix build with FOX 1.7.80 + +--- src/GMIconTheme.h.orig 2022-10-28 03:25:54 UTC ++++ src/GMIconTheme.h +@@ -47,7 +47,11 @@ class GMIconTheme { (protected) + FXImage * loadImage(const FXString & filename); + protected: + void loadIcon(FXIconPtr & icon,const FXString &pathlist,FXint size,const char * value,const FXColor blend); ++#if FOXVERSION >= FXVERSION(1, 7, 80) ++ void loadResource(FXIconPtr & icon,const FXuchar * data,const FXColor blend,const char * type="png"); ++#else + void loadResource(FXIconPtr & icon,const void * data,const FXColor blend,const char * type="png"); ++#endif + protected: + FXbool load_cache(); + void save_cache(); diff --git a/audio/gogglesmm/files/patch-src_GMPlayerManager.cpp b/audio/gogglesmm/files/patch-src_GMPlayerManager.cpp deleted file mode 100644 index 56fe89851954..000000000000 --- a/audio/gogglesmm/files/patch-src_GMPlayerManager.cpp +++ /dev/null @@ -1,14 +0,0 @@ -Re-enable tray icon for KDE4 until KDE5 is in the ports tree. Mpris plugin -works, but tray icon might be wanted to minimize app in the time being. - ---- src/GMPlayerManager.cpp.orig 2017-06-10 02:18:06 UTC -+++ src/GMPlayerManager.cpp -@@ -757,7 +757,7 @@ FXint GMPlayerManager::run(int& argc,cha - // KDE5 comes with mpris plugin on the toolbar, no need for - // tray icon - if (gm_desktop_session()==DESKTOP_SESSION_KDE_PLASMA) { -- preferences.gui_tray_icon_disabled=true; -+ preferences.gui_tray_icon_disabled=false; - } - - /// Grab Media Player Keys diff --git a/audio/gogglesmm/files/patch-src_GMTrayIcon.cpp b/audio/gogglesmm/files/patch-src_GMTrayIcon.cpp index 27d690c3ebc0..9f924409a7ea 100644 --- a/audio/gogglesmm/files/patch-src_GMTrayIcon.cpp +++ b/audio/gogglesmm/files/patch-src_GMTrayIcon.cpp @@ -1,61 +1,62 @@ Add pseudo transparency to the tray icon ---- src/GMTrayIcon.cpp.orig 2016-10-22 17:13:46 UTC +--- src/GMTrayIcon.cpp.orig 2020-12-27 21:40:54 UTC +++ src/GMTrayIcon.cpp @@ -81,17 +81,17 @@ void GMTrayIcon::updateIcon() { /// Update if (size<=16) { - icon = new FXPNGIcon(getApp(),gogglesmm_16_png,0,opaque ? IMAGE_OPAQUE : 0); + icon = new FXPNGIcon(getApp(),gogglesmm_16_png,0,IMAGE_ALPHAGUESS); icon->setVisual(getVisual()); if (size!=16) icon->scale(size,size,FOX_SCALE_BEST); } else { - icon = new FXPNGIcon(getApp(),gogglesmm_32_png,0,opaque ? IMAGE_OPAQUE : 0); + icon = new FXPNGIcon(getApp(),gogglesmm_32_png,0,IMAGE_ALPHAGUESS); icon->setVisual(getVisual()); if (size!=32) icon->scale(size,size,FOX_SCALE_BEST); } - icon->blend(GMPlayerManager::instance()->getPreferences().gui_tray_color); + //icon->blend(GMPlayerManager::instance()->getPreferences().gui_tray_color); icon->create(); // Mark Dirty -@@ -230,13 +230,8 @@ void GMTrayIcon::create(){ +@@ -230,14 +230,9 @@ void GMTrayIcon::dock() { void GMTrayIcon::dock() { if (findSystemTray()){ - FXuint trayid = getTrayVisual(); - if (trayid) { - if (trayid!=XVisualIDFromVisual((Visual*)getVisual()->getVisual())) - opaque=true; - else - opaque=false; - } -+ -+ opaque=false; ++ opaque=false; ++ if (!opaque) { /// Don't draw the background -@@ -276,16 +271,16 @@ long GMTrayIcon::onConfigure(FXObject*,F + XSetWindowAttributes sattr; +@@ -276,16 +271,16 @@ long GMTrayIcon::onConfigure(FXObject*,FXSelector,void if (icon==nullptr) { if (size<=16) { - icon = new FXPNGIcon(getApp(),gogglesmm_16_png,0,opaque ? IMAGE_OPAQUE : 0); + icon = new FXPNGIcon(getApp(),gogglesmm_16_png,0,IMAGE_ALPHAGUESS); icon->setVisual(getVisual()); if (size!=16) icon->scale(size,size,FOX_SCALE_BEST); } else { - icon = new FXPNGIcon(getApp(),gogglesmm_32_png,0,opaque ? IMAGE_OPAQUE : 0); + icon = new FXPNGIcon(getApp(),gogglesmm_32_png,0,IMAGE_ALPHAGUESS); icon->setVisual(getVisual()); if (size!=32) icon->scale(size,size,FOX_SCALE_BEST); } - icon->blend(GMPlayerManager::instance()->getPreferences().gui_tray_color); + //icon->blend(GMPlayerManager::instance()->getPreferences().gui_tray_color); icon->create(); } return 1; diff --git a/audio/gogglesmm/files/patch-src_gmdefs.h b/audio/gogglesmm/files/patch-src_gmdefs.h new file mode 100644 index 000000000000..20e946110452 --- /dev/null +++ b/audio/gogglesmm/files/patch-src_gmdefs.h @@ -0,0 +1,32 @@ +Fix build with FOX 1.7.80 + +--- src/gmdefs.h.orig 2020-12-27 21:40:54 UTC ++++ src/gmdefs.h +@@ -93,5 +93,27 @@ extern const FXchar * fxtr(const FXchar *) FX_FORMAT(1 + // Best Image Scaler in FXImage + #define FOX_SCALE_BEST 2 + ++#if FOXVERSION >= FXVERSION(1, 7, 80) ++#include ++#define FX_ALIAS_SPEC(SPECS, NEW_NAME, ...) \ ++ template \ ++ SPECS auto NEW_NAME(Args &&... args) \ ++ noexcept(noexcept(__VA_ARGS__(std::forward(args)...))) \ ++ -> decltype(__VA_ARGS__(std::forward(args)...)) { \ ++ return __VA_ARGS__(std::forward(args)...); \ ++ } ++ ++#define FX_ALIAS(NEW_NAME, ...) \ ++ FX_ALIAS_SPEC(inline, NEW_NAME, __VA_ARGS__) ++ ++FX_ALIAS(compare, FXString::compare) ++FX_ALIAS(comparecase, FXString::comparecase) ++FX_ALIAS(compareversion, FXString::comparenatural) ++#define FXISFOLLOWUTF8 followUTF8 ++#define FXISLEADUTF16 leadUTF16 ++#define FXISFOLLOWUTF16 followUTF16 ++#define FXISSEQUTF16 seqUTF16 ++#endif ++ + #endif +