Remove nonexistent -t option from call to netstat(1) [1]

Convert to options helpers
Install everything with BSD_INSTALL_* instead of cp to set
correct permissions and strip binaries
Pet portlint and stage-qa

PR:		213490 [1]
Submitted by:	G. Paul Ziemba <p-fbsd-bugs@ziemba.us> [1]
This commit is contained in:
Jason E. Hale 2016-12-09 15:41:00 +00:00
parent 9572693d15
commit 3d8ce639bb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=428224
4 changed files with 63 additions and 53 deletions

View File

@ -3,10 +3,10 @@
PORTNAME= ssvnc
PORTVERSION= 1.0.29
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= net security
MASTER_SITES= SF
DISTFILES= ${DISTNAME}.src${EXTRACT_SUFX}
EXTRACT_SUFX= .src.tar.gz
MAINTAINER= ports@FreeBSD.org
COMMENT= Enhanced TightVNC Viewer (SSVNC: SSL/SSH VNC viewer)
@ -19,30 +19,23 @@ RUN_DEPENDS= stunnel:security/stunnel \
USES= gmake imake:env jpeg perl5 ssl tk:wrapper
USE_PERL5= run
USE_XORG= xi xmu xt xaw ice xpm xext sm
USE_XORG= ice sm x11 xaw xext xi xmu xpm xt
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
MAKE_ENV+= ROOT=${STAGEDIR}
OPTIONS_DEFINE= DOCS ULTRAFTP
OPTIONS_SUB= yes
ULTRAFTP_DESC= UltraVNC File Transfer support (Java required)
ULTRAFTP_USE= JAVA=yes
DOCS_MAKE_ARGS_OFF= DOCS=""
MAKE_ENV+= ROOT=${STAGEDIR}
.include <bsd.port.options.mk>
.if ! ${PORT_OPTIONS:MULTRAFTP}
MAKE_ARGS+= JSRC=""
.endif
.if ! ${PORT_OPTIONS:MDOCS}
MAKE_ARGS+= DOCS=""
.endif
ULTRAFTP_DESC= UltraVNC File Transfer support (Java required)
ULTRAFTP_USE= JAVA=yes
ULTRAFTP_MAKE_ARGS_OFF= JSRC=""
post-patch:
@${REINPLACE_CMD} -e 's|grep Linux|grep ${OPSYS}|' \
@${REINPLACE_CMD} -e 's|netstat -ant|netstat -an|' \
${WRKSRC}/scripts/util/ss_vncviewer
@${REINPLACE_CMD} -e 's|[[:<:]]ssvnc[[:>:]]|ssvnc-gui|' \
${WRKSRC}/man/man1/ssvnc.1
@ -51,12 +44,4 @@ do-configure:
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${MAKE_CMD} ${MAKE_ARGS} config)
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ssvnc/*.so
@${MKDIR} ${STAGEDIR}${MAN1PREFIX}/man/man1
.for man in ssvnc.1 ssvncviewer.1
${INSTALL_MAN} ${WRKSRC}/man/man1/${man} \
${STAGEDIR}${MAN1PREFIX}/man/man1
.endfor
.include <bsd.port.mk>

View File

@ -1,6 +1,6 @@
--- Makefile.orig 2011-02-05 00:28:18.000000000 -0800
+++ Makefile 2011-02-05 00:36:51.000000000 -0800
@@ -29,6 +29,7 @@
--- Makefile.orig 2010-02-26 02:29:31 UTC
+++ Makefile
@@ -29,6 +29,7 @@ MAN = man
MANDIR ?= $(MAN)
APPS ?= share/applications
BINNAME ?= ssvncviewer
@ -8,40 +8,50 @@
VSRC = vnc_unixsrc
@@ -65,23 +66,30 @@
@@ -65,23 +66,30 @@ clean:
cd $(PSRC); $(MAKE) clean
install: all
- mkdir -p $(ROOT)$(PREFIX)/$(BIN) $(ROOT)$(PREFIX)/$(LIB) $(ROOT)$(PREFIX)/$(MANDIR)/man1
+ mkdir -p $(ROOT)$(PREFIX)/$(BIN) $(ROOT)$(PREFIX)/$(LIB)/util $(ROOT)$(PREFIX)/$(MANDIR)/man1
strip $(VIEWER)
cp -p $(VIEWER) $(ROOT)$(PREFIX)/$(LIB)
cp -p $(VNCSPW) $(ROOT)$(PREFIX)/$(LIB)
cp -p $(UNWRAP) $(ROOT)$(PREFIX)/$(LIB)
cp -p $(LIMACC) $(ROOT)$(PREFIX)/$(LIB)
cp -p $(ULTDSM) $(ROOT)$(PREFIX)/$(LIB)
- strip $(VIEWER)
- cp -p $(VIEWER) $(ROOT)$(PREFIX)/$(LIB)
- cp -p $(VNCSPW) $(ROOT)$(PREFIX)/$(LIB)
- cp -p $(UNWRAP) $(ROOT)$(PREFIX)/$(LIB)
- cp -p $(LIMACC) $(ROOT)$(PREFIX)/$(LIB)
- cp -p $(ULTDSM) $(ROOT)$(PREFIX)/$(LIB)
- cp -pR scripts/* $(ROOT)$(PREFIX)/$(LIB)
+ cp -p scripts/ssvnc $(ROOT)$(PREFIX)/$(LIB)
+ cp -p scripts/ssvnc_cmd $(ROOT)$(PREFIX)/$(LIB)
+ cp -p scripts/tsvnc $(ROOT)$(PREFIX)/$(LIB)
+ cp -p scripts/util/ssvnc.tcl $(ROOT)$(PREFIX)/$(LIB)/util
+ cp -p scripts/util/ss_vncviewer $(ROOT)$(PREFIX)/$(LIB)/util
if [ "X$(JSRC)" != "X" ]; then cp -p $(ARCHIVE) $(ROOT)$(PREFIX)/$(LIB)/util; fi
- if [ "X$(JSRC)" != "X" ]; then cp -p $(ARCHIVE) $(ROOT)$(PREFIX)/$(LIB)/util; fi
- cp -p $(MAN)/man1/ssvnc.1 $(ROOT)$(PREFIX)/$(MANDIR)/man1
- ./wr_tool $(ROOT)$(PREFIX)/$(BIN)/ssvnc $(PREFIX)/$(LIB)/ssvnc
- ./wr_tool $(ROOT)$(PREFIX)/$(BIN)/tsvnc $(PREFIX)/$(LIB)/tsvnc
- ./wr_tool $(ROOT)$(PREFIX)/$(BIN)/sshvnc $(PREFIX)/$(LIB)/sshvnc
+ cp -p $(MAN)/man1/ssvnc.1 $(ROOT)$(PREFIX)/$(MANDIR)/man1/ssvnc-gui.1
+ mkdir -p $(ROOT)$(PREFIX)/$(BIN) $(ROOT)$(PREFIX)/$(LIB)/util $(ROOT)$(PREFIX)/$(MANDIR)/man1
+ ${BSD_INSTALL_PROGRAM} $(VIEWER) $(ROOT)$(PREFIX)/$(LIB)
+ ${BSD_INSTALL_PROGRAM} $(VNCSPW) $(ROOT)$(PREFIX)/$(LIB)
+ ${BSD_INSTALL_LIB} $(UNWRAP) $(ROOT)$(PREFIX)/$(LIB)
+ ${BSD_INSTALL_LIB} $(LIMACC) $(ROOT)$(PREFIX)/$(LIB)
+ ${BSD_INSTALL_PROGRAM} $(ULTDSM) $(ROOT)$(PREFIX)/$(LIB)
+ ${BSD_INSTALL_SCRIPT} scripts/ssvnc $(ROOT)$(PREFIX)/$(LIB)
+ ${BSD_INSTALL_SCRIPT} scripts/ssvnc_cmd $(ROOT)$(PREFIX)/$(LIB)
+ ${BSD_INSTALL_SCRIPT} scripts/tsvnc $(ROOT)$(PREFIX)/$(LIB)
+ ${BSD_INSTALL_SCRIPT} scripts/util/ssvnc.tcl $(ROOT)$(PREFIX)/$(LIB)/util
+ ${BSD_INSTALL_SCRIPT} scripts/util/ss_vncviewer $(ROOT)$(PREFIX)/$(LIB)/util
+ if [ "X$(JSRC)" != "X" ]; then ${BSD_INSTALL_DATA} $(ARCHIVE) $(ROOT)$(PREFIX)/$(LIB)/util; fi
+ ${BSD_INSTALL_MAN} $(MAN)/man1/ssvnc.1 $(ROOT)$(PREFIX)/$(MANDIR)/man1/ssvnc.1
+ ${BSD_INSTALL_MAN} $(MAN)/man1/ssvnc.1 $(ROOT)$(PREFIX)/$(MANDIR)/man1/ssvnc-gui.1
+ ./wr_tool $(ROOT)$(PREFIX)/$(BIN)/ssvnc-gui $(PREFIX)/$(LIB)/ssvnc
+ ./wr_tool $(ROOT)$(PREFIX)/$(BIN)/ssvnc-ts $(PREFIX)/$(LIB)/tsvnc
+ ./wr_tool $(ROOT)$(PREFIX)/$(BIN)/ssvnc-stunnel $(PREFIX)/$(LIB)/util/ss_vncviewer
if [ "X$(APPS)" != X ]; then mkdir -p $(ROOT)$(PREFIX)/$(APPS); fi
if [ "X$(APPS)" != X ]; then cp -p ssvnc.desktop $(ROOT)$(PREFIX)/$(APPS); fi
if [ "X$(BINNAME)" != X ]; then cp -p $(VIEWER) $(ROOT)$(PREFIX)/$(BIN)/$(BINNAME); fi
if [ "X$(BINNAME)" != X ]; then cp -p $(MAN)/man1/ssvncviewer.1 $(ROOT)$(PREFIX)/$(MANDIR)/man1/$(BINNAME).1; fi
- if [ "X$(APPS)" != X ]; then cp -p ssvnc.desktop $(ROOT)$(PREFIX)/$(APPS); fi
- if [ "X$(BINNAME)" != X ]; then cp -p $(VIEWER) $(ROOT)$(PREFIX)/$(BIN)/$(BINNAME); fi
- if [ "X$(BINNAME)" != X ]; then cp -p $(MAN)/man1/ssvncviewer.1 $(ROOT)$(PREFIX)/$(MANDIR)/man1/$(BINNAME).1; fi
+ if [ "X$(APPS)" != X ]; then ${BSD_INSTALL_DATA} ssvnc.desktop $(ROOT)$(PREFIX)/$(APPS); fi
+ if [ "X$(BINNAME)" != X ]; then ${BSD_INSTALL_PROGRAM} $(VIEWER) $(ROOT)$(PREFIX)/$(BIN)/$(BINNAME); fi
+ if [ "X$(BINNAME)" != X ]; then ${BSD_INSTALL_MAN} $(MAN)/man1/ssvncviewer.1 $(ROOT)$(PREFIX)/$(MANDIR)/man1/$(BINNAME).1; fi
+ if [ "X$(DOCS)" != X ]; then mkdir -p $(ROOT)$(PREFIX)/$(DOCS); fi
+ if [ "X$(DOCS)" != X ]; then cp -p scripts/util/stunnel-server.conf $(ROOT)$(PREFIX)/$(DOCS); fi
+ if [ "X$(DOCS)" != X ]; then cp -p README $(ROOT)$(PREFIX)/$(DOCS); fi
+ if [ "X$(DOCS)" != X ]; then ${BSD_INSTALL_DATA} scripts/util/stunnel-server.conf $(ROOT)$(PREFIX)/$(DOCS); fi
+ if [ "X$(DOCS)" != X ]; then ${BSD_INSTALL_MAN} README $(ROOT)$(PREFIX)/$(DOCS); fi
#internal use only, a test install:

View File

@ -1,6 +1,6 @@
--- vncstorepw/Makefile.orig 2010-04-22 03:22:40 UTC
+++ vncstorepw/Makefile
@@ -7,8 +7,6 @@ UNWRAP = unwrap.so
@@ -7,21 +7,18 @@ UNWRAP = unwrap.so
LIMACC = lim_accept.so
ULTDSM = ultravnc_dsm_helper
@ -9,7 +9,12 @@
all: $(CMD) $(UNWRAP) $(LIMACC) $(ULTDSM)
@@ -21,7 +19,7 @@ $(UNWRAP): unwrap.c
$(CMD): vncauth.o vncstorepw.o d3des.o
PATH=$$PATH:$(EPATH) $(CC) -o $(CMD) vncstorepw.o vncauth.o d3des.o
- PATH=$$PATH:$(EPATH) strip $(CMD)
@ls -l $(CMD)
$(UNWRAP): unwrap.c
if [ `uname` = "Darwin" ]; then \
PATH=$$PATH:$(EPATH) $(CC) -o $(UNWRAP) -dynamiclib -fPIC unwrap.c; \
else \
@ -18,7 +23,7 @@
fi
@ls -l $(UNWRAP)
@@ -29,7 +27,7 @@ $(LIMACC): lim_accept.c
@@ -29,7 +26,7 @@ $(LIMACC): lim_accept.c
if [ `uname` = "Darwin" ]; then \
PATH=$$PATH:$(EPATH) $(CC) -o $(LIMACC) -dynamiclib -fPIC -nostartfiles lim_accept.c; \
else \
@ -27,12 +32,14 @@
fi
@ls -l $(LIMACC)
@@ -39,7 +37,7 @@ $(ULTDSM): ultravnc_dsm_helper.c
@@ -39,9 +36,8 @@ $(ULTDSM): ultravnc_dsm_helper.c
if [ `uname` = "SunOS" ]; then \
PATH=$$PATH:$(EPATH) $(CC) -o $(ULTDSM) $(CPP_SSL) ultravnc_dsm_helper.c $(LD_SSL) -lssl -lcrypto -lsocket -lnsl; \
else \
- PATH=$$PATH:$(EPATH) $(CC) -o $(ULTDSM) $(CPP_SSL) ultravnc_dsm_helper.c $(LD_SSL) -lssl -lcrypto; \
+ PATH=$$PATH:$(EPATH) $(CC) -o $(ULTDSM) $(CPP_SSL) ultravnc_dsm_helper.c $(CFLAGS) $(LDFLAGS) -lssl -lcrypto; \
fi
PATH=$$PATH:$(EPATH) strip $(ULTDSM)
- PATH=$$PATH:$(EPATH) strip $(ULTDSM)
@ls -l $(ULTDSM)
test: $(CMD)

View File

@ -0,0 +1,8 @@
--- wr_tool.orig 2008-08-29 12:58:03 UTC
+++ wr_tool
@@ -6,4 +6,4 @@ cat > $wr <<END
UNAME=.; export UNAME
exec $cmd "\$@"
END
-chmod 755 $wr
+chmod 555 $wr