Sfoglia il codice sorgente

feat(deps): add flex-2.6.4 source code

clanker 1 mese fa
parent
commit
cbe3b56f0e

+ 79 - 0
flex-2.6.4/MANIFEST.usm

@@ -0,0 +1,79 @@
+{
+  "provides" : {
+    "locale:eo/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:pt_BR/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:es/LC_MESSAGES/flex.mo" : "as-expected",
+    "man:man1/flex.1" : "as-expected",
+    "lib:libfl.so.2.0.0" : "as-expected",
+    "res:doc/flex-2.6.4/NEWS" : "as-expected",
+    "locale:fi/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:zh_CN/LC_MESSAGES/flex.mo" : "as-expected",
+    "bin:lex" : "as-expected",
+    "locale:fr/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:nl/LC_MESSAGES/flex.mo" : "as-expected",
+    "info:dir" : "as-expected",
+    "locale:vi/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:ro/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:ca/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:ru/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:ga/LC_MESSAGES/flex.mo" : "as-expected",
+    "bin:flex++" : "as-expected",
+    "locale:ko/LC_MESSAGES/flex.mo" : "as-expected",
+    "bin:flex" : "as-expected",
+    "locale:en@quot/LC_MESSAGES/flex.mo" : "as-expected",
+    "lib:libfl.so.2" : "as-expected",
+    "locale:da/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:sr/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:de/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:sv/LC_MESSAGES/flex.mo" : "as-expected",
+    "res:doc/flex-2.6.4/AUTHORS" : "as-expected",
+    "locale:zh_TW/LC_MESSAGES/flex.mo" : "as-expected",
+    "res:doc/flex-2.6.4/README.md" : "as-expected",
+    "locale:hr/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:pl/LC_MESSAGES/flex.mo" : "as-expected",
+    "locale:en@boldquot/LC_MESSAGES/flex.mo" : "as-expected",
+    "res:doc/flex-2.6.4/COPYING" : "as-expected",
+    "lib:libfl.so" : "as-expected",
+    "info:flex.info-1" : "as-expected",
+    "info:flex.info-2" : "as-expected",
+    "info:flex.info" : "as-expected",
+    "locale:tr/LC_MESSAGES/flex.mo" : "as-expected",
+    "lib:libfl.la" : "as-expected",
+    "res:doc/flex-2.6.4/ONEWS" : "as-expected",
+    "inc:FlexLexer.h" : "as-expected",
+    "man:man1/lex.1" : "as-expected"
+  },
+  "flags" : [
+    "simpleBuildEnvironment"
+  ],
+  "summary" : "A tool for generating programs that recognize patterns in text",
+  "name" : "flex",
+  "md" : "PACKAGE.md",
+  "depends" : {
+    "build" : [
+      "bin:gcc",
+      "bin:make",
+      "bin:grep",
+      "bin:sed"
+    ],
+    "runtime" : [
+      "lib:libc.so.6",
+      "lib:libm.so.6"
+    ],
+    "manage" : [
+      "bin:mkdir",
+      "bin:rm",
+      "bin:bash",
+      "bin:wget",
+      "bin:tar"
+    ]
+  },
+  "url" : "https://github.com/westes/flex",
+  "version" : "2.6.4",
+  "execs" : {
+    "build" : "usm-scripts/build.sh",
+    "test" : "usm-scripts/test.sh",
+    "install" : "usm-scripts/install.sh",
+    "acquire" : "usm-scripts/acquire.sh"
+  }
+}

+ 39 - 0
flex-2.6.4/PACKAGE.md

