Quellcode durchsuchen

feat(deps): add lz4-1.10.0 source code

clanker vor 1 Monat
Ursprung
Commit
86f1c9c478

+ 46 - 0
lz4-1.10.0/MANIFEST.usm

@@ -0,0 +1,46 @@
+{
+  "provides" : {
+    "lib:liblz4.so.1.10.0" : "as-expected",
+    "pc:liblz4.pc" : "as-expected",
+    "man:man1/lz4cat.1" : "as-expected",
+    "inc:lz4.h" : "as-expected",
+    "bin:lz4cat" : "as-expected",
+    "man:man1/lz4.1" : "as-expected",
+    "bin:lz4" : "as-expected",
+    "man:man1/lz4c.1" : "as-expected",
+    "inc:lz4hc.h" : "as-expected",
+    "inc:lz4frame.h" : "as-expected",
+    "lib:liblz4.so.1" : "as-expected",
+    "lib:liblz4.so" : "as-expected",
+    "bin:lz4c" : "as-expected",
+    "bin:unlz4" : "as-expected",
+    "man:man1/unlz4.1" : "as-expected"
+  },
+  "flags" : [
+    "simpleBuildEnvironment"
+  ],
+  "summary" : "Extremely fast compression algorithm",
+  "name" : "lz4",
+  "md" : "PACKAGE.md",
+  "depends" : {
+    "build" : [
+      "bin:make",
+      "bin:gcc"
+    ],
+    "runtime" : [
+      "lib:libc.so.6"
+    ],
+    "manage" : [
+      "bin:wget",
+      "bin:tar"
+    ]
+  },
+  "url" : "https://github.com/lz4/lz4",
+  "version" : "1.10.0",
+  "execs" : {
+    "build" : "usm-scripts/build.sh",
+    "test" : "usm-scripts/test.sh",
+    "install" : "usm-scripts/install.sh",
+    "acquire" : "usm-scripts/acquire.sh"
+  }
+}

+ 58 - 0
lz4-1.10.0/PACKAGE.md

@@ -0,0 +1,58 @@
+# LZ4
+
+LZ4 is a lossless compression algorithm, providing compression speed greater than 500 MB/s per core. It features an extremely fast decoder, with speed in multiple GB/s per core. LZ4 can work with Zstandard to allow both algorithms to compress data faster.
+
+## Features
+
+- Extremely fast compression (500+ MB/s per core)
+- Very fast decoder (multi-GB/s per core)
+- Lossless compression algorithm
+- Compatible with Zstandard
+- Streaming compression support
+- Frame format for integrity checking
+
+## Installed Programs
+
+- `lz4` - Compresses or decompresses files using the LZ4 format
+- `lz4c` - Compresses files using the LZ4 format (link to lz4)
+- `lz4cat` - Lists the contents of a file compressed using the LZ4 format (link to lz4)
+- `unlz4` - Decompresses files using the LZ4 format (link to lz4)
+
+## Installed Library
+
+- `liblz4.so` - The library implementing lossless data compression, using the LZ4 algorithm
+
+## Usage Examples
+
+### Basic Compression
+```bash
+# Compress a file
+lz4 file.txt file.txt.lz4
+
+# Decompress a file
+lz4 -d file.txt.lz4 file.txt
+```
+
+### Using with pipes
+```bash
+# Compress output of a command
+tar -cf - /path/to/directory | lz4 > archive.tar.lz4
+
+# Decompress to pipe
+lz4 -d archive.tar.lz4 | tar -xf -
+```
+
+### Using the library
+The LZ4 library can be used in C/C++ applications to provide fast compression and decompression capabilities.
+
+## Performance
+
+LZ4 is designed for speed-critical applications where compression ratio is secondary. It offers:
+
+- Compression speeds over 500 MB/s per core
+- Decompression speeds over 1 GB/s per core
+- Trade-off between compression speed and ratio
+
+## License
+
+This package is distributed under the BSD 2-Clause License.

