Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Apr 2016 08:41:42 +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: r413248 - in head/games/trenchbroom: . files
Message-ID:  <201604140841.u3E8fg5t004663@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Thu Apr 14 08:41:42 2016
New Revision: 413248
URL: https://svnweb.freebsd.org/changeset/ports/413248

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

Added:
  head/games/trenchbroom/files/patch-set-icon   (contents, props changed)
Modified:
  head/games/trenchbroom/Makefile
  head/games/trenchbroom/files/patch-freebsd-support
  head/games/trenchbroom/pkg-plist

Modified: head/games/trenchbroom/Makefile
==============================================================================
--- head/games/trenchbroom/Makefile	Thu Apr 14 07:51:26 2016	(r413247)
+++ head/games/trenchbroom/Makefile	Thu Apr 14 08:41:42 2016	(r413248)
@@ -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}

Modified: head/games/trenchbroom/files/patch-freebsd-support
==============================================================================
--- head/games/trenchbroom/files/patch-freebsd-support	Thu Apr 14 07:51:26 2016	(r413247)
+++ head/games/trenchbroom/files/patch-freebsd-support	Thu Apr 14 08:41:42 2016	(r413248)
@@ -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 {

Added: head/games/trenchbroom/files/patch-set-icon
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/trenchbroom/files/patch-set-icon	Thu Apr 14 08:41:42 2016	(r413248)
@@ -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);
+             

Modified: head/games/trenchbroom/pkg-plist
==============================================================================
--- head/games/trenchbroom/pkg-plist	Thu Apr 14 07:51:26 2016	(r413247)
+++ head/games/trenchbroom/pkg-plist	Thu Apr 14 08:41:42 2016	(r413248)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604140841.u3E8fg5t004663>