From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 04:13:01 2023 Received: (at submit) by debbugs.gnu.org; 1 Feb 2023 09:13:01 +0000 Received: from localhost ([127.0.0.1]:56441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pN9An-0005Xr-T6 for submit@debbugs.gnu.org; Wed, 01 Feb 2023 04:13:01 -0500 Received: from lists.gnu.org ([209.51.188.17]:58154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pN4zQ-0003Dg-Qk for submit@debbugs.gnu.org; Tue, 31 Jan 2023 23:44:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pN4zQ-00019A-8z for guix-patches@gnu.org; Tue, 31 Jan 2023 23:44:56 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pN4zN-00063b-Fc for guix-patches@gnu.org; Tue, 31 Jan 2023 23:44:55 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 88D8124049F for ; Wed, 1 Feb 2023 05:44:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1675226686; bh=03Zp8IqrlryC0aaQjd+t9IP8p2jtdCFtYMJI6RCHw6A=; h=From:To:Subject:Date:From; b=WAykqXvABVLfLJBZ3/cBM5aiHoiCJJBoe9lJXCiCMzJ4xGEguXSOqpyz5NIEdI/wo ECO+1hmHG8Im2vt2aYw30Qr+g4WJ0HGT4WLQzVOCVS5YCM9/Qatn0oIKq7k1Cv+7fs ZCoQ+OKlHuFvi2kqgkqa9a9pLlHScVgXB05Ydj8tVeNERgTnkGFBIUabvfsJbGTedQ EKIn6rmySDLJhza2Q+k1cWbr/uPN9z1Ry9oifeuhVTAdm5inZKI1PeMk2CMASFKoP2 Jaa2XhsnXI2UO3JmAymXK9SoyUgXzSXY2C03mlhaNxHx1wGlpXqj3ZrAtczR3azA1r NdEOA4j1FlyeA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4P68Tn2TqGz9rxB for ; Wed, 1 Feb 2023 05:44:45 +0100 (CET) From: Skylar Hill To: guix-patches@gnu.org Subject: [PATCH] gnu: Add opentaxsolver. Date: Wed, 01 Feb 2023 04:44:24 +0000 Message-ID: <87v8kmyoyf.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=stellarskylark@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 01 Feb 2023 04:12:57 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hello, everyone, With tax season coming up in the US, I wanted to use OpenTaxSolver to prepare my tax return. However, it wasn't packaged on Guix! OTS assumes it'll be run directly from an unpacked tarball, so a patch is also included to fix some of the issues that causes (namely that an unmodified build will try to save files to the store instead of the user's home directory). This is my first time trying to package something for Guix, so if there are any glaring issues or mistakes here, please let me know! Skylar Hill --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-opentaxsolver.patch Content-Transfer-Encoding: quoted-printable Content-Description: gnu: Add opentaxsolver. >From ec431fbcc49c8bb57ea6c11bb3fb4f5a93aa1a10 Mon Sep 17 00:00:00 2001 From: Skylar Hill Date: Tue, 31 Jan 2023 22:30:25 -0600 Subject: [PATCH] gnu: Add opentaxsolver. * gnu/packages/opentaxsolver.scm (opentaxsolver): New variable. --- gnu/packages/opentaxsolver.scm | 94 +++++++++++++++++++ .../opentaxsolver-file-browser-fix.patch | 58 ++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 gnu/packages/opentaxsolver.scm create mode 100644 gnu/packages/patches/opentaxsolver-file-browser-fix.pat= ch diff --git a/gnu/packages/opentaxsolver.scm b/gnu/packages/opentaxsolver.scm new file mode 100644 index 0000000000..85ba40a2ea --- /dev/null +++ b/gnu/packages/opentaxsolver.scm @@ -0,0 +1,94 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2023 Skylar Hill +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages opentaxsolver) + #:use-module (gnu packages) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system glib-or-gtk) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages gcc) + #:use-module (gnu packages gtk) + #:use-module (gnu packages pkg-config)) + +;; The version number seems to consist of two separate parts, a typical +;; version number (ots-version) and a tax year. At time of writing, the +;; version is 2022_20.00. Both parts are used separately in the tarball u= ri, +;; it is convenient to define both as separate variables. + +(define tax-year "2022") +(define ots-version "20.00") + +(define-public opentaxsolver + (package + (name "opentaxsolver") + (version (string-append tax-year "_" ots-version)) + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/opentaxsolver/OTS_" + tax-year + "/v" + ots-version + "_linux/OpenTaxSolver" + version + "_linux64.tgz")) + (sha256 + (base32 + "06k0a72bmwdmr71dvrp8b4vl8vilnggsh92hrp7wjdgcjj9m074w")) + (patches (search-patches "opentaxsolver-file-browser-fix.pat= ch")))) + (build-system glib-or-gtk-build-system) + + (arguments + '(#:phases (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + ;; The provided Build_taxsolve_packages.sh would do = this, but + ;; then we can't configure CC=3Dgcc in the make call= s, which + ;; errors. Also, the provided `make clean` doesn't = delete the + ;; GUI. + (delete-file "Run_taxsolve_GUI") + (delete-file-recursively "bin") + (mkdir "bin") + (chdir "src/Gui_gtk") + (invoke "make" "CC=3Dgcc") + (chdir "..") + (invoke "make" "CC=3Dgcc"))) + (delete 'check) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + ;; OTS was designed to be run straight out of the = unpacked + ;; tarball. Thus, the installation procedure is ex= tremely + ;; cursed. Also note we don't use the provided + ;; Run_taxsolve_GUI because it's pointless in this= context. + (copy-recursively "../bin" bin) + (copy-recursively "../tax_form_files" + (string-append out "/tax_form_fi= les")) + (copy-recursively "formdata" + (string-append out "/src/formdat= a")))))))) + (inputs (list (specification->package "gtk+@2"))) + (native-inputs (list gcc pkg-config)) + (synopsis "Yearly tax preparation tool") + (description + "OpenTaxSolver is a free, safe, and secure program for calculating ta= x form entries for federal and state personal income taxes. It automatical= ly fills out and prints your forms for mailing. + +Invoke with @code{ots_gui2} rather than the usual @code{Run_taxsolve_GUI}.= ") + (home-page "https://opentaxsolver.sourceforge.net/") + (license license:gpl2+))) diff --git a/gnu/packages/patches/opentaxsolver-file-browser-fix.patch b/gn= u/packages/patches/opentaxsolver-file-browser-fix.patch new file mode 100644 index 0000000000..0e6be74f85 --- /dev/null +++ b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch @@ -0,0 +1,58 @@ +From 96fda11a53a89c6647031f2c05ef12f1a9df6a08 Mon Sep 17 00:00:00 2001 +From: Skylar Hill +Date: Tue, 31 Jan 2023 21:02:18 -0600 +Subject: [PATCH] Change default directory in file browser + +--- + src/Gui_gtk/ots_gui2.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/Gui_gtk/ots_gui2.c b/src/Gui_gtk/ots_gui2.c +index ff3366b..1247933 100644 +--- a/src/Gui_gtk/ots_gui2.c ++++ b/src/Gui_gtk/ots_gui2.c +@@ -82,6 +82,7 @@ char ots_release_package[]=3D"20.00"; + #include + #include + #include ++#include + #include + // #include "backcompat.c" + #include "gtk_utils.c" /* Include the graphics library. */ +@@ -109,6 +110,7 @@ char toolpath[MaxFname]=3D"", *start_cmd; + int pending_compute=3D0, supported_pdf_form=3D1; + int filingstatus_mfj=3D1; + int round_to_whole_nums=3D0; ++char *working_dir[MaxFname+512]; +=20 + void pick_file( GtkWidget *wdg, void *data ); /* Prototype */ + void consume_leading_trailing_whitespace( char *line ); +@@ -2364,7 +2366,7 @@ void save_taxfile( GtkWidget *wdg, void *data ) + if (cpt !=3D 0) + strcpy( cpt, "_xxxx.txt" ); + // printf("OTS_save_taxfile: dir=3D'%s', wc=3D'%s', fname=3D'%s'\n", dir= ectory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "File to Save As:", 2048, directory_dat, wildcards_fb, fil= ename_fb, Save_Tax_File ); ++ Browse_Files( "File to Save As:", 2048, working_dir, wildcards_fb, filen= ame_fb, Save_Tax_File ); + } +=20 +=20 +@@ -3878,7 +3880,7 @@ void pick_file( GtkWidget *wdg, void *data ) + strcpy( wildcards_fb, ".txt" ); + strcpy( filename_fb, "" ); + // printf("OTS_pick_file: dir=3D'%s', wc=3D'%s', fname=3D'%s'\n", direc= tory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "Select File", 2048, directory_dat, wildcards_fb, filenam= e_fb, receive_filename ); ++ Browse_Files( "Select File", 2048, working_dir, wildcards_fb, filename_= fb, receive_filename ); + } +=20 +=20 +@@ -4019,6 +4021,7 @@ int main(int argc, char *argv[] ) + invocation_path[k] =3D '\0'; + // printf("Invocation path =3D '%s'\n", invocation_path); + set_ots_path(); ++ getcwd(working_dir, MaxFname+512); +=20 + /* Decode any command-line arguments. */ + argn =3D 1; k=3D1; +--=20 +2.38.1 + --=20 2.38.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 02 13:31:15 2023 Received: (at 61207) by debbugs.gnu.org; 2 Feb 2023 18:31:15 +0000 Received: from localhost ([127.0.0.1]:35797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNeMd-0004yo-08 for submit@debbugs.gnu.org; Thu, 02 Feb 2023 13:31:15 -0500 Received: from jpoiret.xyz ([206.189.101.64]:56568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNeMa-0004yd-6V for 61207@debbugs.gnu.org; Thu, 02 Feb 2023 13:31:13 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 45ED2184F0F; Thu, 2 Feb 2023 18:31:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1675362670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2aDEKteZYgY+XttZi/DKmrRqjviL4bkCyNBZ1xd6Sf8=; b=GfW90W6rVV13tmfAPh486N/C75YAnFXx2scWtcpGXcRD+NPMTYgRQZEuw0I9A8G0zTizvy 5hYu99MPV+hzNWLv8HU5bdtyd/RtQMIwO3RXw3uAyFHQ33EX7sJwcFawZuqzU56QyYkgpK 95260fitkBqwnWabS7B83GHBujp8QNYcVU5Ny+1SzwZQR8v1wBfrcYv1871YUWp4h1N0pu Q7+s81RwGIxibLRX4kjecFth7mlUKwUH1nYqyGprSFVo59QZTn2pkVBG4WTsfcn76zxDwD TcjH/PnSqYtBExovG3lDWBzfH3nE8w77978bBN3B6XtIMW7zaBsYIvxkRQBEeg== From: Josselin Poiret To: Skylar Hill , 61207@debbugs.gnu.org Subject: Re: [bug#61207] [PATCH] gnu: Add opentaxsolver. In-Reply-To: <87v8kmyoyf.fsf@posteo.net> References: <87v8kmyoyf.fsf@posteo.net> Date: Thu, 02 Feb 2023 19:31:09 +0100 Message-ID: <87o7qbx6ky.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61207 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi Skylar, Skylar Hill writes: > Hello, everyone, > > With tax season coming up in the US, I wanted to use OpenTaxSolver to > prepare my tax return. However, it wasn't packaged on Guix! > > OTS assumes it'll be run directly from an unpacked tarball, so a patch > is also included to fix some of the issues that causes (namely that an > unmodified build will try to save files to the store instead of the > user's home directory). > > This is my first time trying to package something for Guix, so if there > are any glaring issues or mistakes here, please let me know! Thanks for your work! Adding a new package is a great first contribution. Here are some suggestions: > Skylar Hill > > From ec431fbcc49c8bb57ea6c11bb3fb4f5a93aa1a10 Mon Sep 17 00:00:00 2001 > From: Skylar Hill > Date: Tue, 31 Jan 2023 22:30:25 -0600 > Subject: [PATCH] gnu: Add opentaxsolver. > > * gnu/packages/opentaxsolver.scm (opentaxsolver): New variable. > --- > gnu/packages/opentaxsolver.scm | 94 +++++++++++++++++++ > .../opentaxsolver-file-browser-fix.patch | 58 ++++++++++++ > 2 files changed, 152 insertions(+) > create mode 100644 gnu/packages/opentaxsolver.scm We don't usually create new files for specific packages. I'd suggest putting this definition into finance.scm. > create mode 100644 gnu/packages/patches/opentaxsolver-file-browser-fix.patch > [...] > + > +;; The version number seems to consist of two separate parts, a typical > +;; version number (ots-version) and a tax year. At time of writing, the > +;; version is 2022_20.00. Both parts are used separately in the tarball uri, > +;; it is convenient to define both as separate variables. > + > +(define tax-year "2022") > +(define ots-version "20.00") > + > +(define-public opentaxsolver What I would do here instead would be to let-bind tax-year and ots-version in the body of the define-public clause, so that it's only defined there. > + (package > + (name "opentaxsolver") > + (version (string-append tax-year "_" ots-version)) > + (source (origin > + (method url-fetch) > + (uri (string-append "mirror://sourceforge/opentaxsolver/OTS_" > + tax-year > + "/v" > + ots-version > + "_linux/OpenTaxSolver" > + version > + "_linux64.tgz")) > + (sha256 > + (base32 > + "06k0a72bmwdmr71dvrp8b4vl8vilnggsh92hrp7wjdgcjj9m074w")) > + (patches (search-patches "opentaxsolver-file-browser-fix.patch")))) > + (build-system glib-or-gtk-build-system) > + > + (arguments > + '(#:phases (modify-phases %standard-phases > + (delete 'configure) > + (replace 'build > + (lambda _ > + ;; The provided Build_taxsolve_packages.sh would do this, but > + ;; then we can't configure CC=gcc in the make calls, which > + ;; errors. Also, the provided `make clean` doesn't delete the > + ;; GUI. > + (delete-file "Run_taxsolve_GUI") > + (delete-file-recursively "bin") > + (mkdir "bin") > + (chdir "src/Gui_gtk") > + (invoke "make" "CC=gcc") Here, you shouldn't directly talk about gcc, since the compiler name might be different when cross-compiling. We have a procedure for that, cc-for-target, an example use would be (invoke "make" (string-append "CC=" ,(cc-for-target))), but you would need to replace the quote '(#:phases ...) to a quasiquote `(#:phases ...). You should have a look at quote and quasiquote in the Guile info manual, node "Expression Syntax". By the way, we now use g-expressions instead of s-expressions for phases, but that might be too big of a commitment for a first contribution. Someone else can adjust that part after these changes. You can still have a look in the Guix manual for the G-Expressions node if you're so inclined. > + (chdir "..") > + (invoke "make" "CC=gcc"))) Ditto. > + (delete 'check) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (bin (string-append out "/bin"))) > + ;; OTS was designed to be run straight out of the unpacked > + ;; tarball. Thus, the installation procedure is extremely > + ;; cursed. Also note we don't use the provided > + ;; Run_taxsolve_GUI because it's pointless in this context. > + (copy-recursively "../bin" bin) > + (copy-recursively "../tax_form_files" > + (string-append out "/tax_form_files")) > + (copy-recursively "formdata" > + (string-append out "/src/formdata")))))))) > + (inputs (list (specification->package "gtk+@2"))) You shouldn't use specification->package in package definitions, as that's pretty costly (it needs to scan the whole package list for it). You should instead make the package variable available itself by using (#:use-module (gnu packages gtk)), and use the variable gtk+-2. > + (native-inputs (list gcc pkg-config)) There's no need to add gcc to the list of native-inputs, it is included by most build systems, glib-or-gtk included. > + (synopsis "Yearly tax preparation tool") > + (description > + "OpenTaxSolver is a free, safe, and secure program for calculating tax form entries for federal and state personal income taxes. It automatically fills out and prints your forms for mailing. > + > +Invoke with @code{ots_gui2} rather than the usual @code{Run_taxsolve_GUI}.") > + (home-page "https://opentaxsolver.sourceforge.net/") > + (license license:gpl2+))) > diff --git a/gnu/packages/patches/opentaxsolver-file-browser-fix.patch b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch > new file mode 100644 > index 0000000000..0e6be74f85 > --- /dev/null > +++ b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch > @@ -0,0 +1,58 @@ > +From 96fda11a53a89c6647031f2c05ef12f1a9df6a08 Mon Sep 17 00:00:00 2001 > +From: Skylar Hill > +Date: Tue, 31 Jan 2023 21:02:18 -0600 > +Subject: [PATCH] Change default directory in file browser > + > +--- > + src/Gui_gtk/ots_gui2.c | 7 +++++-- > + 1 file changed, 5 insertions(+), 2 deletions(-) > + > +diff --git a/src/Gui_gtk/ots_gui2.c b/src/Gui_gtk/ots_gui2.c > +index ff3366b..1247933 100644 > +--- a/src/Gui_gtk/ots_gui2.c > ++++ b/src/Gui_gtk/ots_gui2.c > +@@ -82,6 +82,7 @@ char ots_release_package[]="20.00"; > + #include > + #include > + #include > ++#include > + #include > + // #include "backcompat.c" > + #include "gtk_utils.c" /* Include the graphics library. */ > +@@ -109,6 +110,7 @@ char toolpath[MaxFname]="", *start_cmd; > + int pending_compute=0, supported_pdf_form=1; > + int filingstatus_mfj=1; > + int round_to_whole_nums=0; > ++char *working_dir[MaxFname+512]; > + > + void pick_file( GtkWidget *wdg, void *data ); /* Prototype */ > + void consume_leading_trailing_whitespace( char *line ); > +@@ -2364,7 +2366,7 @@ void save_taxfile( GtkWidget *wdg, void *data ) > + if (cpt != 0) > + strcpy( cpt, "_xxxx.txt" ); > + // printf("OTS_save_taxfile: dir='%s', wc='%s', fname='%s'\n", directory_dat, wildcards_fb, filename_fb ); > +- Browse_Files( "File to Save As:", 2048, directory_dat, wildcards_fb, filename_fb, Save_Tax_File ); > ++ Browse_Files( "File to Save As:", 2048, working_dir, wildcards_fb, filename_fb, Save_Tax_File ); > + } > + > + > +@@ -3878,7 +3880,7 @@ void pick_file( GtkWidget *wdg, void *data ) > + strcpy( wildcards_fb, ".txt" ); > + strcpy( filename_fb, "" ); > + // printf("OTS_pick_file: dir='%s', wc='%s', fname='%s'\n", directory_dat, wildcards_fb, filename_fb ); > +- Browse_Files( "Select File", 2048, directory_dat, wildcards_fb, filename_fb, receive_filename ); > ++ Browse_Files( "Select File", 2048, working_dir, wildcards_fb, filename_fb, receive_filename ); > + } > + > + > +@@ -4019,6 +4021,7 @@ int main(int argc, char *argv[] ) > + invocation_path[k] = '\0'; > + // printf("Invocation path = '%s'\n", invocation_path); > + set_ots_path(); > ++ getcwd(working_dir, MaxFname+512); > + > + /* Decode any command-line arguments. */ > + argn = 1; k=1; > +-- > +2.38.1 > + > -- > 2.38.1 > Best, -- Josselin Poiret From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 09:40:18 2023 Received: (at 61207) by debbugs.gnu.org; 3 Feb 2023 14:40:18 +0000 Received: from localhost ([127.0.0.1]:36947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNxEg-0001J2-0f for submit@debbugs.gnu.org; Fri, 03 Feb 2023 09:40:18 -0500 Received: from jpoiret.xyz ([206.189.101.64]:47934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNxEe-0001Is-96 for 61207@debbugs.gnu.org; Fri, 03 Feb 2023 09:40:16 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id BA84718531B; Fri, 3 Feb 2023 14:40:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1675435215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=x1D4s8ixqcNzAj0e0GpA55nn0S2kOWuNgGaCzmoCC1M=; b=pikTHgYuRbijw1LV+gjqLRhz4j+OeE63ay1frKOISUmXNrEmXKwgpBrh0PQTWToAeneFD2 Ls3740+vGoL/EXim3F5MJxGVv3d9InyF3dn0oJG6r6XpQCuyPH3KvT+Nw2vRMMzqRrZWTh pLU2XqWo0rSg5UPjgI1uW8q1Fx64V9nEQ2EsomYI1BKNO9KdsfnIPpb/nEZ6qhtITwkgvb iL4hwZpgBpwPvhWQun1v79rMdjzR79KchoDPEhFU8+IFiTGZQF/aMtDVeeTswc1PgCyELn H2cZ9gZr4S4YHhldlYdtAWr1lVMi2HnMBDcL6jeC76+Dne/8++otjnqm3MzTEg== From: Josselin Poiret To: Skylar Hill , 61207@debbugs.gnu.org Subject: Re: [bug#61207] [PATCH] gnu: Add opentaxsolver. In-Reply-To: <87y1pfg5pk.fsf@posteo.net> References: <87v8kmyoyf.fsf@posteo.net> <87o7qbx6ky.fsf@jpoiret.xyz> <87y1pfg5pk.fsf@posteo.net> Date: Fri, 03 Feb 2023 15:40:14 +0100 Message-ID: <87edr6x169.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61207 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi Skylar, Skylar Hill writes: > Thanks, Josselin! Here's an updated patch including the requested > changes. I also took a crack at switching over to G-expressions -- let > me know if I need to fix anything on that front to match best practices > or fully take advantage of the construct. > > Skylar Hill > > [...] Thanks for the quick changes, this looks really good, although you forgot to reply to the bug email address! I've added it again and will resend the patch, I've only removed one extra whitespace and rebased on top of master (there is a new copyright line where you added yours). I am no committer though so someone else will have to look at this, and there might be an issue with the license, although I'm no expert: I see some files with a GPLv2 header, another with a LGPLv2 header, some with none. Also, it's good practice to include the fact that it's the second version of a patch by adding --reroll-count=2 (shortened -v 2) to git format/send-patch, and also adding the base commit you're using using --base=auto. Best, -- Josselin Poiret From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 09:41:45 2023 Received: (at 61207) by debbugs.gnu.org; 3 Feb 2023 14:41:45 +0000 Received: from localhost ([127.0.0.1]:36952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNxG3-0001LL-EM for submit@debbugs.gnu.org; Fri, 03 Feb 2023 09:41:45 -0500 Received: from jpoiret.xyz ([206.189.101.64]:48340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNxFx-0001L9-O5 for 61207@debbugs.gnu.org; Fri, 03 Feb 2023 09:41:41 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 93825184BF2; Fri, 3 Feb 2023 14:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1675435296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZEOpcJRKCJY1p9yy0w8OOavqEHUnPFCvJe7AWWXEPTo=; b=iS27FE+aGBLJI1Vhj8ZnaETH5yOEG+tw5H/nqhzrqpKihAGhedukFm8Cnd0xfUHr+clQUW NQJ4JeuLnaoit5Ug+5MAQbJTCuWp6pyedCHTIyLAh+QUCMU/HYVkNzlEnL8t7mnfJs3sJJ B6GjcjNT0LqAmTooi7mW/DdUkXLsuLa6OrPIAyYRfYaAjCZ3JCXhLraEavVy9sY0k7zaZd 2dtisHrzyIZbi61a3942yTH9Dmn2rDdrwH+fBR70f7ijwylOY21zizWxyzLjsuKi87ONRE YbUpg2xG8D1BZPpq8VgGN1PwSQZFyhSt6W9Zb17o1qWCyjWREur975E3U7I0gA== From: Josselin Poiret To: Josselin Poiret , Skylar Hill , 61207@debbugs.gnu.org Subject: [PATCH v2] gnu: Add opentaxsolver. Date: Fri, 3 Feb 2023 15:41:27 +0100 Message-Id: In-Reply-To: <87edr6x169.fsf@jpoiret.xyz> References: <87edr6x169.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: --- X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61207 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Skylar Hill --- gnu/packages/finance.scm | 71 +++++++++++++++++++ .../opentaxsolver-file-browser-fix.patch | 58 +++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 gnu/packages/patches/opentaxsolver-file-browser-fix.patch diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index c9c8e9b823..a2795c41f9 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -33,6 +33,7 @@ ;;; Copyright © 2022 Collin J. Doering ;;; Copyright © 2022 Justin Veilleux ;;; Copyright © 2023 Frank Pursel +;;; Copyright © 2023 Skylar Hill ;;; ;;; This file is part of GNU Guix. ;;; @@ -2271,3 +2272,73 @@ (define-public p2pool Monero node and what it mines, but you get frequent payouts like on a regular pool.") (license license:gpl3))) + +(define-public opentaxsolver + ;; The OTS version is formatted like tax-year_version. So, at time of + ;; writing, the version is 2022_20.00. Each part of this is used in + ;; different places in the source uri, so it's convenient to have them + ;; separately like this. + (let ((tax-year "2022") + (ots-version "20.00")) + (package + (name "opentaxsolver") + (version (string-append tax-year "_" ots-version)) + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/opentaxsolver/OTS_" + tax-year + "/v" + ots-version + "_linux/OpenTaxSolver" + version + "_linux64.tgz")) + (sha256 + (base32 + "06k0a72bmwdmr71dvrp8b4vl8vilnggsh92hrp7wjdgcjj9m074w")) + (patches (search-patches + "opentaxsolver-file-browser-fix.patch")))) + (build-system glib-or-gtk-build-system) + (arguments + (list #:phases #~(modify-phases %standard-phases + (delete 'configure) + ;; OTS does provide a shellscript that does exactly + ;; this, but we need to do it ourselves to specify + ;; the correct compiler and to delete the GUI + ;; binaries. + (replace 'build + (lambda _ + (delete-file "Run_taxsolve_GUI") + (delete-file-recursively "bin") + (mkdir "bin") + (chdir "src/Gui_gtk") + (invoke "make" + (string-append "CC=" + #$(cc-for-target))) + (chdir "..") + (invoke "make" + (string-append "CC=" + #$(cc-for-target))))) + (delete 'check) + ;; OTS doesn't provide a `make install` target, + ;; because it assumes it'll be run from the + ;; tarball. So, we do it ourselves, making sure to + ;; replicate the directory structure of the tarball. + (replace 'install + (lambda _ + (copy-recursively "../bin" + (string-append #$output "/bin")) + (copy-recursively "../tax_form_files" + (string-append #$output + "/tax_form_files")) + (copy-recursively "formdata" + (string-append #$output + "/src/formdata"))))))) + (inputs (list gtk+-2)) + (native-inputs (list pkg-config)) + (synopsis "Yearly tax preparation tool") + (description + "OpenTaxSolver is a free, safe, and secure program for calculating tax form entries for federal and state personal income taxes. It automatically fills out and prints your forms for mailing. + +Invoke with @code{ots_gui2} rather than the usual @code{Run_taxsolve_GUI}.") + (home-page "https://opentaxsolver.sourceforge.net/") + (license license:gpl2+)))) diff --git a/gnu/packages/patches/opentaxsolver-file-browser-fix.patch b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch new file mode 100644 index 0000000000..0e6be74f85 --- /dev/null +++ b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch @@ -0,0 +1,58 @@ +From 96fda11a53a89c6647031f2c05ef12f1a9df6a08 Mon Sep 17 00:00:00 2001 +From: Skylar Hill +Date: Tue, 31 Jan 2023 21:02:18 -0600 +Subject: [PATCH] Change default directory in file browser + +--- + src/Gui_gtk/ots_gui2.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/Gui_gtk/ots_gui2.c b/src/Gui_gtk/ots_gui2.c +index ff3366b..1247933 100644 +--- a/src/Gui_gtk/ots_gui2.c ++++ b/src/Gui_gtk/ots_gui2.c +@@ -82,6 +82,7 @@ char ots_release_package[]="20.00"; + #include + #include + #include ++#include + #include + // #include "backcompat.c" + #include "gtk_utils.c" /* Include the graphics library. */ +@@ -109,6 +110,7 @@ char toolpath[MaxFname]="", *start_cmd; + int pending_compute=0, supported_pdf_form=1; + int filingstatus_mfj=1; + int round_to_whole_nums=0; ++char *working_dir[MaxFname+512]; + + void pick_file( GtkWidget *wdg, void *data ); /* Prototype */ + void consume_leading_trailing_whitespace( char *line ); +@@ -2364,7 +2366,7 @@ void save_taxfile( GtkWidget *wdg, void *data ) + if (cpt != 0) + strcpy( cpt, "_xxxx.txt" ); + // printf("OTS_save_taxfile: dir='%s', wc='%s', fname='%s'\n", directory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "File to Save As:", 2048, directory_dat, wildcards_fb, filename_fb, Save_Tax_File ); ++ Browse_Files( "File to Save As:", 2048, working_dir, wildcards_fb, filename_fb, Save_Tax_File ); + } + + +@@ -3878,7 +3880,7 @@ void pick_file( GtkWidget *wdg, void *data ) + strcpy( wildcards_fb, ".txt" ); + strcpy( filename_fb, "" ); + // printf("OTS_pick_file: dir='%s', wc='%s', fname='%s'\n", directory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "Select File", 2048, directory_dat, wildcards_fb, filename_fb, receive_filename ); ++ Browse_Files( "Select File", 2048, working_dir, wildcards_fb, filename_fb, receive_filename ); + } + + +@@ -4019,6 +4021,7 @@ int main(int argc, char *argv[] ) + invocation_path[k] = '\0'; + // printf("Invocation path = '%s'\n", invocation_path); + set_ots_path(); ++ getcwd(working_dir, MaxFname+512); + + /* Decode any command-line arguments. */ + argn = 1; k=1; +-- +2.38.1 + base-commit: c19cd9f9470a8d60f8c1f8e0ff26b9cdb0e083ad -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 11 17:07:44 2023 Received: (at submit) by debbugs.gnu.org; 11 Feb 2023 22:07:44 +0000 Received: from localhost ([127.0.0.1]:43469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQy24-0005V6-BE for submit@debbugs.gnu.org; Sat, 11 Feb 2023 17:07:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:39512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQy21-0005Ur-JF for submit@debbugs.gnu.org; Sat, 11 Feb 2023 17:07:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQy21-0005Cz-9k for guix-patches@gnu.org; Sat, 11 Feb 2023 17:07:41 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQy1y-0000ES-BN for guix-patches@gnu.org; Sat, 11 Feb 2023 17:07:40 -0500 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by mail.gandi.net (Postfix) with ESMTPSA id 5FCFD60002; Sat, 11 Feb 2023 22:07:33 +0000 (UTC) From: Nicolas Goaziou To: Josselin Poiret via Guix-patches via Subject: Re: [bug#61207] [PATCH v2] gnu: Add opentaxsolver. Message-ID: <87mt5jsvt6.fsf@nicolasgoaziou.fr> References: <87edr6x169.fsf@jpoiret.xyz> Date: Sat, 11 Feb 2023 23:07:22 +0100 In-Reply-To: (Josselin Poiret via Guix-patches via's message of "Fri, 3 Feb 2023 15:41:27 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:4b98:dc4:8::223; envelope-from=mail@nicolasgoaziou.fr; helo=relay3-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: Josselin Poiret , 61207@debbugs.gnu.org, Skylar Hill X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Hello, Josselin Poiret via Guix-patches via writes: > From: Skylar Hill Thanks to both of you. > > + (source (origin > + (method url-fetch) > + (uri (string-append "mirror://sourceforge/opentaxsolver/OTS_" > + tax-year > + "/v" > + ots-version > + "_linux/OpenTaxSolver" > + version > + "_linux64.tgz")) Formatting needs some love here. > + (sha256 > + (base32 > + "06k0a72bmwdmr71dvrp8b4vl8vilnggsh92hrp7wjdgcjj9m074w")) > + (patches (search-patches > + "opentaxsolver-file-browser-fix.patch")))) This file needs to be registered in gnu/local.mk file. > + (build-system glib-or-gtk-build-system) > + (arguments > + (list #:phases #~(modify-phases %standard-phases (list #:phases #~(...)) > + (delete 'check) There are no tests. You need to use #:tests? keyword instead. > + (description > + "OpenTaxSolver is a free, safe, and secure program for calculating tax form entries for federal and state personal income taxes. It automatically fills out and prints your forms for mailing. I suggest to remove "free, safe, and secure". Description needs to be filled, too. > +Invoke with @code{ots_gui2} rather than the usual > @code{Run_taxsolve_GUI}.") Note that it is possible to create a symlink to reintroduce Run_taxsolve_GUI. > + (license license:gpl2+)))) I agree with Josselin. Licensing is unclear. Many files do not have a license, or are "user contributed" (under what terms?). Would it be possible to clarify this with upstream? Regards, -- Nicolas Goaziou From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 12 23:31:48 2023 Received: (at submit) by debbugs.gnu.org; 13 Feb 2023 04:31:48 +0000 Received: from localhost ([127.0.0.1]:47329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRQVG-0000fD-0U for submit@debbugs.gnu.org; Sun, 12 Feb 2023 23:31:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:56284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRP69-0006QQ-Bt for submit@debbugs.gnu.org; Sun, 12 Feb 2023 22:01:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRP69-0002Y0-67 for guix-patches@gnu.org; Sun, 12 Feb 2023 22:01:45 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRP66-0008SA-Ih for guix-patches@gnu.org; Sun, 12 Feb 2023 22:01:44 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BB6A5240178 for ; Mon, 13 Feb 2023 04:01:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1676257299; bh=Z/hqYR+Z9aI6wtH0EAWVg+4thEWGRSQv8BDCw7sFWCs=; h=From:To:Cc:Subject:Date:From; b=TlnsyxpqJw0Cz7tUMhhnIrXZOm6UrqmQGi6vA6dipIBJKXOSGt0D94cyK4BpE6jIP VvP0G+lGZ344GyvUx/F0VbV3Jm8sSeUlngB0P5uM4qNxnAY3+RLbFFsXqCmDdLf6CN gCYXPe5KWiXbJKkIzIWZ9MEE4+eBceNRlmpj/+gyYV5oMzfz9xRUtsSMCGWP4Z4/lP 19/MX8l8gNEQucSp9rvdhKhbuy5aqT5lM55sBZA9nGzhrhkSuVMjPxBlRzaRCMub/H 2emocKxWECOvhb5lDuDlIi9w7NnlF2tVpAxUBuR48opwY23opsoiCoHMcTn3+z5Shx lb5yc4aya93JQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PFTdF5pqTz6trS; Mon, 13 Feb 2023 04:01:34 +0100 (CET) From: Skylar Hill To: Nicolas Goaziou Subject: Re: [bug#61207] [PATCH v2] gnu: Add opentaxsolver. References: <87edr6x169.fsf@jpoiret.xyz> <87mt5jsvt6.fsf@nicolasgoaziou.fr> Date: Mon, 13 Feb 2023 03:01:22 +0000 In-Reply-To: <87mt5jsvt6.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sat, 11 Feb 2023 23:07:22 +0100") Message-ID: <87mt5iz2t9.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=stellarskylark@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 12 Feb 2023 23:31:45 -0500 Cc: Josselin Poiret , 61207@debbugs.gnu.org, Josselin Poiret via Guix-patches via X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Thanks, y'all! I've attached a patch that addresses everything Nicolas brought up. > I agree with Josselin. Licensing is unclear. Many files do not have > a license, or are "user contributed" (under what terms?). > > Would it be possible to clarify this with upstream? I got a hold of Aston Roberts , the maintainer for OTS, and asked him about the licensing for files without headers. (The tax templates, in particular, seem to lack headers because the custom markup doesn't appear to have comment syntax.) He answered: > Yes, all files of OTS are released under GNU GPL license. > Will review the file headers. So it looks like all the files, even the ones without a clear license header, are GPL. Skylar --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=v3-0001-gnu-Add-opentaxsolver.patch Content-Transfer-Encoding: quoted-printable Content-Description: Patch version three >From f5f2b8b4539d48b474b131ece87b65dbfd9b2532 Mon Sep 17 00:00:00 2001 From: Skylar Hill Date: Sun, 12 Feb 2023 20:47:23 -0600 Subject: [PATCH v3] gnu: Add opentaxsolver --- gnu/local.mk | 1 + gnu/packages/finance.scm | 71 +++++++++++++++++++ .../opentaxsolver-file-browser-fix.patch | 58 +++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 gnu/packages/patches/opentaxsolver-file-browser-fix.pat= ch diff --git a/gnu/local.mk b/gnu/local.mk index cdb99813d0..148bd6e908 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1616,6 +1616,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/opensles-add-license-file.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ %D%/packages/patches/openssl-3.0-c-rehash-in.patch \ + %D%/packages/patches/opentaxsolver-file-browser-fix.patch \ %D%/packages/patches/open-zwave-hidapi.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ %D%/packages/patches/osip-CVE-2017-7853.patch \ diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index c9c8e9b823..252f5e422c 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -33,6 +33,7 @@ ;;; Copyright =C2=A9 2022 Collin J. Doering ;;; Copyright =C2=A9 2022 Justin Veilleux ;;; Copyright =C2=A9 2023 Frank Pursel +;;; Copyright =C2=A9 2023 Skylar Hill ;;; ;;; This file is part of GNU Guix. ;;; @@ -2271,3 +2272,73 @@ (define-public p2pool Monero node and what it mines, but you get frequent payouts like on a regu= lar pool.") (license license:gpl3))) + +(define-public opentaxsolver + ;; The OTS version is formatted like tax-year_version. So, at time of + ;; writing, the version is 2022_20.00. Each part of this is used in + ;; different places in the source uri, so it's convenient to have them + ;; separately like this. + (let ((tax-year "2022") + (ots-version "20.00")) + (package + (name "opentaxsolver") + (version (string-append tax-year "_" ots-version)) + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/opentaxsolver/OT= S_" + tax-year "/v" ots-version + "_linux/OpenTaxSolver" version "_linux= 64.tgz")) + (sha256 + (base32 + "06k0a72bmwdmr71dvrp8b4vl8vilnggsh92hrp7wjdgcjj9m074w")) + (patches (search-patches + "opentaxsolver-file-browser-fix.patch")))) + (build-system glib-or-gtk-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + ;; OTS does provide a shellscript that does exactly + ;; this, but we need to do it ourselves to specify + ;; the correct compiler and to delete the GUI + ;; binaries. + (replace 'build + (lambda _ + (delete-file "Run_taxsolve_GUI") + (delete-file-recursively "bin") + (mkdir "bin") + (chdir "src/Gui_gtk") + (invoke "make" + (string-append "CC=3D" + #$(cc-for-target))) + (chdir "..") + (invoke "make" + (string-append "CC=3D" + #$(cc-for-target))))) + ;; OTS doesn't provide a `make install` target, + ;; because it assumes it'll be run from the + ;; tarball. So, we do it ourselves, making sure to + ;; replicate the directory structure of the tarball. + (replace 'install + (lambda _ + (copy-recursively "../bin" + (string-append #$output "/bin")) + (symlink (string-append #$output "/bin/ots_gui2") + (string-append #$output "/bin/Run_taxsolve_GUI")) + (copy-recursively "../tax_form_files" + (string-append #$output + "/tax_form_files")) + (copy-recursively "formdata" + (string-append #$output + "/src/formdata"))))) + #:tests? #f)) + (inputs (list gtk+-2)) + (native-inputs (list pkg-config)) + (synopsis "Yearly tax preparation tool") + (description + "OpenTaxSolver is a program for calculating tax form entries for fe= deral and +state personal income taxes. It automatically fills out and prints your fo= rms +for mailing.") + (home-page "https://opentaxsolver.sourceforge.net/") + (license license:gpl2+)))) diff --git a/gnu/packages/patches/opentaxsolver-file-browser-fix.patch b/gn= u/packages/patches/opentaxsolver-file-browser-fix.patch new file mode 100644 index 0000000000..0e6be74f85 --- /dev/null +++ b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch @@ -0,0 +1,58 @@ +From 96fda11a53a89c6647031f2c05ef12f1a9df6a08 Mon Sep 17 00:00:00 2001 +From: Skylar Hill +Date: Tue, 31 Jan 2023 21:02:18 -0600 +Subject: [PATCH] Change default directory in file browser + +--- + src/Gui_gtk/ots_gui2.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/Gui_gtk/ots_gui2.c b/src/Gui_gtk/ots_gui2.c +index ff3366b..1247933 100644 +--- a/src/Gui_gtk/ots_gui2.c ++++ b/src/Gui_gtk/ots_gui2.c +@@ -82,6 +82,7 @@ char ots_release_package[]=3D"20.00"; + #include + #include + #include ++#include + #include + // #include "backcompat.c" + #include "gtk_utils.c" /* Include the graphics library. */ +@@ -109,6 +110,7 @@ char toolpath[MaxFname]=3D"", *start_cmd; + int pending_compute=3D0, supported_pdf_form=3D1; + int filingstatus_mfj=3D1; + int round_to_whole_nums=3D0; ++char *working_dir[MaxFname+512]; +=20 + void pick_file( GtkWidget *wdg, void *data ); /* Prototype */ + void consume_leading_trailing_whitespace( char *line ); +@@ -2364,7 +2366,7 @@ void save_taxfile( GtkWidget *wdg, void *data ) + if (cpt !=3D 0) + strcpy( cpt, "_xxxx.txt" ); + // printf("OTS_save_taxfile: dir=3D'%s', wc=3D'%s', fname=3D'%s'\n", dir= ectory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "File to Save As:", 2048, directory_dat, wildcards_fb, fil= ename_fb, Save_Tax_File ); ++ Browse_Files( "File to Save As:", 2048, working_dir, wildcards_fb, filen= ame_fb, Save_Tax_File ); + } +=20 +=20 +@@ -3878,7 +3880,7 @@ void pick_file( GtkWidget *wdg, void *data ) + strcpy( wildcards_fb, ".txt" ); + strcpy( filename_fb, "" ); + // printf("OTS_pick_file: dir=3D'%s', wc=3D'%s', fname=3D'%s'\n", direc= tory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "Select File", 2048, directory_dat, wildcards_fb, filenam= e_fb, receive_filename ); ++ Browse_Files( "Select File", 2048, working_dir, wildcards_fb, filename_= fb, receive_filename ); + } +=20 +=20 +@@ -4019,6 +4021,7 @@ int main(int argc, char *argv[] ) + invocation_path[k] =3D '\0'; + // printf("Invocation path =3D '%s'\n", invocation_path); + set_ots_path(); ++ getcwd(working_dir, MaxFname+512); +=20 + /* Decode any command-line arguments. */ + argn =3D 1; k=3D1; +--=20 +2.38.1 + --=20 2.39.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 12 23:31:48 2023 Received: (at submit) by debbugs.gnu.org; 13 Feb 2023 04:31:49 +0000 Received: from localhost ([127.0.0.1]:47331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRQVI-0000fH-8F for submit@debbugs.gnu.org; Sun, 12 Feb 2023 23:31:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:57436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRPKv-0006sc-A9 for submit@debbugs.gnu.org; Sun, 12 Feb 2023 22:17:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRPKu-0006Di-TI for guix-patches@gnu.org; Sun, 12 Feb 2023 22:17:00 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRPKq-0002Wr-DW for guix-patches@gnu.org; Sun, 12 Feb 2023 22:17:00 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6F3392400DB for ; Mon, 13 Feb 2023 04:16:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1676258214; bh=5bYOGhQNdv+JujJGIdJIspJsG8Z7bJgQo/4mZaNyI+4=; h=From:To:Cc:Subject:Date:From; b=I2lgBcHBNjPQk43x/jZndmLidapDpy0eGZ89BDwGJkdNH1O9z9OIZsawkNYiBeDdv sFzaQ0xy5bSHdnDJXbzG4AxoeiClJF26ib7+maWeyHxauiXKc7AN+arTUkOTM8q41I Shdd0VyMu+1z65FZiLpKXqLQO2nKuvOcW8NlYOdSsxxvMccJd6MA4iHAUMjEKxTEAK lAba6MA0jO5z8r5pnPUSMxknLR9L3HL0720HKVa4BCQ3RcXIF14gAYevJMLuqTV6Ab 9tvzfGeF+WFm6W7A2Qmr6y7ZoQUWhJCrJ54z0izy1PiR6KYLS6+5G8QoESh557IHnl zPEzwKSc7b7Yw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PFTyr1nZzz6tmB; Mon, 13 Feb 2023 04:16:51 +0100 (CET) From: Skylar Hill To: Nicolas Goaziou Subject: Re: [bug#61207] [PATCH v3] gnu: Add opentaxsolver. References: <87edr6x169.fsf@jpoiret.xyz> <87mt5jsvt6.fsf@nicolasgoaziou.fr> Date: Mon, 13 Feb 2023 03:16:49 +0000 In-Reply-To: <87mt5jsvt6.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sat, 11 Feb 2023 23:07:22 +0100") Message-ID: <87cz6ez23i.fsf_-_@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=stellarskylark@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 12 Feb 2023 23:31:45 -0500 Cc: Josselin Poiret , 61207@debbugs.gnu.org, Josselin Poiret via Guix-patches via X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Oops, my last email came back undeliverable to the bug tracker address. Not sure why. As a summary, just in case this one manages to get through, the new patch addresses the issues Nicolas brought up, and I confirmed with Aston Roberts, the OTS maintainer, that everything is released under GPL. Here's the patch again, again just in case it gets through. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=v3-0001-gnu-Add-opentaxsolver.patch Content-Transfer-Encoding: quoted-printable Content-Description: Patch version 3 >From f5f2b8b4539d48b474b131ece87b65dbfd9b2532 Mon Sep 17 00:00:00 2001 From: Skylar Hill Date: Sun, 12 Feb 2023 20:47:23 -0600 Subject: [PATCH v3] gnu: Add opentaxsolver --- gnu/local.mk | 1 + gnu/packages/finance.scm | 71 +++++++++++++++++++ .../opentaxsolver-file-browser-fix.patch | 58 +++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 gnu/packages/patches/opentaxsolver-file-browser-fix.pat= ch diff --git a/gnu/local.mk b/gnu/local.mk index cdb99813d0..148bd6e908 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1616,6 +1616,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/opensles-add-license-file.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ %D%/packages/patches/openssl-3.0-c-rehash-in.patch \ + %D%/packages/patches/opentaxsolver-file-browser-fix.patch \ %D%/packages/patches/open-zwave-hidapi.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ %D%/packages/patches/osip-CVE-2017-7853.patch \ diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index c9c8e9b823..252f5e422c 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -33,6 +33,7 @@ ;;; Copyright =C2=A9 2022 Collin J. Doering ;;; Copyright =C2=A9 2022 Justin Veilleux ;;; Copyright =C2=A9 2023 Frank Pursel +;;; Copyright =C2=A9 2023 Skylar Hill ;;; ;;; This file is part of GNU Guix. ;;; @@ -2271,3 +2272,73 @@ (define-public p2pool Monero node and what it mines, but you get frequent payouts like on a regu= lar pool.") (license license:gpl3))) + +(define-public opentaxsolver + ;; The OTS version is formatted like tax-year_version. So, at time of + ;; writing, the version is 2022_20.00. Each part of this is used in + ;; different places in the source uri, so it's convenient to have them + ;; separately like this. + (let ((tax-year "2022") + (ots-version "20.00")) + (package + (name "opentaxsolver") + (version (string-append tax-year "_" ots-version)) + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/opentaxsolver/OT= S_" + tax-year "/v" ots-version + "_linux/OpenTaxSolver" version "_linux= 64.tgz")) + (sha256 + (base32 + "06k0a72bmwdmr71dvrp8b4vl8vilnggsh92hrp7wjdgcjj9m074w")) + (patches (search-patches + "opentaxsolver-file-browser-fix.patch")))) + (build-system glib-or-gtk-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + ;; OTS does provide a shellscript that does exactly + ;; this, but we need to do it ourselves to specify + ;; the correct compiler and to delete the GUI + ;; binaries. + (replace 'build + (lambda _ + (delete-file "Run_taxsolve_GUI") + (delete-file-recursively "bin") + (mkdir "bin") + (chdir "src/Gui_gtk") + (invoke "make" + (string-append "CC=3D" + #$(cc-for-target))) + (chdir "..") + (invoke "make" + (string-append "CC=3D" + #$(cc-for-target))))) + ;; OTS doesn't provide a `make install` target, + ;; because it assumes it'll be run from the + ;; tarball. So, we do it ourselves, making sure to + ;; replicate the directory structure of the tarball. + (replace 'install + (lambda _ + (copy-recursively "../bin" + (string-append #$output "/bin")) + (symlink (string-append #$output "/bin/ots_gui2") + (string-append #$output "/bin/Run_taxsolve_GUI")) + (copy-recursively "../tax_form_files" + (string-append #$output + "/tax_form_files")) + (copy-recursively "formdata" + (string-append #$output + "/src/formdata"))))) + #:tests? #f)) + (inputs (list gtk+-2)) + (native-inputs (list pkg-config)) + (synopsis "Yearly tax preparation tool") + (description + "OpenTaxSolver is a program for calculating tax form entries for fe= deral and +state personal income taxes. It automatically fills out and prints your fo= rms +for mailing.") + (home-page "https://opentaxsolver.sourceforge.net/") + (license license:gpl2+)))) diff --git a/gnu/packages/patches/opentaxsolver-file-browser-fix.patch b/gn= u/packages/patches/opentaxsolver-file-browser-fix.patch new file mode 100644 index 0000000000..0e6be74f85 --- /dev/null +++ b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch @@ -0,0 +1,58 @@ +From 96fda11a53a89c6647031f2c05ef12f1a9df6a08 Mon Sep 17 00:00:00 2001 +From: Skylar Hill +Date: Tue, 31 Jan 2023 21:02:18 -0600 +Subject: [PATCH] Change default directory in file browser + +--- + src/Gui_gtk/ots_gui2.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/Gui_gtk/ots_gui2.c b/src/Gui_gtk/ots_gui2.c +index ff3366b..1247933 100644 +--- a/src/Gui_gtk/ots_gui2.c ++++ b/src/Gui_gtk/ots_gui2.c +@@ -82,6 +82,7 @@ char ots_release_package[]=3D"20.00"; + #include + #include + #include ++#include + #include + // #include "backcompat.c" + #include "gtk_utils.c" /* Include the graphics library. */ +@@ -109,6 +110,7 @@ char toolpath[MaxFname]=3D"", *start_cmd; + int pending_compute=3D0, supported_pdf_form=3D1; + int filingstatus_mfj=3D1; + int round_to_whole_nums=3D0; ++char *working_dir[MaxFname+512]; +=20 + void pick_file( GtkWidget *wdg, void *data ); /* Prototype */ + void consume_leading_trailing_whitespace( char *line ); +@@ -2364,7 +2366,7 @@ void save_taxfile( GtkWidget *wdg, void *data ) + if (cpt !=3D 0) + strcpy( cpt, "_xxxx.txt" ); + // printf("OTS_save_taxfile: dir=3D'%s', wc=3D'%s', fname=3D'%s'\n", dir= ectory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "File to Save As:", 2048, directory_dat, wildcards_fb, fil= ename_fb, Save_Tax_File ); ++ Browse_Files( "File to Save As:", 2048, working_dir, wildcards_fb, filen= ame_fb, Save_Tax_File ); + } +=20 +=20 +@@ -3878,7 +3880,7 @@ void pick_file( GtkWidget *wdg, void *data ) + strcpy( wildcards_fb, ".txt" ); + strcpy( filename_fb, "" ); + // printf("OTS_pick_file: dir=3D'%s', wc=3D'%s', fname=3D'%s'\n", direc= tory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "Select File", 2048, directory_dat, wildcards_fb, filenam= e_fb, receive_filename ); ++ Browse_Files( "Select File", 2048, working_dir, wildcards_fb, filename_= fb, receive_filename ); + } +=20 +=20 +@@ -4019,6 +4021,7 @@ int main(int argc, char *argv[] ) + invocation_path[k] =3D '\0'; + // printf("Invocation path =3D '%s'\n", invocation_path); + set_ots_path(); ++ getcwd(working_dir, MaxFname+512); +=20 + /* Decode any command-line arguments. */ + argn =3D 1; k=3D1; +--=20 +2.38.1 + --=20 2.39.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 12 23:31:50 2023 Received: (at submit) by debbugs.gnu.org; 13 Feb 2023 04:31:50 +0000 Received: from localhost ([127.0.0.1]:47335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRQVJ-0000fZ-RL for submit@debbugs.gnu.org; Sun, 12 Feb 2023 23:31:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:53518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRPU8-0007Ct-N8 for submit@debbugs.gnu.org; Sun, 12 Feb 2023 22:26:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRPU8-0000c9-Hm for guix-patches@gnu.org; Sun, 12 Feb 2023 22:26:32 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRPU6-0004GS-0Q for guix-patches@gnu.org; Sun, 12 Feb 2023 22:26:32 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 034DF24019C for ; Mon, 13 Feb 2023 04:26:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1676258787; bh=vqBngGcjXyb1yCFNgBJDlPOTIz9HhnLNc8LpLD/YTO4=; h=From:To:Cc:Subject:Date:From; b=GBaOga6CKWlKsuTws1Tr/gmkpOaCZfKL+EDmGICFbuDJTHGlHvwHspGhXe8XKWiJH OdS74Z5rTB1AH/l+qKm+i86xlUsFWcO5s6NkI9EyCuXLALLWHnrDljEksrnhO6+sJf XSaCuB2u+n8pehwQHqqTBFHxaioLc5r3Rq6kz5pBZa5zGibuOPKIIJfV9xAavi49l+ ZaxEynWBzJtJY6PO3/CfBpuW3D2nuPuPD2pd72S+PMhcRfZ4YBOwXhuuC4Xru8xnhP RAeAC5dMnbxEny7vh7BTlzhZGhzYmCoQSbvWVbXBDbRnqcI0aZWnMzOp6uApz/JpAe ycTMoYKK0oGcA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PFV9r0Xsmz6tpl; Mon, 13 Feb 2023 04:26:21 +0100 (CET) From: Skylar Hill To: Nicolas Goaziou Subject: Re: [bug#61207] [PATCH v2] gnu: Add opentaxsolver. References: <87edr6x169.fsf@jpoiret.xyz> <87mt5jsvt6.fsf@nicolasgoaziou.fr> <87mt5iz2t9.fsf@posteo.net> Date: Mon, 13 Feb 2023 03:26:19 +0000 In-Reply-To: <87mt5iz2t9.fsf@posteo.net> (Skylar Hill's message of "Sun, 12 Feb 2023 21:01:22 -0600") Message-ID: <871qmuz1no.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=stellarskylark@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 12 Feb 2023 23:31:45 -0500 Cc: Josselin Poiret , 61207@debbugs.gnu.org, Josselin Poiret via Guix-patches via X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Ahh okay had to disable the TLS guarantee on my Posteo account since apparently debbugs doesn't provide a TLS connection, which is why it was undeliverable. (Sorry for spamming you two but it should work this time.) Here's my original message: Thanks, y'all! I've attached a patch that addresses everything Nicolas brought up.=20 I agree with Josselin. Licensing is unclear. Many files do not have a license, or are "user contributed" (under what terms?). Would it be possible to clarify this with upstream? I got a hold of Aston Roberts , the maintainer for OTS, and asked him about the licensing for files without headers. (The tax templates, in particular, seem to lack headers because the custom markup doesn't appear to have comment syntax.) He answered: Yes, all files of OTS are released under GNU GPL license. Will review the file headers. So it looks like all the files, even the ones without a clear license header, are GPL. Skylar >From f5f2b8b4539d48b474b131ece87b65dbfd9b2532 Mon Sep 17 00:00:00 2001 From: Skylar Hill Date: Sun, 12 Feb 2023 20:47:23 -0600 Subject: [PATCH v3] gnu: Add opentaxsolver --- gnu/local.mk | 1 + gnu/packages/finance.scm | 71 +++++++++++++++++++ .../opentaxsolver-file-browser-fix.patch | 58 +++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 gnu/packages/patches/opentaxsolver-file-browser-fix.pat= ch diff --git a/gnu/local.mk b/gnu/local.mk index cdb99813d0..148bd6e908 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1616,6 +1616,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/opensles-add-license-file.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ %D%/packages/patches/openssl-3.0-c-rehash-in.patch \ + %D%/packages/patches/opentaxsolver-file-browser-fix.patch \ %D%/packages/patches/open-zwave-hidapi.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ %D%/packages/patches/osip-CVE-2017-7853.patch \ diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index c9c8e9b823..252f5e422c 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -33,6 +33,7 @@ ;;; Copyright =C2=A9 2022 Collin J. Doering ;;; Copyright =C2=A9 2022 Justin Veilleux ;;; Copyright =C2=A9 2023 Frank Pursel +;;; Copyright =C2=A9 2023 Skylar Hill ;;; ;;; This file is part of GNU Guix. ;;; @@ -2271,3 +2272,73 @@ (define-public p2pool Monero node and what it mines, but you get frequent payouts like on a regu= lar pool.") (license license:gpl3))) + +(define-public opentaxsolver + ;; The OTS version is formatted like tax-year_version. So, at time of + ;; writing, the version is 2022_20.00. Each part of this is used in + ;; different places in the source uri, so it's convenient to have them + ;; separately like this. + (let ((tax-year "2022") + (ots-version "20.00")) + (package + (name "opentaxsolver") + (version (string-append tax-year "_" ots-version)) + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/opentaxsolver/OT= S_" + tax-year "/v" ots-version + "_linux/OpenTaxSolver" version "_linux= 64.tgz")) + (sha256 + (base32 + "06k0a72bmwdmr71dvrp8b4vl8vilnggsh92hrp7wjdgcjj9m074w")) + (patches (search-patches + "opentaxsolver-file-browser-fix.patch")))) + (build-system glib-or-gtk-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + ;; OTS does provide a shellscript that does exactly + ;; this, but we need to do it ourselves to specify + ;; the correct compiler and to delete the GUI + ;; binaries. + (replace 'build + (lambda _ + (delete-file "Run_taxsolve_GUI") + (delete-file-recursively "bin") + (mkdir "bin") + (chdir "src/Gui_gtk") + (invoke "make" + (string-append "CC=3D" + #$(cc-for-target))) + (chdir "..") + (invoke "make" + (string-append "CC=3D" + #$(cc-for-target))))) + ;; OTS doesn't provide a `make install` target, + ;; because it assumes it'll be run from the + ;; tarball. So, we do it ourselves, making sure to + ;; replicate the directory structure of the tarball. + (replace 'install + (lambda _ + (copy-recursively "../bin" + (string-append #$output "/bin")) + (symlink (string-append #$output "/bin/ots_gui2") + (string-append #$output "/bin/Run_taxsolve_GUI")) + (copy-recursively "../tax_form_files" + (string-append #$output + "/tax_form_files")) + (copy-recursively "formdata" + (string-append #$output + "/src/formdata"))))) + #:tests? #f)) + (inputs (list gtk+-2)) + (native-inputs (list pkg-config)) + (synopsis "Yearly tax preparation tool") + (description + "OpenTaxSolver is a program for calculating tax form entries for fe= deral and +state personal income taxes. It automatically fills out and prints your fo= rms +for mailing.") + (home-page "https://opentaxsolver.sourceforge.net/") + (license license:gpl2+)))) diff --git a/gnu/packages/patches/opentaxsolver-file-browser-fix.patch b/gn= u/packages/patches/opentaxsolver-file-browser-fix.patch new file mode 100644 index 0000000000..0e6be74f85 --- /dev/null +++ b/gnu/packages/patches/opentaxsolver-file-browser-fix.patch @@ -0,0 +1,58 @@ +From 96fda11a53a89c6647031f2c05ef12f1a9df6a08 Mon Sep 17 00:00:00 2001 +From: Skylar Hill +Date: Tue, 31 Jan 2023 21:02:18 -0600 +Subject: [PATCH] Change default directory in file browser + +--- + src/Gui_gtk/ots_gui2.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/Gui_gtk/ots_gui2.c b/src/Gui_gtk/ots_gui2.c +index ff3366b..1247933 100644 +--- a/src/Gui_gtk/ots_gui2.c ++++ b/src/Gui_gtk/ots_gui2.c +@@ -82,6 +82,7 @@ char ots_release_package[]=3D"20.00"; + #include + #include + #include ++#include + #include + // #include "backcompat.c" + #include "gtk_utils.c" /* Include the graphics library. */ +@@ -109,6 +110,7 @@ char toolpath[MaxFname]=3D"", *start_cmd; + int pending_compute=3D0, supported_pdf_form=3D1; + int filingstatus_mfj=3D1; + int round_to_whole_nums=3D0; ++char *working_dir[MaxFname+512]; +=20 + void pick_file( GtkWidget *wdg, void *data ); /* Prototype */ + void consume_leading_trailing_whitespace( char *line ); +@@ -2364,7 +2366,7 @@ void save_taxfile( GtkWidget *wdg, void *data ) + if (cpt !=3D 0) + strcpy( cpt, "_xxxx.txt" ); + // printf("OTS_save_taxfile: dir=3D'%s', wc=3D'%s', fname=3D'%s'\n", dir= ectory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "File to Save As:", 2048, directory_dat, wildcards_fb, fil= ename_fb, Save_Tax_File ); ++ Browse_Files( "File to Save As:", 2048, working_dir, wildcards_fb, filen= ame_fb, Save_Tax_File ); + } +=20 +=20 +@@ -3878,7 +3880,7 @@ void pick_file( GtkWidget *wdg, void *data ) + strcpy( wildcards_fb, ".txt" ); + strcpy( filename_fb, "" ); + // printf("OTS_pick_file: dir=3D'%s', wc=3D'%s', fname=3D'%s'\n", direc= tory_dat, wildcards_fb, filename_fb ); +- Browse_Files( "Select File", 2048, directory_dat, wildcards_fb, filenam= e_fb, receive_filename ); ++ Browse_Files( "Select File", 2048, working_dir, wildcards_fb, filename_= fb, receive_filename ); + } +=20 +=20 +@@ -4019,6 +4021,7 @@ int main(int argc, char *argv[] ) + invocation_path[k] =3D '\0'; + // printf("Invocation path =3D '%s'\n", invocation_path); + set_ots_path(); ++ getcwd(working_dir, MaxFname+512); +=20 + /* Decode any command-line arguments. */ + argn =3D 1; k=3D1; +--=20 +2.38.1 + From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 18 06:46:51 2023 Received: (at 61207-done) by debbugs.gnu.org; 18 Feb 2023 11:46:51 +0000 Received: from localhost ([127.0.0.1]:42673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTLg3-0001Gc-Bx for submit@debbugs.gnu.org; Sat, 18 Feb 2023 06:46:51 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:57075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTLg1-0001GM-I9 for 61207-done@debbugs.gnu.org; Sat, 18 Feb 2023 06:46:50 -0500 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by mail.gandi.net (Postfix) with ESMTPSA id 76510240002; Sat, 18 Feb 2023 11:46:38 +0000 (UTC) From: Nicolas Goaziou To: Skylar Hill Subject: Re: [bug#61207] [PATCH v2] gnu: Add opentaxsolver. References: <87edr6x169.fsf@jpoiret.xyz> <87mt5jsvt6.fsf@nicolasgoaziou.fr> <87mt5iz2t9.fsf@posteo.net> <871qmuz1no.fsf@posteo.net> Date: Sat, 18 Feb 2023 12:46:31 +0100 In-Reply-To: <871qmuz1no.fsf@posteo.net> (Skylar Hill's message of "Mon, 13 Feb 2023 03:26:19 +0000") Message-ID: <873573tcvc.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 61207-done Cc: dev@jpoiret.xyz, 61207-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, Skylar Hill writes: > Subject: [PATCH v3] gnu: Add opentaxsolver I added a proper commit message and applied your patch, with slight fixes to indentation. > + (description > + "OpenTaxSolver is a program for calculating tax form entries for federal and > +state personal income taxes. It automatically fills out and prints your forms > +for mailing.") I added two spaces between sentences as requested by Texinfo syntax. Regards, -- Nicolas Goaziou From unknown Sun Jun 22 07:36:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 19 Mar 2023 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator