aboutsummaryrefslogtreecommitdiff
path: root/biology/povchem
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2013-02-10 07:55:45 +0000
committerMartin Wilke <miwi@FreeBSD.org>2013-02-10 07:55:45 +0000
commitc23a507726c54fccbf88012fa8eaa19d2955c2f5 (patch)
tree9018f154062295a400e8b3db3691805debdab261 /biology/povchem
parente33108145f2ad5cbfecff1b25318b88ae31c2d50 (diff)
downloadports-c23a507726c54fccbf88012fa8eaa19d2955c2f5.tar.gz
ports-c23a507726c54fccbf88012fa8eaa19d2955c2f5.zip
- Fix build with clang
PR: 175034 Submitted by: Ports Fury
Notes
Notes: svn path=/head/; revision=312001
Diffstat (limited to 'biology/povchem')
-rw-r--r--biology/povchem/Makefile37
-rw-r--r--biology/povchem/files/patch-ab9
-rw-r--r--biology/povchem/pkg-plist4
3 files changed, 26 insertions, 24 deletions
diff --git a/biology/povchem/Makefile b/biology/povchem/Makefile
index 18aa6c25c99d..4f44b747a8e0 100644
--- a/biology/povchem/Makefile
+++ b/biology/povchem/Makefile
@@ -1,9 +1,5 @@
-# New ports collection Makefile for: povchem
-# Date created: Mar 14 1998
-# Whom: frankch@waru.life.nthu.edu.tw
-#
+# Created by: frankch@waru.life.nthu.edu.tw
# $FreeBSD$
-#
PORTNAME= povchem
PORTVERSION= 1.0
@@ -13,6 +9,8 @@ MASTER_SITES= http://www.chemicalgraphics.com/paul/PC_Dist/v1.00/
DISTFILES= povchem.c \
povchem.cfg \
periodic.tab
+DIST_SUBDIR= povchem
+EXTRACT_ONLY= #
MAINTAINER= ports@FreeBSD.org
COMMENT= Simple yet powerful tool to generate POV from a PDB file
@@ -20,31 +18,30 @@ COMMENT= Simple yet powerful tool to generate POV from a PDB file
RUN_DEPENDS= povray:${PORTSDIR}/graphics/povray-meta
NO_WRKSUBDIR= yes
-DIST_SUBDIR= povchem
-DEFS= -DDATADIR=\"${PREFIX}/share/povchem\" \
+USE_DOS2UNIX= povchem.c
+
+CPPFLAGS+= -DDATADIR=\"${DATADIR}\" \
-DSYSCONFDIR=\"${PREFIX}/etc\"
-PATCH_ARGS= -l -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_STRIP}
-do-extract:
- @${MKDIR} ${WRKSRC}
-.for file in ${DISTFILES}
- @${CP} ${_DISTDIR}/${file} ${WRKSRC}
-.endfor
+PLIST_FILES= bin/povchem etc/povchem.cfg %%DATADIR%%/periodic.tab
+PLIST_DIRS= %%DATADIR%%
+
+post-extract:
+ @(cd ${DISTDIR}/${DIST_SUBDIR} && ${TAR} -cf - ${DISTFILES}) | \
+ (cd ${WRKSRC} && ${TAR} -xf -)
post-patch:
- @${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
- ${WRKSRC}/povchem.cfg
- ${MV} ${WRKSRC}/povchem.c ${WRKSRC}/povchem.c.patched
- strings -1 ${WRKSRC}/povchem.c.patched > ${WRKSRC}/povchem.c
+ @${REINPLACE_CMD} -e \
+ 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/povchem.cfg
do-build:
- cd ${WRKSRC} && ${CC} ${CFLAGS} ${DEFS} -o povchem povchem.c -lm
+ cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o povchem povchem.c -lm
do-install:
${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
+ @${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/periodic.tab ${DATADIR}
.include <bsd.port.mk>
diff --git a/biology/povchem/files/patch-ab b/biology/povchem/files/patch-ab
index 3534183ea95e..20227eaac79f 100644
--- a/biology/povchem/files/patch-ab
+++ b/biology/povchem/files/patch-ab
@@ -177,3 +177,12 @@ $FreeBSD$
eye.x,eye.y,eye.z);
fputs( "camera{\n",pov);
+@@ -2317,7 +2317,7 @@
+
+ /*-------------------- the main program body --------------------------*/
+
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+ char *pdbName, *configName=NULL;
+ char *tgaName=NULL, *leftTga=NULL, *rightTga=NULL;
diff --git a/biology/povchem/pkg-plist b/biology/povchem/pkg-plist
index 6e7ba75a5365..e69de29bb2d1 100644
--- a/biology/povchem/pkg-plist
+++ b/biology/povchem/pkg-plist
@@ -1,4 +0,0 @@
-bin/povchem
-etc/povchem.cfg
-share/povchem/periodic.tab
-@dirrm share/povchem