git: 6b408353b42c - main - devel/tortoisehg: Fix pkg-plist hack in a proper way.
Gleb Popov
arrowd at FreeBSD.org
Thu Apr 8 09:52:31 UTC 2021
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=6b408353b42cf859f7349e0a4528dec0e0478b63
commit 6b408353b42cf859f7349e0a4528dec0e0478b63
Author: Gleb Popov <arrowd at FreeBSD.org>
AuthorDate: 2021-04-08 09:48:28 +0000
Commit: Gleb Popov <arrowd at FreeBSD.org>
CommitDate: 2021-04-08 09:49:34 +0000
devel/tortoisehg: Fix pkg-plist hack in a proper way.
---
devel/tortoisehg/Makefile | 10 ++--------
devel/tortoisehg/files/patch-contrib-thg.desktop | 11 -----------
devel/tortoisehg/files/patch-contrib_thg.desktop | 11 +++++++++++
devel/tortoisehg/files/patch-setup.py | 23 +++++++++++++++++++----
devel/tortoisehg/pkg-plist | 2 +-
5 files changed, 33 insertions(+), 24 deletions(-)
diff --git a/devel/tortoisehg/Makefile b/devel/tortoisehg/Makefile
index 277e809ffeaa..adfa3ebec8a7 100644
--- a/devel/tortoisehg/Makefile
+++ b/devel/tortoisehg/Makefile
@@ -1,6 +1,6 @@
PORTNAME= tortoisehg
DISTVERSION= 5.7.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel
MAINTAINER= arrowd at FreeBSD.org
@@ -44,9 +44,6 @@ EXTRACT_AFTER_ARGS= --exclude ${GL_PROJECT}-${GL_COMMIT}-${GL_HEPTAPOD_COMMIT}/h
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
.endif
-post-patch:
- @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/contrib/tortoisehg.desktop
-
post-patch-NLS-on:
@${REINPLACE_CMD} -e 's/^%%NLS%%//' ${WRKSRC}/${PYSETUP}
@@ -62,10 +59,7 @@ post-patch-NAUTILUS-off:
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/tortoisehg
+ ${INSTALL_DATA} ${WRKSRC}/contrib/thg.desktop ${STAGEDIR}${PREFIX}/share/applications/
${INSTALL_DATA} ${WRKSRC}/contrib/mergetools.rc ${STAGEDIR}${PREFIX}/share/tortoisehg/
- ${INSTALL_DATA} ${WRKSRC}/contrib/tortoisehg.desktop ${STAGEDIR}${PREFIX}/share/applications/
- # workaround bug in python autoplist
- @${REINPLACE_CMD} -e '/16x16$$/d' -e '/22x22$$/d' -e '/24x24$$/d' -e '/32x32$$/d' -e '/scalable$$/d' \
- ${_PYTHONPKGLIST}
.include <bsd.port.post.mk>
diff --git a/devel/tortoisehg/files/patch-contrib-thg.desktop b/devel/tortoisehg/files/patch-contrib-thg.desktop
deleted file mode 100644
index 7e3feb1678a5..000000000000
--- a/devel/tortoisehg/files/patch-contrib-thg.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
---- /dev/null 2013-09-09 09:16:06.000000000 +0400
-+++ contrib/tortoisehg.desktop 2013-09-09 09:15:52.767575878 +0400
-@@ -0,0 +1,8 @@
-+[Desktop Entry]
-+Type=Application
-+Name=TortoiseHg
-+GenericName=Version Control GUI
-+Comment=GUI application for using Mercurial
-+Icon=%%PREFIX%%/share/pixmaps/tortoisehg/icons/thg_logo.ico
-+Exec=thg --nofork
-+Categories=Development;RevisionControl;
diff --git a/devel/tortoisehg/files/patch-contrib_thg.desktop b/devel/tortoisehg/files/patch-contrib_thg.desktop
new file mode 100644
index 000000000000..8c6190e50832
--- /dev/null
+++ b/devel/tortoisehg/files/patch-contrib_thg.desktop
@@ -0,0 +1,11 @@
+--- contrib/thg.desktop.orig 2021-02-03 05:58:06 UTC
++++ contrib/thg.desktop
+@@ -5,7 +5,7 @@ GenericName=Version Control GUI
+ GenericName[ru]=Графический интерфейс для системы контроля версий
+ Comment=GUI application for using Mercurial
+ Comment[ru]=Графический интерфейс для Mercurial
+-Icon=thg_logo
++Icon=tortoisehg/scalable/apps/thg
+ Exec=thg --nofork
+ Categories=Development;RevisionControl;
+ X-Desktop-File-Install-Version=0.23
diff --git a/devel/tortoisehg/files/patch-setup.py b/devel/tortoisehg/files/patch-setup.py
index 2cb4bd346e20..a4b351936a6c 100644
--- a/devel/tortoisehg/files/patch-setup.py
+++ b/devel/tortoisehg/files/patch-setup.py
@@ -1,6 +1,16 @@
---- setup.py.orig 2020-04-08 09:44:12 UTC
+--- setup.py.orig 2021-02-03 05:58:06 UTC
+++ setup.py
-@@ -488,7 +488,7 @@ class build(_build_orig):
+@@ -218,8 +218,7 @@ class build_config(Command):
+ 'license_path': os.path.join(sharedir, 'doc', 'tortoisehg',
+ 'Copying.txt.gz'),
+ 'locale_path': os.path.join(sharedir, 'locale'),
+- 'icon_path': os.path.join(sharedir, 'pixmaps', 'tortoisehg',
+- 'icons'),
++ 'icon_path': os.path.join(sharedir, 'pixmaps', 'tortoisehg'),
+ 'nofork': True,
+ 'qt_api': qtcore._detectapi(),
+ }
+@@ -488,7 +487,7 @@ class build(_build_orig):
lambda self: 'py2app' in self.distribution.commands),
('build_ui', None),
('build_qrc', lambda self: 'py2exe' in self.distribution.commands),
@@ -9,9 +19,14 @@
] + _build_orig.sub_commands
class clean(_clean_orig):
-@@ -725,10 +725,10 @@ def setup_posix():
+@@ -723,12 +722,14 @@ def setup_posix():
+ for root, dirs, files in os.walk('icons'):
+ if root == 'icons':
dirs.remove('svg') # drop source of .ico files
- _data_files.append((os.path.join('share/pixmaps/tortoisehg', root),
+- _data_files.append((os.path.join('share/pixmaps/tortoisehg', root),
++ if not files:
++ continue
++ _data_files.append((os.path.normpath(os.path.join('share/pixmaps/tortoisehg', root.replace("icons", "."))),
[os.path.join(root, f) for f in files]))
- _data_files.extend((os.path.join('share', modir), [mofile])
- for pofile, modir, mofile in _walklocales())
diff --git a/devel/tortoisehg/pkg-plist b/devel/tortoisehg/pkg-plist
index 6abbac69663a..5fcb2f812df4 100644
--- a/devel/tortoisehg/pkg-plist
+++ b/devel/tortoisehg/pkg-plist
@@ -3,5 +3,5 @@
%%PYTHON_SITELIBDIR%%/tortoisehg/util/config.py
%%PYTHON2%%%%PYTHON_SITELIBDIR%%/tortoisehg/util/config.pyc
%%PYTHON2%%%%PYTHON_SITELIBDIR%%/tortoisehg/util/config.pyo
-share/applications/tortoisehg.desktop
+share/applications/thg.desktop
%%DATADIR%%/mergetools.rc
More information about the dev-commits-ports-all
mailing list