Hi all,

I've looked at the changes recently done on the tint2 port and posted in this 
ML.
I would also propose the below cleanup/fixes for the upgrade to 0.14.5.

* remove INSTDIR: what's the purpose of that variable? I don't find it in the 
doc.
* remove the dependencies on python & py-gtk2: tint2 doesn't use python
  (except for the new_release script and linux specific test case).
* add desktop-file-utils & shared-mime-info to MODGNOME_TOOLS and then
  remove the RUN_DEPENDS on desktop-file-utils (auto added by MODGNOME_TOOLS)
* remove the CONFIGURE_ARGS on MANDIR (not needed anymore, cmake complaining 
about it)
* temporary "fix" on get_version.sh to retrieve the version number.
  That script doesn't work when the builddir is not the same as the source dir.
  I'll report it upstream.

I've tested the new version (panel, battery, executor, launcher, systray).

The files (diff or full port) can be found here:
https://vale.re/ports/tint2-0.14.5.diff
https://vale.re/ports/tint2-0.14.5.tar.gz

Cheers,
V.


diff -urPN -x CVS /usr/ports/x11/tint2/Makefile 
/usr/ports/mystuff/x11/tint2/Makefile
--- /usr/ports/x11/tint2/Makefile       Mon May 29 23:41:10 2017
+++ /usr/ports/mystuff/x11/tint2/Makefile       Fri Jun  9 00:18:09 2017
@@ -2,13 +2,11 @@

 COMMENT=        freedesktop-compliant panel

-V=             0.12.2
-REVISION=      2
+V=             0.14.5
 CATEGORIES=    x11
 DISTNAME=      tint2-$V
 DISTFILES=     ${DISTNAME}${EXTRACT_SUFX}{archive${EXTRACT_SUFX}?ref=v$V}
-WRKDIST=       ${WRKDIR}/tint2-v$V-dc300c021531f47cca336e15b50adf3b4a9bc9ae
-INSTDIR=       ${PREFIX}/tint2
+WRKDIST=       ${WRKDIR}/tint2-v$V-d10a505aa951c8c3589f5c5f3a2fb0c2f0dd93b4

 HOMEPAGE=      https://gitlab.com/o9000/tint2/

@@ -25,27 +23,26 @@
 WANTLIB += z

 BUILD_DEPENDS= devel/gettext-tools
-LIB_DEPENDS=   graphics/imlib2 \
-               devel/gettext \
+
+LIB_DEPENDS=   devel/gettext \
                devel/pango \
                devel/startup-notification \
+               graphics/imlib2 \
                x11/gnome/librsvg \
                x11/gtk+2
-RUN_DEPENDS=   x11/py-gtk2 \
-               devel/desktop-file-utils

 MODULES=       devel/cmake \
-               lang/python \
                x11/gnome

-MODGNOME_TOOLS+= gtk-update-icon-cache
+MODGNOME_TOOLS += desktop-file-utils \
+               gtk-update-icon-cache \
+               shared-mime-info

 NO_TEST=       Yes

-CONFIGURE_ARGS= -DMANDIR="${PREFIX}/man"
-
 post-install:
