aboutsummaryrefslogtreecommitdiff
path: root/security/gtkportscan
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2012-12-10 08:51:51 +0000
committerBeech Rintoul <beech@FreeBSD.org>2012-12-10 08:51:51 +0000
commitf973eabeb0d2d66aec6d6e138010e7d130c6fa16 (patch)
tree2d080c538b850ff4a6aae63ccd45177862dd7dd4 /security/gtkportscan
parent48f622a4cb665e7fb6c870260541bdc2ba4957d6 (diff)
Notes
Diffstat (limited to 'security/gtkportscan')
-rw-r--r--security/gtkportscan/Makefile35
-rw-r--r--security/gtkportscan/files/patch-aa32
-rw-r--r--security/gtkportscan/pkg-plist2
3 files changed, 28 insertions, 41 deletions
diff --git a/security/gtkportscan/Makefile b/security/gtkportscan/Makefile
index 9cd4d50daf01..48dd99f8ec11 100644
--- a/security/gtkportscan/Makefile
+++ b/security/gtkportscan/Makefile
@@ -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$
-#
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 --git a/security/gtkportscan/files/patch-aa b/security/gtkportscan/files/patch-aa
deleted file mode 100644
index 9dc42a9ae276..000000000000
--- a/security/gtkportscan/files/patch-aa
+++ /dev/null
@@ -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 --git a/security/gtkportscan/pkg-plist b/security/gtkportscan/pkg-plist
deleted file mode 100644
index ab4e906bfaa0..000000000000
--- a/security/gtkportscan/pkg-plist
+++ /dev/null
@@ -1,2 +0,0 @@
-bin/gtkportscan
-bin/portscan