summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgarbled <garbled@pkgsrc.org>2000-01-11 02:56:33 +0000
committergarbled <garbled@pkgsrc.org>2000-01-11 02:56:33 +0000
commitca40abfb5a42b7773d5fff4cc65265e7a0d98f42 (patch)
tree915a18f4fb730f0d7d47d7f5bfb5c0633b1481e5
parent2259fe94f260d44c734926e2f2b7f1c9baa27623 (diff)
downloadpkgsrc-ca40abfb5a42b7773d5fff4cc65265e7a0d98f42.tar.gz
Initial import of nut program.
record what you eat and analyze your meals.
-rw-r--r--biology/nut/Makefile19
-rw-r--r--biology/nut/files/md53
-rw-r--r--biology/nut/files/patch-sum5
-rw-r--r--biology/nut/patches/patch-aa36
-rw-r--r--biology/nut/patches/patch-ab24
-rw-r--r--biology/nut/patches/patch-ac11
-rw-r--r--biology/nut/pkg/COMMENT1
-rw-r--r--biology/nut/pkg/DESCR3
-rw-r--r--biology/nut/pkg/PLIST4
9 files changed, 106 insertions, 0 deletions
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 <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <sys/errno.h>
++#include <sys/types.h>
++#include <sys/stat.h>
+
+ 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