Skip to content

Commit 2a8df9e

Browse files
committed
Add dependencies of blender
1 parent 3973573 commit 2a8df9e

23 files changed

+2738
-0
lines changed

alarmcn/embree/PKGBUILD

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Maintainer: Sven-Hendrik Haase <[email protected]>
2+
# Maintainer: Bruno Pagani <[email protected]>
3+
# Contributor: Lukas Jirkovsky <[email protected]>
4+
5+
pkgname=embree
6+
pkgver=4.3.3
7+
pkgrel=1
8+
pkgdesc="Collection of high-performance ray tracing kernels"
9+
arch=('aarch64')
10+
url="https://embree.github.io/"
11+
license=('Apache')
12+
depends=('gcc-libs' 'glibc' 'intel-tbb')
13+
makedepends=('cmake' 'ispc' 'freeglut' 'libxmu' 'ninja')
14+
source=(https://github.com/embree/embree/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
15+
sha256sums=('8a3bc3c3e21aa209d9861a28f8ba93b2f82ed0dc93341dddac09f1f03c36ef2d')
16+
17+
build() {
18+
# Embree detects actual ISA at runtime but we have to set a high maximum
19+
# buildtime version as it would otherwise default to the builder processor.
20+
cmake \
21+
-B build \
22+
-G Ninja \
23+
-S ${pkgname}-${pkgver} \
24+
-DCMAKE_INSTALL_PREFIX=/usr \
25+
-DCMAKE_BUILD_TYPE=Release \
26+
-DEMBREE_ISPC_SUPPORT=ON \
27+
-DEMBREE_TUTORIALS=OFF \
28+
-DEMBREE_MAX_ISA="NEON2X" \
29+
-DEMBREE_BACKFACE_CULLING=OFF
30+
ninja -C build
31+
# Maybe enable these later once they are out of beta:
32+
# -DEMBREE_SYCL_SUPPORT=ON \
33+
# -DEMBREE_SYCL_LARGEGRF=ON
34+
}
35+
36+
package() {
37+
DESTDIR="${pkgdir}" ninja -C build install
38+
39+
mkdir "${pkgdir}"/usr/bin/
40+
mv "${pkgdir}"/usr/embree-vars.* "${pkgdir}"/usr/bin/
41+
}

alarmcn/embree/lilac.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python3
2+
3+
from types import SimpleNamespace
4+
5+
from lilaclib import *
6+
7+
g = SimpleNamespace()
8+
9+
def pre_build():
10+
g.files = download_official_pkgbuild('embree')
11+
12+
for line in edit_file('PKGBUILD'):
13+
line = line.replace('AVX512SKX', 'NEON2X')
14+
if line.startswith('arch='):
15+
line = 'arch=(aarch64 x86_64)'
16+
print(line)
17+
18+
def post_build():
19+
git_add_files([f for f in g.files if not f.startswith(".")])
20+
git_commit()

alarmcn/embree/lilac.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
maintainers:
2+
- github: yuyichao
3+
4+
post_build: git_pkgbuild_commit
5+
6+
repo_depends:
7+
- ispc
8+
9+
update_on:
10+
# Note that we need to get the official package and not the archlinux arm package
11+
- source: archpkg
12+
archpkg: embree
13+
- source: manual
14+
manual: 1

alarmcn/ispc/PKGBUILD

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Maintainer: Lukas Jirkovsky <[email protected]>
2+
# Maintainer: Bruno Pagani <[email protected]>
3+
# Maintainer: Torsten Keßler <[email protected]>
4+
5+
pkgname=ispc
6+
pkgver=1.25.3
7+
pkgrel=1
8+
pkgdesc="Compiler for high-performance SIMD programming on the CPU"
9+
arch=(aarch64)
10+
url="https://ispc.github.io/"
11+
license=(BSD-3-Clause)
12+
depends=(clang gcc-libs glibc llvm-libs spirv-llvm-translator onetbb)
13+
makedepends=(cmake git level-zero-headers level-zero-loader llvm openmp python vc-intrinsics)
14+
_checkdepends=(intel-compute-runtime)
15+
optdepends=(
16+
'intel-compute-runtime: GPU support'
17+
'level-zero-loader: GPU support'
18+
'openmp: GPU support'
19+
)
20+
# NOTE: libispcrt_static.a is required by ospray during build time
21+
options=(staticlibs)
22+
source=(
23+
git+https://github.com/$pkgname/$pkgname#tag=v$pkgver
24+
$pkgname-benchmark::git+https://github.com/google/benchmark.git
25+
$pkgname-googletest::git+https://github.com/google/googletest.git
26+
)
27+
sha256sums=('7f663afbba105013c7c859d46b1111ae25a2c7d349202994b3105ee59d7dc9a7'
28+
'SKIP'
29+
'SKIP')
30+
31+
prepare() {
32+
cd $pkgname
33+
git submodule init
34+
git config submodule.benchmarks/vendor/google/benchmark.url "$srcdir/$pkgname-benchmark"
35+
git config submodule.ispcrt/tests/vendor/google/googletest.url "$srcdir/$pkgname-googletest"
36+
git -c protocol.file.allow=always submodule update
37+
38+
git cherry-pick -n \
39+
62426bf5a50a49b30a4eb0206e8a8d78ff0e7006 \
40+
5422fc1f6e7caa74906e612f5803287be5bb915f \
41+
17ee83fba824eaee79065256c49fbfc21f730d01 \
42+
cb097ab5821c4219349b37a5c217e3df3d3987f1
43+
}
44+
45+
build() {
46+
local cmake_options=(
47+
-B build
48+
-D CMAKE_BUILD_TYPE=Release # None not allowed :(
49+
-D CMAKE_INSTALL_PREFIX=/usr
50+
-D ISPC_INCLUDE_EXAMPLES=OFF
51+
-D ISPC_INCLUDE_XE_EXAMPLES=OFF
52+
-D ISPC_OPAQUE_PTR_MODE=OFF # suggested in https://github.com/ispc/ispc/issues/2427
53+
-D ISPC_STATIC_LINK=OFF
54+
-D XE_ENABLED=ON
55+
-D XE_DEPS_DIR=/usr
56+
-S $pkgname
57+
-W no-dev
58+
)
59+
60+
cmake "${cmake_options[@]}"
61+
cmake --build build --verbose
62+
}
63+
64+
_check() {
65+
# https://github.com/ispc/ispc/issues/2427
66+
# https://github.com/ispc/ispc/issues/2428
67+
# https://github.com/ispc/ispc/issues/2429
68+
make -C build check-all || echo "Tests failed"
69+
}
70+
71+
package() {
72+
DESTDIR="$pkgdir" cmake --install build
73+
install -Dm644 $pkgname/LICENSE.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}
74+
}

