rpms/octave-forge/devel octave-forge-20090607-ann-swig-build.patch, NONE, 1.1 octave-forge.spec, 1.71, 1.72
alexlan
alexlan at fedoraproject.org
Sat Aug 1 04:06:55 UTC 2009
- Previous message (by thread): rpms/WebShell/devel README.fedora, NONE, 1.1 WebShell-0.9.6-default-paths.p0, NONE, 1.1 WebShell.spec, NONE, 1.1 background.jpg, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/GMT/devel GMT.spec,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: alexlan
Update of /cvs/pkgs/rpms/octave-forge/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28238
Modified Files:
octave-forge.spec
Added Files:
octave-forge-20090607-ann-swig-build.patch
Log Message:
* Sat Aug 1 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 20090607-2
- Add patch from SVN (r6006) which has SWIG fixes for ann module.
octave-forge-20090607-ann-swig-build.patch:
ann_wrap.cpp | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 52 insertions(+), 9 deletions(-)
--- NEW FILE octave-forge-20090607-ann-swig-build.patch ---
--- main/ann-1.0.2/src/ann/bindings/ann_wrap.cpp 2009/01/10 01:02:37 5518
+++ main/ann-1.0.2/src/ann/bindings/ann_wrap.cpp 2009/07/12 21:16:23 6006
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.37
+ * Version 1.3.40
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -11,6 +11,7 @@
#define SWIGOCTAVE
#define SWIG_name_d "ann"
#define SWIG_name ann
+#define USE_OCTAVE_API_VERSION 37
#ifdef __cplusplus
@@ -860,27 +861,35 @@
typedef std::map < void *, Director * > rtdir_map;
- SWIGINTERN rtdir_map &get_rtdir_map() {
+ SWIGINTERN rtdir_map* get_rtdir_map() {
static swig_module_info *module = 0;
if (!module)
module = SWIG_GetModule(0);
- assert(module);
+ if (!module)
+ return 0;
if (!module->clientdata)
module->clientdata = new rtdir_map;
- return *(rtdir_map *) module->clientdata;
+ return (rtdir_map *) module->clientdata;
}
SWIGINTERNINLINE void set_rtdir(void *vptr, Director *d) {
- get_rtdir_map()[vptr] = d;
+ rtdir_map* rm = get_rtdir_map();
+ if (rm)
+ (*rm)[vptr] = d;
}
SWIGINTERNINLINE void erase_rtdir(void *vptr) {
- get_rtdir_map().erase(vptr);
+ rtdir_map* rm = get_rtdir_map();
+ if (rm)
+ (*rm).erase(vptr);
}
SWIGINTERNINLINE Director *get_rtdir(void *vptr) {
- rtdir_map::const_iterator pos = get_rtdir_map().find(vptr);
- Director *rtdir = (pos != get_rtdir_map().end())? pos->second : 0;
+ rtdir_map* rm = get_rtdir_map();
+ if (!rm)
+ return 0;
+ rtdir_map::const_iterator pos = rm->find(vptr);
+ Director *rtdir = (pos != rm->end())? pos->second : 0;
return rtdir;
}
}
@@ -1194,9 +1203,15 @@
install_builtin_function(it->second.first->method, it->first,
it->second.first->doc?it->second.first->doc:std::string());
else if (it->second.second.is_defined()) {
+#if USE_OCTAVE_API_VERSION<37
link_to_global_variable(curr_sym_tab->lookup(it->first, true));
+#else
+ symbol_table::varref(it->first);
+ symbol_table::mark_global(it->first);
+#endif
set_global_value(it->first, it->second.second);
+#if USE_OCTAVE_API_VERSION<37
octave_swig_type *ost = Swig::swig_value_deref(it->second.second);
if (ost) {
const char* h = ost->help_text();
@@ -1205,6 +1220,7 @@
sr->document(h);
}
}
+#endif
}
}
}
@@ -2107,7 +2123,12 @@
SWIGRUNTIME void SWIG_Octave_SetModule(void *clientdata, swig_module_info *pointer) {
octave_value ov = new octave_swig_packed(0, &pointer, sizeof(swig_module_info *));
const char *module_var = "__SWIG_MODULE__" SWIG_TYPE_TABLE_NAME SWIG_RUNTIME_VERSION;
+#if USE_OCTAVE_API_VERSION<37
link_to_global_variable(curr_sym_tab->lookup(module_var, true));
+#else
+ symbol_table::varref(module_var);
+ symbol_table::mark_global(module_var);
+#endif
set_global_value(module_var, ov);
}
@@ -2146,7 +2167,7 @@
/* -------- TYPES TABLE (END) -------- */
-#define SWIGVERSION 0x010337
+#define SWIGVERSION 0x010340
#define SWIG_VERSION SWIGVERSION
@@ -9614,12 +9635,34 @@
module_ns->install_global();
module_ns->decref();
+#if USE_OCTAVE_API_VERSION<37
link_to_global_variable(curr_sym_tab->lookup(SWIG_name_d,true));
+#else
+ symbol_table::varref(SWIG_name_d);
+ symbol_table::mark_global(SWIG_name_d);
+#endif
set_global_value(SWIG_name_d,Swig::swig_value_ref(module_ns));
+#if USE_OCTAVE_API_VERSION>=37
+ mlock();
+#endif
+
return octave_value_list();
}
+// workaround bug in octave where installing global variable of custom type and then
+// exiting without explicitly clearing the variable causes octave to segfault.
+#if USE_OCTAVE_API_VERSION>=37
+struct oct_file_unload {
+ ~oct_file_unload() {
+ string_vector vars = symbol_table::global_variable_names();
+ for (int i = 0; i < vars.length(); i++)
+ symbol_table::clear_global(vars[i]);
+ }
+};
+static oct_file_unload __unload;
+#endif
+
static void SWIG_init_user(octave_swig_type* module_ns)
{
Index: octave-forge.spec
===================================================================
RCS file: /cvs/pkgs/rpms/octave-forge/devel/octave-forge.spec,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -p -r1.71 -r1.72
--- octave-forge.spec 1 Aug 2009 03:13:26 -0000 1.71
+++ octave-forge.spec 1 Aug 2009 04:06:55 -0000 1.72
@@ -2,7 +2,7 @@
Name: octave-forge
Version: 20090607
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Contributed functions for octave
Group: Applications/Engineering
@@ -19,6 +19,7 @@ URL: http://octave.sourceforg
Source0: %{name}-bundle-%{version}.patched.tar.gz
#Patch0: %{name}-image-1.0.8-build.patch
Patch0: octave-forge-20090607-includes.patch
+Patch1: octave-forge-20090607-ann-swig-build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: octave-devel >= 6:3.0.0-1
@@ -152,8 +153,9 @@ do
cd ..
done
-#apply patch to build image-1.0.8 (bug #477577)
+#apply patches
%patch0 -p0
+%patch1 -p0
#Install with -nodeps
sed -i -e "s/pkg('install',/pkg('install','-nodeps',/" */*/Makefile
@@ -227,6 +229,9 @@ octave -q -H --no-site-file --eval "pkg(
%changelog
+* Sat Aug 1 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 20090607-2
+- Add patch from SVN (r6006) which has SWIG fixes for ann module.
+
* Fri Jul 31 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 20090607-1
- Apply patch from Jussi Lehtola <jussilehtola at fedoraproject.org> to
update to 20090607
- Previous message (by thread): rpms/WebShell/devel README.fedora, NONE, 1.1 WebShell-0.9.6-default-paths.p0, NONE, 1.1 WebShell.spec, NONE, 1.1 background.jpg, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/GMT/devel GMT.spec,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list