ports/175041: games/starlanes: Fix build with clang
KATO Tsuguru
tkato432 at yahoo.com
Sat Jan 5 18:10:11 UTC 2013
>Number: 175041
>Category: ports
>Synopsis: games/starlanes: Fix build with clang
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 05 18:10:11 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: KATO Tsuguru
>Release: FreeBSD 7.4-RELEASE-p10 i386
>Organization:
>Environment:
>Description:
- Fix build with clang
Remove file:
files/patch-aa
files/patch-ab
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/games/starlanes/Makefile games/starlanes/Makefile
--- /usr/ports/games/starlanes/Makefile 2012-11-08 07:33:53.000000000 +0900
+++ games/starlanes/Makefile 2013-01-05 22:54:47.000000000 +0900
@@ -1,24 +1,28 @@
-# New ports collection makefile for: starlanes
-# Date created: 7 May 1997
-# Whom: Andrey Zakhvatov
-#
+# Created by: Andrey Zakhvatov
# $FreeBSD: head/games/starlanes/Makefile 300896 2012-07-14 13:54:48Z beat $
-#
PORTNAME= starlanes
PORTVERSION= 1.2.2
CATEGORIES= games
-MASTER_SITES= ${MASTER_SITE_SUNSITE}
-MASTER_SITE_SUBDIR= games/strategy
+MASTER_SITES= SUNSITE/games/strategy
MAINTAINER= ports at FreeBSD.org
-COMMENT= The classic space-age stock trading game
+COMMENT= Classic space-age stock trading game
-ALL_TARGET= # empty
MAN6= starlanes.6
PLIST_FILES= bin/starlanes
-post-extract:
- @${RM} ${WRKSRC}/starlanes
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's| restrict| m_restrict| ; \
+ s|(restrict|(m_restrict|' ${WRKSRC}/starlanes.c
+
+do-build:
+ (cd ${WRKSRC} \
+ && ${CC} ${CFLAGS} -o starlanes starlanes.c -lcurses)
+
+do-install:
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} starlanes ${PREFIX}/bin)
+ (cd ${WRKSRC} && ${INSTALL_MAN} starlanes.6 ${MAN6PREFIX}/man/man6)
.include <bsd.port.mk>
diff -urN /usr/ports/games/starlanes/files/patch-aa games/starlanes/files/patch-aa
--- /usr/ports/games/starlanes/files/patch-aa 2012-11-08 07:33:53.000000000 +0900
+++ games/starlanes/files/patch-aa 1970-01-01 09:00:00.000000000 +0900
@@ -1,19 +0,0 @@
-*** starlanes.c Sun Mar 30 01:42:18 1997
---- /home/andy/tmp/wrk/starlanes.c Sat May 10 15:33:29 1997
-***************
-*** 26,32 ****
- #include <ctype.h>
- #include <time.h>
- #include <unistd.h>
-! #include <curses.h>
- #include <termios.h>
-
- /* color stuff: */
---- 26,32 ----
- #include <ctype.h>
- #include <time.h>
- #include <unistd.h>
-! #include <ncurses.h>
- #include <termios.h>
-
- /* color stuff: */
diff -urN /usr/ports/games/starlanes/files/patch-ab games/starlanes/files/patch-ab
--- /usr/ports/games/starlanes/files/patch-ab 2012-11-08 07:33:53.000000000 +0900
+++ games/starlanes/files/patch-ab 1970-01-01 09:00:00.000000000 +0900
@@ -1,29 +0,0 @@
---- Makefile.orig Sun Mar 30 09:36:44 1997
-+++ Makefile Thu Mar 30 01:54:39 2000
-@@ -2,21 +2,17 @@
- # Makefile for Starlanes
- #
-
--CC=gcc
--CCOPTS=-Wall
-+CC?=gcc
-+CCOPTS=${CFLAGS}
- CURSESLIB=ncurses
--INSTALLDIR=/usr/local
-+INSTALLDIR=${PREFIX}
-
- starlanes: starlanes.c
- $(CC) $(CCOPTS) -o starlanes starlanes.c -l$(CURSESLIB)
-
- install:
-- cp starlanes $(INSTALLDIR)/games
-- cp starlanes.6 $(INSTALLDIR)/man/man6
-- chown bin:bin $(INSTALLDIR)/games/starlanes
-- chown root:root $(INSTALLDIR)/man/man6/starlanes.6
-- chmod 755 $(INSTALLDIR)/games/starlanes
-- chmod 444 $(INSTALLDIR)/man/man6/starlanes.6
-+ ${BSD_INSTALL_PROGRAM} starlanes $(INSTALLDIR)/bin
-+ ${BSD_INSTALL_MAN} starlanes.6 $(INSTALLDIR)/man/man6
-
- # fakeinstall just echos the install commands:
- fakeinstall:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list