aboutsummaryrefslogtreecommitdiff
path: root/games/trenchbroom
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2016-04-14 08:41:42 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2016-04-14 08:41:42 +0000
commit1350b8c2c8d388ed0aeaa955a595893c396cb0c9 (patch)
tree7f9d5966e19914eb0fcfd30969eb7bd311e9b764 /games/trenchbroom
parent7fcba30951559a1204f75805cdabc84173e70277 (diff)
downloadports-1350b8c2c8d388ed0aeaa955a595893c396cb0c9.tar.gz
ports-1350b8c2c8d388ed0aeaa955a595893c396cb0c9.zip
- Fix invisible active (highlighted) tab label bug: for an unknown reason,
wxWidgets' wxSYS_COLOUR_HIGHLIGHT is matching background color; use the same work-around as on OS X and construct wxColour manually - Display an icon on TrenchBroom's various windows and dialogs by calling SetIcon(); install provided icons and set INSTALLS_ICONS accordingly - Amend CATEGORIES and inform end-users of TB's current beta status while here; bump PORTREVISION
Notes
Notes: svn path=/head/; revision=413248
Diffstat (limited to 'games/trenchbroom')
-rw-r--r--games/trenchbroom/Makefile11
-rw-r--r--games/trenchbroom/files/patch-freebsd-support11
-rw-r--r--games/trenchbroom/files/patch-set-icon95
-rw-r--r--games/trenchbroom/pkg-plist13
4 files changed, 128 insertions, 2 deletions
diff --git a/games/trenchbroom/Makefile b/games/trenchbroom/Makefile
index 55b7249b9f36..33f1056596bd 100644
--- a/games/trenchbroom/Makefile
+++ b/games/trenchbroom/Makefile
@@ -3,7 +3,8 @@
PORTNAME= trenchbroom
PORTVERSION= 2.0.0.b
-CATEGORIES= games
+PORTREVISION= 1
+CATEGORIES= games cad
MAINTAINER= danfe@FreeBSD.org
COMMENT= Cross-platform level editor for Quake-engine based games
@@ -20,7 +21,8 @@ GH_TAGNAME= ed46601
USES= cmake compiler:c++11-lib pkgconfig
USE_GL= glew
USE_WX= 3.0+
-CMAKE_ARGS= -DAPP_BUILD_CHANNEL:STRING="for ${OPSYS}/${ARCH}"
+CMAKE_ARGS= -DAPP_BUILD_CHANNEL:STRING="Beta for ${OPSYS}/${ARCH}"
+INSTALLS_ICONS= yes
PORTDOCS= README.md
@@ -38,6 +40,11 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/TrenchBroom ${STAGEDIR}${PREFIX}/bin
@${RMDIR} ${WRKSRC}/Resources/help || :
cd ${WRKSRC}/Resources && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}
+.for n in 16 22 24 32 36 48 64 72 96 128 192 256 512
+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${n}x${n}/apps
+ ${INSTALL_DATA} ${WRKSRC}/app/resources/linux/icons/icon_${n}.png \
+ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${n}x${n}/apps/${PORTNAME}.png
+.endfor
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/games/trenchbroom/files/patch-freebsd-support b/games/trenchbroom/files/patch-freebsd-support
index 9294fa91fd6a..ed16de8dd529 100644
--- a/games/trenchbroom/files/patch-freebsd-support
+++ b/games/trenchbroom/files/patch-freebsd-support
@@ -42,6 +42,17 @@
}
#endif
+--- common/src/View/ViewConstants.cpp.orig 2016-03-09 20:19:17 UTC
++++ common/src/View/ViewConstants.cpp
+@@ -32,7 +32,7 @@ namespace TrenchBroom {
+
+ const wxColour& highlightText() {
+ static const wxColour col =
+-#if defined __APPLE__
++#if defined __APPLE__ || defined __FreeBSD__
+ wxColour(26, 79, 189);
+ #else
+ wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
--- common/src/View/KeyboardShortcut.cpp.orig 2016-03-09 20:19:17 UTC
+++ common/src/View/KeyboardShortcut.cpp
@@ -74,7 +74,7 @@ namespace TrenchBroom {
diff --git a/games/trenchbroom/files/patch-set-icon b/games/trenchbroom/files/patch-set-icon
new file mode 100644
index 000000000000..beb4b2df09ca
--- /dev/null
+++ b/games/trenchbroom/files/patch-set-icon
@@ -0,0 +1,95 @@
+--- common/src/View/AboutFrame.cpp.orig 2016-03-09 20:19:17 UTC
++++ common/src/View/AboutFrame.cpp
+@@ -26,6 +26,7 @@
+ #include <wx/sizer.h>
+ #include <wx/statline.h>
+ #include <wx/stattext.h>
++#include <wx/stdpaths.h>
+ #include <wx/textctrl.h>
+
+ #include <iostream>
+@@ -63,6 +64,8 @@ namespace TrenchBroom {
+
+ void AboutFrame::createGui() {
+ SetBackgroundColour(*wxWHITE);
++ SetIcon(wxIcon(wxStandardPaths::Get().GetInstallPrefix() + "/share/icons/hicolor/128x128/apps/trenchbroom.png", wxBITMAP_TYPE_PNG));
++
+ AppInfoPanel* infoPanel = new AppInfoPanel(this);
+
+ wxStaticText* creditsText = new wxStaticText(this, wxID_ANY, "");
+--- common/src/View/GameDialog.cpp.orig 2016-03-09 20:19:17 UTC
++++ common/src/View/GameDialog.cpp
+@@ -33,6 +33,7 @@
+ #include <wx/choice.h>
+ #include <wx/sizer.h>
+ #include <wx/stattext.h>
++#include <wx/stdpaths.h>
+
+ #include <cassert>
+
+@@ -120,6 +121,8 @@ namespace TrenchBroom {
+ }
+
+ void GameDialog::createGui(const wxString& title, const wxString& infoText) {
++ SetIcon(wxIcon(wxStandardPaths::Get().GetInstallPrefix() + "/share/icons/hicolor/128x128/apps/trenchbroom.png", wxBITMAP_TYPE_PNG));
++
+ wxWindow* infoPanel = createInfoPanel(this, title, infoText);
+ wxWindow* selectionPanel = createSelectionPanel(this);
+
+--- common/src/View/MapFrame.cpp.orig 2016-03-09 20:19:17 UTC
++++ common/src/View/MapFrame.cpp
+@@ -52,6 +52,7 @@
+ #include <wx/msgdlg.h>
+ #include <wx/persist.h>
+ #include <wx/sizer.h>
++#include <wx/stdpaths.h>
+ #include <wx/timer.h>
+
+ #include <cassert>
+@@ -296,6 +297,8 @@ namespace TrenchBroom {
+ }
+
+ void MapFrame::createGui() {
++ SetIcon(wxIcon(wxStandardPaths::Get().GetInstallPrefix() + "/share/icons/hicolor/128x128/apps/trenchbroom.png", wxBITMAP_TYPE_PNG));
++
+ m_hSplitter = new SplitterWindow2(this);
+ m_hSplitter->setSashGravity(1.0);
+ m_hSplitter->SetName("MapFrameHSplitter");
+--- common/src/View/PreferenceDialog.cpp.orig 2016-03-09 20:19:17 UTC
++++ common/src/View/PreferenceDialog.cpp
+@@ -36,6 +36,7 @@
+ #include <wx/panel.h>
+ #include <wx/sizer.h>
+ #include <wx/simplebook.h>
++#include <wx/stdpaths.h>
+ #include <wx/toolbar.h>
+
+ namespace TrenchBroom {
+@@ -149,6 +150,8 @@ namespace TrenchBroom {
+ }
+
+ void PreferenceDialog::createGui() {
++ SetIcon(wxIcon(wxStandardPaths::Get().GetInstallPrefix() + "/share/icons/hicolor/128x128/apps/trenchbroom.png", wxBITMAP_TYPE_PNG));
++
+ const wxBitmap gamesImage = IO::loadImageResource("GeneralPreferences.png");
+ const wxBitmap generalImage = IO::loadImageResource("GeneralPreferences.png");
+ const wxBitmap mouseImage = IO::loadImageResource("MousePreferences.png");
+--- common/src/View/WelcomeFrame.cpp.orig 2016-03-09 20:19:17 UTC
++++ common/src/View/WelcomeFrame.cpp
+@@ -28,6 +28,7 @@
+
+ #include <wx/panel.h>
+ #include <wx/sizer.h>
++#include <wx/stdpaths.h>
+
+ namespace TrenchBroom {
+ namespace View {
+@@ -41,6 +42,8 @@ namespace TrenchBroom {
+ }
+
+ void WelcomeFrame::createGui() {
++ SetIcon(wxIcon(wxStandardPaths::Get().GetInstallPrefix() + "/share/icons/hicolor/128x128/apps/trenchbroom.png", wxBITMAP_TYPE_PNG));
++
+ wxPanel* container = new wxPanel(this);
+ container->SetBackgroundColour(*wxWHITE);
+
diff --git a/games/trenchbroom/pkg-plist b/games/trenchbroom/pkg-plist
index 2f3cf77d9f7a..7908fd3dec23 100644
--- a/games/trenchbroom/pkg-plist
+++ b/games/trenchbroom/pkg-plist
@@ -93,3 +93,16 @@ bin/TrenchBroom
%%DATADIR%%/shader/VaryingPC.fragsh
%%DATADIR%%/shader/VaryingPC.vertsh
%%DATADIR%%/shader/VaryingPUniformC.vertsh
+share/icons/hicolor/16x16/apps/trenchbroom.png
+share/icons/hicolor/22x22/apps/trenchbroom.png
+share/icons/hicolor/24x24/apps/trenchbroom.png
+share/icons/hicolor/32x32/apps/trenchbroom.png
+share/icons/hicolor/36x36/apps/trenchbroom.png
+share/icons/hicolor/48x48/apps/trenchbroom.png
+share/icons/hicolor/64x64/apps/trenchbroom.png
+share/icons/hicolor/72x72/apps/trenchbroom.png
+share/icons/hicolor/96x96/apps/trenchbroom.png
+share/icons/hicolor/128x128/apps/trenchbroom.png
+share/icons/hicolor/192x192/apps/trenchbroom.png
+share/icons/hicolor/256x256/apps/trenchbroom.png
+share/icons/hicolor/512x512/apps/trenchbroom.png