Bug 187671 - [MAINTAINER] math/ent: Add DOCS and clang patch
Summary: [MAINTAINER] math/ent: Add DOCS and clang patch
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: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-17 18:20 UTC by Horia Racoviceanu
Modified: 2014-03-18 15:00 UTC (History)
0 users

See Also:


Attachments
file.diff (1.17 KB, patch)
2014-03-17 18:20 UTC, Horia Racoviceanu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Horia Racoviceanu 2014-03-17 18:20:00 UTC

Fix: - Bump PORTREVISION
- Add USES=compiler, needed for clang patch
- Add DOCS to Options
- Change REINPLACE, CC and CFLAGS
- Remove unused -g CFLAGS for clang

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-03-17 18:20:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

swills@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Horia Racoviceanu 2014-03-17 20:15:20 UTC
Build log:
https://redports.org/buildarchive/20140317045802-47850/
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-03-18 14:58:27 UTC
Author: swills
Date: Tue Mar 18 14:58:23 2014
New Revision: 348565
URL: http://svnweb.freebsd.org/changeset/ports/348565
QAT: https://qat.redports.org/buildarchive/r348565/

Log:
  - Add USES=compiler, needed for clang patch
  - Add DOCS to Options
  - Change REINPLACE, CC and CFLAGS
  - Remove unused -g CFLAGS for clang
  - Bump PORTREVISION
  
  PR:		ports/187671
  Submitted by:	Horia Racoviceanu <horia@racoviceanu.com> (maintainer)

Modified:
  head/math/ent/Makefile

Modified: head/math/ent/Makefile
==============================================================================
--- head/math/ent/Makefile	Tue Mar 18 14:55:42 2014	(r348564)
+++ head/math/ent/Makefile	Tue Mar 18 14:58:23 2014	(r348565)
@@ -3,6 +3,7 @@
 
 PORTNAME=	ent
 PORTVERSION=	0.20080128
+PORTREVISION=	1
 CATEGORIES=	math
 MASTER_SITES=	http://www.fourmilab.ch/random/
 DISTNAME=	random
@@ -11,19 +12,30 @@ DIST_SUBDIR=	${PORTNAME}/${PORTVERSION}
 MAINTAINER=	horia@racoviceanu.com
 COMMENT=	Entropy calculation and analysis of putative random sequences
 
-USES=		zip
+USES=		compiler zip
 NO_WRKSUBDIR=	yes
 ALL_TARGET=	ent
 PLIST_FILES=	bin/ent
 
+PORTDOCS=	ent.html entitle.gif
+OPTIONS_DEFINE=	DOCS
+
 regression-test: build
 	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check)
 
+.include <bsd.port.pre.mk>
+
 post-patch:
-	${REINPLACE_CMD} -e '/CC = /d' -e '/CFLAGS = /s,$$, ${CFLAGS},' \
-		${WRKSRC}/Makefile
+	${REINPLACE_CMD} -e 's|gcc|${CC}|; s|^CFLAGS |&+|' ${WRKSRC}/Makefile
+
+.if ${COMPILER_TYPE} == clang
+	${REINPLACE_CMD} -e 's|-g ||' ${WRKSRC}/Makefile
+.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
 
-.include <bsd.port.mk>
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.post.mk>
_______________________________________________
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"
Comment 4 Steve Wills freebsd_committer freebsd_triage 2014-03-18 14:59:42 UTC
State Changed
From-To: open->closed

Committed. Thanks!