Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 2015 13:29:26 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r378535 - in head/databases/sqlitebrowser: . files
Message-ID:  <201502061329.t16DTQaM015440@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Fri Feb  6 13:29:25 2015
New Revision: 378535
URL: https://svnweb.freebsd.org/changeset/ports/378535
QAT: https://qat.redports.org/buildarchive/r378535/

Log:
  Update to 3.5.0.
  
  PR:		197253
  Submitted by:	coder@tuxfamily.org (maintainer)

Added:
  head/databases/sqlitebrowser/files/
  head/databases/sqlitebrowser/files/patch-src-Application.cpp   (contents, props changed)
  head/databases/sqlitebrowser/files/patch-src-PreferencesDialog.cpp   (contents, props changed)
Modified:
  head/databases/sqlitebrowser/Makefile
  head/databases/sqlitebrowser/distinfo
  head/databases/sqlitebrowser/pkg-plist

Modified: head/databases/sqlitebrowser/Makefile
==============================================================================
--- head/databases/sqlitebrowser/Makefile	Fri Feb  6 13:05:37 2015	(r378534)
+++ head/databases/sqlitebrowser/Makefile	Fri Feb  6 13:29:25 2015	(r378535)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	sqlitebrowser
-PORTVERSION=	3.4.0
+PORTVERSION=	3.5.0
 CATEGORIES=	databases
 
 MAINTAINER=	coder@tuxfamily.org
@@ -13,9 +13,9 @@ LICENSE_COMB=	dual
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTNAME}-${GH_COMMIT}
 
-USE_GITHUB=
+USE_GITHUB=	yes
 GH_ACCOUNT=	sqlitebrowser
-GH_COMMIT=	0358faa
+GH_COMMIT=	634c51b
 GH_TAGNAME=	${GH_COMMIT}
 
 USES=		cmake desktop-file-utils
@@ -23,4 +23,16 @@ USE_QT4=	gui qmake_build linguist_build 
 USE_SQLITE=	yes
 
 INSTALLS_ICONS=	yes
+
+post-patch:
+	@${ECHO} ${DATADIR}
+	@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' \
+		${WRKSRC}/src/PreferencesDialog.cpp
+	@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' \
+		${WRKSRC}/src/Application.cpp
+
+post-install:
+	${MKDIR} ${STAGEDIR}${LOCALBASE}/share/${PORTNAME}/translations
+	(cd ${WRKSRC}/translations && ${COPYTREE_SHARE} . ${STAGEDIR}${LOCALBASE}/share/${PORTNAME}/translations)
+
 .include <bsd.port.mk>

Modified: head/databases/sqlitebrowser/distinfo
==============================================================================
--- head/databases/sqlitebrowser/distinfo	Fri Feb  6 13:05:37 2015	(r378534)
+++ head/databases/sqlitebrowser/distinfo	Fri Feb  6 13:29:25 2015	(r378535)
@@ -1,2 +1,2 @@
-SHA256 (sqlitebrowser-3.4.0.tar.gz) = 9d2493c1b4ef15643b42899a2a6069fed75dae50073e3056adabb3b164904b8a
-SIZE (sqlitebrowser-3.4.0.tar.gz) = 841234
+SHA256 (sqlitebrowser-3.5.0.tar.gz) = 251175ecb3c9f7ac2db4b23216c370eceda502b82438cb9afa114fe89a0e8275
+SIZE (sqlitebrowser-3.5.0.tar.gz) = 872486

Added: head/databases/sqlitebrowser/files/patch-src-Application.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/sqlitebrowser/files/patch-src-Application.cpp	Fri Feb  6 13:29:25 2015	(r378535)
@@ -0,0 +1,28 @@
+--- src/Application.cpp.orig	2015-01-30 19:48:06.000000000 +0100
++++ src/Application.cpp	2015-02-01 15:40:02.790619098 +0100
+@@ -30,8 +30,15 @@
+ 
+     // First of all try to load the application translation file.
+     m_translatorApp = new QTranslator(this);
++
++#ifdef Q_OS_FREEBSD
++    QString trans_dir = "%%DATADIR%%/translations";
++    ok = m_translatorApp->load("sqlb_" + name,
++                               trans_dir);
++#else
+     ok = m_translatorApp->load("sqlb_" + name,
+                                QCoreApplication::applicationDirPath() + "/translations");
++#endif
+ 
+     if (ok == true) {
+         PreferencesDialog::setSettingsValue("General", "language", name);
+@@ -47,7 +54,9 @@
+         ok = m_translatorQt->load("qt_" + name,
+                                   QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+         if (ok == false)
++	{
+             ok = m_translatorQt->load("qt_" + name, "translations");
++	}
+         if (ok == true)
+             installTranslator(m_translatorQt);
+     }

Added: head/databases/sqlitebrowser/files/patch-src-PreferencesDialog.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/sqlitebrowser/files/patch-src-PreferencesDialog.cpp	Fri Feb  6 13:29:25 2015	(r378535)
@@ -0,0 +1,17 @@
+--- src/PreferencesDialog.cpp.orig	2015-02-01 15:27:53.407669984 +0100
++++ src/PreferencesDialog.cpp	2015-02-01 15:30:51.885904399 +0100
+@@ -266,9 +266,13 @@
+ void PreferencesDialog::fillLanguageBox()
+ {
+     // Use the path relative to the main executable
++#ifdef Q_OS_FREEBSD
++    QDir translationsDir("%%DATADIR%%/translations",
++                         "sqlb_*.qm");
++#else
+     QDir translationsDir(QCoreApplication::applicationDirPath() + "/translations",
+                          "sqlb_*.qm");
+-
++#endif
+     // Add default language
+     ui->languageComboBox->addItem("English (United States)", "en_US");
+ 

Modified: head/databases/sqlitebrowser/pkg-plist
==============================================================================
--- head/databases/sqlitebrowser/pkg-plist	Fri Feb  6 13:05:37 2015	(r378534)
+++ head/databases/sqlitebrowser/pkg-plist	Fri Feb  6 13:29:25 2015	(r378535)
@@ -1,3 +1,7 @@
 %%QT_BINDIR%%/sqlitebrowser
 share/applications/sqlitebrowser.desktop
 share/icons/hicolor/256x256/apps/sqlitebrowser.png
+%%DATADIR%%/translations/sqlb_de.qm
+%%DATADIR%%/translations/sqlb_fr.qm
+%%DATADIR%%/translations/sqlb_ru.qm
+%%DATADIR%%/translations/sqlb_zh.qm



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