Bug 176786

Summary: [PATCH] Fix some problem on ports/irc/scrollz.
Product: Ports & Packages Reporter: Norikatsu Shigemura <nork>
Component: Individual Port(s)Assignee: Beech Rintoul <beech>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Norikatsu Shigemura freebsd_committer freebsd_triage 2013-03-09 15:30:00 UTC
ports/irc/scrollz has some implicitly dependencies on other ports,
and is disabled '/WINDOW CREATE' feature.  To fix these problem,
I made a patch for ports/irc/scrollz.

Fix: o Fix implicitly dependency on iconv and openssl.
o OPTIONfy.
o Enable '/WINDOW CREATE'.
o Install wserv as wservz, to avoid conflict with ports/irc/ircII.
o Bump PORTREVISION, accordingly.

NOTE: I confirmed OK with ports/sysutils/screen, but NG with
      sysutils/tmux.

Patch attached with submission follows:
How-To-Repeat: N/A
Comment 1 Beech Rintoul freebsd_committer freebsd_triage 2013-03-10 04:24:21 UTC
State Changed
From-To: open->feedback

Submitter is not maintainer
Comment 2 Beech Rintoul freebsd_committer freebsd_triage 2013-03-10 04:26:52 UTC
Responsible Changed
From-To: freebsd-ports-bugs->beech

I'll take it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176786 

Date: Sat, 9 Mar 2013 19:30:24 -0900
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2013-03-10 04:41:28 UTC
State Changed
From-To: feedback->feedback

Include text from misfiled PR. 


Comment 4 Mark Linimon freebsd_committer freebsd_triage 2013-03-10 04:41:28 UTC
Responsible Changed
From-To: beech->beech
Comment 5 Beech Rintoul freebsd_committer freebsd_triage 2013-03-11 16:22:53 UTC
State Changed
From-To: feedback->open

Maintainer approved
Comment 6 dfilter service freebsd_committer freebsd_triage 2013-03-11 21:34:22 UTC
Author: beech
Date: Mon Mar 11 21:34:13 2013
New Revision: 313941
URL: http://svnweb.freebsd.org/changeset/ports/313941

Log:
  - Fix implicit dependency on iconv and openssl
  - OPTIONfy
  - Enable '/WINDOW CREATE'
  - Install wserv as wservz, to avoid conflict with ports/irc/ircII
  - Support tmux terminal multiplexer
  - Bump PORTREVISION
  
  PR:		ports/176786
  Submitted by:	Norikatsu Shigemura <nork@FreeBSD.org>
  Approved by:	Maarten de Vries <mdv@unsavoury.net> (maintainer)

Added:
  head/irc/scrollz/files/
  head/irc/scrollz/files/patch-Makefile.in   (contents, props changed)
  head/irc/scrollz/files/patch-include-screen.h   (contents, props changed)
  head/irc/scrollz/files/patch-include-window.h   (contents, props changed)
  head/irc/scrollz/files/patch-source-Makefile.in   (contents, props changed)
  head/irc/scrollz/files/patch-source-screen.c   (contents, props changed)
Modified:
  head/irc/scrollz/Makefile   (contents, props changed)
  head/irc/scrollz/pkg-plist   (contents, props changed)

Modified: head/irc/scrollz/Makefile
==============================================================================
--- head/irc/scrollz/Makefile	Mon Mar 11 21:19:35 2013	(r313940)
+++ head/irc/scrollz/Makefile	Mon Mar 11 21:34:13 2013	(r313941)
@@ -7,7 +7,7 @@
 
 PORTNAME=	scrollz
 PORTVERSION=	2.2.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	irc ipv6
 MASTER_SITES=	http://www.netraam.net/scrollz/download/ \
 		http://www.scrollz.com/download/
@@ -16,9 +16,10 @@ DISTNAME=	ScrollZ-${PORTVERSION}
 MAINTAINER=	mdv@unsavoury.net
 COMMENT=	Enhanced ircII client that supports scripts, colors, and more
 