+ 23 - 0
lz4-1.10.0/usm-scripts/acquire.sh

@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+ARCHIVE_URL="https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz"
+ARCHIVE_NAME="lz4-1.10.0.tar.gz"
+EXTRACT_DIR="sources/lz4"
+
+echo "Downloading LZ4 source..."
+wget -O ${ARCHIVE_NAME} ${ARCHIVE_URL}
+
+echo "Extracting archive..."
+mkdir -p sources
+tar -xzf ${ARCHIVE_NAME}
+
+# Rename the extracted directory to match our expected name
+if [ -d "lz4-1.10.0" ]; then
+    mv lz4-1.10.0 ${EXTRACT_DIR}
+fi
+
+echo "Cleaning up..."
+rm ${ARCHIVE_NAME}
+
+echo "Source acquisition complete."

+ 27 - 0
lz4-1.10.0/usm-scripts/build.sh

@@ -0,0 +1,27 @@
+#!/bin/bash
+set -e
+
+build_dir=$1
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# The source tree has been copied here by USM from sources/lz4
+echo "Building LZ4 in ${build_dir}..."
+
+# Check if we need to navigate to the lz4 source directory
+if [ ! -f "./Makefile" ]; then
+    if [ -d "sources/lz4" ]; then
+        cd sources/lz4
+    elif [ -d "lz4" ]; then
+        cd lz4
+    else
+        echo "Error: Makefile not found"
+        echo "Contents of current directory:"
+        ls -la
+        exit 1
+    fi
+fi
+
+# Build according to LFS instructions
+make BUILD_STATIC=no PREFIX=${PREFIX}
+
+echo "Build complete."

+ 28 - 0
lz4-1.10.0/usm-scripts/install.sh

@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e
+
+build_dir=$1
+install_dir=$2
+install_type=$3
+
+# With simpleBuildEnvironment flag, we're already in build directory
+echo "Installing LZ4 to ${install_dir}..."
+
+# Check if we need to navigate to lz4 source directory
+if [ ! -f "./Makefile" ]; then
+    if [ -d "sources/lz4" ]; then
+        cd sources/lz4
+    elif [ -d "lz4" ]; then
+        cd lz4
+    else
+        echo "Error: Makefile not found"
+        echo "Contents of current directory:"
+        ls -la
+        exit 1
+    fi
+fi
+
+# Install according to LFS instructions
+make BUILD_STATIC=no PREFIX=${PREFIX} DESTDIR=${install_dir}/${PREFIX}/ install
+
+echo "Installation complete."

+ 26 - 0
lz4-1.10.0/usm-scripts/test.sh

@@ -0,0 +1,26 @@
+#!/bin/bash
+set -e
+
+build_dir=$1
+
+# With simpleBuildEnvironment flag, we're already in build directory
+echo "Running LZ4 tests..."
+
+# Check if we need to navigate to lz4 source directory
+if [ ! -f "./Makefile" ]; then
+    if [ -d "sources/lz4" ]; then
+        cd sources/lz4
+    elif [ -d "lz4" ]; then
+        cd lz4
+    else
+        echo "Error: Makefile not found"
+        echo "Contents of current directory:"
+        ls -la
+        exit 1
+    fi
+fi
+
+# Run tests according to LFS instructions
+make -j1 check
+
+echo "All tests passed."

+ 4 - 1
prompt-enhanced.md

@@ -52,7 +52,10 @@ LFS References:
 1. Create complete package structure
 2. Execute `usm manifest acquire` in package directory
 3. Fix any errors
-4. Verify compliance with Astrologue standards
+4. Execute `usm manifest autoprovides --replace --debug` in package directory
+5. Verify `provides` was populated
+6. Fix any errors
+7. Verify compliance with Astrologue standards
 
 **PACKAGE SPECIFICATION:**