From: Ryan Pavlik Date: Tue, 19 Jan 2021 21:10:41 +0000 (-0600) Subject: Add 03_use_system_threejs.patch, update d/control and d/solvespace.links to use syste... X-Git-Tag: archive/raspbian/3.1+ds1-4+rpi1^2~99 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=138469609aed0f3e91534c119f4462e8f7980a82;p=solvespace.git Add 03_use_system_threejs.patch, update d/control and d/solvespace.links to use system-provided three.js --- diff --git a/debian/control b/debian/control index 113f5b4..b61d807 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,7 @@ Build-Depends: cmake (>= 3.1.0), libglew-dev, libglu1-mesa-dev, libgtkmm-3.0-dev, + libjs-three, libjson-c-dev, libpangomm-1.4-dev, libspnav-dev, @@ -28,7 +29,8 @@ Package: solvespace Architecture: any Multi-Arch: foreign Depends: ${misc:Depends}, - ${shlibs:Depends} + ${shlibs:Depends}, + libjs-three Description: Parametric 2d/3d CAD SolveSpace is a parametric 2d/3d CAD program. Applications include: . diff --git a/debian/patches/03_use_system_threejs.patch b/debian/patches/03_use_system_threejs.patch new file mode 100644 index 0000000..60b9713 --- /dev/null +++ b/debian/patches/03_use_system_threejs.patch @@ -0,0 +1,34 @@ +From: Ryan Pavlik +Date: Tue, 19 Jan 2021 15:05:06 -0600 +Subject: Use threejs from system. + +--- + res/CMakeLists.txt | 1 - + src/export.cpp | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt +index 5969039..348f812 100644 +--- a/res/CMakeLists.txt ++++ b/res/CMakeLists.txt +@@ -282,7 +282,6 @@ add_resources( + shaders/edge.frag + shaders/edge.vert + shaders/outline.vert +- threejs/three-r76.js.gz + threejs/hammer-2.0.8.js.gz + threejs/SolveSpaceControls.js) + +diff --git a/src/export.cpp b/src/export.cpp +index e0c6182..6a670b9 100644 +--- a/src/export.cpp ++++ b/src/export.cpp +@@ -1064,7 +1064,7 @@ void SolveSpaceUI::ExportMeshAsThreeJsTo(FILE *f, const Platform::Path &filename + + if(filename.HasExtension("html")) { + fprintf(f, htmlbegin, +- LoadStringFromGzip("threejs/three-r76.js.gz").c_str(), ++ LoadString("threejs/three.js").c_str(), + LoadStringFromGzip("threejs/hammer-2.0.8.js.gz").c_str(), + LoadString("threejs/SolveSpaceControls.js").c_str()); + } diff --git a/debian/patches/series b/debian/patches/series index 5990c3e..8ef2061 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,5 @@ 01_RemoveGitHash.patch 02_add_debian_pkg_version.patch +03_use_system_threejs.patch 10_mimalloc_restrict_cpu_yield.patch diff --git a/debian/solvespace.links b/debian/solvespace.links new file mode 100644 index 0000000..249f988 --- /dev/null +++ b/debian/solvespace.links @@ -0,0 +1 @@ +usr/share/javascript/three/three.js usr/share/solvespace/threejs/three.js