audio/gogglesmm: Fix build with FOX 1.7.80
While here, remove stale KDE patch.
This commit is contained in:
parent
4353779b92
commit
3bfe839f23
@ -1,6 +1,6 @@
|
||||
PORTNAME= gogglesmm
|
||||
PORTVERSION= 1.2.2
|
||||
PORTREVISION= 8
|
||||
PORTREVISION= 9
|
||||
CATEGORIES= audio
|
||||
|
||||
MAINTAINER= jhale@FreeBSD.org
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- 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()
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
# 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
|
||||
@ -31,9 +31,9 @@
|
||||
|
||||
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)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- 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)
|
||||
|
40
audio/gogglesmm/files/patch-gap_fox.h
Normal file
40
audio/gogglesmm/files/patch-gap_fox.h
Normal file
@ -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 <fxdefs.h>
|
||||
+#if FOXVERSION >= FXVERSION(1, 7, 80)
|
||||
+#include <fxchar.h>
|
||||
+#endif
|
||||
#include <fxendian.h>
|
||||
#include <fxascii.h>
|
||||
#include <fxunicode.h>
|
||||
@@ -121,6 +124,25 @@ constexpr FXTime operator"" _ms(unsigned long long int
|
||||
{
|
||||
return value * NANOSECONDS_PER_MILLISECOND;
|
||||
}
|
||||
+
|
||||
+#if FOXVERSION >= FXVERSION(1, 7, 80)
|
||||
+#include <utility>
|
||||
+#define FX_ALIAS_SPEC(SPECS, NEW_NAME, ...) \
|
||||
+ template <typename... Args> \
|
||||
+ SPECS auto NEW_NAME(Args &&... args) \
|
||||
+ noexcept(noexcept(__VA_ARGS__(std::forward<Args>(args)...))) \
|
||||
+ -> decltype(__VA_ARGS__(std::forward<Args>(args)...)) { \
|
||||
+ return __VA_ARGS__(std::forward<Args>(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
|
||||
|
40
audio/gogglesmm/files/patch-src_GMFilename.cpp
Normal file
40
audio/gogglesmm/files/patch-src_GMFilename.cpp
Normal file
@ -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;j<dcm.length();j+=dcm.inc(j)) {
|
||||
if (Unicode::isPrint(dcm.wc(j)) && codec->wc2mb(&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;j<dcm.length();j+=dcm.inc(j)) {
|
||||
if (Unicode::isPrint(dcm.wc(j)) && codec->wc2mb(&c,1,dcm.wc(j)) && c!=undefined_character) {
|
||||
dst[n++]=c;
|
16
audio/gogglesmm/files/patch-src_GMIconTheme.cpp
Normal file
16
audio/gogglesmm/files/patch-src_GMIconTheme.cpp
Normal file
@ -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);
|
16
audio/gogglesmm/files/patch-src_GMIconTheme.h
Normal file
16
audio/gogglesmm/files/patch-src_GMIconTheme.h
Normal file
@ -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();
|
@ -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
|
@ -1,6 +1,6 @@
|
||||
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() {
|
||||
|
||||
@ -23,7 +23,7 @@ Add pseudo transparency to the tray icon
|
||||
icon->create();
|
||||
|
||||
// Mark Dirty
|
||||
@@ -230,13 +230,8 @@ void GMTrayIcon::create(){
|
||||
@@ -230,14 +230,9 @@ void GMTrayIcon::dock() {
|
||||
|
||||
void GMTrayIcon::dock() {
|
||||
if (findSystemTray()){
|
||||
@ -34,12 +34,13 @@ Add pseudo transparency to the tray icon
|
||||
- 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) {
|
||||
|
32
audio/gogglesmm/files/patch-src_gmdefs.h
Normal file
32
audio/gogglesmm/files/patch-src_gmdefs.h
Normal file
@ -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 <utility>
|
||||
+#define FX_ALIAS_SPEC(SPECS, NEW_NAME, ...) \
|
||||
+ template <typename... Args> \
|
||||
+ SPECS auto NEW_NAME(Args &&... args) \
|
||||
+ noexcept(noexcept(__VA_ARGS__(std::forward<Args>(args)...))) \
|
||||
+ -> decltype(__VA_ARGS__(std::forward<Args>(args)...)) { \
|
||||
+ return __VA_ARGS__(std::forward<Args>(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
|
||||
|
Loading…
Reference in New Issue
Block a user