tag 463152 -patch
thanks
On Tue, Jan 29, 2008 at 10:15:28PM +0200, Niko Tyni wrote:
> Package: suck
> Version: 4.3.2-5
> Severity: normal
> Tags: patch
> I'm attaching a patch that enables the Perl support again (after running
> autoconf, of course.) This compiles with both Perl 5.8 and the upcoming
> 5.10 (currently in experimental). I haven't tested it at all, though.
And it shows. New try attached, I think this one has a slightly better
chance of working.
Still, removing the patch for now because of the lack of testing.
Cheers,
--
Niko Tyni [EMAIL PROTECTED]
diff -u suck-4.3.2/debian/changelog suck-4.3.2/debian/changelog
--- suck-4.3.2/debian/changelog
+++ suck-4.3.2/debian/changelog
@@ -1,3 +1,9 @@
+suck (4.3.2-6) UNRELEASED; urgency=low
+
+ * add perl support
+
+ -- Niko Tyni <[EMAIL PROTECTED]> Tue, 29 Jan 2008 22:06:43 +0200
+
suck (4.3.2-5) unstable; urgency=low
* fix rpostoptions in get-news (Closes: #363321)
diff -u suck-4.3.2/configure.in suck-4.3.2/configure.in
--- suck-4.3.2/configure.in
+++ suck-4.3.2/configure.in
@@ -101,12 +101,12 @@
if test "$PERL" = "true"; then
found="no"
AC_MSG_CHECKING([for libperl.a])
- for path in `$whichperl -e 'foreach $i (@INC) { printf("%s ", $i) }'`; do
+ for path in /usr/lib `$whichperl -e 'foreach $i (@INC) { printf("%s ", $i) }'`; do
if test -f $path/libperl.a; then
AC_MSG_RESULT($path)
if test "$found" = "no"; then
AC_MSG_CHECKING([for libperl.so])
- for path in `$whichperl -e 'foreach $i (@INC) { printf("%s ", $i) }'`; do
+ for path in /usr/lib `$whichperl -e 'foreach $i (@INC) { printf("%s ", $i) }'`; do
if test -f $path/libperl.so; then
AC_MSG_RESULT($path)
found="yes"
@@ -131,10 +131,10 @@
fi
done
if test "$found" = "yes"; then
- PERL_DEFS="-DPERL_EMBED -Dbool=char -DHAS_BOOL"
- PERL_LIB="-lperl"
- PERL_LIB_LOC="-L$path"
- PERL_INC_LOC="-I$path"
+ PERL_DEFS="-DPERL_EMBED -Dbool=char -DHAS_BOOL $(perl -MExtUtils::Embed -e ccopts)"
+ PERL_LIB="$(perl -MExtUtils::Embed -e ldopts)"
+ PERL_LIB_LOC=""
+ PERL_INC_LOC=""
AC_CHECK_LIB(m, cos, [PERL_LIB="$PERL_LIB -lm"])
AC_CHECK_LIB(crypt, crypt, [PERL_LIB="$PERL_LIB -lcrypt"])
else
interdiff impossible; taking evasive action
reverted:
unchanged:
diff -u suck-4.3.2/rpost.c suck-4.3.2/rpost.c
--- suck-4.3.2/rpost.c
+++ suck-4.3.2/rpost.c
@@ -28,6 +28,7 @@
# define PL_na (na)
#endif
#endif /* OLD_PERL */
+static PerlInterpreter *my_perl;
#endif
#ifdef HAVE_DIRENT_H
@@ -147,7 +148,7 @@
myargs.do_ssl = FALSE;
myargs.ssl_struct = NULL;
#ifdef PERL_EMBED
- myargs.perl_int = NULL;
+ myargs.perl_int = my_perl = NULL;
#endif
/* have to do this next so if set on cmd line, overrides this */
only in patch2:
unchanged:
--- suck-4.3.2.orig/killprg.c
+++ suck-4.3.2/killprg.c
@@ -66,6 +66,7 @@
# define PL_na (na)
#endif
#endif /* OLD_PERL */
+static PerlInterpreter *my_perl;
#endif
/* KILLPRG.C -------------------------------------------------------------*/
@@ -373,7 +374,7 @@
char *prgs[] = { ptr, ptr};
- if((master->perl_int = perl_alloc()) == NULL) {
+ if((master->perl_int = my_perl = perl_alloc()) == NULL) {
retval = FALSE;
error_log(ERRLOG_REPORT, killp_phrases[14], NULL);
}