From 50973690a87f60979a5867e7a4593cd0277c534b Mon Sep 17 00:00:00 2001 From: garbled Date: Tue, 11 Jan 2000 02:56:33 +0000 Subject: Initial import of nut program. record what you eat and analyze your meals. --- biology/nut/Makefile | 19 +++++++++++++++++++ biology/nut/files/md5 | 3 +++ biology/nut/files/patch-sum | 5 +++++ biology/nut/patches/patch-aa | 36 ++++++++++++++++++++++++++++++++++++ biology/nut/patches/patch-ab | 24 ++++++++++++++++++++++++ biology/nut/patches/patch-ac | 11 +++++++++++ biology/nut/pkg/COMMENT | 1 + biology/nut/pkg/DESCR | 3 +++ biology/nut/pkg/PLIST | 4 ++++ 9 files changed, 106 insertions(+) create mode 100644 biology/nut/Makefile create mode 100644 biology/nut/files/md5 create mode 100644 biology/nut/files/patch-sum create mode 100644 biology/nut/patches/patch-aa create mode 100644 biology/nut/patches/patch-ab create mode 100644 biology/nut/patches/patch-ac create mode 100644 biology/nut/pkg/COMMENT create mode 100644 biology/nut/pkg/DESCR create mode 100644 biology/nut/pkg/PLIST (limited to 'biology/nut') diff --git a/biology/nut/Makefile b/biology/nut/Makefile new file mode 100644 index 00000000000..6ee8942f7af --- /dev/null +++ b/biology/nut/Makefile @@ -0,0 +1,19 @@ +# $NetBSD: Makefile,v 1.1.1.1 2000/01/11 02:56:33 garbled Exp $ + +DISTNAME= nut4 +PKGNAME= nut-4.0 +WRKSRC= ${WRKDIR}/nut +CATEGORIES= biology +MASTER_SITES= http://www.kachinatech.com/~hjjou/archives/ + +MAINTAINER= root@garbled.net + +ALL_TARGET= nut +USE_GMAKE= yes + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/nut ${PREFIX}/bin + ${INSTALL_DATA_DIR} ${PREFIX}/share/nut + ${INSTALL_DATA} ${WRKSRC}/nutdb/abbrev.txt ${PREFIX}/share/nut/abbrev.txt + +.include "../../mk/bsd.pkg.mk" diff --git a/biology/nut/files/md5 b/biology/nut/files/md5 new file mode 100644 index 00000000000..c14c0520030 --- /dev/null +++ b/biology/nut/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2000/01/11 02:56:33 garbled Exp $ + +MD5 (nut4.tar.gz) = 73f13faa3354df924435a91be96312a1 diff --git a/biology/nut/files/patch-sum b/biology/nut/files/patch-sum new file mode 100644 index 00000000000..eed786eaf35 --- /dev/null +++ b/biology/nut/files/patch-sum @@ -0,0 +1,5 @@ +$NetBSD: patch-sum,v 1.1.1.1 2000/01/11 02:56:33 garbled Exp $ + +MD5 (patch-aa) = cf75e20529a2e4d57cf4fe33ee17e597 +MD5 (patch-ab) = 146b82f6a8666d6401426d9c42a39a76 +MD5 (patch-ac) = 6ebfd65fc158d0d36f7567808306f261 diff --git a/biology/nut/patches/patch-aa b/biology/nut/patches/patch-aa new file mode 100644 index 00000000000..b9da4412a00 --- /dev/null +++ b/biology/nut/patches/patch-aa @@ -0,0 +1,36 @@ +$NetBSD: patch-aa,v 1.1.1.1 2000/01/11 02:56:33 garbled Exp $ +--- main.c.orig Thu Apr 8 11:28:57 1999 ++++ main.c Mon Jan 10 16:07:45 2000 +@@ -23,15 +23,32 @@ + #include "food.h" + #include "db.h" + #include ++#include ++#include ++#include ++#include ++#include + + void main(int argc, char *argv[]) + { ++ ++char pathname[256]; ++extern int errno; ++ + food_root.next = NULL; + meal_root.next = NULL; + recipe_root.next = NULL; + make_filenames(); + if ( ! read_food_db() ) + { ++ sprintf(pathname, "%s/%s", getenv("HOME"), NUTDIR); ++ if (mkdir(pathname, S_IRWXU|S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) != 0) { ++ if (errno != EEXIST) { ++ printf("Cannot create %s/%s: %s\n", getenv("HOME"), NUTDIR, ++ strerror(errno)); ++ exit(1); ++ } ++ } + read_raw_food_db(); + read_nut_raw_food_file(); + } diff --git a/biology/nut/patches/patch-ab b/biology/nut/patches/patch-ab new file mode 100644 index 00000000000..a95de4bd21d --- /dev/null +++ b/biology/nut/patches/patch-ab @@ -0,0 +1,24 @@ +$NetBSD: patch-ab,v 1.1.1.1 2000/01/11 02:56:33 garbled Exp $ +--- db.c.orig Mon Jan 10 15:24:03 2000 ++++ db.c Mon Jan 10 15:42:12 2000 +@@ -32,6 +32,11 @@ + #else + char nutdir1[]=NUTDIR ; + #endif ++#ifndef DBDIR ++char nutdir2[]=".nutdb"; ++#else ++char nutdir2[]=DBDIR ; ++#endif + + char rawfoodfile1[] = "abbrev.txt"; + char rawnutfoodfile1[] = "nutfood.txt"; +@@ -454,7 +459,7 @@ + + void make_filenames(void) + { +-sprintf(rawfoodfile,"%s/%s/%s",getenv("HOME"),nutdir1,rawfoodfile1); ++sprintf(rawfoodfile,"%s/%s",nutdir2,rawfoodfile1); + sprintf(rawnutfoodfile,"%s/%s/%s",getenv("HOME"),nutdir1,rawnutfoodfile1); + sprintf(foodfile,"%s/%s/%s",getenv("HOME"),nutdir1,foodfile1); + sprintf(mealfile,"%s/%s/%s",getenv("HOME"),nutdir1,mealfile1); diff --git a/biology/nut/patches/patch-ac b/biology/nut/patches/patch-ac new file mode 100644 index 00000000000..9b78f9d413e --- /dev/null +++ b/biology/nut/patches/patch-ac @@ -0,0 +1,11 @@ +$NetBSD: patch-ac,v 1.1.1.1 2000/01/11 02:56:33 garbled Exp $ +--- Makefile.orig Mon Jan 10 15:49:05 2000 ++++ Makefile Mon Jan 10 15:52:35 2000 +@@ -1,6 +1,6 @@ + objects := $(patsubst %.c,%.o,$(wildcard *.c)) + +-CFLAGS= -O2 -Wall -DNUTDIR=\".nutdb\" ++CFLAGS= -O2 -Wall -DNUTDIR=\".nutdb\" -DDBDIR=\"${PREFIX}/share/nut\" + + nut : $(objects) + gcc -O2 -Wall -lm -o nut $(objects) diff --git a/biology/nut/pkg/COMMENT b/biology/nut/pkg/COMMENT new file mode 100644 index 00000000000..02b5cf67cf6 --- /dev/null +++ b/biology/nut/pkg/COMMENT @@ -0,0 +1 @@ +record what you eat and analyze your meals. diff --git a/biology/nut/pkg/DESCR b/biology/nut/pkg/DESCR new file mode 100644 index 00000000000..c4de2a32d4e --- /dev/null +++ b/biology/nut/pkg/DESCR @@ -0,0 +1,3 @@ +Nut allows you to record what you eat and analyze your meals for nutrient +composition. The database included is the USDA Nutrient Database for +Standard Reference, Release 12, which contains 5,976 foods. diff --git a/biology/nut/pkg/PLIST b/biology/nut/pkg/PLIST new file mode 100644 index 00000000000..3696627613b --- /dev/null +++ b/biology/nut/pkg/PLIST @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2000/01/11 02:56:33 garbled Exp $ +bin/nut +share/nut/abbrev.txt +@dirrm share/nut -- cgit v1.2.3