+USE_ICONV=	yes
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS+=	--enable-ipv6 --enable-regexp
+CONFIGURE_ARGS+=	--enable-ipv6 --enable-regexp --enable-iconv
 USE_NCURSES=	yes
 
 MAKE_ENV+=	IRCLIB="${PREFIX}/share/scrollz"
@@ -26,16 +27,23 @@ MAKE_ENV+=	IRCLIB="${PREFIX}/share/scrol
 PLIST_SUB+=	SCROLLZ_VER="${PORTVERSION}"
 PORTDATA=	*
 
+OPTIONS_DEFAULT=	OPENSSL
+OPTIONS_RADIO=		SSL
+OPTIONS_RADIO_SSL=	GNUTLS OPENSSL
+
 MAN1=	scrollz.1
 
-.if defined(WITH_SSL)
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MGNUTLS}
 BUILD_DEPENDS+=	${LOCALBASE}/lib/libgnutls.a:${PORTSDIR}/security/gnutls
 LIB_DEPENDS+=	gnutls:${PORTSDIR}/security/gnutls
-CONFIGURE_ARGS+=	--with-ssl
+CONFIGURE_ARGS+=	--with-ssl=${LOCALBASE}
 .endif
 
-.if defined(WITH_OPENSSL)
-CONFIGURE_ARGS+=	--with-openssl
+.if ${PORT_OPTIONS:MOPENSSL}
+USE_OPENSSL=		yes
+CONFIGURE_ARGS+=	--with-openssl=${OPENSSLBASE}
 .endif
 
 pre-build:

Added: head/irc/scrollz/files/patch-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/scrollz/files/patch-Makefile.in	Mon Mar 11 21:34:13 2013	(r313941)
@@ -0,0 +1,85 @@
+--- Makefile.in.orig	2011-04-29 17:21:18.000000000 +0900
++++ Makefile.in	2013-03-09 19:35:03.628110600 +0900
+@@ -31,14 +31,14 @@
+ # @(#)$Id: Makefile.in,v 1.23 2006-10-31 12:31:27 f Exp $
+ 
+ # targets recognised by this makefile:
+-#   all, everything	- compiles ircii, ircio, ircflush and wserv
++#   all, everything	- compiles ircii, ircio, ircflush and wservz
+ #   ircio		- compiles ircio
+ #   ircflush		- compiles ircflush
+-#   wserv		- compiles wserv
+-#   install		- installs ircii, ircio, ircflush and wserv
++#   wservz		- compiles wservz
++#   install		- installs ircii, ircio, ircflush and wservz
+ #   installirc		- installs ircii
+ #   installio		- installs ircio
+-#   installwserv	- installs wserv
++#   installwservz	- installs wservz
+ #   installflush	- installs ircflush
+ #   installscript 	- installs the scripts
+ #   installhelp		- installs the help files
+@@ -105,7 +105,7 @@
+ 
+ # This program allows you to use screen/xterm's to put new irc windows
+ # on new screen/xterm windows.
+-INSTALL_WSERV = $(bindir)/wserv
++INSTALL_WSERVZ = $(bindir)/wservz
+ 
+ # This command will be used to install the irc help files.  If you don't
+ # want to install them, replace with the following:
+@@ -133,7 +133,7 @@
+ 	'HELP_DIR=$(HELP_DIR)'				\
+ 	'INSTALL_IRC=$(INSTALL_IRC)'			\
+ 	'INSTALL_IRCIO=$(INSTALL_IRCIO)'		\
+-	'INSTALL_WSERV=$(INSTALL_WSERV)'		\
++	'INSTALL_WSERVZ=$(INSTALL_WSERVZ)'		\
+ 	'IRCSHARE=$(IRCSHARE)'				\
+ 	'IRCPATH=$(IRC_PATH)'				\
+ 	'LDFLAGS=$(LDFLAGS)'				\
+@@ -143,9 +143,9 @@
+ 	'LN=$(LN)'					\
+ 	'RM=$(RM)'
+ 
+-all: scrollz scrollz.1
++all: scrollz scrollz.1 wservz
+ 
+-install: all installbin installdirs installman installhelp
++install: all installbin installwservz installdirs installman installhelp
+ 
+ scrollz: source/Makefile Makefile
+ 	@cd source; $(MAKE) all
+@@ -154,9 +154,9 @@
+ 	sed -e "s,SHAREDIR,$(IRCSHARE)," < scrollz.1.in > scrollz.1
+ 
+ installeverything:  install installman installflush installio \
+-		    installwserv installhelp
++		    installwservz installhelp
+ 
+-everything: all ircflush ircio wserv
++everything: all ircflush ircio wservz
+ 
+ ircserv: ircio
+ 
+@@ -166,8 +166,8 @@
+ ircflush: source/ircflush.c source/Makefile
+ 	@cd source; $(MAKE) ircflush
+ 
+-wserv: source/wserv.c source/term.c source/Makefile
+-	@cd source; $(MAKE) wserv
++wservz: source/wserv.c source/term.c source/Makefile
++	@cd source; $(MAKE) wservz
+ 
+ installbin: installirc
+ 
+@@ -189,8 +189,8 @@
+ installflush: ircflush installdirs
+ 	$(INSTALL) source/ircflush $(DESTDIR)/$(INSTALL_IRCFLUSH)
+ 
+-installwserv: wserv installdirs
+-	$(INSTALL) source/wserv $(DESTDIR)/$(INSTALL_WSERV)
++installwservz: wservz installdirs
++	$(INSTALL) source/wservz $(DESTDIR)/$(INSTALL_WSERVZ)
+ 
+ installdirs:
+ 	umask 022; ./mkinstalldirs $(DESTDIR)/$(IRCSHARE) $(DESTDIR)/$(bindir) \

