Преглед изворни кода

feat(deps): add m4-1.4.20 source code

clanker пре 1 месец
родитељ
комит
0943084271

+ 67 - 0
m4-1.4.20/MANIFEST.usm

@@ -0,0 +1,67 @@
+{
+  "provides" : {
+    "locale:da/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:sr/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:bg/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:de/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:ja/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:sv/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:zh_TW/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:fi/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:zh_CN/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:fr/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:hr/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:nl/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:pl/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:vi/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:ro/LC_MESSAGES/m4.mo" : "as-expected",
+    "info:m4.info-1" : "as-expected",
+    "info:m4.info-2" : "as-expected",
+    "info:m4.info" : "as-expected",
+    "locale:ga/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:ru/LC_MESSAGES/m4.mo" : "as-expected",
+    "info:dir" : "as-expected",
+    "locale:id/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:ka/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:el/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:gl/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:eo/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:cs/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:pt_BR/LC_MESSAGES/m4.mo" : "as-expected",
+    "locale:es/LC_MESSAGES/m4.mo" : "as-expected",
+    "man:man1/m4.1" : "as-expected",
+    "locale:ko/LC_MESSAGES/m4.mo" : "as-expected",
+    "bin:m4" : "as-expected",
+    "locale:uk/LC_MESSAGES/m4.mo" : "as-expected"
+  },
+  "flags" : [
+    "simpleBuildEnvironment"
+  ],
+  "summary" : "GNU macro processor - copies files while expanding macros",
+  "name" : "m4",
+  "md" : "PACKAGE.md",
+  "depends" : {
+    "build" : [
+      "bin:gcc",
+      "bin:make",
+      "bin:automake",
+      "bin:aclocal"
+    ],
+    "runtime" : [
+      "lib:libc.so.6"
+    ],
+    "manage" : [
+      "bin:wget",
+      "bin:tar",
+      "bin:gzip"
+    ]
+  },
+  "url" : "https://www.gnu.org/software/m4/",
+  "version" : "1.4.20",
+  "execs" : {
+    "build" : "usm-scripts/build.sh",
+    "test" : "usm-scripts/test.sh",
+    "install" : "usm-scripts/install.sh",
+    "acquire" : "usm-scripts/acquire.sh"
+  }
+}

+ 36 - 0
m4-1.4.20/PACKAGE.md

@@ -0,0 +1,36 @@
+# GNU M4
+
+M4 is a powerful macro processor that copies files while expanding the macros that they contain. These macros are either built-in or user-defined and can take any number of arguments.
+
+## Features
+
+- Macro expansion with built-in and user-defined macros
+- File inclusion capabilities
+- Unix command execution
+- Integer arithmetic operations
+- Text manipulation functions
+- Recursion support
+- Can be used as a compiler front-end or standalone macro processor
+
+## Description
+
+The GNU M4 implementation of the traditional Unix macro processor is designed to be compatible with the original while providing many enhancements. M4 is particularly useful for:
+
+- Generating configuration files
+- Creating template-based code generation
+- Preprocessing source code
+- Building complex text processing pipelines
+
+## Installation
+
+This package installs the `m4` binary to `/usr/bin` along with supporting documentation and manual pages.
+
+## Usage
+
+Basic usage involves processing input files and expanding macros:
+
+```bash
+m4 input.txt > output.txt
+```
+
+M4 can be used interactively or in shell scripts, making it a versatile tool for system administration and software development tasks.

+ 27 - 0
m4-1.4.20/usm-scripts/acquire.sh

@@ -0,0 +1,27 @@
+#!/bin/bash
+set -e
+
+# M4 source acquisition script
+# Downloads and extracts the M4 source code
+
+PACKAGE_NAME="m4"
+VERSION="1.4.20"
+ARCHIVE_URL="https://ftp.gnu.org/gnu/m4/m4-${VERSION}.tar.xz"
+ARCHIVE_NAME="source.tar.xz"
+SOURCE_DIR="sources/${PACKAGE_NAME}"
+
+echo "Downloading M4 source code..."
+# Download the source archive using HTTPS only
+wget -O ${ARCHIVE_NAME} ${ARCHIVE_URL}
+
+echo "Creating source directory..."
+mkdir -p ${SOURCE_DIR}
+
+echo "Extracting archive..."
+# Extract to the sources directory
+tar -xf ${ARCHIVE_NAME} -C ${SOURCE_DIR} --strip-components=1
+
+echo "Cleaning up..."
+rm ${ARCHIVE_NAME}
+
+echo "M4 source acquisition complete."

+ 19 - 0
m4-1.4.20/usm-scripts/build.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+set -e
+
+# M4 build script
+# Configures and compiles the M4 package
+
+build_dir=$1
+
+# With simpleBuildEnvironment flag, we're in the build directory
+# but the source is still in sources/m4, need to go there
+cd sources/m4
+
+echo "Configuring M4..."
+./configure --prefix=${PREFIX}
+
+echo "Compiling M4..."
+make
+
+echo "M4 build complete."

+ 16 - 0
m4-1.4.20/usm-scripts/install.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+
+# M4 install script
+# Installs the compiled M4 package to the destination directory
+
+build_dir=$1
+install_dir=$2
+install_type=$3
+
+cd sources/m4
+echo "Installing M4 to ${install_dir}..."
+
+make DESTDIR=${install_dir} install
+
+echo "M4 installation complete."

+ 15 - 0
m4-1.4.20/usm-scripts/test.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+
+# M4 test script
+# Runs the test suite for M4 as recommended by LFS
+
+build_dir=$1
+
+
+cd sources/m4
+echo "Running M4 tests in $(pwd)..."
+
+make test
+
+echo "M4 tests completed successfully."