Github messages for voidlinux
 help / color / mirror / Atom feed
From: Nicop06 <Nicop06@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] new package: FreeFileSync
Date: Sun, 21 Apr 2024 23:45:28 +0200	[thread overview]
Message-ID: <20240421214528.EB5AA22015@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49934@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

There is an updated pull request by Nicop06 against master on the void-packages repository

https://github.com/Nicop06/void-packages FreeFileSync
https://github.com/void-linux/void-packages/pull/49934

new package: FreeFileSync
#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)


A patch file from https://github.com/void-linux/void-packages/pull/49934.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-FreeFileSync-49934.patch --]
[-- Type: text/x-diff, Size: 8500 bytes --]

From 53581f30bb93391bad4a6d9e1e4e6acb9bbd9c4e Mon Sep 17 00:00:00 2001
From: Nicolas Porcel <nicolasporcel06@gmail.com>
Date: Wed, 17 Mar 2021 01:09:40 +0000
Subject: [PATCH] new package: FreeFileSync

---
 .../FreeFileSync/files/FreeFileSync.desktop   | 11 +++++
 .../FreeFileSync/files/RealTimeSync.desktop   | 11 +++++
 .../patches/allow_wxUSE_EXCEPTIONS.patch      | 30 ++++++++++++
 .../remove_namespace_prefix_for_gobject.patch | 13 +++++
 srcpkgs/FreeFileSync/patches/use_gtk3.patch   | 32 +++++++++++++
 srcpkgs/FreeFileSync/template                 | 48 +++++++++++++++++++
 6 files changed, 145 insertions(+)
 create mode 100644 srcpkgs/FreeFileSync/files/FreeFileSync.desktop
 create mode 100644 srcpkgs/FreeFileSync/files/RealTimeSync.desktop
 create mode 100644 srcpkgs/FreeFileSync/patches/allow_wxUSE_EXCEPTIONS.patch
 create mode 100644 srcpkgs/FreeFileSync/patches/remove_namespace_prefix_for_gobject.patch
 create mode 100644 srcpkgs/FreeFileSync/patches/use_gtk3.patch
 create mode 100644 srcpkgs/FreeFileSync/template