-       cp -R ${WRKSRC}/sample/ ${PREFIX}/share/examples/tint2/
+       mkdir -p ${PREFIX}/share/examples/tint2
+       cp -R ${WRKSRC}/themes/*tint2rc ${PREFIX}/share/examples/tint2/
        sed -i -e '/\/usr\/local\/share\/applications/d' -e \
            's,/usr/share/applications,${LOCALBASE}/share/applications,g' \
            ${PREFIX}/share/examples/tint2/*tint2rc
diff -urPN -x CVS /usr/ports/x11/tint2/distinfo 
/usr/ports/mystuff/x11/tint2/distinfo
--- /usr/ports/x11/tint2/distinfo       Fri Sep 11 16:14:07 2015
+++ /usr/ports/mystuff/x11/tint2/distinfo       Tue Jun  6 22:08:54 2017
@@ -1,2 +1,2 @@
-SHA256 (tint2-0.12.2.tar.gz) = vanMkT1Ln9QTKF6jRGasFJVZ6emTjhKfRqZkwxEBM0U=
-SIZE (tint2-0.12.2.tar.gz) = 229320
+SHA256 (tint2-0.14.5.tar.gz) = OGhFdgAAfD9OK/yhTQ+iFp4BMwlF5o+S5yeg7U1rZjk=
+SIZE (tint2-0.14.5.tar.gz) = 465986
diff -urPN -x CVS /usr/ports/x11/tint2/patches/patch-get_version_sh 
/usr/ports/mystuff/x11/tint2/patches/patch-get_version_sh
--- /usr/ports/x11/tint2/patches/patch-get_version_sh   Thu Jan  1 01:00:00 1970
+++ /usr/ports/mystuff/x11/tint2/patches/patch-get_version_sh   Fri Jun  9 
00:12:05 2017
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- get_version.sh.orig        Fri Jun  9 00:10:29 2017
++++ get_version.sh     Fri Jun  9 00:11:56 2017
+@@ -34,14 +34,13 @@ then
+     VERSION=$(git describe --exact-match 2>/dev/null || echo "$MAJOR-git$(git show 
-s --pretty=format:%ci | cut -d ' ' -f 1 | tr -d '-').$(git show -s 
--pretty=format:%h)")$DIRTY
+ else
+     VERSION=$(head -n 1 ChangeLog || head -n 1 ../ChangeLog | cut -d ' ' -f 2)
+-    if [ $VERSION = "master" ]
++    if [ "$VERSION" = "master" ]
+     then
+-        VERSION=$VERSION-$(head -n 1 ChangeLog || head -n 1 ../ChangeLog | 
cut -d ' ' -f 1)
++        VERSION="$VERSION"-$(head -n 1 ChangeLog || head -n 1 ../ChangeLog | 
cut -d ' ' -f 1)
+     fi
+ fi
+
+-
+ VERSION=$(echo "$VERSION" | sed 's/^v//')
+
+-echo '#define VERSION_STRING "'$VERSION'"' > version.h
++echo '#define VERSION_STRING "2017-05-21 0.14.5"' > version.h
+ echo $VERSION
diff -urPN -x CVS 
/usr/ports/x11/tint2/patches/patch-src_tint2conf_CMakeLists_txt 
/usr/ports/mystuff/x11/tint2/patches/patch-src_tint2conf_CMakeLists_txt
--- /usr/ports/x11/tint2/patches/patch-src_tint2conf_CMakeLists_txt     Fri Sep 
11 16:14:07 2015
+++ /usr/ports/mystuff/x11/tint2/patches/patch-src_tint2conf_CMakeLists_txt     
Thu Jan  1 01:00:00 1970
@@ -1,8 +0,0 @@
-$OpenBSD: patch-src_tint2conf_CMakeLists_txt,v 1.1.1.1 2015/09/11 14:14:07 
sthen Exp $
---- src/tint2conf/CMakeLists.txt.orig  Tue Aug 11 09:26:49 2015
-+++ src/tint2conf/CMakeLists.txt       Fri Sep 11 15:30:10 2015
-@@ -71,4 +71,3 @@ add_subdirectory(po)
- install( TARGETS tint2conf DESTINATION bin )
- install( FILES tint2conf.svg DESTINATION 
${DATADIR}/icons/hicolor/scalable/apps )
- install( FILES tint2conf.desktop DESTINATION ${DATADIR}/applications )
--install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t 
${DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" )
diff -urPN -x CVS /usr/ports/x11/tint2/patches/patch-src_tint2conf_main_c 
/usr/ports/mystuff/x11/tint2/patches/patch-src_tint2conf_main_c
--- /usr/ports/x11/tint2/patches/patch-src_tint2conf_main_c     Sat Nov 26 
03:06:16 2016
+++ /usr/ports/mystuff/x11/tint2/patches/patch-src_tint2conf_main_c     Tue Jun 
 6 23:32:55 2017
@@ -1,12 +1,12 @@
-$OpenBSD: patch-src_tint2conf_main_c,v 1.1 2016/11/26 02:06:16 jca Exp $
---- src/tint2conf/main.c.orig  Tue Nov 22 21:42:54 2016
-+++ src/tint2conf/main.c       Tue Nov 22 21:43:58 2016
-@@ -503,7 +503,7 @@ static void set_current_theme()
+$OpenBSD$
+--- src/tint2conf/main.c.orig  Tue Jun  6 23:21:53 2017
++++ src/tint2conf/main.c       Tue Jun  6 23:25:42 2017
+@@ -100,7 +100,7 @@ char *file_name_from_path(const char *filepath)

-               gchar *main_file = g_build_filename(g_get_user_config_dir(), "tint2", 
"tint2rc", NULL);
-               {
--                      gchar *backup_path = g_strdup_printf("%s.backup.%ld", 
main_file, time(NULL));
-+                      gchar *backup_path = g_strdup_printf("%s.backup.%lld", 
main_file, (long long)time(NULL));
-                       copy_file(main_file, backup_path);
-                       g_free(backup_path);
-               }
+ void make_backup(const char *filepath)
+ {
+-    gchar *backup_path = g_strdup_printf("%s.backup.%ld", filepath, 
time(NULL));
++    gchar *backup_path = g_strdup_printf("%s.backup.%lld", filepath, (long 
long)time(NULL));
+     copy_file(filepath, backup_path);
+     g_free(backup_path);
+ }
diff -urPN -x CVS /usr/ports/x11/tint2/patches/patch-src_tint2conf_properties_c 
/usr/ports/mystuff/x11/tint2/patches/patch-src_tint2conf_properties_c
--- /usr/ports/x11/tint2/patches/patch-src_tint2conf_properties_c       Sat Nov 
26 03:06:16 2016
+++ /usr/ports/mystuff/x11/tint2/patches/patch-src_tint2conf_properties_c       
Tue Jun  6 23:32:55 2017
@@ -1,12 +1,12 @@
-$OpenBSD: patch-src_tint2conf_properties_c,v 1.1 2016/11/26 02:06:16 jca Exp $
---- src/tint2conf/properties.c.orig    Tue Nov 22 21:44:18 2016
-+++ src/tint2conf/properties.c Tue Nov 22 21:44:32 2016
-@@ -171,7 +171,7 @@ void applyClicked(GtkWidget *widget, gpointer data)
-       gchar *file = get_current_theme_file_name();
-       if (file) {
-               if (config_is_manual(file)) {
--                      gchar *backup_path = g_strdup_printf("%s.backup.%ld", 
file, time(NULL));
-+                      gchar *backup_path = g_strdup_printf("%s.backup.%lld", 
file, (long long)time(NULL));
-                       copy_file(file, backup_path);
-                       g_free(backup_path);
-               }
+$OpenBSD$
+--- src/tint2conf/properties.c.orig    Tue Jun  6 23:26:45 2017
++++ src/tint2conf/properties.c Tue Jun  6 23:27:29 2017
+@@ -180,7 +180,7 @@ void applyClicked(GtkWidget *widget, gpointer data)
+     gchar *filepath = get_current_theme_path();
+     if (filepath) {
+         if (config_is_manual(filepath)) {
+-            gchar *backup_path = g_strdup_printf("%s.backup.%ld", filepath, 
time(NULL));
++            gchar *backup_path = g_strdup_printf("%s.backup.%lld", filepath, 
(long long)time(NULL));
+             copy_file(filepath, backup_path);
+             g_free(backup_path);
+         }
diff -urPN -x CVS /usr/ports/x11/tint2/pkg/PLIST 
/usr/ports/mystuff/x11/tint2/pkg/PLIST
--- /usr/ports/x11/tint2/pkg/PLIST      Fri Sep 11 16:14:07 2015
+++ /usr/ports/mystuff/x11/tint2/pkg/PLIST      Thu Jun  8 22:29:03 2017
@@ -1,4 +1,4 @@
-@comment $OpenBSD: PLIST,v 1.1.1.1 2015/09/11 14:14:07 sthen Exp $
+@comment $OpenBSD$
 @pkgpath x11/tint
 @bin bin/tint2
 @bin bin/tint2conf
@@ -9,8 +9,16 @@
 share/doc/tint2/AUTHORS
 share/doc/tint2/ChangeLog
 share/doc/tint2/README.md
+share/doc/tint2/html/
+share/doc/tint2/html/images/
+share/doc/tint2/html/images/panel_padding.jpg
+share/doc/tint2/html/images/panel_size_margin.jpg
+share/doc/tint2/html/images/task_padding.jpg
+share/doc/tint2/html/images/taskbar_padding.jpg
+share/doc/tint2/html/manual.html
+share/doc/tint2/html/readme.html
+share/doc/tint2/tint2.md
 share/examples/tint2/
-@sample ${SYSCONFDIR}/xdg/
 share/examples/tint2/horizontal-dark-opaque.tint2rc
 share/examples/tint2/horizontal-dark-transparent.tint2rc
 share/examples/tint2/horizontal-light-opaque.tint2rc
@@ -32,22 +40,25 @@
 share/examples/tint2/text_only_5.tint2rc
 share/examples/tint2/text_only_6.tint2rc
 share/examples/tint2/tint2rc
-@sample ${SYSCONFDIR}/xdg/tint2/
-@sample ${SYSCONFDIR}/xdg/tint2/tint2rc
 share/examples/tint2/vertical-dark-opaque.tint2rc
 share/examples/tint2/vertical-dark-transparent.tint2rc
 share/examples/tint2/vertical-light-opaque.tint2rc
 share/examples/tint2/vertical-light-transparent.tint2rc
+share/examples/tint2/vertical-neutral-icons.tint2rc
 share/icons/hicolor/scalable/apps/tint2.svg
 share/icons/hicolor/scalable/apps/tint2conf.svg
 share/locale/bs/LC_MESSAGES/tint2conf.mo
 share/locale/fr/LC_MESSAGES/tint2conf.mo
 share/locale/hr/LC_MESSAGES/tint2conf.mo
 share/locale/pl/LC_MESSAGES/tint2conf.mo
+share/locale/ru/LC_MESSAGES/tint2conf.mo
 share/locale/sr/LC_MESSAGES/tint2conf.mo
+share/mime/packages/tint2conf.xml
 share/tint2/
 share/tint2/default_icon.png
 @exec %D/bin/update-desktop-database
 @unexec-delete %D/bin/update-desktop-database
 @exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
 @unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
+@exec %D/bin/update-mime-database %D/share/mime
+@unexec-delete %D/bin/update-mime-database %D/share/mime

Reply via email to