@@ -0,0 +1,39 @@
+# Flex
+
+Flex (Fast Lexical Analyzer Generator) is a tool for generating programs that recognize patterns in text. It allows for the versatility to specify the rules for pattern-finding, eradicating the need to develop a specialized program.
+
+## Description
+
+Flex is a free software alternative to the classic lex tool. It generates C source code for scanners that can recognize regular expressions. The generated scanners are highly efficient and suitable for use in a wide variety of applications, from simple text processing to complex lexical analysis in compilers.
+
+## Features
+
+- Fast lexical analyzer generation
+- Compatible with original lex specifications
+- Generates efficient C code
+- Supports extended regular expressions
+- Cross-platform compatibility
+- Active development and maintenance
+
+## Installed Programs
+
+- **flex**: The main lexical analyzer generator
+- **flex++**: A symbolic link to flex for C++ code generation
+- **lex**: A symbolic link to flex for lex compatibility mode
+
+## Installed Libraries
+
+- **libfl.so**: The flex library containing support functions
+
+## Documentation
+
+Comprehensive documentation is installed in `/usr/share/doc/flex-2.6.4/` including:
+
+- Manual pages
+- Examples
+- Technical documentation
+- FAQ
+
+## Compatibility
+
+Flex maintains compatibility with the original lex tool while providing many enhancements and improvements. Programs that expect lex can use the provided lex symbolic link.

+ 29 - 0
flex-2.6.4/usm-scripts/acquire.sh

@@ -0,0 +1,29 @@
+#!/bin/bash
+set -e
+
+# Flex source acquisition script
+# Downloads and extracts flex-2.6.4 source code
+
+ARCHIVE_URL="https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz"
+ARCHIVE_NAME="flex-2.6.4.tar.gz"
+SOURCE_DIR="sources"
+EXTRACT_DIR="flex"
+
+echo "Downloading flex source..."
+wget -O ${ARCHIVE_NAME} ${ARCHIVE_URL}
+
+echo "Creating source directory..."
+mkdir -p ${SOURCE_DIR}
+
+echo "Extracting archive..."
+tar -xzf ${ARCHIVE_NAME} -C ${SOURCE_DIR}
+
+# Rename to expected directory name if needed
+if [ -d "${SOURCE_DIR}/flex-2.6.4" ]; then
+    mv "${SOURCE_DIR}/flex-2.6.4" "${SOURCE_DIR}/${EXTRACT_DIR}"
+fi
+
+echo "Cleaning up..."
+rm ${ARCHIVE_NAME}
+
+echo "Source acquisition complete."

+ 22 - 0
flex-2.6.4/usm-scripts/build.sh

@@ -0,0 +1,22 @@
+#!/bin/bash
+set -e
+
+# Flex build script
+# Configures and builds flex-2.6.4
+
+build_dir=$1
+
+echo "Building flex in ${build_dir}..."
+
+# Change to source directory
+cd sources/flex
+
+echo "Configuring flex..."
+./configure --prefix=${PREFIX} \
+            --docdir=${PREFIX}/share/doc/flex-2.6.4 \
+            --disable-static
+
+echo "Compiling flex..."
+make
+
+echo "Build complete."

+ 23 - 0
flex-2.6.4/usm-scripts/install.sh

@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+# Flex install script
+# Installs flex-2.6.4 to the specified directory
+
+build_dir=$1
+install_dir=$2
+install_type=$3
+
+echo "Installing flex to ${install_dir}..."
+
+# Change to source directory
+cd sources/flex
+
+echo "Running make install..."
+make DESTDIR=${install_dir} install
+
+echo "Creating lex compatibility links..."
+ln -sv flex ${install_dir}${PREFIX}/bin/lex
+ln -sv flex.1 ${install_dir}${PREFIX}/share/man/man1/lex.1
+
+echo "Installation complete."

+ 17 - 0
flex-2.6.4/usm-scripts/test.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+set -e
+
+# Flex test script
+# Runs the flex test suite
+
+build_dir=$1
+
+echo "Running flex test suite..."
+
+# Change to source directory
+cd sources/flex
+
+echo "Executing make check..."
+make check
+
+echo "Tests completed successfully."

+ 1 - 1
prompt-enhanced.md

@@ -60,7 +60,7 @@ LFS References:
 2. Execute `usm manifest acquire` in package directory
 3. Fix any errors
 4. Execute `usm manifest autoprovides --replace --debug` in package directory
-5. Verify `provides` was populated
+5. Verify `provides` was populated correctly. Missing entries indicate a problem with the `install` script.
 6. Fix any errors
 7. Verify compliance with Astrologue standards