From 6a94b4c964f220ce869841128d0b28650ccd4505 Mon Sep 17 00:00:00 2001 From: "Philip M. Gollucci" Date: Fri, 17 Feb 2012 22:43:30 +0000 Subject: [PATCH] - Update to 9.00 Files in redports work as expected PR: ports/164875 Submitted by: John Hein (maintainer) --- finance/opentaxsolver/Makefile | 28 ++++++--- finance/opentaxsolver/distinfo | 4 +- .../patch-Build_taxsolve_packages_LINUX.sh | 28 +++++++++ .../files/patch-src-GUI-Makefile.linux | 15 +++++ .../files/patch-src-GUI-otk_lib-otk_lib.c | 1 + .../files/patch-src-GUI-ots_gui.c | 56 ++++++++++-------- finance/opentaxsolver/files/pkg-plist.in | 58 +++++++++++++++++++ 7 files changed, 156 insertions(+), 34 deletions(-) create mode 100644 finance/opentaxsolver/files/patch-Build_taxsolve_packages_LINUX.sh create mode 100644 finance/opentaxsolver/files/patch-src-GUI-Makefile.linux create mode 100644 finance/opentaxsolver/files/pkg-plist.in diff --git a/finance/opentaxsolver/Makefile b/finance/opentaxsolver/Makefile index 55e5948115d8..b5ad2d688223 100644 --- a/finance/opentaxsolver/Makefile +++ b/finance/opentaxsolver/Makefile @@ -6,26 +6,38 @@ # PORTNAME= ${UPPORTNAME:L} -PORTVERSION= 8.05 +PORTVERSION= 9.00 CATEGORIES= finance -MASTER_SITES= SF/${PORTNAME}/OTS_2010/v${PORTVERSION} -DISTNAME= ${UPPORTNAME}2010_${PORTVERSION} +MASTER_SITES= SF/${PORTNAME}/OTS_${TAXYEAR}/v${PORTVERSION} +DISTNAME= ${UPPORTNAME}${TAXYEAR}_${PORTVERSION} EXTRACT_SUFX= .tgz MAINTAINER= jhein@symmetricom.com COMMENT= US tax prep software +PLIST= ${WRKDIR}/pkg-plist +SUB_FILES= pkg-plist +SUB_LIST= TAXYEAR=${TAXYEAR} +TAXYEAR= 2011 +UPPORTNAME= OpenTaxSolver + +.if !defined(WITHOUT_X11) USE_GL= yes USE_XORG= xmu xext x11 -UPPORTNAME= OpenTaxSolver +BUILD_DEPENDS+= pkg-config:${PORTSDIR}/devel/pkg-config +CPPFLAGS+= $$(pkg-config --cflags-only-I glu xext xmu) +LDFLAGS+= $$(pkg-config --libs-only-L glu xext xmu) +SUB_LIST+= X11= +.else +MAKE_ENV+= WITHOUT_X11=yes +SUB_LIST+= X11="@comment " +.endif post-patch: @${REINPLACE_CMD} -e 's/%%PREFIX%%/${PREFIX:C,/,\/,g}/' \ ${WRKSRC}/src/GUI/ots_gui.c - @${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|' \ - ${WRKSRC}/src/GUI/Makefile.linux -# 4.07 distfile has pre-built (linux) binaries we must whack. +# 9.00 distfile has pre-built (linux) binaries we must whack. pre-build: @(cd ${BUILD_WRKSRC}/src && make -f Makefile.unix clean && \ cd GUI && make -f Makefile.linux clean) @@ -45,7 +57,6 @@ do-install: ${INSTALL_PROGRAM} $${prog} ${PREFIX}/bin/. ; \ done && \ ${MKDIR} ${PREFIX}/share/ots && \ - ${INSTALL_DATA} src/GUI/otslogo.ppm ${PREFIX}/share/ots/. && \ for example in $$(${BUILDEXAMPLELISTCMD}); do \ ${MKDIR} ${PREFIX}/share/ots/$$(dirname $${example}) && \ ${INSTALL_DATA} $${example} \ @@ -55,7 +66,6 @@ do-install: new-plist: @(cd ${WRKSRC} && \ ${BUILDPROGLISTCMD} | ${SORT} > ${NEWPLIST} && \ - ${ECHO_CMD} share/ots/otslogo.ppm >> ${NEWPLIST} && \ ${BUILDEXAMPLELISTCMD} | ${SED} 's,^,share/ots/,' | ${SORT} \ >> ${NEWPLIST} && \ for f in $$(${BUILDEXAMPLEDIRLISTCMD} | ${SED} 's,^,share/ots/,' && \ diff --git a/finance/opentaxsolver/distinfo b/finance/opentaxsolver/distinfo index 412e9106e875..b7b526597b6c 100644 --- a/finance/opentaxsolver/distinfo +++ b/finance/opentaxsolver/distinfo @@ -1,2 +1,2 @@ -SHA256 (OpenTaxSolver2010_8.05.tgz) = dbc307b0d1750679c204a8ea04a33ce4d097544c366318e5951184ed50a3ffe0 -SIZE (OpenTaxSolver2010_8.05.tgz) = 442180 +SHA256 (OpenTaxSolver2011_9.00.tgz) = 6be62226625795f11d6c1aab6dcd1d3d3628424d9f0c1fca8ea357c891b44758 +SIZE (OpenTaxSolver2011_9.00.tgz) = 499595 diff --git a/finance/opentaxsolver/files/patch-Build_taxsolve_packages_LINUX.sh b/finance/opentaxsolver/files/patch-Build_taxsolve_packages_LINUX.sh new file mode 100644 index 000000000000..bf50e241a8a8 --- /dev/null +++ b/finance/opentaxsolver/files/patch-Build_taxsolve_packages_LINUX.sh @@ -0,0 +1,28 @@ +$FreeBSD$ + +--- Build_taxsolve_packages_LINUX.sh.orig 2009-05-09 11:10:10.000000000 -0600 ++++ Build_taxsolve_packages_LINUX.sh 2012-02-11 09:23:27.000000000 -0700 +@@ -1,11 +1,15 @@ + #!/bin/sh + ++# die on errors ++set -e ++ + TAXSOLVEDIR=${PWD}/`dirname $0` + + if [ ! -d ${TAXSOLVEDIR}/bin ] ; then + mkdir ${TAXSOLVEDIR}/bin + fi + ++if [ -z "$WITHOUT_X11" -a -z "${WITHOUT_X11+isset}" ] ; then + cd ${TAXSOLVEDIR}/src/GUI/ + if [ ! -d otk_lib ] ; then + echo "" +@@ -23,6 +27,7 @@ + else + make -f Makefile.linux + fi ++fi + + cd "${TAXSOLVEDIR}/src" + make -f Makefile.unix diff --git a/finance/opentaxsolver/files/patch-src-GUI-Makefile.linux b/finance/opentaxsolver/files/patch-src-GUI-Makefile.linux new file mode 100644 index 000000000000..08d0a0010eee --- /dev/null +++ b/finance/opentaxsolver/files/patch-src-GUI-Makefile.linux @@ -0,0 +1,15 @@ +$FreeBSD$ +--- src/GUI/Makefile.linux.orig Fri Mar 31 22:16:19 2006 ++++ src/GUI/Makefile.linux Mon Feb 4 21:47:35 2008 +@@ -2,9 +2,9 @@ + + CFLAGS = + COPTIM = -O +-INCLUDE = -I/usr/X11R6/include +-LDPATH = -L/usr/X11R6/lib ++INCLUDE = ${CPPFLAGS} ++LDPATH = ${LDFLAGS} + LIBS = -lGLU -lGL -lXmu -lXext -lX11 -lm + + + ../../bin/ots_gui: diff --git a/finance/opentaxsolver/files/patch-src-GUI-otk_lib-otk_lib.c b/finance/opentaxsolver/files/patch-src-GUI-otk_lib-otk_lib.c index 4a959c35ed88..c6da00896b35 100644 --- a/finance/opentaxsolver/files/patch-src-GUI-otk_lib-otk_lib.c +++ b/finance/opentaxsolver/files/patch-src-GUI-otk_lib-otk_lib.c @@ -1,3 +1,4 @@ +$FreeBSD$ --- src/GUI/otk_lib/otk_lib.c.orig Fri Mar 31 21:42:34 2006 +++ src/GUI/otk_lib/otk_lib.c Sat Apr 8 11:50:21 2006 @@ -38,6 +38,10 @@ diff --git a/finance/opentaxsolver/files/patch-src-GUI-ots_gui.c b/finance/opentaxsolver/files/patch-src-GUI-ots_gui.c index c68daadbf95c..830c1d1da718 100644 --- a/finance/opentaxsolver/files/patch-src-GUI-ots_gui.c +++ b/finance/opentaxsolver/files/patch-src-GUI-ots_gui.c @@ -1,15 +1,16 @@ ---- src/GUI/ots_gui.c.orig 2011-01-16 10:31:20.000000000 -0700 -+++ src/GUI/ots_gui.c 2011-01-24 14:49:02.000000000 -0700 -@@ -664,7 +664,7 @@ +$FreeBSD$ +--- src/GUI/ots_gui.c.orig 2012-01-13 07:12:50.000000000 -0700 ++++ src/GUI/ots_gui.c 2012-02-07 08:14:06.000000000 -0700 +@@ -731,7 +731,7 @@ npanels = nlines / lines_per_page + 1; if (npanels < 2) npanels = 2; panelnames = (char **)malloc( (npanels+1) * sizeof(char *)); - for (j=0; jkind) { case VKIND_FLOAT: // printf("Formbox: '%s'\n", messg); @@ -18,7 +19,7 @@ pos_x = leftmargin; leftmargin = leftmargin + box_width + 1.5; pos_y = (float)linenum * 9.0 + 6.5; -@@ -1048,9 +1048,9 @@ +@@ -1142,9 +1142,9 @@ return; } if (PLATFORM_KIND==Posix_Platform) @@ -30,7 +31,16 @@ printf("Invoking '%s'\n", cmd ); system(cmd); /* Invoke the TaxSolver. */ -@@ -1086,7 +1086,7 @@ +@@ -1166,7 +1166,7 @@ + viewfile = fopen( outfname, "rb" ); + if (viewfile == 0) + { +- sprintf(vline,"Cannot open: %s", outfname); ++ snprintf(vline, sizeof(vline), "Cannot open: %s", outfname); + Otk_Add_Selection_Item( viewwin, vline, 0, 0 ); + } + else +@@ -1206,7 +1206,7 @@ void togprntcmd_in(void *x) { @@ -39,7 +49,7 @@ Otk_Modify_Text( printerformbox, printer_command ); } -@@ -1094,7 +1094,7 @@ +@@ -1214,7 +1214,7 @@ { char tmpstr[MaxFname]; int k; predict_output_filename(wrkingfname,tmpstr); @@ -48,7 +58,7 @@ Otk_Modify_Text( printerformbox, printer_command ); } -@@ -1122,7 +1122,7 @@ +@@ -1242,7 +1242,7 @@ Otk_Add_BoundingBox( printpopup, Otk_Blue, 1.0, 18.0, 16.0, 63.0, 47.0 ); if (working_file==0) strcpy(wrkingfname,filename_dat); else strcpy(wrkingfname,working_file); @@ -57,14 +67,14 @@ OtkMakeTextLabel( printpopup, "Print Command:", Otk_Black, /*scale=*/ 1.5, /*weight=*/ 1, /*x=*/ 4, /*y=*/ 57 ); printerformbox = OtkMakeTextFormBox( printpopup, printer_command, 60, 28.5, 55, 68, 18, acceptprinter_command2, 0 ); -@@ -1181,15 +1181,15 @@ +@@ -1302,15 +1302,15 @@ if (k>0) k--; while ((k>0) && (tmpstr[k]!=slashchr)) k--; if (tmpstr[k]==slashchr) tmpstr[k+1] = '\0'; - else {sprintf(tmpstr,".%c", slashchr);} - sprintf(directory_dat,"%sexamples_and_templates%c", tmpstr, slashchr); + else {snprintf(tmpstr, sizeof(tmpstr), ".%c", slashchr);} -+ snprintf(directory_dat, sizeof(directory_dat), "%sexamples_and_templates%c", tmpstr, slashchr); ++ snprintf(directory_dat, sizeof(directory_dat), "%%PREFIX%%/share/ots/examples_and_templates%c", slashchr); Otk_Browse_Files( "Select TaxForm:", MaxFname, directory_dat, wildcards_dat, taxsolvestrng, open_taxfile ); return; } @@ -76,18 +86,18 @@ printf("Setting Tax Program to be: '%s'\n", tmpstr); taxsolvecmd = strdup(tmpstr); strcpy(taxsolvestrng,tmpstr); -@@ -1200,8 +1200,8 @@ +@@ -1321,8 +1321,8 @@ if (k>0) k--; while ((k>0) && (tmpstr[k]!=slashchr)) k--; if (tmpstr[k]==slashchr) tmpstr[k+1] = '\0'; - else {sprintf(tmpstr,".%c", slashchr);} - sprintf(directory_dat,"%sexamples_and_templates%c", tmpstr, slashchr); + else {snprintf(tmpstr, sizeof(tmpstr), ".%c", slashchr);} -+ snprintf(directory_dat, sizeof(directory_dat), "%sexamples_and_templates%c", tmpstr, slashchr); ++ snprintf(directory_dat, sizeof(directory_dat), "%%PREFIX%%/share/ots/examples_and_templates%c", slashchr); - sel = strstr( strg, "_2010" ); - sel[0] = '\0'; -@@ -1272,7 +1272,7 @@ + sel = strstr( strg, "_2011" ); + if (sel != 0) +@@ -1399,7 +1399,7 @@ {printf("Unknown command-line parameter '%s'\n", argv[argn]); /* exit(1); */ } argn = argn + 1; } @@ -96,12 +106,12 @@ invocation_path = strdup(argv[0]); k = strlen(invocation_path)-1; while ((k>0) && (invocation_path[k]!=slashchr)) k--; -@@ -1298,7 +1298,7 @@ - main_panel = - OtkMakePanel( bckgrnd, Otk_Raised, Otk_LightGray, 1, 7.5, 98, 87 ); /* Main Panel. */ - Otk_SetBorderThickness( main_panel, 0.25 ); +@@ -1436,7 +1436,7 @@ + OtkMakeImagePanel_ImgPtr( subpanel, logo_image, 1.5, 5.0, 96.8, 89.85 ); + } + #else - sprintf(tmpstr,"%s..%csrc%cGUI%cotslogo.ppm", invocation_path, slashchr, slashchr, slashchr ); + snprintf(tmpstr, sizeof(tmpstr), "%%PREFIX%%/share/ots/otslogo.ppm"); - subpanel = OtkMakePanel( main_panel, Otk_Raised, Otk_LightGray, 18.5, 2, 63, 17 ); - Otk_SetBorderThickness( subpanel, 0.75 ); - testfile = fopen(tmpstr,"r"); + testfile = fopen(tmpstr,"r"); /* External image-file. */ + if (testfile!=0) + { /* Only attempt to show image if image-file is where we expect to find it. */ diff --git a/finance/opentaxsolver/files/pkg-plist.in b/finance/opentaxsolver/files/pkg-plist.in new file mode 100644 index 000000000000..da6fdf0354b5 --- /dev/null +++ b/finance/opentaxsolver/files/pkg-plist.in @@ -0,0 +1,58 @@ +@comment $FreeBSD$ +%%X11%%bin/ots_gui +bin/taxsolve_CA_540_%%TAXYEAR%% +bin/taxsolve_MA_1_%%TAXYEAR%% +bin/taxsolve_NC_D400_%%TAXYEAR%% +bin/taxsolve_NJ_1040_%%TAXYEAR%% +bin/taxsolve_NY_IT201_%%TAXYEAR%% +bin/taxsolve_OH_IT1040_%%TAXYEAR%% +bin/taxsolve_PA_40_%%TAXYEAR%% +bin/taxsolve_US_1040_%%TAXYEAR%% +bin/taxsolve_US_1040_Sched_C_%%TAXYEAR%% +bin/taxsolve_US_8829 +bin/taxsolve_VA_760_%%TAXYEAR%% +share/ots/examples_and_templates/CA_540/CA_540_%%TAXYEAR%%_example.txt +share/ots/examples_and_templates/CA_540/CA_540_%%TAXYEAR%%_template.txt +share/ots/examples_and_templates/CA_540/README_CA_540.txt +share/ots/examples_and_templates/MA_1/README_MA_1.txt +share/ots/examples_and_templates/MA_1/ma_1_%%TAXYEAR%%_example.txt +share/ots/examples_and_templates/MA_1/ma_1_%%TAXYEAR%%_template.txt +share/ots/examples_and_templates/NC_D400/NC_400_%%TAXYEAR%%_example.txt +share/ots/examples_and_templates/NC_D400/NC_400_%%TAXYEAR%%_template.txt +share/ots/examples_and_templates/NC_D400/README_NC_400.txt +share/ots/examples_and_templates/NJ_1040/NJ_1040_%%TAXYEAR%%_example.txt +share/ots/examples_and_templates/NJ_1040/NJ_1040_%%TAXYEAR%%_template.txt +share/ots/examples_and_templates/NJ_1040/README_NJ_1040.txt +share/ots/examples_and_templates/NY_IT201/NY_IT201_%%TAXYEAR%%_example.txt +share/ots/examples_and_templates/NY_IT201/NY_IT201_%%TAXYEAR%%_template.txt +share/ots/examples_and_templates/NY_IT201/README_NY_IT201.txt +share/ots/examples_and_templates/OH_IT1040/OH_IT1040_%%TAXYEAR%%_example.txt +share/ots/examples_and_templates/OH_IT1040/OH_IT1040_%%TAXYEAR%%_template.txt +share/ots/examples_and_templates/OH_IT1040/README_OH_IT1040.txt +share/ots/examples_and_templates/PA_40/PA_40_%%TAXYEAR%%_example.txt +share/ots/examples_and_templates/PA_40/PA_40_%%TAXYEAR%%_template.txt +share/ots/examples_and_templates/PA_40/README_PA_40.txt +share/ots/examples_and_templates/US_1040/README_US_1040.txt +share/ots/examples_and_templates/US_1040/US_1040_example.txt +share/ots/examples_and_templates/US_1040/US_1040_template.txt +share/ots/examples_and_templates/US_1040_Sched_C/README_US_1040_Sched_C.txt +share/ots/examples_and_templates/US_1040_Sched_C/US_1040Sched_C_%%TAXYEAR%%_example.txt +share/ots/examples_and_templates/US_1040_Sched_C/US_1040Sched_C_%%TAXYEAR%%_template.txt +share/ots/examples_and_templates/US_8829/8829_example.txt +share/ots/examples_and_templates/US_8829/8829_template.txt +share/ots/examples_and_templates/VA_760/README_VA_760.txt +share/ots/examples_and_templates/VA_760/VA_760_%%TAXYEAR%%_example.txt +share/ots/examples_and_templates/VA_760/VA_760_%%TAXYEAR%%_template.txt +@dirrm share/ots/examples_and_templates/VA_760 +@dirrm share/ots/examples_and_templates/US_8829 +@dirrm share/ots/examples_and_templates/US_1040_Sched_C +@dirrm share/ots/examples_and_templates/US_1040 +@dirrm share/ots/examples_and_templates/PA_40 +@dirrm share/ots/examples_and_templates/OH_IT1040 +@dirrm share/ots/examples_and_templates/NY_IT201 +@dirrm share/ots/examples_and_templates/NJ_1040 +@dirrm share/ots/examples_and_templates/NC_D400 +@dirrm share/ots/examples_and_templates/MA_1 +@dirrm share/ots/examples_and_templates/CA_540 +@dirrm share/ots/examples_and_templates +@dirrm share/ots