svn commit: r308593 - in head/security/gtkportscan: . files
Beech Rintoul
beech at FreeBSD.org
Mon Dec 10 08:51:52 UTC 2012
Author: beech
Date: Mon Dec 10 08:51:51 2012
New Revision: 308593
URL: http://svnweb.freebsd.org/changeset/ports/308593
Log:
- Fix build with clang
- Add option for GTK2 support
- Support PLIST_FILES
PR: ports/174157
Submitted by: KATO Tsuguru <tkato432 at yahoo.com>
Deleted:
head/security/gtkportscan/files/
head/security/gtkportscan/pkg-plist
Modified:
head/security/gtkportscan/Makefile (contents, props changed)
Modified: head/security/gtkportscan/Makefile
==============================================================================
--- head/security/gtkportscan/Makefile Mon Dec 10 08:48:38 2012 (r308592)
+++ head/security/gtkportscan/Makefile Mon Dec 10 08:51:51 2012 (r308593)
@@ -1,22 +1,43 @@
-# New ports collection makefile for: gtkportscan
-# Date created: 11 March 1999
-# Whom: Chris Piazza <cpiazza at FreeBSD.org>
-#
+# Created by: Chris Piazza <cpiazza at FreeBSD.org>
# $FreeBSD$
-#
PORTNAME= gtkportscan
PORTVERSION= 1.2
PORTREVISION= 4
CATEGORIES= security
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= cpiazza
+MASTER_SITES= LOCAL/cpiazza
MAINTAINER= ports at 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>
More information about the svn-ports-all
mailing list