[freehoo] - Fixing SCM files to work with guile2 - Fixing FTBFS against guile2 (patch from Jan Synacek)

Jaromír Cápík jcapik at fedoraproject.org
Mon Feb 25 16:47:33 UTC 2013


commit bfb5bd9a378e41bc8b59a36a4e00052b75db1a13
Author: Jaromir Capik <jcapik at redhat.com>
Date:   Mon Feb 25 17:47:13 2013 +0100

    - Fixing SCM files to work with guile2
    - Fixing FTBFS against guile2 (patch from Jan Synacek)

 freehoo-guile2-scm.patch |  117 +++++++++++++++++++++++++
 freehoo-guile2.patch     |  216 ++++++++++++++++++++++++++++++++++++++++++++++
 freehoo.spec             |   29 ++++---
 3 files changed, 350 insertions(+), 12 deletions(-)
---
diff --git a/freehoo-guile2-scm.patch b/freehoo-guile2-scm.patch
new file mode 100644
index 0000000..8c23296
--- /dev/null
+++ b/freehoo-guile2-scm.patch
@@ -0,0 +1,117 @@
+diff -Naur freehoo-3.5.3.20100314cvs.orig/extensions/alias.scm freehoo-3.5.3.20100314cvs/extensions/alias.scm
+--- freehoo-3.5.3.20100314cvs.orig/extensions/alias.scm	2005-05-14 14:26:52.000000000 +0200
++++ freehoo-3.5.3.20100314cvs/extensions/alias.scm	2013-02-25 16:53:04.000000000 +0100
+@@ -23,10 +23,11 @@
+ ;;; 		    (nags . (nagappanal))
+ ;;; 		    (visu . (kvisu2000))))
+ 
+-(if (defined? 'alias)
+-    '()
+-    (begin
+-      (define alias '())))
++;;(if (defined? 'alias)
++;;    '()
++;;    (begin
++      (define alias '())
++;;      ))
+  
+ (define (alias-buddy-name to msg)
+   "expand alias for buddy name"
+diff -Naur freehoo-3.5.3.20100314cvs.orig/extensions/cc.scm freehoo-3.5.3.20100314cvs/extensions/cc.scm
+--- freehoo-3.5.3.20100314cvs.orig/extensions/cc.scm	2005-05-14 14:26:52.000000000 +0200
++++ freehoo-3.5.3.20100314cvs/extensions/cc.scm	2013-02-25 16:53:26.000000000 +0100
+@@ -22,10 +22,11 @@
+ ;;; (define cc '((rms . (gnuindian nagappanal kvisu2000 bala))
+ ;;;	     (gopal . (mehta))))
+ 
+-(if (defined? 'cc)
+-    '()
+-    (begin
+-      (define cc '())))
++;;(if (defined? 'cc)
++;;    '()
++;;    (begin
++      (define cc '())
++;;      ))
+ 
+ (define (cc-buddy to msg)
+   "CC the messages sent to buddy"
+diff -Naur freehoo-3.5.3.20100314cvs.orig/extensions/color.scm freehoo-3.5.3.20100314cvs/extensions/color.scm
+--- freehoo-3.5.3.20100314cvs.orig/extensions/color.scm	2005-05-14 14:26:52.000000000 +0200
++++ freehoo-3.5.3.20100314cvs/extensions/color.scm	2013-02-25 16:52:45.000000000 +0100
+@@ -62,15 +62,17 @@
+        (local-ignored-message? ignored-msg-pattern-list message)))
+ 
+ 
+-(if (defined? 'auto-color-list)
+-    '()
+-    (define auto-color-list '()))
++;;(if (defined? 'auto-color-list)
++;;    '()
++    (define auto-color-list '())
++;;    )
+ 
+ 
+-(if (defined? 'fh-default-color)
+-    '()
+-    (begin
+-      (define fh-default-color "cyan")))
++;;(if (defined? 'fh-default-color)
++;;    '()
++;;    (begin
++      (define fh-default-color "cyan")
++;;      ))
+ 
+ 
+ (define (fh-set-buddy-color! buddy color)
+diff -Naur freehoo-3.5.3.20100314cvs.orig/extensions/conference.scm freehoo-3.5.3.20100314cvs/extensions/conference.scm
+--- freehoo-3.5.3.20100314cvs.orig/extensions/conference.scm	2005-05-14 14:26:52.000000000 +0200
++++ freehoo-3.5.3.20100314cvs/extensions/conference.scm	2013-02-25 16:53:43.000000000 +0100
+@@ -22,10 +22,11 @@
+ ;;; To end the conference
+ ;;;  /eval (cf-end)
+ 
+-(if (defined? 'conference-group)
+-    '()
+-    (begin
+-      (define conference-group '())))
++;;(if (defined? 'conference-group)
++;;    '()
++;;    (begin
++      (define conference-group '())
++;;      ))
+ 
+ (define (conference-who group)
+   "list all conference members"
+diff -Naur freehoo-3.5.3.20100314cvs.orig/extensions/forward.scm freehoo-3.5.3.20100314cvs/extensions/forward.scm
+--- freehoo-3.5.3.20100314cvs.orig/extensions/forward.scm	2005-05-14 14:26:52.000000000 +0200
++++ freehoo-3.5.3.20100314cvs/extensions/forward.scm	2013-02-25 16:57:33.000000000 +0100
+@@ -20,10 +20,12 @@
+ ;;; (define forward '((rms . (gnuindian nagappanal kvisu2000 bala))
+ ;;; 		 (gopal . (mehta))))
+ 
+-(if (defined? 'forward)
+-    '()
+-    (begin
+-      (define forward '())))
++;;(if (defined? 'forward)
++;;    '()
++;;    (begin
++      (define forward '())
++;;      ))
++
+  
+ (define (forward-buddy from msg)
+   "forward the messages sent to buddy"
+diff -Naur freehoo-3.5.3.20100314cvs.orig/extensions/init.scm freehoo-3.5.3.20100314cvs/extensions/init.scm
+--- freehoo-3.5.3.20100314cvs.orig/extensions/init.scm	2013-02-25 16:14:39.000000000 +0100
++++ freehoo-3.5.3.20100314cvs/extensions/init.scm	2013-02-25 16:40:04.000000000 +0100
+@@ -21,7 +21,7 @@
+ ;;; to overload this init.scm file, place your own init.scm in ur
+ ;;; ~/.freehoo/extensions folder.
+ 
+-(use-modules (ice-9 debugger))
++(use-modules (ice-9 debug))
+ (debug-enable 'backtrace)
+ 
+ (define (delayed-loading)
diff --git a/freehoo-guile2.patch b/freehoo-guile2.patch
new file mode 100644
index 0000000..afcf86f
--- /dev/null
+++ b/freehoo-guile2.patch
@@ -0,0 +1,216 @@
+diff -up freehoo-3.5.3.20100314cvs/src/compat.c freehoo-3.5.3.20100314cvs-new/src/compat.c
+--- freehoo-3.5.3.20100314cvs/src/compat.c	2008-02-20 17:19:10.000000000 +0100
++++ freehoo-3.5.3.20100314cvs-new/src/compat.c	2012-04-02 10:56:16.400823743 +0200
+@@ -168,3 +168,115 @@ freehoo_getline (char **buf, size_t *siz
+   }
+ }
+ #endif
++
++#if SCM_MAJOR_VERSION == 2
++
++SCM gh_define (const char *name, SCM val)
++{
++  scm_c_define (name, val);
++  return SCM_UNSPECIFIED;
++}
++
++SCM
++gh_append2 (SCM l1, SCM l2)
++{
++  return scm_append (scm_list_2 (l1, l2));
++}
++
++SCM 
++gh_standard_handler (void *data SCM_UNUSED, SCM tag, SCM throw_args SCM_UNUSED)
++{
++  fprintf (stderr, "\nJust got an error; tag is\n        ");
++  scm_display (tag, scm_current_output_port ());
++  scm_newline (scm_current_output_port ());
++  scm_newline (scm_current_output_port ());
++
++  return SCM_BOOL_F;
++}
++
++SCM 
++gh_catch (SCM tag, scm_t_catch_body body, void *body_data,
++	  scm_t_catch_handler handler, void *handler_data)
++{
++  return scm_internal_catch (tag, body, body_data, handler, handler_data);
++}
++
++SCM 
++gh_str02scm (const char *s)
++{
++  return scm_from_locale_string (s);
++}
++
++/* evaluate the file by passing it to the lower level scm_primitive_load() */
++SCM
++gh_eval_file (const char *fname)
++{
++  return scm_primitive_load (gh_str02scm (fname));
++}
++
++static SCM
++eval_file_wrapper (void *data)
++{
++/*   gh_eval_t real_eval_proc = (gh_eval_t) (* ((gh_eval_t *) data)); */
++
++  char *scheme_code = (char *) data;
++  return gh_eval_file (scheme_code);
++}
++
++SCM
++gh_eval_file_with_catch (const char *scheme_code, scm_t_catch_handler handler)
++{
++  /* FIXME: not there yet */
++  return gh_catch (SCM_BOOL_T, (scm_t_catch_body) eval_file_wrapper,
++		   (void *) scheme_code, (scm_t_catch_handler) handler,
++		   (void *) scheme_code);
++}
++
++SCM
++gh_eval_file_with_standard_handler (const char *scheme_code)
++{
++  return gh_eval_file_with_catch (scheme_code, gh_standard_handler);
++}
++
++/* Evaluate the string; toss the value.  */
++SCM
++gh_eval_str (const char *scheme_code)
++{
++  return scm_c_eval_string (scheme_code);
++}
++
++static SCM
++eval_str_wrapper (void *data)
++{
++/*   gh_eval_t real_eval_proc = (gh_eval_t) (* ((gh_eval_t *) data)); */
++
++  char *scheme_code = (char *) data;
++  return gh_eval_str (scheme_code);
++}
++
++SCM
++gh_eval_str_with_catch (const char *scheme_code, scm_t_catch_handler handler)
++{
++  /* FIXME: not there yet */
++  return gh_catch (SCM_BOOL_T, (scm_t_catch_body) eval_str_wrapper, (void *) scheme_code,
++		   (scm_t_catch_handler) handler, (void *) scheme_code);
++}
++
++SCM
++gh_eval_str_with_standard_handler (const char *scheme_code)
++{
++  return gh_eval_str_with_catch (scheme_code, gh_standard_handler);
++}
++
++SCM
++gh_eval_str_with_stack_saving_handler (const char *scheme_code)
++{
++  return scm_internal_stack_catch (SCM_BOOL_T,
++				   (scm_t_catch_body) eval_str_wrapper,
++				   (void *) scheme_code,
++				   (scm_t_catch_handler)
++				   gh_standard_handler,
++				   (void *) scheme_code);
++}
++
++#endif /* SCM_MAJOR_VERSION == 2 */
+diff -up freehoo-3.5.3.20100314cvs/src/compat.h freehoo-3.5.3.20100314cvs-new/src/compat.h
+--- freehoo-3.5.3.20100314cvs/src/compat.h	2008-02-20 17:19:11.000000000 +0100
++++ freehoo-3.5.3.20100314cvs-new/src/compat.h	2012-04-02 10:47:57.000000000 +0200
+@@ -144,4 +144,21 @@ ssize_t freehoo_getline(char **buf, size
+ 
+ #endif 
+ 
++#if SCM_MAJOR_VERSION == 2
++
++SCM gh_define (const char *name, SCM val);
++SCM gh_append2 (SCM l1, SCM l2);
++SCM gh_standard_handler (void *data SCM_UNUSED, SCM tag, SCM throw_args SCM_UNUSED);
++SCM gh_catch (SCM tag, scm_t_catch_body body, void *body_data, scm_t_catch_handler handler, void *handler_data);
++SCM gh_str02scm (const char *s);
++SCM gh_eval_file (const char *fname);
++SCM gh_eval_file_with_catch (const char *scheme_code, scm_t_catch_handler handler);
++SCM gh_eval_file_with_standard_handler (const char *scheme_code);
++SCM gh_eval_str (const char *scheme_code);
++SCM gh_eval_str_with_catch (const char *scheme_code, scm_t_catch_handler handler);
++SCM gh_eval_str_with_standard_handler (const char *scheme_code);
++SCM gh_eval_str_with_stack_saving_handler (const char *scheme_code);
++
++#endif /* SCM_MAJOR_VERSION == 2 */
++
+ #endif /* __COMPAT_H__ */
+diff -up freehoo-3.5.3.20100314cvs/src/extension.c freehoo-3.5.3.20100314cvs-new/src/extension.c
+--- freehoo-3.5.3.20100314cvs/src/extension.c	2008-05-04 11:40:01.000000000 +0200
++++ freehoo-3.5.3.20100314cvs-new/src/extension.c	2012-04-02 10:13:58.000000000 +0200
+@@ -16,7 +16,7 @@
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ 
+ 
+-#include <guile/gh.h>
++#include <libguile.h>
+ #include "extension.h"
+ #include "freehoo.h"
+ #include "scm-procedures.h"
+diff -up freehoo-3.5.3.20100314cvs/src/fh-utils.c freehoo-3.5.3.20100314cvs-new/src/fh-utils.c
+--- freehoo-3.5.3.20100314cvs/src/fh-utils.c	2008-04-30 22:16:26.000000000 +0200
++++ freehoo-3.5.3.20100314cvs-new/src/fh-utils.c	2012-04-02 10:15:17.000000000 +0200
+@@ -25,7 +25,7 @@
+ #include <unistd.h>
+ #include <assert.h>
+ #include <readline/readline.h>
+-#include <guile/gh.h>
++#include <libguile.h>
+ #include <sys/stat.h>
+ #include <time.h>
+ 
+diff -up freehoo-3.5.3.20100314cvs/src/freehoo.c freehoo-3.5.3.20100314cvs-new/src/freehoo.c
+--- freehoo-3.5.3.20100314cvs/src/freehoo.c	2008-05-02 21:46:06.000000000 +0200
++++ freehoo-3.5.3.20100314cvs-new/src/freehoo.c	2012-04-02 10:14:16.000000000 +0200
+@@ -23,7 +23,7 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+-#include <guile/gh.h>
++#include <libguile.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <config.h>
+diff -up freehoo-3.5.3.20100314cvs/src/interpreter.c freehoo-3.5.3.20100314cvs-new/src/interpreter.c
+--- freehoo-3.5.3.20100314cvs/src/interpreter.c	2010-03-15 03:37:56.000000000 +0100
++++ freehoo-3.5.3.20100314cvs-new/src/interpreter.c	2012-04-02 10:55:26.225831957 +0200
+@@ -21,7 +21,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <assert.h>
+-#include <guile/gh.h>
++#include <libguile.h>
+ #include <readline/readline.h>
+ #include <readline/history.h>
+ #include <libgen.h>
+diff -up freehoo-3.5.3.20100314cvs/src/yahoo-adapter.c freehoo-3.5.3.20100314cvs-new/src/yahoo-adapter.c
+--- freehoo-3.5.3.20100314cvs/src/yahoo-adapter.c	2008-04-30 22:16:27.000000000 +0200
++++ freehoo-3.5.3.20100314cvs-new/src/yahoo-adapter.c	2012-04-02 10:15:30.000000000 +0200
+@@ -29,7 +29,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include <guile/gh.h>
++#include <libguile.h>
+ #include <readline/readline.h>
+ 
+ #include "freehoo.h"
+diff -up freehoo-3.5.3.20100314cvs/src/yahoo-backend.c freehoo-3.5.3.20100314cvs-new/src/yahoo-backend.c
+--- freehoo-3.5.3.20100314cvs/src/yahoo-backend.c	2012-04-02 10:56:51.577817986 +0200
++++ freehoo-3.5.3.20100314cvs-new/src/yahoo-backend.c	2012-04-02 10:14:59.000000000 +0200
+@@ -56,7 +56,7 @@
+ 
+ #include <readline/readline.h>
+ #include <readline/history.h>
+-#include <guile/gh.h>
++#include <libguile.h>
+ 
+ #include <config.h>
+ #include "yahoo-backend.h"
diff --git a/freehoo.spec b/freehoo.spec
index 409825a..c1d8990 100644
--- a/freehoo.spec
+++ b/freehoo.spec
@@ -2,20 +2,22 @@
 
 Name:             freehoo
 Version:          3.5.3
-Release:          7.%{cvs_version}%{?dist}
+Release:          9.%{cvs_version}%{?dist}
 Summary:          Freehoo is a free console based messenger for Yahoo IM Service
 Group:            Applications/Internet
 License:          GPLv2+
 URL:              http://www.nongnu.org/freehoo/
 Source0:          http://download.savannah.gnu.org/releases/freehoo/freehoo-%{version}.%{cvs_version}.tar.gz
 Patch0:           freehoo-libyahoo2-1.0.0.patch
-BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch1:           freehoo-guile2.patch
+Patch2:           freehoo-guile2-scm.patch
+
 Requires:         libyahoo2 >= 0.7.7-2.20100314svn words openssl
 Requires(post):   info
 Requires(preun):  info
-BuildRequires:    guile-devel 
-BuildRequires:    readline-devel 
-BuildRequires:    glib2-devel 
+BuildRequires:    guile-devel
+BuildRequires:    readline-devel
+BuildRequires:    glib2-devel
 BuildRequires:    libyahoo2-devel >= 0.7.7-2.20100314svn
 BuildRequires:    texinfo
 BuildRequires:    openssl-devel
@@ -29,14 +31,15 @@ unfeasible.
 %prep
 %setup -q -n %{name}-%{version}.%{cvs_version}
 %patch0 -p0 -b .libyahoo2-1.0.0
+%patch1 -p1 -b .guile2
+%patch2 -p1 -b .guile2-scm
 
 %build
-%configure \
-  --with-docdir=%{_docdir}/%{name}-%{version}
+%configure --with-docdir=%{_docdir}/%{name}-%{version}
+
 %{__make} %{?_smp_mflags}
 
 %install
-%{__rm} -rf %{buildroot}
 # This preserves timestamps.
 %{__make} install DESTDIR=%{buildroot} INSTALL="%{__install} -c -p"
 
@@ -51,9 +54,6 @@ unfeasible.
 # Remove info/dir if it exists.
 %{__rm} -f  %{buildroot}/%{_infodir}/dir
 
-%clean
-%{__rm} -rf %{buildroot}
-
 %post
 /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
 
@@ -63,7 +63,6 @@ if [ $1 = 0 ]; then
 fi
 
 %files
-%defattr(-,root,root,-)
 %doc AUTHORS BUGS ChangeLog COPYING README TODO doc/examples
 %{_bindir}/%{name}
 %{_datadir}/%{name}
@@ -71,6 +70,12 @@ fi
 %{_mandir}/man?/*
 
 %changelog
+* Mon Feb 25 2013 Jaromir Capik <jcapik at redhat.com> - 3.5.3-9.20100314cvs
+- Fixing SCM files to work with guile2
+
+* Mon Feb 25 2013 Jaromir Capik <jcapik at redhat.com> - 3.5.3-8.20100314cvs
+- Fixing FTBFS against guile2 (patch from Jan Synacek)
+
 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.5.3-7.20100314cvs
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list