Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions vc4asm/README.md
Original file line number Diff line number Diff line change
@@ -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
55 changes: 55 additions & 0 deletions vc4asm/lure.sh
Original file line number Diff line number Diff line change
@@ -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 <email@example.com>"
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
}
Binary file added vc4asm/vc4asm_0.3-1_all.deb
Binary file not shown.
75 changes: 75 additions & 0 deletions vcpkg-git/lure.sh
Original file line number Diff line number Diff line change
@@ -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 <email@example.com>"
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 <<EOF >"$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"
}
Loading