alarmcn/ispc/lilac.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env python3
2+
3+
from types import SimpleNamespace
4+
import re
5+
6+
from lilaclib import *
7+
8+
g = SimpleNamespace()
9+
10+
def pre_build():
11+
g.files = download_official_pkgbuild('ispc')
12+
13+
for line in edit_file('PKGBUILD'):
14+
line = re.sub(r'\blib32-glibc\b', '', line)
15+
if line.startswith('checkdepends=') or line.startswith('check()'):
16+
line = '_' + line
17+
if line.lstrip().startswith('local cmake_options=('):
18+
line = line + " -D ISPC_INCLUDE_XE_EXAMPLES=OFF"
19+
if line.startswith('arch='):
20+
line = 'arch=(aarch64 x86_64)'
21+
print(line)
22+
23+
def post_build():
24+
git_add_files([f for f in g.files if not f.startswith(".")])
25+
git_commit()

alarmcn/ispc/lilac.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
maintainers:
2+
- github: yuyichao
3+
4+
post_build: git_pkgbuild_commit
5+
6+
update_on:
7+
# Note that we need to get the official package and not the archlinux arm package
8+
- source: archpkg
9+
archpkg: ispc
10+
- source: manual
11+
manual: 1

alarmcn/materialx/PKGBUILD

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Maintainer: Sven-Hendrik Haase <[email protected]>
2+
# Contributor: Adrià Cabello <adro.cc79 at protonmail dot com>
3+
# Contributor: Fabio Loli <[email protected]>
4+
5+
pkgname=materialx
6+
pkgver=1.38.10
7+
pkgrel=6
8+
pkgdesc="Open standard for representing rich material and look-development content in computer graphics"
9+
arch=(aarch64)
10+
url="https://materialx.org/"
11+
license=('Apache')
12+
depends=('glibc' 'gcc-libs' 'glfw' 'libglvnd' 'libx11' 'libxt' 'python'
13+
'python-setuptools' 'opencolorio' 'dos2unix' 'zenity')
14+
makedepends=('cmake' 'chrpath' 'libxinerama' 'libxcursor' 'pybind11' 'ninja')
15+
source=("https://github.com/AcademySoftwareFoundation/MaterialX/releases/download/v${pkgver}/MaterialX-${pkgver}.tar.gz"
16+
"materialx-grapheditor.desktop"
17+
"materialx-view.desktop"
18+
"materialx.xml")
19+
sha256sums=('f7f2aa7587ae63eb095cef35d202d23df341e3d67c8c458357d2a555d76c69f2'
20+
'88e5ecafa8088b90f799b49c36af59f8462ca7426cdec58215332ee283556ddb'
21+
'2f2b675540fea39a749f89083a9c341319c1f7b478fbb049a77bd66c29b2ee01'
22+
'd9b9426fb94121da052b796542cc74a0c5d7cef06997be70611c25f345553861')
23+
24+
_pyver=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
25+
26+
prepare() {
27+
cd MaterialX-${pkgver}
28+
29+
# Repath
30+
sed -i 's|CMAKE_INSTALL_PREFIX|CMAKE_BINARY_DIR|g' python/CMakeLists.txt
31+
32+
sed -i 's|resources|/usr/share/materialx/resources|g' source/MaterialXView/{Main.cpp,Viewer.cpp}
33+
sed -i 's|"libraries"|"/usr/share/materialx/libraries"|g' source/MaterialXView/Main.cpp
34+
sed -i 's|resources|/usr/share/materialx/resources|g' source/MaterialXGraphEditor/{Main.cpp,Graph.cpp}
35+
sed -i 's|"libraries"|"/usr/share/materialx/libraries"|g' source/MaterialXGraphEditor/{Main.cpp,Graph.cpp}
36+
sed -i 's|"libraries"|"/usr/share/materialx/libraries"|g' source/MaterialXGenShader/GenOptions.h
37+
38+
dos2unix python/Scripts/*
39+
}
40+
41+
build() {
42+
cmake -S MaterialX-${pkgver} -B build -G Ninja \
43+
-DCMAKE_INSTALL_PREFIX=/usr \
44+
-DCMAKE_SKIP_INSTALL_RPATH=ON \
45+
-DCMAKE_SKIP_RPATH=ON \
46+
-Wno-dev \
47+
-DMATERIALX_BUILD_SHARED_LIBS=ON \
48+
-DMATERIALX_BUILD_PYTHON=ON \
49+
-DMATERIALX_BUILD_VIEWER=ON \
50+
-DMATERIALX_BUILD_GRAPH_EDITOR=ON \
51+
-DNANOGUI_NATIVE_FLAGS="-march=armv8-a"
52+
53+
cmake --build build
54+
}
55+
56+
package() {
57+
DESTDIR=${pkgdir} cmake --install build
58+
59+
find ${pkgdir} -type f -name "README.md" -exec rm {} \;
60+
rm ${pkgdir}/usr/CHANGELOG.md
61+
62+
for file in ${pkgdir}/usr/python/Scripts/*; do
63+
name="${file%.py}"
64+
chmod +x "$file"
65+
mv "$file" $name
66+
done
67+
68+
mkdir -p ${pkgdir}/usr/share/$pkgname
69+
mv ${pkgdir}/usr/resources ${pkgdir}/usr/share/$pkgname/resources
70+
mv ${pkgdir}/usr/libraries ${pkgdir}/usr/share/$pkgname/libraries
71+
72+
cp ${pkgdir}/usr/python/Scripts/* ${pkgdir}/usr/bin
73+
rm -r ${pkgdir}/usr/python/Scripts
74+
75+
mkdir -p ${pkgdir}/usr/lib/python$_pyver
76+
mv ${pkgdir}/usr/python $_/site-packages
77+
78+
install -Dm755 ${srcdir}/MaterialX-${pkgver}/documents/Images/MaterialXLogo_200x155.png ${pkgdir}/usr/share/icons/hicolor/256x256/apps/materialx.png
79+
80+
# Fix CMake configs
81+
sed -i 's|libraries|share/materialx/libraries|g' ${pkgdir}/usr/lib/cmake/MaterialX/MaterialXConfig.cmake
82+
sed -i 's|python|lib/python'$_pyver'/site-packages/MaterialX|g' ${pkgdir}/usr/lib/cmake/MaterialX/MaterialXConfig.cmake
83+
sed -i 's|resources|share/materialx/resources|g' ${pkgdir}/usr/lib/cmake/MaterialX/MaterialXConfig.cmake
84+
85+
mkdir -p ${pkgdir}/usr/share/{applications,mime/model,licenses/$pkgname}
86+
cp ${srcdir}/{materialx-grapheditor.desktop,materialx-view.desktop} ${pkgdir}/usr/share/applications
87+
install -Dm644 ${srcdir}/materialx.xml ${pkgdir}/usr/share/mime/model/materialx.xml
88+
mv ${pkgdir}/usr/{LICENSE,THIRD-PARTY.md} ${pkgdir}/usr/share/licenses/materialx/
89+
90+
# Remove junk
91+
rm -rf ${pkgdir}/build
92+
93+
# Remove empty dirs
94+
find ${pkgdir}/usr -empty -type d -delete
95+
}

alarmcn/materialx/lilac.py

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env python3
2+
3+
from types import SimpleNamespace
4+
5+
from lilaclib import *
6+
7+
g = SimpleNamespace()
8+
9+
def pre_build():
10+
g.files = download_official_pkgbuild('materialx')
11+
12+
in_build = False
13+
patched = False
14+
for line in edit_file('PKGBUILD'):
15+
if line.startswith('build()'):
16+
in_build = True
17+
if in_build and not patched:
18+
if line.lstrip().startswith('cmake '):
19+
patched = True
20+
line = ' cmake -DNANOGUI_NATIVE_FLAGS=-march=armv8-a' + line.lstrip().lstrip('cmake')
21+
if line.startswith('arch='):
22+
line = 'arch=(aarch64 x86_64)'
23+
print(line)
24+
25+
def post_build():
26+
git_add_files([f for f in g.files if not f.startswith(".")])
27+
git_commit()

alarmcn/materialx/lilac.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
maintainers:
2+
- github: yuyichao
3+
4+
post_build: git_pkgbuild_commit
5+
6+
update_on:
7+
# Note that we need to get the official package and not the archlinux arm package
8+
- source: archpkg
9+
archpkg: materialx
10+
- source: manual
11+
manual: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Desktop Entry]
2+
Comment=A simple MaterialX Editor
3+
Exec=MaterialXGraphEditor --material
4+
GenericName=MaterialX Graph Editor
5+
Icon=materialx
6+
MimeType=model/materialx;
7+
Name[en_US]=MaterialX Graph Editor
8+
Name=MaterialX Graph Editor
9+
NoDisplay=true
10+
StartupNotify=true
11+
Terminal=false
12+
Type=Application
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Desktop Entry]
2+
Comment=Default Viewer for MaterialX Shaders
3+
Exec=MaterialXView --material
4+
GenericName=MaterialX Viewer
5+
Icon=materialx
6+
MimeType=model/materialx;
7+
Name=MaterialX Viewer
8+
NoDisplay=true
9+
StartupNotify=true
10+
Terminal=false
11+
Type=Application

alarmcn/materialx/materialx.xml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="model/materialx">
3+
<comment>MaterialX Shading Network</comment>
4+
<icon name="materialx"/>
5+
<glob-deleteall/>
6+
<glob pattern="*.MTLX"/>
7+
<glob pattern="*.mtlx"/>
8+
</mime-type>

0 commit comments

Comments
 (0)