Bug 175034 - biology/povchem: Fix build with clang
Summary: biology/povchem: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-05 18:10 UTC by tkato432
Modified: 2013-02-10 08:00 UTC (History)
0 users

See Also:


Attachments
file.diff (3.00 KB, patch)
2013-01-05 18:10 UTC, tkato432
no flags Details | Diff
biology_povchem.diff (3.02 KB, patch)
2013-02-08 17:57 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-01-05 18:10:09 UTC
- Fix build with clang
- Support PLIST_FILES

Remove file:
pkg-plist
Comment 1 Marcelo Araujo freebsd_committer freebsd_triage 2013-01-18 06:13:52 UTC
Responsible Changed
From-To: freebsd-ports-bugs->araujo

I'll take it.
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2013-02-07 13:10:05 UTC
Responsible Changed
From-To: araujo->miwi

I'll take it.
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2013-02-07 13:10:28 UTC
State Changed
From-To: open->feedback

plist failes now. 
http://miwibox.org/tb/index.php?action=describe_port&id=444
Comment 4 tkato432 2013-02-08 17:57:07 UTC
Here is the corrected patch.
Comment 5 Martin Wilke freebsd_committer freebsd_triage 2013-02-10 07:55:47 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 6 dfilter service freebsd_committer freebsd_triage 2013-02-10 07:55:54 UTC
Author: miwi
Date: Sun Feb 10 07:55:45 2013
New Revision: 312001
URL: http://svnweb.freebsd.org/changeset/ports/312001

Log:
  - Fix build with clang
  
  PR:		175034
  Submitted by:	Ports Fury

Modified:
  head/biology/povchem/Makefile   (contents, props changed)
  head/biology/povchem/files/patch-ab   (contents, props changed)
  head/biology/povchem/pkg-plist   (contents, props changed)

Modified: head/biology/povchem/Makefile
==============================================================================
--- head/biology/povchem/Makefile	Sun Feb 10 07:55:02 2013	(r312000)
+++ head/biology/povchem/Makefile	Sun Feb 10 07:55:45 2013	(r312001)
@@ -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.chemicalgraphic
 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 gen
 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>

Modified: head/biology/povchem/files/patch-ab
==============================================================================
--- head/biology/povchem/files/patch-ab	Sun Feb 10 07:55:02 2013	(r312000)
+++ head/biology/povchem/files/patch-ab	Sun Feb 10 07:55:45 2013	(r312001)
@@ -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;

Modified: head/biology/povchem/pkg-plist
==============================================================================
--- head/biology/povchem/pkg-plist	Sun Feb 10 07:55:02 2013	(r312000)
+++ head/biology/povchem/pkg-plist	Sun Feb 10 07:55:45 2013	(r312001)
@@ -1,4 +0,0 @@
-bin/povchem
-etc/povchem.cfg
-share/povchem/periodic.tab
-@dirrm share/povchem
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"