summaryrefslogtreecommitdiffstats
path: root/biology/babel
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2001-12-02 13:09:47 +0000
committernaddy <naddy@FreeBSD.org>2001-12-02 13:09:47 +0000
commit48878aa9097e09515665708ac92adfc809385e87 (patch)
treed3ec304a7d49e5de7b7cc39176927a38d331d4e8 /biology/babel
parentb4e77a2bdc553c95143fbd9d68dfcb83b4c933f7 (diff)
downloadFreeBSD-ports-48878aa9097e09515665708ac92adfc809385e87.zip
FreeBSD-ports-48878aa9097e09515665708ac92adfc809385e87.tar.gz
* Replace pkg-message about setting BABEL_DIR with a wrapper script
that does. * Remove misleading full path name from usage message. * Improve fgets() usage. * Add converters category. * Improve pkg-comment and pkg-descr.
Diffstat (limited to 'biology/babel')
-rw-r--r--biology/babel/Makefile12
-rw-r--r--biology/babel/files/babel.sh6
-rw-r--r--biology/babel/files/patch-ab23
-rw-r--r--biology/babel/files/patch-convert.c22
-rw-r--r--biology/babel/pkg-comment2
-rw-r--r--biology/babel/pkg-descr8
-rw-r--r--biology/babel/pkg-message6
-rw-r--r--biology/babel/pkg-plist2
8 files changed, 55 insertions, 26 deletions
diff --git a/biology/babel/Makefile b/biology/babel/Makefile
index 1472103..2a3aff7 100644
--- a/biology/babel/Makefile
+++ b/biology/babel/Makefile
@@ -7,8 +7,8 @@
PORTNAME= babel
PORTVERSION= 1.6
-PORTREVISION= 1
-CATEGORIES= biology
+PORTREVISION= 2
+CATEGORIES= biology converters
MASTER_SITES= http://smog.com/chem/babel/files/ \
http://www.ccl.net/cca/software/UNIX/babel/ \
ftp://ccl.osc.edu/pub/chemistry/software/UNIX/babel/
@@ -18,14 +18,18 @@ MAINTAINER= ports@FreeBSD.org
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}"
+post-build:
+ ${SED} -e 's%@PREFIX@%${PREFIX}%g' \
+ ${FILESDIR}/babel.sh >${WRKSRC}/babel.sh
+
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/babel ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/babel ${PREFIX}/libexec
+ ${INSTALL_SCRIPT} ${WRKSRC}/babel.sh ${PREFIX}/bin/babel
@${MKDIR} ${PREFIX}/share/babel
${INSTALL_DATA} ${WRKSRC}/*.lis ${PREFIX}/share/babel
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/babel
${INSTALL_DATA} ${WRKSRC}/README.1ST ${PREFIX}/share/doc/babel
.endif
- @${SED} -e 's:/usr/local:${PREFIX}:' ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/biology/babel/files/babel.sh b/biology/babel/files/babel.sh
new file mode 100644
index 0000000..6a97d7d
--- /dev/null
+++ b/biology/babel/files/babel.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+# $FreeBSD$
+
+export BABEL_DIR=${BABEL_DIR-@PREFIX@/share/babel}
+
+exec @PREFIX@/libexec/babel "$@"
diff --git a/biology/babel/files/patch-ab b/biology/babel/files/patch-ab
index a8017dc..5859fc0 100644
--- a/biology/babel/files/patch-ab
+++ b/biology/babel/files/patch-ab
@@ -1,14 +1,17 @@
---- menus.c.orig Tue Jan 21 23:52:36 1997
-+++ menus.c Mon Dec 22 14:29:37 1997
+
+$FreeBSD$
+
+--- menus.c.orig Tue Jan 21 16:52:36 1997
++++ menus.c Sun Nov 18 16:43:32 2001
@@ -63,9 +63,9 @@
}
}
printf("Input file name : ");
- gets(InfileName);
-+ fgets(InfileName, BUFF_SIZE - 1, stdin);
++ fgets(InfileName, BUFF_SIZE, stdin);
printf("Keywords : ");
- gets(InputKeywords);
-+ fgets(InputKeywords, BUFF_SIZE - 1, stdin);
++ fgets(InputKeywords, BUFF_SIZE, stdin);
if (strlen(InputKeywords) < 1)
strcpy(InputKeywords,"KEYWORDS GO HERE");
@@ -17,23 +20,21 @@
}
printf("Output file name : ");
- gets(OutfileName);
-+ fgets(OutfileName, BUFF_SIZE - 1, stdin);
++ fgets(OutfileName, BUFF_SIZE, stdin);
if (has_keywords)
{
printf("Keywords : ");
- gets(OutputKeywords);
-+ fgets(OutputKeywords, BUFF_SIZE - 1, stdin);
++ fgets(OutputKeywords, BUFF_SIZE, stdin);
if (strlen(OutputKeywords) < 1)
strcpy(OutputKeywords,"KEYWORDS GO HERE");
}
-@@ -167,8 +167,8 @@
+@@ -167,7 +167,7 @@
while (done == FALSE)
{
printf("Choice : ");
- gets(choice_string);
-- for (i = 0; i < (int) strlen(choice_string); i++)
-+ fgets(choice_string, 99, stdin);
-+ for (i = 0; i < ((int) strlen(choice_string) - 1) ; i++)
++ fgets(choice_string, sizeof(choice_string), stdin);
+ for (i = 0; i < (int) strlen(choice_string); i++)
{
if (!isdigit(choice_string[i]))
- choice = 0;
diff --git a/biology/babel/files/patch-convert.c b/biology/babel/files/patch-convert.c
new file mode 100644
index 0000000..229da42
--- /dev/null
+++ b/biology/babel/files/patch-convert.c
@@ -0,0 +1,22 @@
+
+$FreeBSD$
+
+--- convert.c.orig Sun Nov 18 16:44:25 2001
++++ convert.c Sun Nov 18 16:44:54 2001
+@@ -28,6 +28,7 @@
+ static warning wstr;
+
+ static char *program_name;
++extern char *__progname;
+ int use_title = FALSE;
+
+ #ifdef MSDOS
+@@ -47,7 +48,7 @@
+ #endif
+
+ babel_init();
+- program_name = argv[0];
++ program_name = __progname;
+ if (argc == 1)
+ {
+ usage();
diff --git a/biology/babel/pkg-comment b/biology/babel/pkg-comment
index dd38a9e..d7ba1d0 100644
--- a/biology/babel/pkg-comment
+++ b/biology/babel/pkg-comment
@@ -1 +1 @@
-Conversion program among various molecular file formats
+Converts among various molecular file formats
diff --git a/biology/babel/pkg-descr b/biology/babel/pkg-descr
index 6b386d0..ced96ca 100644
--- a/biology/babel/pkg-descr
+++ b/biology/babel/pkg-descr
@@ -1,6 +1,6 @@
-Babel is a conversion program which is able to convert among dozens of
-molecular file formats.
-Babel is developed by Dolata Group, Department of Chemistry,
-Arizona University and Ohio State University.
+Babel is a program designed to interconvert a number of file formats
+currently used in molecular modeling. Babel is capable of assigning
+hybridization, bond order, and connectivity when these elements are
+not present in the input file.
WWW: http://smog.com/chem/babel/
diff --git a/biology/babel/pkg-message b/biology/babel/pkg-message
deleted file mode 100644
index 0c167a8..0000000
--- a/biology/babel/pkg-message
+++ /dev/null
@@ -1,6 +0,0 @@
-*********************************************************
-* Please set the env variable BABEL_DIR to *
-* /usr/local/share/babel before running babel. *
-* For example, put the next line in your .cshrc file: *
-* setenv BABEL_DIR /usr/local/share/babel *
-*********************************************************
diff --git a/biology/babel/pkg-plist b/biology/babel/pkg-plist
index e5c0db2..e781099 100644
--- a/biology/babel/pkg-plist
+++ b/biology/babel/pkg-plist
@@ -1,4 +1,6 @@
+@comment $FreeBSD$
bin/babel
+libexec/babel
share/babel/element.lis
share/babel/new.lis
share/babel/quanta.lis
OpenPOWER on IntegriCloud