diff --git a/vc4asm/README.md b/vc4asm/README.md new file mode 100644 index 0000000..16804f4 --- /dev/null +++ b/vc4asm/README.md @@ -0,0 +1,33 @@ +# vc4asm + +Macro assembler for Broadcom VideoCore IV (Raspberry Pi GPU). + +## Description + +vc4asm is an assembler and disassembler for the VideoCore IV GPU found in Raspberry Pi models 0-3. It allows writing QPU (Quad Processing Unit) assembly code for GPU compute tasks. + +## Upstream + +- **Homepage:** https://maazl.de/project/vc4asm/doc/index.html +- **Source:** https://github.com/maazl/vc4asm + +## Included tools + +- `vc4asm` — Assembler +- `vc4dis` — Disassembler +- `libvc4asm.so` / `libvc4asm.a` — Library + +## Usage + +```bash +# Assemble QPU code +vc4asm -o output.bin -V /usr/share/vc4inc/vc4.qinc input.qasm + +# Disassemble +vc4dis -o output.qasm input.bin +``` + +## Notes + +- Based on [Homebrew formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/v/vc4asm.rb) +- Includes GCC 9+ compatibility patch diff --git a/vc4asm/lure.sh b/vc4asm/lure.sh new file mode 100644 index 0000000..d1c85cd --- /dev/null +++ b/vc4asm/lure.sh @@ -0,0 +1,55 @@ +name="vc4asm" +version="0.3" +release="1" +desc="Macro assembler for Broadcom VideoCore IV aka Raspberry Pi GPU" +homepage="https://maazl.de/project/vc4asm/doc/index.html" +maintainer="Your Name " +architectures=("all") +license=("GPL-3.0-or-later") +provides=("vc4asm") +conflicts=("vc4asm") + +# Build Dependencies +build_deps=("cmake" "build-essential") + +# Runtime Dependencies (minimal) +deps=() + +# Sources: tarball + patch from GitHub raw URL +# The patch file will be downloaded to $srcdir with filename derived from URL +sources=( + "https://github.com/maazl/vc4asm/archive/refs/tags/V${version}.tar.gz" + "https://github.com/maazl/vc4asm/commit/ff16f635b07e14b07c1de69bf322e3bf7feecd93.patch" +) +checksums=( + "sha256:f712fb27eb1b7d46b75db298fd50bb62905ccbdd7c0c7d27728596c496f031c2" + "sha256:aac41ac1f58e9c08cef7b67c9e1a8df33c53acb951be003597bc0f2b9a9621b6" +) + +prepare() { + cd "$srcdir/vc4asm-${version}" + + # Apply GCC 9+ compatibility patch + # The patch is downloaded to $srcdir with the commit hash as filename + patch -p1 < "$srcdir/ff16f635b07e14b07c1de69bf322e3bf7feecd93.patch" + + # Critical Fix: Upstream includes a *directory* named CMakeCache.txt in the tarball + # which prevents CMake from generating its cache file. We must remove it. + rm -rf CMakeCache.txt +} + +build() { + cd "$srcdir/vc4asm-${version}" + + cmake -B build -S . \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + cmake --build build +} + +package() { + cd "$srcdir/vc4asm-${version}" + DESTDIR="$pkgdir" cmake --install build +} diff --git a/vc4asm/vc4asm_0.3-1_all.deb b/vc4asm/vc4asm_0.3-1_all.deb new file mode 100644 index 0000000..0c3a5e5 Binary files /dev/null and b/vc4asm/vc4asm_0.3-1_all.deb differ diff --git a/vcpkg-git/lure.sh b/vcpkg-git/lure.sh new file mode 100644 index 0000000..ff30dc8 --- /dev/null +++ b/vcpkg-git/lure.sh @@ -0,0 +1,75 @@ +name="vcpkg-git" +version="0.0.0" +release="2" +desc="C++ library manager for Windows, Linux, and MacOS" +homepage="https://github.com/microsoft/vcpkg" +maintainer="Your Name " +architectures=("amd64" "arm64") +license=("MIT") +provides=("vcpkg") +conflicts=("vcpkg") + +# Build Dependencies +build_deps=("git" "cmake" "ninja-build" "curl" "zip" "unzip" "build-essential" "ca-certificates") + +# Runtime Dependencies +deps=("curl" "zip" "unzip" "git") + +sources=("git+https://github.com/microsoft/vcpkg.git") +checksums=("SKIP") + +version() { + cd "$srcdir/vcpkg" + if git describe --long --tags >/dev/null 2>&1; then + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' + else + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git describe --always)" + fi +} + +prepare() { + cat <"$srcdir/vcpkg_wrapper.sh" +#!/bin/sh +export VCPKG_ROOT="/opt/vcpkg" +[ -z "\$VCPKG_DOWNLOADS" ] && export VCPKG_DOWNLOADS="/var/cache/vcpkg" +exec /opt/vcpkg/vcpkg "\$@" +EOF +} + +build() { + cd "$srcdir/vcpkg" + # Force system binaries via environment variable since the flag was ignored + export VCPKG_USE_SYSTEM_BINARIES=1 + + # Bootstrap the binary + ./bootstrap-vcpkg.sh -disableMetrics +} + +package() { + # Define paths without 'local' keyword to avoid shell issues + VCPKG_ROOT="/opt/vcpkg" + VCPKG_DOWNLOADS="/var/cache/vcpkg" + + # 1. Install Wrapper Script + install -Dm755 "$srcdir/vcpkg_wrapper.sh" "$pkgdir/usr/bin/vcpkg" + + # 2. Install Main Binary + # We look for the binary in the source root + install -Dm755 "$srcdir/vcpkg/vcpkg" "$pkgdir/$VCPKG_ROOT/vcpkg" + + # 3. Copy required support directories + mkdir -p "$pkgdir/$VCPKG_ROOT" + cp -r "$srcdir/vcpkg/ports" "$pkgdir/$VCPKG_ROOT/" + cp -r "$srcdir/vcpkg/scripts" "$pkgdir/$VCPKG_ROOT/" + cp -r "$srcdir/vcpkg/triplets" "$pkgdir/$VCPKG_ROOT/" + cp -r "$srcdir/vcpkg/versions" "$pkgdir/$VCPKG_ROOT/" 2>/dev/null || true # Copy versions if it exists + + # Create the marker file + touch "$pkgdir/$VCPKG_ROOT/.vcpkg-root" + + # 4. Create Cache Directory with sticky bit + install -dm1777 "$pkgdir/$VCPKG_DOWNLOADS" + + # 5. Install License + install -Dm644 "$srcdir/vcpkg/LICENSE.txt" "$pkgdir/usr/share/licenses/$name/LICENSE" +}