aboutsummaryrefslogtreecommitdiff
path: root/games/slade
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2018-12-13 16:30:37 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2018-12-13 16:30:37 +0000
commit8b702f0de08fdfaf258452558e4c7645c4b4db18 (patch)
treeeb82edcace3bf9dc4d6c29d485061a18f1539f15 /games/slade
parent726e688e81c854504ba281844d2d4b99ae8796ab (diff)
downloadports-8b702f0de08fdfaf258452558e4c7645c4b4db18.tar.gz
ports-8b702f0de08fdfaf258452558e4c7645c4b4db18.zip
Notes
Diffstat (limited to 'games/slade')
-rw-r--r--games/slade/Makefile15
-rw-r--r--games/slade/distinfo6
-rw-r--r--games/slade/files/patch-src_CMakeLists.txt46
-rw-r--r--games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.cpp140
-rw-r--r--games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.h18
5 files changed, 120 insertions, 105 deletions
diff --git a/games/slade/Makefile b/games/slade/Makefile
index fadeb4a6703e..cd40708f775b 100644
--- a/games/slade/Makefile
+++ b/games/slade/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= slade
-PORTVERSION= 3.1.1.5
-PORTREVISION= 5
+PORTVERSION= 3.1.3
CATEGORIES= games
MAINTAINER= danfe@FreeBSD.org
@@ -25,7 +24,13 @@ USE_WX= 3.0+
USE_GL= glew
USE_CXXSTD= c++11
-PLIST_FILES= bin/slade share/slade3/slade.pk3
+CMAKE_ARGS= -DwxWidgets_CONFIG_EXECUTABLE:FILEPATH="${WX_CONFIG}" \
+ -DWX_GTK3:BOOL=OFF -DNO_WEBVIEW:BOOL=ON
+
+PLIST_FILES= bin/slade share/slade3/slade.pk3 \
+ share/appdata/net.mancubus.SLADE.appdata.xml \
+ share/applications/net.mancubus.SLADE.desktop \
+ share/icons/net.mancubus.SLADE.png
OPTIONS_DEFINE= FLUIDSYNTH
OPTIONS_DEFAULT= FLUIDSYNTH
@@ -38,5 +43,9 @@ post-patch:
@${REINPLACE_CMD} -e 's,"alsa","oss", ; \
/share\/sounds\/sf2/s,/usr,${LOCALBASE},g' \
${WRKSRC}/src/Audio/MIDIPlayer.cpp
+ @${REINPLACE_CMD} -e 's,OpenBSD,${OPSYS},' \
+ ${WRKSRC}/src/External/zreaders/portable_endian.h
+ @${REINPLACE_CMD} -e 's,wxVSCROLL,static_cast<long>(&),' \
+ ${WRKSRC}/src/MapEditor/UI/Dialogs/ActionSpecialDialog.cpp
.include <bsd.port.mk>
diff --git a/games/slade/distinfo b/games/slade/distinfo
index f0e6a547850e..03c67dbdf601 100644
--- a/games/slade/distinfo
+++ b/games/slade/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1484663152
-SHA256 (sirjuddington-SLADE-3.1.1.5_GH0.tar.gz) = 1b1c9e8267d8749f6087297ec629d1ca81777bb1b74e51853508a570e4368e2a
-SIZE (sirjuddington-SLADE-3.1.1.5_GH0.tar.gz) = 4385905
+TIMESTAMP = 1544256590
+SHA256 (sirjuddington-SLADE-3.1.3_GH0.tar.gz) = caa5027dfed00b7faf6ef783e84d04bd018816223e002e6eeca2f7ccaeac91f5
+SIZE (sirjuddington-SLADE-3.1.3_GH0.tar.gz) = 5887853
diff --git a/games/slade/files/patch-src_CMakeLists.txt b/games/slade/files/patch-src_CMakeLists.txt
index 3f08cb8597b4..3a45e417e119 100644
--- a/games/slade/files/patch-src_CMakeLists.txt
+++ b/games/slade/files/patch-src_CMakeLists.txt
@@ -1,27 +1,33 @@
---- src/CMakeLists.txt.orig 2015-12-12 08:41:35 UTC
+--- src/CMakeLists.txt.orig 2018-11-25 00:21:04 UTC
+++ src/CMakeLists.txt
-@@ -6,6 +6,14 @@ find_package(wxWidgets 3.0 COMPONENTS st
- endif (USE_WEBVIEW_STARTPAGE)
- include(${wxWidgets_USE_FILE})
+@@ -16,7 +16,11 @@ unset(WITH_WXPATH CACHE)
+ set( CL_WX_CONFIG wx-config )
+ if (UNIX OR MINGW)
+- execute_process(COMMAND which ${CL_WX_CONFIG} OUTPUT_VARIABLE WX_TOOL OUTPUT_STRIP_TRAILING_WHITESPACE)
++ if(NOT wxWidgets_CONFIG_EXECUTABLE)
++ execute_process(COMMAND which ${CL_WX_CONFIG} OUTPUT_VARIABLE WX_TOOL OUTPUT_STRIP_TRAILING_WHITESPACE)
++ else()
++ set(WX_TOOL ${wxWidgets_CONFIG_EXECUTABLE})
++ endif()
+ if (NOT WX_TOOL)
+ message(FATAL_ERROR
+ "\nNo functional wx_config script was found in your PATH.\nIs the wxWidgets development package installed?\nIf you built wxWidgets yourself, you can specify the path to your built wx-config executable via WITH_WXPATH\neg. -DWITH_WXPATH=\"/path/to/wx-config/\""
+@@ -52,7 +54,16 @@ if (WX_GTK3)
+ set(wxWidgets_CONFIG_OPTIONS --toolkit=gtk3)
+ endif (WX_GTK3)
+
+-SET(WX_LIBS std aui gl stc richtext propgrid media)
+# Work around find_package(wxWidgets...) inability to detect absence of some
+# optional components (e.g., media)
+find_library(WX_MEDIA wx_gtk2u_media-3.0)
+if (NOT WX_MEDIA)
-+ message(STATUS "wx_gtk2u_media-3.0 not found, removing from wxWidgets_LIBRARIES.")
-+ list(REMOVE_ITEM wxWidgets_LIBRARIES -lwx_gtk2u_media-3.0)
-+endif(NOT WX_MEDIA)
++ message(STATUS "wx_gtk2u_media-3.0 not found, building without MP3 playback support.")
++else (WX_MEDIA)
++ SET(WX_LIBS ${WX_LIBS} media)
++endif ()
+
- if (USE_SFML_RENDERWINDOW)
- set(SFML_FIND_COMPONENTS system audio window graphics)
- ADD_DEFINITIONS(-DUSE_SFML_RENDERWINDOW)
-@@ -57,7 +65,8 @@ endif()
- if(NOT ${GLEW_FOUND})
- message(SEND_ERROR "GLEW required.")
- endif()
--include_directories(${FREEIMAGE_INCLUDE_DIR} ${SFML_INCLUDE_DIR} ${FTGL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ${GTK2_INCLUDE_DIRS} . ./External/dumb ./Application)
-+# Put local `dumb' directory first to avoid conflict with `audio/dumb' port
-+include_directories(External/dumb ${FREEIMAGE_INCLUDE_DIR} ${SFML_INCLUDE_DIR} ${FTGL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ${GTK2_INCLUDE_DIRS} . Application)
-
- if (NOT NO_FLUIDSYNTH)
- include_directories(${FLUIDSYNTH_INCLUDE_DIR})
++SET(WX_LIBS std aui gl stc richtext propgrid ${WX_LIBS})
+ if (NO_WEBVIEW)
+ SET(WX_LIBS ${WX_LIBS} html)
+ else (NO_WEBVIEW)
diff --git a/games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.cpp b/games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.cpp
index 432fec246577..6917cddc2bb4 100644
--- a/games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.cpp
+++ b/games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.cpp
@@ -1,52 +1,52 @@
---- src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp.orig 2016-02-28 02:57:06 UTC
+--- src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp.orig 2018-11-25 00:21:04 UTC
+++ src/MainEditor/UI/EntryPanel/AudioEntryPanel.cpp
-@@ -100,15 +100,17 @@ AudioEntryPanel::AudioEntryPanel(wxWindo
+@@ -93,15 +93,17 @@ AudioEntryPanel::AudioEntryPanel(wxWindow* parent) :
LOG_MESSAGE(3, "Windows Media Player installed, using wxMediaCtrl");
- media_ctrl = new wxMediaCtrl(this, -1);
+ media_ctrl_ = new wxMediaCtrl(this, -1);
}
-#else
+#elif wxUSE_MEDIACTRL
// Create wxMediaCtrl
- media_ctrl = new wxMediaCtrl(this, -1);
+ media_ctrl_ = new wxMediaCtrl(this, -1);
+#else
+ LOG_MESSAGE(1, "wxWidgets is built without media support, MP3 playback disabled.");
#endif
// Setup sizer
- wxGridBagSizer* sizer_gb = new wxGridBagSizer(4, 4);
- sizer_main->AddStretchSpacer();
+ wxGridBagSizer* sizer_gb = new wxGridBagSizer(UI::pad(), UI::pad());
+ sizer_main_->AddStretchSpacer();
-#ifndef __WXOSX__
+#if wxUSE_MEDIACTRL && !defined(__WXOSX__)
- if (media_ctrl) sizer_main->Add(media_ctrl, 0);
+ if (media_ctrl_) sizer_main_->Add(media_ctrl_, 0);
#endif
- sizer_main->Add(sizer_gb, 0, wxALIGN_CENTER);
-@@ -155,13 +157,17 @@ AudioEntryPanel::AudioEntryPanel(wxWindo
- sound->setVolume(snd_volume);
- music->setVolume(snd_volume);
+ sizer_main_->Add(sizer_gb, 0, wxALIGN_CENTER);
+@@ -163,13 +165,17 @@ AudioEntryPanel::AudioEntryPanel(wxWindow* parent) :
+ sound_->setVolume(snd_volume);
+ music_->setVolume(snd_volume);
theMIDIPlayer->setVolume(snd_volume);
+#if wxUSE_MEDIACTRL
- if (media_ctrl) media_ctrl->SetVolume(snd_volume*0.01);
+ if (media_ctrl_) media_ctrl_->SetVolume(snd_volume*0.01);
+#endif
- mod->setVolume(snd_volume);
+ mod_->setVolume(snd_volume);
//theGMEPlayer->setVolume(snd_volume);
//theOPLPlayer->setVolume(snd_volume);
// Disable general entrypanel buttons
+#if wxUSE_MEDIACTRL
- if (media_ctrl) media_ctrl->Show(false);
+ if (media_ctrl_) media_ctrl_->Show(false);
+#endif
- toolbar->Show(false);
+ toolbar_->Show(false);
// Bind events
-@@ -513,6 +519,7 @@ bool AudioEntryPanel::openMod(MemChunk&
- *******************************************************************/
+@@ -533,6 +539,7 @@ bool AudioEntryPanel::openMod(MemChunk& data)
+ // ----------------------------------------------------------------------------
bool AudioEntryPanel::openMedia(string filename)
{
+#if wxUSE_MEDIACTRL
// Attempt to open with wxMediaCtrl
- if (media_ctrl && media_ctrl->Load(filename))
+ if (media_ctrl_ && media_ctrl_->Load(filename))
{
-@@ -527,6 +534,7 @@ bool AudioEntryPanel::openMedia(string f
+@@ -547,6 +554,7 @@ bool AudioEntryPanel::openMedia(string filename)
return true;
}
@@ -54,79 +54,79 @@
return false;
}
-@@ -549,8 +557,10 @@ void AudioEntryPanel::startStream()
- mod->play(); break;
- case AUTYPE_MIDI:
+@@ -571,8 +579,10 @@ void AudioEntryPanel::startStream()
+ mod_->play(); break;
+ case MIDI:
theMIDIPlayer->play(); break;
+#if wxUSE_MEDIACTRL
- case AUTYPE_MEDIA:
- if (media_ctrl) media_ctrl->Play(); break;
+ case Media:
+ if (media_ctrl_) media_ctrl_->Play(); break;
+#endif
+ default:
+ break;
}
- }
-
-@@ -569,8 +579,10 @@ void AudioEntryPanel::stopStream()
- mod->pause(); break;
- case AUTYPE_MIDI:
+@@ -595,8 +605,10 @@ void AudioEntryPanel::stopStream()
+ mod_->pause(); break;
+ case MIDI:
theMIDIPlayer->pause(); break;
+#if wxUSE_MEDIACTRL
- case AUTYPE_MEDIA:
- if (media_ctrl) media_ctrl->Pause(); break;
+ case Media:
+ if (media_ctrl_) media_ctrl_->Pause(); break;
+#endif
+ default:
+ break;
}
- }
-
-@@ -590,8 +602,10 @@ void AudioEntryPanel::resetStream()
- mod->stop(); break;
- case AUTYPE_MIDI:
+@@ -620,8 +632,10 @@ void AudioEntryPanel::resetStream()
+ mod_->stop(); break;
+ case MIDI:
theMIDIPlayer->stop(); break;
+#if wxUSE_MEDIACTRL
- case AUTYPE_MEDIA:
- if (media_ctrl) media_ctrl->Stop(); break;
+ case Media:
+ if (media_ctrl_) media_ctrl_->Stop(); break;
+#endif
+ default:
+ break;
}
- }
-
-@@ -773,8 +787,10 @@ void AudioEntryPanel::onTimer(wxTimerEve
- pos = mod->getPlayingOffset().asMilliseconds(); break;
- case AUTYPE_MIDI:
+@@ -823,8 +837,10 @@ void AudioEntryPanel::onTimer(wxTimerEvent& e)
+ pos = mod_->getPlayingOffset().asMilliseconds(); break;
+ case MIDI:
pos = theMIDIPlayer->getPosition(); break;
+#if wxUSE_MEDIACTRL
- case AUTYPE_MEDIA:
- if (media_ctrl) pos = media_ctrl->Tell(); break;
+ case Media:
+ if (media_ctrl_) pos = media_ctrl_->Tell(); break;
+#endif
+ default:
+ break;
}
-
- // Set slider
-@@ -785,7 +801,9 @@ void AudioEntryPanel::onTimer(wxTimerEve
- (audio_type == AUTYPE_SOUND && sound->getStatus() == sf::Sound::Stopped) ||
- (audio_type == AUTYPE_MUSIC && music->getStatus() == sf::Sound::Stopped) ||
- (audio_type == AUTYPE_MOD && mod->getStatus() == sf::Sound::Stopped) ||
+@@ -837,7 +853,9 @@ void AudioEntryPanel::onTimer(wxTimerEvent& e)
+ (audio_type_ == Sound && sound_->getStatus() == sf::Sound::Stopped) ||
+ (audio_type_ == Music && music_->getStatus() == sf::Sound::Stopped) ||
+ (audio_type_ == Mod && mod_->getStatus() == sf::Sound::Stopped) ||
+#if wxUSE_MEDIACTRL
- (audio_type == AUTYPE_MEDIA && media_ctrl && media_ctrl->GetState() == wxMEDIASTATE_STOPPED) ||
+ (audio_type_ == Media && media_ctrl_ && media_ctrl_->GetState() == wxMEDIASTATE_STOPPED) ||
+#endif
- (audio_type == AUTYPE_MIDI && theMIDIPlayer && !theMIDIPlayer->isPlaying()))
+ (audio_type_ == MIDI && theMIDIPlayer && !theMIDIPlayer->isPlaying()))
{
- timer_seek->Stop();
-@@ -809,8 +827,10 @@ void AudioEntryPanel::onSliderSeekChange
- mod->setPlayingOffset(sf::milliseconds(slider_seek->GetValue())); break;
- case AUTYPE_MIDI:
- theMIDIPlayer->setPosition(slider_seek->GetValue()); break;
+ timer_seek_->Stop();
+@@ -863,8 +881,10 @@ void AudioEntryPanel::onSliderSeekChanged(wxCommandEve
+ mod_->setPlayingOffset(sf::milliseconds(slider_seek_->GetValue())); break;
+ case MIDI:
+ theMIDIPlayer->setPosition(slider_seek_->GetValue()); break;
+#if wxUSE_MEDIACTRL
- case AUTYPE_MEDIA:
- if (media_ctrl) media_ctrl->Seek(slider_seek->GetValue()); break;
+ case Media:
+ if (media_ctrl_) media_ctrl_->Seek(slider_seek_->GetValue()); break;
+#endif
+ default:
+ break;
}
- }
-
-@@ -829,8 +849,10 @@ void AudioEntryPanel::onSliderVolumeChan
- music->setVolume(snd_volume); break;
- case AUTYPE_MIDI:
+@@ -887,8 +907,10 @@ void AudioEntryPanel::onSliderVolumeChanged(wxCommandE
+ music_->setVolume(snd_volume); break;
+ case MIDI:
theMIDIPlayer->setVolume(snd_volume); break;
+#if wxUSE_MEDIACTRL
- case AUTYPE_MEDIA:
- if (media_ctrl) media_ctrl->SetVolume(snd_volume*0.01); break;
+ case Media:
+ if (media_ctrl_) media_ctrl_->SetVolume(snd_volume*0.01); break;
+#endif
- case AUTYPE_MOD:
- mod->setVolume(snd_volume); break;
- }
+ case Mod:
+ mod_->setVolume(snd_volume); break;
+ default:
diff --git a/games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.h b/games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.h
index d71451a61c82..c82d3e0a1a49 100644
--- a/games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.h
+++ b/games/slade/files/patch-src_MainEditor_UI_EntryPanel_AudioEntryPanel.h
@@ -1,12 +1,12 @@
---- src/MainEditor/UI/EntryPanel/AudioEntryPanel.h.orig 2015-12-12 08:41:35 UTC
+--- src/MainEditor/UI/EntryPanel/AudioEntryPanel.h.orig 2018-11-25 00:21:04 UTC
+++ src/MainEditor/UI/EntryPanel/AudioEntryPanel.h
-@@ -27,7 +27,9 @@ private:
- wxSlider* slider_seek;
- wxSlider* slider_volume;
- wxTimer* timer_seek;
+@@ -46,7 +46,9 @@ class AudioEntryPanel : public EntryPanel (private)
+ wxSlider* slider_seek_ = nullptr;
+ wxSlider* slider_volume_ = nullptr;
+ wxTimer* timer_seek_ = nullptr;
+#if wxUSE_MEDIACTRL
- wxMediaCtrl* media_ctrl;
+ wxMediaCtrl* media_ctrl_ = nullptr;
+#endif
- wxStaticText* txt_title;
- wxStaticText* txt_track;
- wxTextCtrl* txt_info;
+ wxStaticText* txt_title_ = nullptr;
+ wxStaticText* txt_track_ = nullptr;
+ wxTextCtrl* txt_info_ = nullptr;