1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00

Update SLADE to version 3.1.3.

Reported by:	portscout
This commit is contained in:
Alexey Dokuchaev 2018-12-13 16:30:37 +00:00
parent 726e688e81
commit 8b702f0de0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=487373
5 changed files with 120 additions and 105 deletions

View File

@ -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>

View File

@ -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

View File

@ -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)

View File

@ -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:

View File

@ -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;