Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1587370
 поиск   регистрация   авторизация 
 
Группа :: Система/Серверы
Пакет: arts

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: arts-1.2.0-glib2.patch


--- arts-1.2.0/flow/gsl/gsldefs.h.glib	2003-03-14 18:28:09.000000000 +0100
+++ arts-1.2.0/flow/gsl/gsldefs.h	2004-02-23 15:03:59.612564387 +0100
@@ -21,7 +21,12 @@
 
 /* configure checks */
 #include <gsl/gslconfig.h>
+
+#if	GSL_USE_GSL_GLIB
+#include <gsl/gslglib.h>	/* GSL just uses a certain subset of GLib */
+#else
 #include <glib.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
--- arts-1.2.0/flow/gsl/gslffttest.c.glib	2003-06-15 15:14:54.000000000 +0200
+++ arts-1.2.0/flow/gsl/gslffttest.c	2004-02-23 15:03:59.615564083 +0100
@@ -59,8 +59,7 @@
   guint i;
 
   /* initialize GSL */
-  if (!g_thread_supported ())
-      g_thread_init (NULL);
+  g_thread_init (NULL);
   gsl_init (NULL, NULL);
 
   /* initialize random numbers */
--- arts-1.2.0/flow/gsl/gslglib.h.glib	2003-07-10 14:14:17.000000000 +0200
+++ arts-1.2.0/flow/gsl/gslglib.h	2004-02-23 15:03:59.618563780 +0100
@@ -505,7 +505,7 @@
  * glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy.
  */
 #if !defined (G_VA_COPY)
-#  if defined (__GNUC__) && ( defined (__PPC__) || defined (__s390__) ) && (defined (_CALL_SYSV) || defined (_WIN32) || defined (__s390__) )
+#  if defined (__GNUC__) && ( defined (__PPC__) || defined (__s390__) || defined(__x86_64__) ) && (defined (_CALL_SYSV) || defined (_WIN32) || defined (__s390__) || defined(__x86_64__) )
 #    define G_VA_COPY(ap1, ap2)   (*(ap1) = *(ap2))
 #  elif defined (G_VA_COPY_AS_ARRAY)
 #    define G_VA_COPY(ap1, ap2)   g_memmove ((ap1), (ap2), sizeof (va_list))
--- arts-1.2.0/flow/gsl/gslmakefile.inc.glib	2003-08-24 17:34:36.000000000 +0200
+++ arts-1.2.0/flow/gsl/gslmakefile.inc	2004-02-23 15:03:59.621563476 +0100
@@ -5,6 +5,8 @@
 #
 # this makefile supports:
 #
+# GSL_cc_dummy		define to an empty .cc file if your linker needs to
+#			link GSL object files as c++ code
 # GSL_progs_ldadd	add link options to this varibale, which are required
 #			to link GSL_NOINST_PROGS targets
 # gslincludedir		directory to install public headers into if not empty
@@ -31,27 +33,39 @@
 GSL_EXTRA_DAT = gsl.gnuplot gsl-mplan.txt gslarrows gslwave.header gslglib.c gslglib.h gsl-fftgen.pl
 EXTRA_DIST   +=	$(GSL_H_SRC) $(GSL_EXTRA_SRC) $(GSL_EXTRA_DAT)
 
-GSL_NOINST_PROGS = gslwchunk gsltests gslffttest
-gslwchunk_SOURCES = gslwchunk.c
+GSL_NOINST_PROGS = gslwchunk gsltests gslglibhashtest gslffttest
+gslwchunk_SOURCES = gslwchunk.c $(GSL_cc_dummy)
 gslwchunk_LDADD = $(GSL_progs_ldadd)
-gsltests_SOURCES = gsltests.c
+gsltests_SOURCES = gsltests.c $(GSL_cc_dummy)
 gsltests_LDADD = $(GSL_progs_ldadd)
-gslffttest_SOURCES = gslffttest.c
+gslffttest_SOURCES = gslffttest.c $(GSL_cc_dummy)
 gslffttest_LDADD = $(GSL_progs_ldadd)
+gslglibhashtest_SOURCES = gslglibhashtest.cc # C++ already
+gslglibhashtest_LDADD = $(GSL_progs_ldadd)
 
 $(srcdir)/gslfft.c: $(srcdir)/gsl-fftgen.pl $(srcdir)/gsl-fftconf.sh
-	cd $(srcdir) && ./gsl-fftconf.sh 'perl ./gsl-fftgen.pl' \"gslfft.h\" >gslfft.c
+	cd $(srcdir) && ./gsl-fftconf.sh '$(PERL) ./gsl-fftgen.pl' \"gslfft.h\" >gslfft.c
 MAINTAINERCLEANFILES += gslfft.c
 
 $(srcdir)/gslwchunk.c: gslconfig.h
 $(srcdir)/gsltests.c: gslconfig.h
 $(srcdir)/gslffttest.c: gslconfig.h
+$(srcdir)/gslglibhashtest.cc: gslconfig.h
 # $(OBJECTS): gslconfig.h
 
