mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
gnu: Add opentaxsolver.
* gnu/packages/finance.scm (opentaxsolver): New variable. * gnu/packages/patches/opentaxsolver-file-browser-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
parent
bc3354a882
commit
53daa23b2e
3 changed files with 124 additions and 0 deletions
|
@ -1617,6 +1617,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/opensles-add-license-file.patch \
|
%D%/packages/patches/opensles-add-license-file.patch \
|
||||||
%D%/packages/patches/openssl-1.1-c-rehash-in.patch \
|
%D%/packages/patches/openssl-1.1-c-rehash-in.patch \
|
||||||
%D%/packages/patches/openssl-3.0-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/open-zwave-hidapi.patch \
|
||||||
%D%/packages/patches/orpheus-cast-errors-and-includes.patch \
|
%D%/packages/patches/orpheus-cast-errors-and-includes.patch \
|
||||||
%D%/packages/patches/osip-CVE-2017-7853.patch \
|
%D%/packages/patches/osip-CVE-2017-7853.patch \
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
;;; Copyright © 2022 Collin J. Doering <collin@rekahsoft.ca>
|
;;; Copyright © 2022 Collin J. Doering <collin@rekahsoft.ca>
|
||||||
;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
|
;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
|
||||||
;;; Copyright © 2023 Frank Pursel <frank.pursel@gmail.com>
|
;;; Copyright © 2023 Frank Pursel <frank.pursel@gmail.com>
|
||||||
|
;;; Copyright © 2023 Skylar Hill <stellarskylark@posteo.net>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -2271,3 +2272,67 @@ (define-public p2pool
|
||||||
Monero node and what it mines, but you get frequent payouts like on a regular
|
Monero node and what it mines, but you get frequent payouts like on a regular
|
||||||
pool.")
|
pool.")
|
||||||
(license license:gpl3)))
|
(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
|
||||||
|
#:tests? #f ;no tests
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'configure) ;no configure script
|
||||||
|
;; 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)))))
|
||||||
|
;; 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")))))))
|
||||||
|
(native-inputs (list pkg-config))
|
||||||
|
(inputs (list gtk+-2))
|
||||||
|
(synopsis "Yearly tax preparation tool")
|
||||||
|
(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.")
|
||||||
|
(home-page "https://opentaxsolver.sourceforge.net/")
|
||||||
|
(license license:gpl2+))))
|
||||||
|
|
58
gnu/packages/patches/opentaxsolver-file-browser-fix.patch
Normal file
58
gnu/packages/patches/opentaxsolver-file-browser-fix.patch
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
From 96fda11a53a89c6647031f2c05ef12f1a9df6a08 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Skylar Hill <stellarskylark@posteo.net>
|
||||||
|
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 <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
// #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
|
||||||
|
|
Loading…
Reference in a new issue