Date: Tue, 17 Dec 2013 02:48:35 +0900 From: KATO Tsuguru <tkato432@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/184843: games/netspades: Fix build with clang Message-ID: <20131217024835.96891ea3a3c82fa0e230ba2a@yahoo.com> Resent-Message-ID: <201312161810.rBGIAB7V016126@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 184843 >Category: ports >Synopsis: games/netspades: 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: Mon Dec 16 18:10:11 UTC 2013 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 8.4-RELEASE-p4 i386 >Organization: >Environment: >Description: - Fix build with clang - Update MASTER_SITES - Add OPTIONS for GTK1 and SLANG support - Support PLIST_FILES Remove file: pkg-plist >How-To-Repeat: >Fix: diff -urN /usr/ports/games/netspades/Makefile games/netspades/Makefile --- /usr/ports/games/netspades/Makefile 2013-11-06 22:00:42.000000000 +0900 +++ games/netspades/Makefile 2013-12-17 00:00:00.000000000 +0900 @@ -3,22 +3,67 @@ PORTNAME= NetSpades PORTVERSION= 4.2.0 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= games -MASTER_SITES= http://www.ece.rice.edu/~brentmh/spades/ +MASTER_SITES= TUCOWS/x11/entertain \ + http://www.ece.rice.edu/~brentmh/spades/ MAINTAINER= ports@FreeBSD.org COMMENT= Very popular card game for 1-4 players over a network -LIB_DEPENDS= slang.2:${PORTSDIR}/devel/libslang2 +LICENSE= GPLv2 # (or later) +OPTIONS_DEFINE= GTK1 SLANG +OPTIONS_DEFAULT= GTK1 SLANG GNU_CONFIGURE= yes -USE_GNOME= gtk12 + CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -ltermcap +LDFLAGS+= -L${LOCALBASE}/lib + +PLIST_FILES= bin/spadesd man/man6/spadesd.6.gz + +.include <bsd.port.options.mk> -MAN6= gspades.6 slspades.6 spadesd.6 +.if ${PORT_OPTIONS:MGTK1} +USE_GNOME+= gtk12 +DESKTOP_ENTRIES="GSpades" "" "" "gspades" "" "" +PLIST_FILES+= bin/gspades man/man6/gspades.6.gz +.else +CONFIGURE_ARGS+=--without-gtk +.endif + +.if ${PORT_OPTIONS:MSLANG} +USES+= readline +LIB_DEPENDS+= libslang.so:${PORTSDIR}/devel/libslang2 +LDFLAGS+= -ltermcap +PLIST_FILES+= bin/slspades man/man6/slspades.6.gz +.else +CONFIGURE_ARGS+=--without-slang +.endif + +post-patch: +.for i in engine_func.c gtk_connect.c listen.c sl_io.c + @${REINPLACE_CMD} -e \ + 's| log| ns_log|g' ${WRKSRC}/src/${i} +.endfor + +do-install: + (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} spadesd \ + ${STAGEDIR}${PREFIX}/bin) + (cd ${WRKSRC} && ${INSTALL_MAN} spadesd.6 \ + ${STAGEDIR}${MANPREFIX}/man/man6) +.if ${PORT_OPTIONS:MGTK1} + (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} gspades \ + ${STAGEDIR}${PREFIX}/bin) + (cd ${WRKSRC} && ${INSTALL_MAN} gspades.6 \ + ${STAGEDIR}${MANPREFIX}/man/man6) +.endif +.if ${PORT_OPTIONS:MSLANG} + (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} slspades \ + ${STAGEDIR}${PREFIX}/bin) + (cd ${WRKSRC} && ${INSTALL_MAN} slspades.6 \ + ${STAGEDIR}${MANPREFIX}/man/man6) +.endif -NO_STAGE= yes .include <bsd.port.mk> diff -urN /usr/ports/games/netspades/pkg-plist games/netspades/pkg-plist --- /usr/ports/games/netspades/pkg-plist 2013-11-06 22:00:42.000000000 +0900 +++ games/netspades/pkg-plist 1970-01-01 09:00:00.000000000 +0900 @@ -1,3 +0,0 @@ -bin/gspades -bin/slspades -bin/spadesd >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131217024835.96891ea3a3c82fa0e230ba2a>