Bug 156833

Summary: games/fairymax: O-Flags option and preparing change into masterport
Product: Ports & Packages Reporter: Kalten <kalten>
Component: Individual Port(s)Assignee: Chris Rees <crees>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Kalten 2011-05-05 18:50:07 UTC
I had removed the -O2 option as mentioned in Porter's Handbook[1] earlier. Now there is an option to re enable it (on by default).

And it is being prepared to be changed into a master port, as my next PR with the title ``New port: games/fairymax-devel latest version of games/fairymax'' (hen egg problem: can not tell you its number yet) will introduce a slave port.

(See attachment.)

[1] http://www.freebsd.org/doc/en/books/porters-handbook/dads-cflags.html

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-05-05 18:50:16 UTC
Class Changed
From-To: change-request->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 Kalten 2011-05-06 00:14:37 UTC
After a little conversation with johans I have given up the system of a
master- and a slave port.
Furthermore he meant, that the optimisation flags should be set
globally, not by the port: well--as the original program uses them, I
stick to this option (maybe better not on but off by default?) (as other
ports have them too).

I hope, it's OK now?

New patch--replacing old one--attached here.

--- patch.txt begins here ---
--- Makefile.orig	2011-05-05 00:47:54.000000000 +0200
+++ Makefile	2011-05-06 00:43:39.000000000 +0200
@@ -1,4 +1,4 @@
-# New ports collection makefile for:	fairy-max
+# New ports collection makefile for:	fairymax
 # Date created:				22 April 2011
 # Whom:					Kalten <kalten@gmx.at>
 #
@@ -7,6 +7,7 @@
 
 PORTNAME=	fairymax
 PORTVERSION=	4.8Q
+PORTREVISION=	1
 CATEGORIES=	games
 MASTER_SITES=	http://freeheimdall.homeunix.org/files/
 DISTNAME=	${PORTNAME}-c7a129e
@@ -15,6 +16,10 @@
 MAINTAINER=	kalten@gmx.at
 COMMENT=	Chess engine (e.g. xboard) for shatranj, courier chess, ...
 
+CONFLICTS=	fairymax-4.8Q.[0-9]* fairymax-4.8Q.[0-9]*_[0-9]*
+
+OPTIONS+=	OCFLAGS "Use optimized compiler flags" on
+
 DIST_SUBDIR=	${PORTNAME}
 
 PLIST_FILES=	bin/fairymax \
@@ -33,6 +38,14 @@
 MAKE_ARGS+=	INI_FILE_fmax=${DATADIR}/fmax.ini \
 		INI_FILE_qmax=${DATADIR}/qmax.ini
 
+.include <bsd.port.options.mk>
+
+.if defined(WITHOUT_OCFLAGS)
+CFLAGS+=
+.else
+CFLAGS+=	-O2
+.endif
+
 post-patch:
 	@${CP} ${WRKSRC}/fairymax.pod ${WRKSRC}/fairymax.pod.ori
 	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g;s|%%DATADIR%%|${DATADIR}|g' \
--- patch.txt ends here ---
--
Comment 3 Chris Rees freebsd_committer freebsd_triage 2011-07-14 17:42:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

I'll take it.
Comment 4 Chris Rees freebsd_committer freebsd_triage 2011-07-14 17:44:09 UTC
State Changed
From-To: open->feedback

Ask for submitter approval.
Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-07-14 17:44:11 UTC
Made a few changes to pet portlint, and other sanity/efficiency changes.

Are they OK?

http://www.bayofrum.net/~crees/patches/fairymax-fixes.diff

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-07-24 19:35:01 UTC
crees       2011-07-24 18:34:51 UTC

  FreeBSD ports repository

  Modified files:
    games/fairymax       Makefile 
  Log:
  - Add optimized compilation option [1]
  - Pet portlint and tidy style, small efficiency savings
  
  PR:             ports/156833
  Submitted by:   Kalten <kalten@gmx.at> [1]
  Approved by:    rene (mentor)
  
  Revision  Changes    Path
  1.2       +27 -17    ports/games/fairymax/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Chris Rees freebsd_committer freebsd_triage 2011-07-24 19:38:43 UTC
State Changed
From-To: feedback->closed

Committed, with minor changes. Thanks!