diff --git a/dust3d.pro.flatpak.patch b/dust3d.pro.flatpak.patch new file mode 100644 index 00000000..5fdd9e45 --- /dev/null +++ b/dust3d.pro.flatpak.patch @@ -0,0 +1,25 @@ +--- dust3d/dust3d.pro 2020-04-07 10:42:08.246213390 -0400 ++++ dust3d/dust3d.pro.flatpak 2020-04-14 13:20:11.609396245 -0400 +@@ -881,14 +881,14 @@ + GMP_LIBNAME = gmp + MPFR_LIBNAME = mpfr + CGAL_LIBNAME = CGAL +- BOOST_INCLUDEDIR = /usr/local/include +- CGAL_INCLUDEDIR = /usr/local/include +- CGAL_BUILDINCLUDEDIR = /usr/local/include +- CGAL_LIBDIR = /usr/local/lib +- GMP_INCLUDEDIR = /usr/local/include +- GMP_LIBDIR = /usr/local/lib +- MPFR_INCLUDEDIR = /usr/local/include +- MPFR_LIBDIR = /usr/local/lib ++ BOOST_INCLUDEDIR = /app/include ++ CGAL_INCLUDEDIR = /app/include ++ CGAL_BUILDINCLUDEDIR = /app/include ++ CGAL_LIBDIR = /app/lib ++ GMP_INCLUDEDIR = /app/include ++ GMP_LIBDIR = /app/lib ++ MPFR_INCLUDEDIR = /app/include ++ MPFR_LIBDIR = /app/lib + } + + INCLUDEPATH += $$BOOST_INCLUDEDIR diff --git a/org.dust3d.dust3d.json b/org.dust3d.dust3d.json new file mode 100644 index 00000000..a0faaf2a --- /dev/null +++ b/org.dust3d.dust3d.json @@ -0,0 +1,78 @@ +{ + "app-id": "org.dust3d.dust3d", + "runtime": "org.kde.Platform", + "runtime-version": "5.13", + "sdk": "org.kde.Sdk", + "branch": "stable", + "command": "dust3d", + "finish-args": [ + "--share=ipc", + "--socket=x11", + "--socket=wayland", + "--device=dri" + ], + "modules": [ + { + "name": "boost", + "buildsystem": "simple", + "build-commands": [ + "./bootstrap.sh --prefix=/app", + "./b2 -j $FLATPAK_BUILDER_N_JOBS", + "./b2 install" + ], + "cleanup": [ "/lib/libboost_*.a" ], + "sources": [ + { + "type": "archive", + "url": "https://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.tar.bz2", + "sha256": "beae2529f759f6b3bf3f4969a19c2e9d6f0c503edcb2de4a61d1428519fcb3b0" + } + ] + }, + { + "name": "mpfr", + "buildsystem": "autotools", + "sources": [ + { + "type": "archive", + "url": "https://www.mpfr.org/mpfr-current/mpfr-4.0.2.tar.gz", + "sha256": "ae26cace63a498f07047a784cd3b0e4d010b44d2b193bab82af693de57a19a78" + } + ] + }, + { + "name": "cgal", + "buildsystem": "cmake", + "sources": [ + { + "type": "archive", + "url": "https://github.com/CGAL/cgal/archive/releases/CGAL-4.14.3.tar.gz", + "sha256": "05badca4025ec85012942533f5f1af6314ae10ce2f7effcc094b6844c4a54985" + } + ] + }, + { + "name": "dust3d", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p thirdparty/instant-meshes/build", + "cd thirdparty/instant-meshes/build && cmake ../", + "cd thirdparty/instant-meshes/build && make -j 4", + "qmake -config release", + "make CXX=\"g++ -fext-numeric-literals\"", + "install -D dust3d /app/bin/dust3d" + ], + "sources": [ + { + "type": "git", + "url": "https://github.com/huxingyi/dust3d.git", + "tag": "1.0.0-rc.3" + }, + { + "type": "patch", + "path": "dust3d.pro.flatpak.patch" + } + ] + } + ] +}