Add 03_use_system_threejs.patch, update d/control and d/solvespace.links to use syste...
authorRyan Pavlik <ryan.pavlik@collabora.com>
Tue, 19 Jan 2021 21:10:41 +0000 (15:10 -0600)
committerRyan Pavlik <ryan.pavlik@collabora.com>
Thu, 21 Jan 2021 15:58:29 +0000 (09:58 -0600)
debian/control
debian/patches/03_use_system_threejs.patch [new file with mode: 0644]
debian/patches/series
debian/solvespace.links [new file with mode: 0644]

index 113f5b4544789af37ee2772214439b723b2ec9b5..b61d8070d9ae5c9c20547dc48865cf04b1066843 100644 (file)
@@ -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 (file)
index 0000000..60b9713
--- /dev/null
@@ -0,0 +1,34 @@
+From: Ryan Pavlik <ryan.pavlik@collabora.com>
+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());
+     }
index 5990c3edda1a53144a30fb2f43edd0bce52f24b9..8ef2061cd414e1fc3dc55dbe72637ef6e7b3ccd5 100644 (file)
@@ -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 (file)
index 0000000..249f988
--- /dev/null
@@ -0,0 +1 @@
+usr/share/javascript/three/three.js usr/share/solvespace/threejs/three.js