Date: Thu, 6 Dec 2012 02:32:58 +0900 From: KATO Tsuguru <tkato432@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/174157: security/gtkportscan: Fix build with clang Message-ID: <20121206023258.7b5902ea3d25016a4a760ca1@yahoo.com> Resent-Message-ID: <201212051810.qB5IA0rX033293@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 174157 >Category: ports >Synopsis: security/gtkportscan: 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: Wed Dec 05 18:10:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 7.4-RELEASE-p11 i386 >Organization: >Environment: >Description: - Fix build with clang - Add option for GTK2 support - Support PLIST_FILES Remove file: files/patch-aa pkg-plist >How-To-Repeat: >Fix: diff -urN /usr/ports/security/gtkportscan/Makefile security/gtkportscan/Makefile --- /usr/ports/security/gtkportscan/Makefile 2012-11-08 09:58:31.000000000 +0900 +++ security/gtkportscan/Makefile 2012-12-04 02:49:14.000000000 +0900 @@ -1,22 +1,43 @@ -# New ports collection makefile for: gtkportscan -# Date created: 11 March 1999 -# Whom: Chris Piazza <cpiazza@FreeBSD.org> -# +# Created by: Chris Piazza <cpiazza@FreeBSD.org> # $FreeBSD: head/security/gtkportscan/Makefile 300897 2012-07-14 14:29:18Z beat $ -# PORTNAME= gtkportscan PORTVERSION= 1.2 PORTREVISION= 4 CATEGORIES= security -MASTER_SITES= ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= cpiazza +MASTER_SITES= LOCAL/cpiazza MAINTAINER= ports@FreeBSD.org COMMENT= A simple port scanner that prints out open ports +OPTIONS_DEFINE= GTK2 + WRKSRC= ${WRKDIR}/${PORTNAME} +PLIST_FILES= bin/gtkportscan bin/portscan + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MGTK2} +USE_GNOME= gtk20 +USE_PKGCONFIG= build +GTK_CONFIG= pkg-config gtk+-2.0 +.else USE_GNOME= gtk12 +.endif + +post-patch: + @${REINPLACE_CMD} -e \ + 's|^void main|int main|' ${WRKSRC}/portscan.c + +do-build: + (cd ${WRKSRC} && ${CC} ${CFLAGS} -o portscan portscan.c) + (cd ${WRKSRC} && ${CC} ${CFLAGS} $$(${GTK_CONFIG} --cflags) \ + -o gtkportscan gtkportscan.c $$(${GTK_CONFIG} --libs)) + +do-install: +.for i in gtkportscan portscan + (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${i} ${PREFIX}/bin) +.endfor .include <bsd.port.mk> diff -urN /usr/ports/security/gtkportscan/files/patch-aa security/gtkportscan/files/patch-aa --- /usr/ports/security/gtkportscan/files/patch-aa 2012-11-08 09:58:30.000000000 +0900 +++ security/gtkportscan/files/patch-aa 1970-01-01 09:00:00.000000000 +0900 @@ -1,32 +0,0 @@ ---- Makefile.orig Thu Mar 11 17:58:41 1999 -+++ Makefile Sun Jul 16 00:45:14 2000 -@@ -1,21 +1,21 @@ --CC=gcc --GTK_FLAGS=`gtk-config --cflags` `gtk-config --libs` -+CC?=gcc -+GTK_FLAGS=`$(GTK_CONFIG) --cflags` `$(GTK_CONFIG) --libs` - - all: gtkportscan portscan - - portscan: portscan.c -- $(CC) -O2 -Wall portscan.c -o portscan -g -+ $(CC) $(CFLAGS) portscan.c -o portscan - - gtkportscan: gtkportscan.c -- $(CC) -Wall $(GTK_FLAGS) gtkportscan.c -o gtkportscan -g -+ $(CC) $(CFLAGS) $(GTK_FLAGS) gtkportscan.c -o gtkportscan - - install: -- cp portscan /usr/local/bin -- cp gtkportscan /usr/X11/bin -+ ${BSD_INSTALL_PROGRAM} portscan ${PREFIX}/bin -+ ${BSD_INSTALL_PROGRAM} gtkportscan ${PREFIX}/bin - - clean: - rm -f portscan gtkportscan - - uninstall: -- rm -f /usr/local/bin/portscan -- rm -f /usr/X11/bin/gtkportscan -+ rm -f ${PREFIX}/bin/portscan -+ rm -f ${PREFIX}/bin/gtkportscan diff -urN /usr/ports/security/gtkportscan/pkg-plist security/gtkportscan/pkg-plist --- /usr/ports/security/gtkportscan/pkg-plist 2012-11-08 09:58:31.000000000 +0900 +++ security/gtkportscan/pkg-plist 1970-01-01 09:00:00.000000000 +0900 @@ -1,2 +0,0 @@ -bin/gtkportscan -bin/portscan >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121206023258.7b5902ea3d25016a4a760ca1>