aboutsummaryrefslogtreecommitdiffstats
path: root/biology/povchem
diff options
context:
space:
mode:
authorjeh <jeh@FreeBSD.org>2000-10-10 08:37:00 +0800
committerjeh <jeh@FreeBSD.org>2000-10-10 08:37:00 +0800
commit8e1b23b883bace5018cab1a476d00a29148508a4 (patch)
tree667a233007149a899faa5fbe55cbaeab576297e7 /biology/povchem
parent584ac3413edb74c7aeda322f5d2add11c7118d50 (diff)
downloadfreebsd-ports-gnome-8e1b23b883bace5018cab1a476d00a29148508a4.tar.gz
freebsd-ports-gnome-8e1b23b883bace5018cab1a476d00a29148508a4.tar.zst
freebsd-ports-gnome-8e1b23b883bace5018cab1a476d00a29148508a4.zip
- Fix MASTER_SITES
- Support CC/LOCALBASE/X11BASE/PREFIX properly Remove file: patches/patch-aa Approval from MAINTAINER after sending EMail PR: 21609 Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp> Approved by: Chen Hsiung Chan <frankch@waru.life.nthu.edu.tw> MAINTAINER
Diffstat (limited to 'biology/povchem')
-rw-r--r--biology/povchem/Makefile32
-rw-r--r--biology/povchem/files/patch-ab4
-rw-r--r--biology/povchem/files/patch-ac15
-rw-r--r--biology/povchem/pkg-plist3
4 files changed, 36 insertions, 18 deletions
diff --git a/biology/povchem/Makefile b/biology/povchem/Makefile
index 4c6a2fd5f8d5..66653475a8d9 100644
--- a/biology/povchem/Makefile
+++ b/biology/povchem/Makefile
@@ -7,29 +7,37 @@
PORTNAME= povchem
PORTVERSION= 1.0
-CATEGORIES= biology graphics
-MASTER_SITES= http://cherubino.med.jhmi.edu/~paul/PC_Dist/v1.00/
+CATEGORIES= biology graphics
+MASTER_SITES= http://www.chemicalgraphics.com/paul/PC_Dist/v1.00/
DISTFILES= povchem.c \
povchem.cfg \
periodic.tab
-MAINTAINER= frankch@waru.life.nthu.edu.tw
+MAINTAINER= frankch@waru.life.nthu.edu.tw
NO_WRKSUBDIR= yes
DIST_SUBDIR= povchem
-pre-extract:
- @${MKDIR} ${WRKSRC}
- @${CP} ${DISTDIR}/${DIST_SUBDIR}/povchem.c ${WRKSRC}
- @${CP} ${DISTDIR}/${DIST_SUBDIR}/povchem.cfg ${WRKSRC}
- @${CP} ${DISTDIR}/${DIST_SUBDIR}/periodic.tab ${WRKSRC}
+DEFS= -DDATADIR=\"${PREFIX}/share/povchem\" \
+ -DSYSCONFDIR=\"${PREFIX}/etc\"
do-extract:
- @${TOUCH} ${TOUCH_FLAGS} ${EXTRACT_COOKIE}
+ @${MKDIR} ${WRKSRC}
+.for file in ${DISTFILES}
+ @${CP} ${_DISTDIR}/${file} ${WRKSRC}
+.endfor
+
+post-patch:
+ @${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/povchem.cfg
+ @${PERL} -pi -e "s|%%X11BASE%%|${X11BASE}|g" ${WRKSRC}/povchem.cfg
+
+do-build:
+ cd ${WRKSRC} && ${CC} ${CFLAGS} ${DEFS} -o povchem povchem.c -lm
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/povchem ${PREFIX}/bin
- @${INSTALL_DATA} ${WRKSRC}/povchem.cfg ${PREFIX}/etc
- @${INSTALL_DATA} ${WRKSRC}/periodic.tab ${PREFIX}/share
+ ${INSTALL_PROGRAM} ${WRKSRC}/povchem ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/povchem.cfg ${PREFIX}/etc
+ @${MKDIR} ${PREFIX}/share/povchem
+ ${INSTALL_DATA} ${WRKSRC}/periodic.tab ${PREFIX}/share/povchem
.include <bsd.port.mk>
diff --git a/biology/povchem/files/patch-ab b/biology/povchem/files/patch-ab
index 222f2bfb9fee..bc0d3afeb9d3 100644
--- a/biology/povchem/files/patch-ab
+++ b/biology/povchem/files/patch-ab
@@ -5,7 +5,7 @@
if (*fileName==NULL) {
- New_String(fileName,"povchem.cfg");
-+ New_String(fileName,"/usr/local/etc/povchem.cfg");
++ New_String(fileName,SYSCONFDIR "/povchem.cfg");
if ((config=fopen(*fileName,"r"))==NULL) {
puts("Can't read the configuration file \"povchem.cfg\"!");
perror("Reason");
@@ -14,7 +14,7 @@
no_config:
- if (!PERIODIC_TABLE_FILE) New_String(&PERIODIC_TABLE_FILE,"periodic.tab");
-+ if (!PERIODIC_TABLE_FILE) New_String(&PERIODIC_TABLE_FILE,"/usr/local/share/periodic.tab");
++ if (!PERIODIC_TABLE_FILE) New_String(&PERIODIC_TABLE_FILE,DATADIR "/periodic.tab");
if (!FINISH) New_String(&FINISH,"Plastic");
if (!FINISH_DECLARATION) New_String(&FINISH_DECLARATION,"\
finish {\n\
diff --git a/biology/povchem/files/patch-ac b/biology/povchem/files/patch-ac
index bf45153e7732..f16f7878cf28 100644
--- a/biology/povchem/files/patch-ac
+++ b/biology/povchem/files/patch-ac
@@ -1,11 +1,20 @@
---- povchem.cfg.orig Sun Mar 15 14:14:16 1998
-+++ povchem.cfg Sun Mar 15 14:15:13 1998
+--- povchem.cfg.orig Tue Aug 8 03:13:31 2000
++++ povchem.cfg Tue Aug 8 03:16:16 2000
+@@ -294,7 +294,7 @@
+ # or leave blank the "POVRay" line, and the next five options will be ignored.
+ #
+ #POVRay = d:\graphics\povray\povray.exe
+-POVRay = /usr/local/bin/povray
++POVRay = %%LOCALBASE%%/bin/povray
+ POVWidth = 640
+ POVOptions = +V -D +Q9 +A +FT +B32
+ RunPOVRay = No
@@ -331,7 +331,7 @@
# the type of image POV-Ray generates - usually TGA (also called TARGA).
#
#Viewer = c:\util\dvpeg.exe
-Viewer = /usr/local/bin/xv
-+Viewer = /usr/X11R6/bin/xv
++Viewer = %%X11BASE%%/bin/xv
# If ColorSplit is Proportional, 'Power' determines the power of the vdW radii
# to which the point of color change is proportional. See the manual for
diff --git a/biology/povchem/pkg-plist b/biology/povchem/pkg-plist
index 85c28b24592a..6e7ba75a5365 100644
--- a/biology/povchem/pkg-plist
+++ b/biology/povchem/pkg-plist
@@ -1,3 +1,4 @@
bin/povchem
etc/povchem.cfg
-share/periodic.tab
+share/povchem/periodic.tab
+@dirrm share/povchem