Bug 184157 - [patch] net/ssvnc: correct options and work with staging
Summary: [patch] net/ssvnc: correct options and work with staging
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Antoine Brodin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-22 02:00 UTC by Warren Block
Modified: 2013-12-05 20:52 UTC (History)
0 users

See Also:


Attachments
file.diff (885 bytes, patch)
2013-11-22 02:00 UTC, Warren Block
no flags Details | Diff
ssvnc.diff (1.05 KB, patch)
2013-12-03 22:32 UTC, Antoine Brodin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Warren Block freebsd_committer freebsd_triage 2013-11-22 02:00:00 UTC
The DOCS option was being used to determine whether to install man pages, but did not remove the man pages from pkg-plist if they were not installed.  The DOCS option is not supposed to apply to man pages anyway.

The ultraftp.jar file was not installed in the correct location, so installing with ULTRAFTP enabled would fail.

Fix: Apply the attached patch.

Patch attached with submission follows:
How-To-Repeat: Try to install the port with DOCS disabled or ULTRAFTP enabled.
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2013-12-03 22:32:03 UTC
Hello,

What about this patch?

According to the source code, it expects to find the jar in lib/ssvnc/util:

scripts/ssvnc:  SSVNC_ULTRA_FTP_JAR="$dir/util/ultraftp.jar"
scripts/ssvnc_cmd:      SSVNC_ULTRA_FTP_JAR="$dir/util/ultraftp.jar"
vnc_unixsrc/vncviewer/argsresources.c:                  strcat(jar,
"../lib/ssvnc/util/ultraftp.jar");
vnc_unixsrc/vncviewer/argsresources.c:
strcat(jar, "util/ultraftp.jar");

And DOCS are installed (a README and a stunnel conf)

Cheers,

Antoine
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2013-12-03 22:32:40 UTC
State Changed
From-To: open->feedback

Tracking feedback 


Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2013-12-03 22:32:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->antoine

Take
Comment 4 Warren Block 2013-12-04 01:50:45 UTC
On Tue, 3 Dec 2013, Antoine Brodin wrote:

> Hello,
>
> What about this patch?
>
> According to the source code, it expects to find the jar in lib/ssvnc/util:
>
> scripts/ssvnc:  SSVNC_ULTRA_FTP_JAR="$dir/util/ultraftp.jar"
> scripts/ssvnc_cmd:      SSVNC_ULTRA_FTP_JAR="$dir/util/ultraftp.jar"
> vnc_unixsrc/vncviewer/argsresources.c:                  strcat(jar,
> "../lib/ssvnc/util/ultraftp.jar");
> vnc_unixsrc/vncviewer/argsresources.c:
> strcat(jar, "util/ultraftp.jar");

I changed the Makefile to actually put the file where pkg-plist claimed 
it was.  Although it never worked for me and I have not tried it lately.

> And DOCS are installed (a README and a stunnel conf)

The Makefile did not do anything with the DOCS option.  Maybe that has 
changed with staging.
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-12-05 19:58:09 UTC
Author: antoine
Date: Thu Dec  5 19:58:01 2013
New Revision: 335682
URL: http://svnweb.freebsd.org/changeset/ports/335682

Log:
  - Fix packaging without DOCS or with ULTRAFTP
  - Use new LIB_DEPENDS syntax and tk:wrapper
  - Simplify ULTRAFTP option with MAKE_ARGS
  
  PR:		ports/184157
  Submitted by:	wblock (previous version)

Modified:
  head/net/ssvnc/Makefile
  head/net/ssvnc/pkg-plist

Modified: head/net/ssvnc/Makefile
==============================================================================
--- head/net/ssvnc/Makefile	Thu Dec  5 19:32:43 2013	(r335681)
+++ head/net/ssvnc/Makefile	Thu Dec  5 19:58:01 2013	(r335682)
@@ -13,16 +13,15 @@ COMMENT=	Enhanced TightVNC Viewer (SSVNC
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphics/jpeg
+LIB_DEPENDS=	libjpeg.so.11:${PORTSDIR}/graphics/jpeg
 RUN_DEPENDS=	stunnel:${PORTSDIR}/security/stunnel \
 		xterm:${PORTSDIR}/x11/xterm
 
-OPTIONS_DEFINE=	ULTRAFTP DOCS
+OPTIONS_DEFINE=	DOCS ULTRAFTP
 ULTRAFTP_DESC=	UltraVNC File Transfer support (Java required)
 
-USES=		imake:env gmake perl5
+USES=		imake:env gmake perl5 tk:wrapper
 USE_XORG=	xi xmu xt xaw ice xpm xext sm
-USE_TK_WRAPPER=	yes
 USE_PERL5=	run
 
 MAKE_ENV+=	ROOT=${STAGEDIR}
@@ -33,6 +32,7 @@ MAKE_ENV+=	ROOT=${STAGEDIR}
 USE_JAVA=	yes
 PLIST_SUB+=	ULTRAFTP=""
 .else
+MAKE_ARGS+=	JSRC=""
 PLIST_SUB+=	ULTRAFTP="@comment "
 .endif
 
@@ -45,24 +45,15 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|[[:<:]]ssvnc[[:>:]]|ssvnc-gui|' ${WRKSRC}/man/man1/ssvnc.1
 	@${REINPLACE_CMD} -e 's|/usr/local/bin|${LOCALBASE}/bin|' \
 		-e 's|^CC =|CC ?=|' ${WRKSRC}/vncstorepw/Makefile
-.if ! ${PORT_OPTIONS:MULTRAFTP}
-	@${REINPLACE_CMD} -e "s|sh -c 'type javac'|:|" \
-		-e "s|sh -c 'type jar'|:|" \
-		-e 's|cd $$(JSRC);|: |' \
-		-e 's|cp -p $$(ARCHIVE)|:|' \
-		${WRKSRC}/Makefile
-.endif
 
 do-configure:
-	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} config
+	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} config
 
 post-install:
-.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${STAGEDIR}${MAN1PREFIX}/man/man1
 .for man in ssvnc.1 ssvncviewer.1
 	${INSTALL_MAN} ${WRKSRC}/man/man1/${man} \
 		${STAGEDIR}${MAN1PREFIX}/man/man1
 .endfor
-.endif
 
 .include <bsd.port.mk>

Modified: head/net/ssvnc/pkg-plist
==============================================================================
--- head/net/ssvnc/pkg-plist	Thu Dec  5 19:32:43 2013	(r335681)
+++ head/net/ssvnc/pkg-plist	Thu Dec  5 19:58:01 2013	(r335682)
@@ -10,12 +10,12 @@ lib/ssvnc/ultravnc_dsm_helper
 lib/ssvnc/unwrap.so
 lib/ssvnc/util/ss_vncviewer
 lib/ssvnc/util/ssvnc.tcl
+%%ULTRAFTP%%lib/ssvnc/util/ultraftp.jar
 lib/ssvnc/vncstorepw
 lib/ssvnc/vncviewer
 man/man1/ssvnc-gui.1.gz
 man/man1/ssvnc.1.gz
 man/man1/ssvncviewer.1.gz
-%%ULTRAFTP%%lib/ssvnc/ultraftp.jar
 share/applications/ssvnc.desktop
 %%PORTDOCS%%%%DOCSDIR%%/README
 %%PORTDOCS%%%%DOCSDIR%%/stunnel-server.conf
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Antoine Brodin freebsd_committer freebsd_triage 2013-12-05 20:51:55 UTC
State Changed
From-To: feedback->closed

Patch committed with slight changes, thanks!