diff --git a/srcpkgs/FreeFileSync/files/FreeFileSync.desktop b/srcpkgs/FreeFileSync/files/FreeFileSync.desktop
new file mode 100644
index 00000000000000..b94e4799d12316
--- /dev/null
+++ b/srcpkgs/FreeFileSync/files/FreeFileSync.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Name=FreeFileSync
+GenericName=Folder Comparison and Synchronization
+GenericName[de_DE]=Ordnervergleich und Synchronisation
+Exec=FreeFileSync %F
+Icon=/usr/share/pixmaps/FreeFileSync.png
+NoDisplay=false
+Terminal=false
+Categories=Utility;FileTools;
+StartupNotify=true
diff --git a/srcpkgs/FreeFileSync/files/RealTimeSync.desktop b/srcpkgs/FreeFileSync/files/RealTimeSync.desktop
new file mode 100644
index 00000000000000..dfd533ffd88a71
--- /dev/null
+++ b/srcpkgs/FreeFileSync/files/RealTimeSync.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Name=RealTimeSync
+GenericName=Automated Synchronization
+GenericName[de_DE]=Automatisierte Synchronisation
+Exec=RealTimeSync %f
+Icon=/usr/share/pixmaps/RealTimeSync.png
+NoDisplay=false
+Terminal=false
+Categories=Utility;FileTools;
+StartupNotify=true
diff --git a/srcpkgs/FreeFileSync/patches/allow_wxUSE_EXCEPTIONS.patch b/srcpkgs/FreeFileSync/patches/allow_wxUSE_EXCEPTIONS.patch
new file mode 100644
index 00000000000000..51f011d89faf00
--- /dev/null
+++ b/srcpkgs/FreeFileSync/patches/allow_wxUSE_EXCEPTIONS.patch
@@ -0,0 +1,30 @@
+Index: FreeFileSync-13.5/FreeFileSync/Source/RealTimeSync/application.cpp
+===================================================================
+--- FreeFileSync-13.5.orig/FreeFileSync/Source/RealTimeSync/application.cpp
++++ FreeFileSync-13.5/FreeFileSync/Source/RealTimeSync/application.cpp
+@@ -209,10 +209,6 @@ wxLayoutDirection Application::GetLayout
+ 
+ int Application::OnRun()
+ {
+-#if wxUSE_EXCEPTIONS
+-#error why is wxWidgets uncaught exception handling enabled!?
+-#endif
+-
+     //exception => Windows: let it crash and create mini dump!!! Linux/macOS: std::exception::what() logged to console
+         [[maybe_unused]] const int rc = wxApp::OnRun();
+     return static_cast<int>(FfsExitCode::success); //process exit code
+Index: FreeFileSync-13.5/FreeFileSync/Source/application.cpp
+===================================================================
+--- FreeFileSync-13.5.orig/FreeFileSync/Source/application.cpp
++++ FreeFileSync-13.5/FreeFileSync/Source/application.cpp
+@@ -243,10 +243,6 @@ wxLayoutDirection Application::GetLayout
+ 
+ int Application::OnRun()
+ {
+-#if wxUSE_EXCEPTIONS
+-#error why is wxWidgets uncaught exception handling enabled!?
+-#endif
+-
+     //exception => Windows: let it crash and create mini dump!!! Linux/macOS: std::exception::what() logged to console
+         [[maybe_unused]] const int rc = wxApp::OnRun();
+     return static_cast<int>(exitCode_);
diff --git a/srcpkgs/FreeFileSync/patches/remove_namespace_prefix_for_gobject.patch b/srcpkgs/FreeFileSync/patches/remove_namespace_prefix_for_gobject.patch
new file mode 100644
index 00000000000000..a8ebacfcf8a47a
--- /dev/null
+++ b/srcpkgs/FreeFileSync/patches/remove_namespace_prefix_for_gobject.patch
@@ -0,0 +1,13 @@
+Index: FreeFileSync-13.5/FreeFileSync/Source/base/icon_loader.cpp
+===================================================================
+--- FreeFileSync-13.5.orig/FreeFileSync/Source/base/icon_loader.cpp
++++ FreeFileSync-13.5/FreeFileSync/Source/base/icon_loader.cpp
+@@ -227,7 +227,7 @@ FileIconHolder fff::getFileIcon(const Zs
+     //the remaining icon types won't block!
+     assert(GDK_IS_PIXBUF(gicon) || G_IS_THEMED_ICON(gicon) || G_IS_EMBLEMED_ICON(gicon));
+ 
+-    ::g_object_ref(gicon);                 //pass ownership
++    g_object_ref(gicon);                 //pass ownership
+     return FileIconHolder(gicon, maxSize); //
+ 
+ }
diff --git a/srcpkgs/FreeFileSync/patches/use_gtk3.patch b/srcpkgs/FreeFileSync/patches/use_gtk3.patch
new file mode 100644
index 00000000000000..9d622ab7133d66
--- /dev/null
+++ b/srcpkgs/FreeFileSync/patches/use_gtk3.patch
@@ -0,0 +1,32 @@
+Index: FreeFileSync-13.5/FreeFileSync/Source/Makefile
+===================================================================
+--- FreeFileSync-13.5.orig/FreeFileSync/Source/Makefile
++++ FreeFileSync-13.5/FreeFileSync/Source/Makefile
+@@ -17,9 +17,8 @@ LDFLAGS += `pkg-config --libs   libcurl`
+ CXXFLAGS  += `pkg-config --cflags libssh2`
+ LDFLAGS += `pkg-config --libs   libssh2`
+ 
+-CXXFLAGS  += `pkg-config --cflags gtk+-2.0`
+-#treat as system headers so that warnings are hidden:
+-CXXFLAGS  += -isystem/usr/include/gtk-2.0
++CXXFLAGS  += `pkg-config --cflags gtk+-3.0`
++LDFLAGS  += `pkg-config --libs gtk+-3.0`
+ 
+ #support for SELinux (optional)
+ SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES)
+Index: FreeFileSync-13.5/FreeFileSync/Source/RealTimeSync/Makefile
+===================================================================
+--- FreeFileSync-13.5.orig/FreeFileSync/Source/RealTimeSync/Makefile
++++ FreeFileSync-13.5/FreeFileSync/Source/RealTimeSync/Makefile
+@@ -8,9 +8,8 @@ CXXFLAGS += -std=c++23 -pipe -DWXINTL_NO
+ LDFLAGS += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread
+ 
+ #Gtk - support "no button border"
+-CXXFLAGS  += `pkg-config --cflags gtk+-2.0`
+-#treat as system headers so that warnings are hidden:
+-CXXFLAGS  += -isystem/usr/include/gtk-2.0
++CXXFLAGS  += `pkg-config --cflags gtk+-3.0`
++LDFLAGS  += `pkg-config --libs gtk+-3.0`
+ 
+ cppFiles=
+ cppFiles+=application.cpp
diff --git a/srcpkgs/FreeFileSync/template b/srcpkgs/FreeFileSync/template
new file mode 100644
index 00000000000000..c8865f1c8f8055
--- /dev/null
+++ b/srcpkgs/FreeFileSync/template
@@ -0,0 +1,48 @@
+# Template file for 'FreeFileSync'
+pkgname=FreeFileSync
+version=13.5
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+build_style=gnu-makefile
+hostmakedepends="unzip wget"
+makedepends="pkg-config libglib-devel wxWidgets-gtk3-devel libcurl-devel openssl-devel libssh2-devel"
+depends="wxWidgets-gtk3 libcurl libssh2 openssl"
+short_desc="Backup software to synchronize files and folders"
+maintainer="Nicolas Porcel <nicolasporcel06@gmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://freefilesync.org"
+distfiles="${homepage}/download/${pkgname}_${version}_Source.zip"
+checksum=@264c9ce29cdbce601707b4514661e0c2c5fe45b67185f9ba0599a95c7c6fab92
+fetch_cmd="wget"
+
+CXXFLAGS="-DMAX_SFTP_READ_SIZE=30000 -DMAX_SFTP_OUTGOING_SIZE=30000"
+
+nopie_files="/opt/${pkgname}/Bin/FreeFileSync /opt/${pkgname}/Bin/RealTimeSync"
+
+post_patch() {
+	sed -i 's/wx-config/wx-config-gtk3/' FreeFileSync/Source/{,RealTimeSync/}Makefile
+}
+
+do_build() {
+	make ${makejobs} exeName=FreeFileSync -C FreeFileSync/Source
+	make ${makejobs} exeName=RealTimeSync -C FreeFileSync/Source/RealTimeSync
+	unzip FreeFileSync/Build/Resources/Icons.zip FreeFileSync.png RealTimeSync.png -d FreeFileSync/Build
+}
+
+do_install() {
+	vmkdir opt/${pkgname}
+	vcopy FreeFileSync/Build/Bin opt/${pkgname}
+	vcopy FreeFileSync/Build/Resources opt/${pkgname}
+
+	vmkdir usr/share/pixmaps
+	vinstall FreeFileSync/Build/FreeFileSync.png 0644 usr/share/pixmaps
+	vinstall FreeFileSync/Build/RealTimeSync.png 0644 usr/share/pixmaps
+
+	vmkdir usr/share/applications
+	vinstall ${FILESDIR}/FreeFileSync.desktop 0644 usr/share/applications
+	vinstall ${FILESDIR}/RealTimeSync.desktop 0644 usr/share/applications
+
+	vmkdir usr/bin
+	ln -s /opt/FreeFileSync/Bin/{FreeFileSync,RealTimeSync} ${DESTDIR}/usr/bin
+}

  reply	other threads:[~2024-04-21 21:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20 11:39 [PR PATCH] " Nicop06
2024-04-21 21:45 ` Nicop06 [this message]
2024-04-21 21:55 ` [PR PATCH] [Updated] " Nicop06
2024-04-21 22:41 ` Nicop06
2024-04-21 22:41 ` Nicop06
2024-04-22  9:31 ` Nicop06
2024-04-22 20:13 ` Nicop06

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240421214528.EB5AA22015@inbox.vuxu.org \
    --to=nicop06@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).