summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreyson Christoforo2021-01-31 13:47:06 +0000
committerGreyson Christoforo2021-01-31 13:48:16 +0000
commit57c333c575b1db2a0e3370acdcee3c0f282a6d9f (patch)
treef6708b70e1b5813ec647a2fdaa97783106952ea4
downloadaur-57c333c575b1db2a0e3370acdcee3c0f282a6d9f.tar.gz
wip
add srcinfo
-rw-r--r--.SRCINFO23
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD83
3 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..c6804963035
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = occt-webgl-viewer
+ pkgdesc = Open CASCADE Technology WebGL 3D Viewer for rendering 3d models on a website
+ pkgver = 7.5.0
+ pkgrel = 1
+ url = https://www.opencascade.org
+ arch = x86_64
+ license = LGPL
+ license = custom
+ makedepends = tk
+ makedepends = gl2ps
+ makedepends = ffmpeg
+ makedepends = freeimage
+ makedepends = emscripten
+ makedepends = cmake
+ makedepends = ninja
+ options = !buildflags
+ source = opencascade-7.5.0.tgz::https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_5_0;sf=tgz
+ source = freetype-2.10.4.tar.xz::https://download-mirror.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.xz
+ sha256sums = c8df7d23051b86064f61299a5f7af30004c115bdb479df471711bab0c7166654
+ sha256sums = 86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784
+
+pkgname = occt-webgl-viewer
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..57a5adbaad2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.tar.gz
+*.tar.xz
+*.tgz
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c79a6724d34
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,83 @@
+# Maintainer: Grey Christoforo <first name at last name dot net>
+
+pkgname=occt-webgl-viewer
+pkgver=7.5.0
+_ftver=2.10.4 # freetype version to use here
+_pkgver=V${pkgver//./_}
+pkgrel=1
+pkgdesc="Open CASCADE Technology WebGL 3D Viewer for rendering 3d models on a website"
+arch=(x86_64)
+url="https://www.opencascade.org"
+license=(LGPL custom)
+depends=()
+makedepends=(
+tk
+gl2ps
+ffmpeg
+freeimage
+emscripten
+cmake
+ninja
+)
+options=(!buildflags)
+source=(
+"opencascade-${pkgver}.tgz::https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_pkgver};sf=tgz"
+"freetype-${_ftver}.tar.xz::https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${_ftver}.tar.xz"
+)
+
+sha256sums=('c8df7d23051b86064f61299a5f7af30004c115bdb479df471711bab0c7166654'
+ '86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784')
+
+prepare() {
+ cd "occt-${_pkgver}"
+}
+
+build() {
+ source /etc/profile.d/emscripten.sh
+
+ msg2 "building freetype for the web"
+ pushd freetype-${_ftver}
+ printenv
+ emconfigure ./configure
+ emcmake cmake -Wno-dev \
+ -G Ninja \
+ -B ft_build \
+ -S .
+ DESTDIR="${srcdir}/freetype-${_ftver}/install" emmake cmake --build ft_build -- install
+ popd
+
+ msg2 "building occt for the web"
+ pushd occt-${_pkgver}
+ emcmake cmake -Wno-dev \
+ -D BUILD_MODULE_Draw=NO \
+ -D BUILD_LIBRARY_TYPE=Static \
+ -D BUILD_DOC_Overview=NO \
+ -D 3RDPARTY_FREETYPE_LIBRARY="${srcdir}/freetype-${_ftver}/install/usr/local/lib/libfreetype.a" \
+ -D 3RDPARTY_FREETYPE_LIBRARY_DIR="${srcdir}/freetype-${_ftver}/install/usr/local/lib" \
+ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build="${srcdir}/freetype-${_ftver}/install/usr/local/include/freetype2" \
+ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2="${srcdir}/freetype-${_ftver}/install/usr/local/include/freetype2" \
+ -G Ninja \
+ -B occt_build \
+ -S .
+ DESTDIR="${srcdir}/occt-${_pkgver}/install" emmake cmake --build occt_build -- install
+ popd
+
+ msg2 "building WebGL viewer example"
+ pushd occt-${_pkgver}/samples/webgl
+ emcmake cmake -Wno-dev \
+ -G Ninja \
+ -B web_build \
+ -S .
+ emmake cmake --build web_build
+}
+
+package() {
+ source /etc/profile.d/emscripten.sh
+ cd occt-${_pkgver}/samples/webgl
+ DESTDIR="${pkgdir}/opt/${pkgname}" emmake cmake --build web_build -- install
+
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE_LGPL_21.txt
+ install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" OCCT_LGPL_EXCEPTION.txt
+}
+
+# vim:set ts=2 sw=2 et: