Date: Thu, 28 Jan 2016 20:04:51 +0000 (UTC) From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r407417 - in head/games: . slade slade/files Message-ID: <201601282004.u0SK4ph9098640@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe Date: Thu Jan 28 20:04:51 2016 New Revision: 407417 URL: https://svnweb.freebsd.org/changeset/ports/407417 Log: - Add a port of SLADE3, a Doom editor - Bring COMMENT in `games/Makefile' closer to reality WWW: http://slade.mancubus.net/ Added: head/games/slade/ head/games/slade/Makefile (contents, props changed) head/games/slade/distinfo (contents, props changed) head/games/slade/files/ head/games/slade/files/patch-src_AudioEntryPanel.cpp (contents, props changed) head/games/slade/files/patch-src_AudioEntryPanel.h (contents, props changed) head/games/slade/files/patch-src_CMakeLists.txt (contents, props changed) head/games/slade/pkg-descr (contents, props changed) Modified: head/games/Makefile Modified: head/games/Makefile ============================================================================== --- head/games/Makefile Thu Jan 28 17:53:21 2016 (r407416) +++ head/games/Makefile Thu Jan 28 20:04:51 2016 (r407417) @@ -1,7 +1,7 @@ # $FreeBSD$ # - COMMENT = Games + COMMENT = Games and related software SUBDIR += 0ad SUBDIR += 0verkill @@ -893,6 +893,7 @@ SUBDIR += sjeng SUBDIR += ski SUBDIR += sl + SUBDIR += slade SUBDIR += slashem-tty SUBDIR += slump SUBDIR += slune Added: head/games/slade/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/slade/Makefile Thu Jan 28 20:04:51 2016 (r407417) @@ -0,0 +1,36 @@ +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= slade +DISTVERSION= 3.1.1_b2 +CATEGORIES= games + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Modern editor for Doom-engine based games and source ports + +BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip +LIB_DEPENDS= libfluidsynth.so:${PORTSDIR}/audio/fluidsynth \ + libsfml-system.so:${PORTSDIR}/devel/sfml \ + libftgl.so:${PORTSDIR}/graphics/ftgl \ + libfreeimage.so:${PORTSDIR}/graphics/freeimage + +USE_GITHUB= yes +GH_ACCOUNT= sirjuddington +GH_PROJECT= ${PORTNAME:tu} + +USES= cmake compiler:c++11-lib pkgconfig +USE_WX= 3.0+ +USE_CXXSTD= c++11 + +PLIST_FILES= bin/slade share/slade3/slade.pk3 + +post-patch: + @${REINPLACE_CMD} -e 's,"alsa","oss",' ${WRKSRC}/src/MIDIPlayer.cpp + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + @${MKDIR} ${STAGEDIR}${PREFIX}/share/${PORTNAME}3 + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.pk3 \ + ${STAGEDIR}${PREFIX}/share/${PORTNAME}3 + +.include <bsd.port.mk> Added: head/games/slade/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/slade/distinfo Thu Jan 28 20:04:51 2016 (r407417) @@ -0,0 +1,2 @@ +SHA256 (sirjuddington-SLADE-3.1.1_b2_GH0.tar.gz) = 5c8d64c69db0369e5c2b64ee04fab29fb5bdbe5d6200cff864f38e098bcf4cbe +SIZE (sirjuddington-SLADE-3.1.1_b2_GH0.tar.gz) = 4386679 Added: head/games/slade/files/patch-src_AudioEntryPanel.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/slade/files/patch-src_AudioEntryPanel.cpp Thu Jan 28 20:04:51 2016 (r407417) @@ -0,0 +1,132 @@ +--- src/AudioEntryPanel.cpp.orig 2015-12-12 08:41:35 UTC ++++ src/AudioEntryPanel.cpp +@@ -89,15 +89,17 @@ AudioEntryPanel::AudioEntryPanel(wxWindo + LOG_MESSAGE(3, "Windows Media Player installed, using wxMediaCtrl"); + media_ctrl = new wxMediaCtrl(this, -1); + } +-#else ++#elif wxUSE_MEDIACTRL + // Create wxMediaCtrl + 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(); +-#ifndef __WXOSX__ ++#if wxUSE_MEDIACTRL && !defined(__WXOSX__) + if (media_ctrl) sizer_main->Add(media_ctrl, 0); + #endif + sizer_main->Add(sizer_gb, 0, wxALIGN_CENTER); +@@ -144,13 +146,17 @@ AudioEntryPanel::AudioEntryPanel(wxWindo + 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); ++#endif + 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); ++#endif + toolbar->Show(false); + + // Bind events +@@ -497,6 +503,7 @@ bool AudioEntryPanel::openMod(MemChunk& + *******************************************************************/ + bool AudioEntryPanel::openMedia(string filename) + { ++#if wxUSE_MEDIACTRL + // Attempt to open with wxMediaCtrl + if (media_ctrl && media_ctrl->Load(filename)) + { +@@ -511,6 +518,7 @@ bool AudioEntryPanel::openMedia(string f + + return true; + } ++#endif + + return false; + } +@@ -533,8 +541,10 @@ void AudioEntryPanel::startStream() + mod.play(); break; + case AUTYPE_MIDI: + theMIDIPlayer->play(); break; ++#if wxUSE_MEDIACTRL + case AUTYPE_MEDIA: + if (media_ctrl) media_ctrl->Play(); break; ++#endif + } + } + +@@ -553,8 +563,10 @@ void AudioEntryPanel::stopStream() + mod.pause(); break; + case AUTYPE_MIDI: + theMIDIPlayer->pause(); break; ++#if wxUSE_MEDIACTRL + case AUTYPE_MEDIA: + if (media_ctrl) media_ctrl->Pause(); break; ++#endif + } + } + +@@ -574,8 +586,10 @@ void AudioEntryPanel::resetStream() + mod.stop(); break; + case AUTYPE_MIDI: + theMIDIPlayer->stop(); break; ++#if wxUSE_MEDIACTRL + case AUTYPE_MEDIA: + if (media_ctrl) media_ctrl->Stop(); break; ++#endif + } + } + +@@ -757,8 +771,10 @@ void AudioEntryPanel::onTimer(wxTimerEve + pos = mod.getPlayingOffset().asMilliseconds(); break; + case AUTYPE_MIDI: + pos = theMIDIPlayer->getPosition(); break; ++#if wxUSE_MEDIACTRL + case AUTYPE_MEDIA: + if (media_ctrl) pos = media_ctrl->Tell(); break; ++#endif + } + + // Set slider +@@ -769,7 +785,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) || ++#if wxUSE_MEDIACTRL + (audio_type == AUTYPE_MEDIA && media_ctrl && media_ctrl->GetState() == wxMEDIASTATE_STOPPED) || ++#endif + (audio_type == AUTYPE_MIDI && theMIDIPlayer && !theMIDIPlayer->isPlaying())) + { + timer_seek->Stop(); +@@ -793,8 +811,10 @@ void AudioEntryPanel::onSliderSeekChange + mod.setPlayingOffset(sf::milliseconds(slider_seek->GetValue())); break; + case AUTYPE_MIDI: + theMIDIPlayer->setPosition(slider_seek->GetValue()); break; ++#if wxUSE_MEDIACTRL + case AUTYPE_MEDIA: + if (media_ctrl) media_ctrl->Seek(slider_seek->GetValue()); break; ++#endif + } + } + +@@ -813,8 +833,10 @@ void AudioEntryPanel::onSliderVolumeChan + music.setVolume(snd_volume); break; + case AUTYPE_MIDI: + theMIDIPlayer->setVolume(snd_volume); break; ++#if wxUSE_MEDIACTRL + case AUTYPE_MEDIA: + if (media_ctrl) media_ctrl->SetVolume(snd_volume*0.01); break; ++#endif + case AUTYPE_MOD: + mod.setVolume(snd_volume); break; + } Added: head/games/slade/files/patch-src_AudioEntryPanel.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/slade/files/patch-src_AudioEntryPanel.h Thu Jan 28 20:04:51 2016 (r407417) @@ -0,0 +1,12 @@ +--- src/AudioEntryPanel.h.orig 2015-12-12 08:41:35 UTC ++++ src/AudioEntryPanel.h +@@ -27,7 +27,9 @@ private: + wxSlider* slider_seek; + wxSlider* slider_volume; + wxTimer* timer_seek; ++#if wxUSE_MEDIACTRL + wxMediaCtrl* media_ctrl; ++#endif + wxStaticText* txt_title; + wxStaticText* txt_track; + wxTextCtrl* txt_info; Added: head/games/slade/files/patch-src_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/slade/files/patch-src_CMakeLists.txt Thu Jan 28 20:04:51 2016 (r407417) @@ -0,0 +1,27 @@ +--- src/CMakeLists.txt.orig 2015-12-12 08:41:35 UTC ++++ src/CMakeLists.txt +@@ -6,6 +6,14 @@ find_package(wxWidgets 3.0 COMPONENTS st + endif (USE_WEBVIEW_STARTPAGE) + include(${wxWidgets_USE_FILE}) + ++# 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) ++ + 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} . ./dumb) ++# Put local `dumb' directory first to avoid conflict with `audio/dumb' port ++include_directories(dumb ${FREEIMAGE_INCLUDE_DIR} ${SFML_INCLUDE_DIR} ${FTGL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ${GTK2_INCLUDE_DIRS} .) + + if (NOT NO_FLUIDSYNTH) + include_directories(${FLUIDSYNTH_INCLUDE_DIR}) Added: head/games/slade/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/slade/pkg-descr Thu Jan 28 20:04:51 2016 (r407417) @@ -0,0 +1,13 @@ +SLADE3 is a modern editor for Doom-engine based games and source ports. +It has the ability to view, modify, and write many different game-specific +formats, and even convert between some of them, or from/to other generic +formats such as PNG. + +SLADE3 can be considered a successor to both SLumpEd and SLADE. Some of +its features: + + - Basic archive/resource editing (create/open/save, import/export) + - Simple tabbed interface with copy/paste support + - Many supported game formats (ZIP/PK3, Quake PAK/WAD2, etc.) + +WWW: http://slade.mancubus.net/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601282004.u0SK4ph9098640>