Added: head/irc/scrollz/files/patch-include-screen.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/scrollz/files/patch-include-screen.h	Mon Mar 11 21:34:13 2013	(r313941)
@@ -0,0 +1,10 @@
+--- include/screen.h.orig	2011-04-29 17:21:18.000000000 +0900
++++ include/screen.h	2013-03-11 23:30:07.063088471 +0900
+@@ -47,6 +47,7 @@
+ #define ST_NOTHING      -1
+ #define ST_SCREEN       0
+ #define ST_XTERM        1
++#define ST_TMUX         2
+ 
+ /* This is here because it happens in so many places */
+ #define curr_scr_win	current_screen->current_window

Added: head/irc/scrollz/files/patch-include-window.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/scrollz/files/patch-include-window.h	Mon Mar 11 21:34:13 2013	(r313941)
@@ -0,0 +1,11 @@
+--- include/window.h.orig	2011-04-29 17:21:18.000000000 +0900
++++ include/window.h	2013-03-09 18:47:08.841093765 +0900
+@@ -42,7 +42,7 @@
+  * CREATE, that allows you to start new iscreen or xterm windows
+  * connected to the ircII client.
+  */
+-#undef	WINDOW_CREATE
++#define	WINDOW_CREATE
+ 
+ #if defined(M_UNIX) || !defined(HAVE_SYS_UN_H)
+ #undef WINDOW_CREATE

