forked from pyodide/pyodide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump rebound/reboundx to version 4.4.3/4.3.0 (pyodide#5163)
- Loading branch information
Showing
6 changed files
with
141 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
Index: rebound-3.24.2/setup.py | ||
=================================================================== | ||
--- rebound-3.24.2.orig/setup.py | ||
+++ rebound-3.24.2/setup.py | ||
@@ -23,8 +23,8 @@ extra_link_args=[] | ||
From 0a6cc79e6814d7e2dbc637541cad86cebc47f855 Mon Sep 17 00:00:00 2001 | ||
From: Hanno Rein <[email protected]> | ||
Date: Wed, 6 Nov 2024 17:37:22 -0500 | ||
Subject: [PATCH 3/3] install_name | ||
|
||
--- | ||
setup.py | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/setup.py b/setup.py | ||
index 6443cb27..965b2fc9 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -23,8 +23,8 @@ except: | ||
extra_link_args=[] | ||
if sys.platform == 'darwin': | ||
from distutils import sysconfig | ||
vars = sysconfig.get_config_vars() | ||
- vars['LDSHARED'] = vars['LDSHARED'].replace('-bundle', '-shared') | ||
config_vars = sysconfig.get_config_vars() | ||
- config_vars['LDSHARED'] = config_vars['LDSHARED'].replace('-bundle', '-shared') | ||
- extra_link_args=['-Wl,-install_name,@rpath/librebound'+suffix] | ||
+ # vars['LDSHARED'] = vars['LDSHARED'].replace('-bundle', '-shared') | ||
+ # extra_link_args=['-Wl,-install_name,@rpath/librebound'+suffix] | ||
|
||
libreboundmodule = Extension('librebound', | ||
sources = [ 'src/rebound.c', | ||
+ #config_vars['LDSHARED'] = config_vars['LDSHARED'].replace('-bundle', '-shared') | ||
+ #extra_link_args=['-Wl,-install_name,@rpath/librebound'+suffix] | ||
if sys.platform == 'win32': | ||
extra_compile_args=[ghash_arg, '-DLIBREBOUND', '-D_GNU_SOURCE', '-DSERVER'] | ||
else: | ||
-- | ||
2.39.5 (Apple Git-154) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
From f875c41a58ae4b3d59d97a5787ec3e546c737860 Mon Sep 17 00:00:00 2001 | ||
From: Hanno Rein <[email protected]> | ||
Date: Wed, 6 Nov 2024 17:21:47 -0500 | ||
Subject: [PATCH] output | ||
|
||
--- | ||
src/output.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/output.c b/src/output.c | ||
index e897743a..fdd4ea45 100644 | ||
--- a/src/output.c | ||
+++ b/src/output.c | ||
@@ -349,7 +349,7 @@ void reb_simulation_output_timing(struct reb_simulation* r, const double tmax){ | ||
r->output_timing_last = temp; | ||
}else{ | ||
#ifdef __EMSCRIPTEN__ | ||
- reb_remove_last_line(); | ||
+ // reb_remove_last_line(); | ||
#else | ||
printf("\r"); | ||
#endif | ||
--- a/src/output.c | ||
+++ b/src/output.c | ||
@@ -257,17 +257,17 @@ void profiling_stop(int cat){ | ||
|
||
#ifdef __EMSCRIPTEN__ | ||
// fflush does not work in emscripten. Workaround. | ||
-EM_JS(void, reb_remove_last_line, (), { | ||
- var output = document.getElementById("output"); | ||
- if (output){ | ||
- const lastIndex1 = output.value.lastIndexOf("\n"); | ||
- const lastIndex2 = output.value.lastIndexOf("\n",lastIndex1-1); | ||
- const lastIndexNtot = output.value.lastIndexOf("N_tot="); | ||
- if(lastIndex1>0 && lastIndex2<lastIndexNtot){ | ||
- output.value = output.value.substring(0, lastIndex2+1); | ||
- } | ||
- } | ||
-}); | ||
+//EM_JS(void, reb_remove_last_line, (), { | ||
+// var output = document.getElementById("output"); | ||
+// if (output){ | ||
+// const lastIndex1 = output.value.lastIndexOf("\n"); | ||
+// const lastIndex2 = output.value.lastIndexOf("\n",lastIndex1-1); | ||
+// const lastIndexNtot = output.value.lastIndexOf("N_tot="); | ||
+// if(lastIndex1>0 && lastIndex2<lastIndexNtot){ | ||
+// output.value = output.value.substring(0, lastIndex2+1); | ||
+// } | ||
+// } | ||
+//}); | ||
#endif | ||
|
||
int reb_simulation_output_screenshot(struct reb_simulation* r, const char* filename){ | ||
-- | ||
-- | ||
2.39.5 (Apple Git-154) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From 90723d5083293ec9ced4085d1b6b8c8a68772fba Mon Sep 17 00:00:00 2001 | ||
From: Hanno Rein <[email protected]> | ||
Date: Thu, 7 Nov 2024 09:40:09 -0500 | ||
Subject: [PATCH 4/4] no emscripten | ||
|
||
--- | ||
src/rebound.c | 16 ++++++++-------- | ||
1 file changed, 8 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/src/rebound.c b/src/rebound.c | ||
index 82f6ac60..accea978 100644 | ||
--- a/src/rebound.c | ||
+++ b/src/rebound.c | ||
@@ -665,7 +665,7 @@ int reb_check_exit(struct reb_simulation* const r, const double tmax, double* la | ||
while(r->status == REB_STATUS_PAUSED || r->status == REB_STATUS_SCREENSHOT){ | ||
// Wait for user to disable paused simulation | ||
#ifdef __EMSCRIPTEN__ | ||
- emscripten_sleep(100); | ||
+ // emscripten_sleep(100); | ||
#else | ||
usleep(1000); | ||
#endif | ||
@@ -820,16 +820,16 @@ static void* reb_simulation_integrate_raw(void* args){ | ||
} | ||
reb_run_heartbeat(r); | ||
#ifdef __EMSCRIPTEN__ | ||
- double t0 = emscripten_performance_now(); | ||
+// double t0 = emscripten_performance_now(); | ||
#endif | ||
while(reb_check_exit(r,thread_info->tmax,&last_full_dt)<0){ | ||
#ifdef __EMSCRIPTEN__ | ||
- double t1 = emscripten_performance_now(); | ||
- if (t1-t0>1000./120.){ // max framerate 120Hz | ||
- t0 = t1; | ||
- emscripten_sleep(0); // allow drawing and event handling | ||
- } | ||
- | ||
+// double t1 = emscripten_performance_now(); | ||
+// if (t1-t0>1000./120.){ // max framerate 120Hz | ||
+// t0 = t1; | ||
+// emscripten_sleep(0); // allow drawing and event handling | ||
+// } | ||
+// | ||
#endif | ||
#ifdef OPENGL | ||
if (r->display_data){ | ||
-- | ||
2.39.5 (Apple Git-154) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters