Bug 113458 - net-im/vicq does not work with perl5.8
Summary: net-im/vicq does not work with perl5.8
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: Kevin Lo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-07 17:00 UTC by Eugene Grosbein
Modified: 2007-06-08 03:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein 2007-06-07 17:00:12 UTC
	Quoting some web page:

Perl 5.8 has this wonderful thing called "safe interrupts", which               
essentially defers them.  So the "alarm" that's supposed to interrupt           
the readline was deferred until AFTER the readline.  Beautiful, no?

	So, vicq doesn't update status nor deliver messages asyncronously
	with input from keyboard when used with perl 5.8.

Fix: 

Eugene Grosbein--44x7u9RS8z8hniWBol64P2I68rjJ0YMKvuDndxK44UmmsJng
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -urN vicq.orig/Makefile vicq/Makefile
--- vicq.orig/Makefile	Thu Jun  7 23:26:53 2007
+++ vicq/Makefile	Thu Jun  7 23:36:18 2007
@@ -30,4 +30,13 @@
 	${MKDIR} ${PREFIX}/share/examples/vicq
 	${INSTALL_DATA} ${WRKSRC}/vicqrc.example ${PREFIX}/share/examples/vicq
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${PERL_LEVEL} >= 500800
+SIGNAL_PATCH=p5.8-patch-sigalrm
+post-patch:
+	@${ECHO_MSG} "===>  Applying patch ${SIGNAL_PATCH} for ${PKGNAME}"
+	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/${SIGNAL_PATCH}
+.endif
+
+.include <bsd.port.post.mk>
diff -urN vicq.orig/files/p5.8-patch-sigalrm vicq/files/p5.8-patch-sigalrm
--- vicq.orig/files/p5.8-patch-sigalrm	Thu Jan  1 07:00:00 1970
+++ vicq/files/p5.8-patch-sigalrm	Thu Jun  7 23:19:53 2007
@@ -0,0 +1,19 @@
+--- vicq.orig	Thu Jun  7 23:15:28 2007
++++ vicq	Thu Jun  7 23:16:41 2007
+@@ -20,6 +20,7 @@
+ use Getopt::Std;
+ use Socket;
+ use POSIX qw(mktime getcwd);
++use POSIX ':signal_h';
+ package main;
+ use locale;
+ #use Data::Dumper;
+@@ -3347,7 +3348,7 @@
+ 	if(!$err)
+ 	{
+ 		print "done!\n";
+-		$SIG{ALRM} = \&tick_handler;
++		sigaction SIGALRM, new POSIX::SigAction \&tick_handler;
+ 		alarm 1;
+ 		return 0;
+ 	} else
How-To-Repeat: 	Run vicq using perl 5.8 and try to receive a message.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-06-07 17:00:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kevlo

Over to maintainer
Comment 2 dfilter service freebsd_committer freebsd_triage 2007-06-08 03:06:47 UTC
kevlo       2007-06-08 02:06:40 UTC

  FreeBSD ports repository

  Modified files:
    net-im/vicq          Makefile 
  Added files:
    net-im/vicq/files    p5.8-patch-sigalrm 
  Log:
  - Add a feature to vicq that updates status and delivers messages
    asyncronously with input from keyboard when used with perl 5.8.
  - Update MASTER_SITES
  - Bump PORTREVISION
  
  PR: ports/113458
  Submitted by: Eugene Grosbein <eugen at grosbein dot pp dot ru>
  
  Revision  Changes    Path
  1.10      +12 -2     ports/net-im/vicq/Makefile
  1.1       +19 -0     ports/net-im/vicq/files/p5.8-patch-sigalrm (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Kevin Lo freebsd_committer freebsd_triage 2007-06-08 03:07:06 UTC
State Changed
From-To: open->closed

Committed, thanks.