Added: head/irc/scrollz/files/patch-source-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/scrollz/files/patch-source-Makefile.in	Mon Mar 11 21:34:13 2013	(r313941)
@@ -0,0 +1,29 @@
+--- source/Makefile.in.orig	2011-04-29 17:21:18.000000000 +0900
++++ source/Makefile.in	2013-03-09 19:07:14.372106954 +0900
+@@ -86,7 +86,7 @@
+ 	$(CC) $(CFLAGS) $(DEFS) $(PP_DEFS) $(INCLUDES) -DTRANSLATION_PATH=\"$(TRANS_DIR)/\" -c translat.c
+ 
+ screen.o: Makefile ../Makefile
+-	$(CC) $(CFLAGS) $(DEFS) $(PP_DEFS) $(INCLUDES) -DWSERV_PATH=\"$(INSTALL_WSERV)\" -c screen.c
++	$(CC) $(CFLAGS) $(DEFS) $(PP_DEFS) $(INCLUDES) -DWSERV_PATH=\"$(INSTALL_WSERVZ)\" -c screen.c
+ 
+ # auxiliary programs
+ 
+@@ -96,7 +96,7 @@
+ ircio: $(IRCIO_OBJECTS)
+ 	$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(DEFS) $(PPS_DEFS) -o $@ $(IRCIO_OBJECTS) $(LIBS)
+ 
+-wserv: $(WSERV_OBJECTS)
++wservz: $(WSERV_OBJECTS)
+ 	$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(DEFS) -o $@ $(WSERV_OBJECTS) $(LIBS)
+ 
+ clean::
+@@ -106,7 +106,7 @@
+ 	$(RM) ircio ircio.o newio.o
+ 
+ clean::
+-	$(RM) wserv wserv.o wterm.o wterm.c
++	$(RM) wservz wserv.o wterm.o wterm.c
+ 
+ # extra junk
+ 

Added: head/irc/scrollz/files/patch-source-screen.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/scrollz/files/patch-source-screen.c	Mon Mar 11 21:34:13 2013	(r313941)
@@ -0,0 +1,44 @@
+--- source/screen.c.orig	2011-04-29 17:21:18.000000000 +0900
++++ source/screen.c	2013-03-12 00:08:32.423090823 +0900
+@@ -2416,6 +2416,10 @@
+ 	{
+ 		screen_type = ST_SCREEN;
+ 	}
++	else if (0 != getenv("TMUX"))
++	{
++		screen_type = ST_TMUX;
++	}
+ 	else if ((char *) 0 != (displayvar = getenv("DISPLAY")))
+ 	{
+ 		if ((char *) 0 == (termvar = getenv("TERM")))
+@@ -2454,6 +2458,7 @@
+ 	say("Opening new %s...",
+ 		screen_type == ST_XTERM ?  "window" :
+ 		screen_type == ST_SCREEN ? "screen" :
++		screen_type == ST_TMUX ?   "tmux window" :
+ 					   "wound" );
+ 	snprintf(sock.sun_path, sizeof sock.sun_path, "/tmp/irc_%08d_%x", (int) pid, mycycle);
+ 	sock.sun_family = AF_UNIX;
+@@ -2569,6 +2574,22 @@
+ 			args[i] = NULL;
+ 			execvp(xterm, args);
+ 		}
++		else if (screen_type == ST_TMUX)
++		{
++			char	*args[64],
++				*ss,
++				*t,
++				opts[BIG_BUFFER_SIZE];
++
++			Debug((3, "going to execvp screen wserv..."));
++			args[i++] = "tmux";
++			args[i++] = "new-window";
++			snprintf(opts, BIG_BUFFER_SIZE-1, "%s %s %s", WSERV_PATH, sockaddr->sun_path, error_sockaddr->sun_path);
++			args[i++] = opts;
++			Debug((3, "added: %s %s '%s'", args[i-3], args[i-2], args[i-1]));
++			args[i++] = NULL;
++			execvp("tmux", args);
++		}
+ 		perror("execve");
+ 		unlink(sockaddr->sun_path);
+ 		unlink(error_sockaddr->sun_path);

Modified: head/irc/scrollz/pkg-plist
==============================================================================
--- head/irc/scrollz/pkg-plist	Mon Mar 11 21:19:35 2013	(r313940)
+++ head/irc/scrollz/pkg-plist	Mon Mar 11 21:34:13 2013	(r313941)
@@ -1,4 +1,5 @@
 bin/scrollz
 bin/scrollz-%%SCROLLZ_VER%%
+bin/wservz
 @exec /bin/mkdir -p %%PREFIX%%/%%DATADIR%%/script
 @dirrm %%DATADIR%%/script
_______________________________________________
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 7 Beech Rintoul freebsd_committer freebsd_triage 2013-03-11 21:34:58 UTC
State Changed
From-To: open->closed

Committed, Thanks!