-gsl_public_HEADERS = $(GSL_H_SRC) gslconfig.h
-gsl_publicdir = $(gslincludedir)
+gsl_public_headers = $(GSL_H_SRC) gslconfig.h
 
-.PHONY:	gsltestoutput 
+install-data-local:	gsl-install-data-local
+gsl-install-data-local:
+	$(mkinstalldirs) $(DESTDIR)$(gslincludedir)
+	@list='$(gsl_public_headers)'; \
+	test -z "$(gslincludedir)" || for hfile in $$list ; do \
+	  if test -f "$$hfile"; then d= ; else d="$(srcdir)/"; fi; \
+	  echo " $(INSTALL_DATA) $$d$$hfile $(DESTDIR)$(gslincludedir)/$$hfile"; \
+	  $(INSTALL_DATA) $$d$$hfile $(DESTDIR)$(gslincludedir)/$$hfile; \
+	done
+
+.PHONY:	gsltestoutput gsl-install-data-local
 
 gsltestoutput:
 	@./gsltests blp     7 0.3		0.1211
--- arts-1.2.0/flow/gsl/gslwchunk.c.glib	2003-10-24 11:06:07.000000000 +0200
+++ arts-1.2.0/flow/gsl/gslwchunk.c	2004-02-23 15:03:59.626562971 +0100
@@ -199,8 +199,7 @@
   };
   gint i, j, k;
 
-  if (!g_thread_supported ())
-    g_thread_init (NULL);
+  g_thread_init (NULL);
   gsl_init (gslconfig, NULL);
 
   if (1)
--- arts-1.2.0/flow/gsl/Makefile.am.glib	2004-01-17 13:12:03.000000000 +0100
+++ arts-1.2.0/flow/gsl/Makefile.am	2004-02-23 15:03:59.628562768 +0100
@@ -6,18 +6,20 @@
 gslincludedir=$(includedir)/arts/gsl
 include gslmakefile.inc
 
+gsl_public_headers += gslglib.h gslartsthreads.h
+
 INCLUDES = -I$(top_srcdir)/flow -I$(top_builddir)/flow -I$(top_srcdir)/mcop -I$(top_builddir) $(all_includes)
 AM_CFLAGS = $(GSL_CFLAGS)
 
 noinst_LTLIBRARIES = libgsl.la
 
-libgsl_la_SOURCES = $(GSL_C_SRC) gslfilehash.c gslartsthreads.cc
-libgsl_la_LIBADD = $(top_builddir)/mcop/libmcop.la -lm $(LIBPOSIX4) $(GSL_LIBS) $(LIB_POLL) $(GLIB_LIBADD)
-libgsl_la_LDFLAGS = -no-undefined $(all_libraries)
+libgsl_la_SOURCES = $(GSL_C_SRC) gslglib.c gslglibhash.cc gslartsthreads.cc gslfilehash.c
+libgsl_la_LIBADD = $(top_builddir)/mcop/libmcop.la -lm $(LIBPOSIX4) $(GSL_LIBS) $(LIB_POLL)
+libgsl_la_LDFLAGS = -no-undefined
 
 noinst_PROGRAMS = $(GSL_NOINST_PROGS)
 
-GSL_progs_ldadd = libgsl.la -lm $(USE_THREADS)
+GSL_progs_ldadd = libgsl.la
 GSL_cc_dummy = dummy.cc
 $(srcdir)/dummy.cc: gslconfig.h
 
--- arts-1.2.0/flow/gslschedule.cc.glib	2003-08-26 20:41:59.000000000 +0200
+++ arts-1.2.0/flow/gslschedule.cc	2004-02-23 15:03:59.637561858 +0100
@@ -841,7 +841,7 @@
 		GslConfigValue values[2] = { { "wave_chunk_padding", 8 }, { 0, 0 } };
 		gsl_is_initialized = true;
 
-                if (!g_thread_supported ()) g_thread_init(0);
+		g_thread_init(0);
 		gsl_init(values, (GslMutexTable *)gslGlobalMutexTable);
 
 		/*
--- arts-1.2.0/flow/gsl/gslengine.c.orig	2004-02-23 15:48:44.623400625 +0100
+++ arts-1.2.0/flow/gsl/gslengine.c	2004-02-23 15:52:58.668623477 +0100
@@ -672,7 +672,7 @@
 
   if (gsl_engine_threaded)
     {
-      if (!g_thread_supported ()) g_thread_init (NULL);
+      g_thread_init (NULL);
       master_thread = gsl_thread_new (_engine_master_thread, NULL);
       if (0)
 	gsl_thread_new (slave, NULL);
--- arts-1.2.0/flow/gsl/gsltests.c.orig	2004-02-23 15:38:39.586811745 +0100
+++ arts-1.2.0/flow/gsl/gsltests.c	2004-02-23 15:42:02.477215089 +0100
@@ -72,8 +72,7 @@
   shift_argc = argc;
   shift_argv = argv;
 
-  if (!g_thread_supported ())
-      g_thread_init (NULL);
+  g_thread_init (NULL);
   gsl_init (NULL, NULL);
 
   arg = shift ();
 
design & coding: Vladimir Lettiev aka crux © 2004-2005