浏览代码

feat(deps): add readline-8.3 source code

clanker 1 月之前
父节点
当前提交
cedfc64a94

+ 61 - 0
readline-8.3/MANIFEST.usm

@@ -0,0 +1,61 @@
+{
+  "provides" : {
+    "lib:libreadline.so" : "as-expected",
+    "inc:readline/chardefs.h" : "as-expected",
+    "inc:readline/rltypedefs.h" : "as-expected",
+    "pc:history.pc" : "as-expected",
+    "lib:libreadline.so.8.3" : "as-expected",
+    "man:man3/history.3" : "as-expected",
+    "lib:libhistory.so.8" : "as-expected",
+    "res:doc/readline-8.3/README" : "as-expected",
+    "info:history.info" : "as-expected",
+    "res:doc/readline-8.3/history.html" : "as-expected",
+    "info:rluserman.info" : "as-expected",
+    "man:man3/readline.3" : "as-expected",
+    "res:doc/readline-8.3/CHANGES" : "as-expected",
+    "res:doc/readline-8.3/INSTALL" : "as-expected",
+    "res:doc/readline-8.3/rluserman.html" : "as-expected",
+    "inc:readline/readline.h" : "as-expected",
+    "inc:readline/rlconf.h" : "as-expected",
+    "lib:libreadline.so.8" : "as-expected",
+    "info:readline.info" : "as-expected",
+    "info:dir" : "as-expected",
+    "inc:readline/rlstdc.h" : "as-expected",
+    "lib:libhistory.so" : "as-expected",
+    "res:doc/readline-8.3/readline.html" : "as-expected",
+    "inc:readline/history.h" : "as-expected",
+    "inc:readline/tilde.h" : "as-expected",
+    "lib:libhistory.so.8.3" : "as-expected",
+    "pc:readline.pc" : "as-expected",
+    "inc:readline/keymaps.h" : "as-expected"
+  },
+  "flags" : [
+    "simpleBuildEnvironment"
+  ],
+  "summary" : "A library that provides command line editing and history capabilities",
+  "name" : "readline",
+  "md" : "PACKAGE.md",
+  "depends" : {
+    "build" : [
+      "bin:gcc",
+      "bin:make",
+      "pc:ncursesw.pc"
+    ],
+    "runtime" : [
+      "lib:libncursesw.so.6"
+    ],
+    "manage" : [
+      "bin:bash",
+      "bin:wget",
+      "bin:tar",
+      "bin:gzip"
+    ]
+  },
+  "url" : "https://tiswww.case.edu/php/chet/readline/rltop.html",
+  "version" : "8.3",
+  "execs" : {
+    "build" : "usm-scripts/build.sh",
+    "install" : "usm-scripts/install.sh",
+    "acquire" : "usm-scripts/acquire.sh"
+  }
+}

+ 30 - 0
readline-8.3/PACKAGE.md

@@ -0,0 +1,30 @@
+# Readline
+
+The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. Readline includes a large number of useful features, including:
+
+- Command line editing and history navigation
+- Customizable key bindings
+- Tab completion support
+- Search capabilities through command history
+- Multi-line editing support
+
+## Features
+
+Readline is used by many command-line applications including bash, gdb, and various scripting languages. It provides a consistent interface for:
+
+- Moving the cursor within the current line
+- Retrieving previous commands from the history list
+- Performing incremental searches of the history list
+- Customizing the behavior through configuration files
+
+## Installation
+
+This package installs the Readline library and header files, allowing other programs to link against it for command line editing capabilities.
+
+## Usage
+
+Applications typically link against libreadline to provide interactive command line interfaces. The library handles all the complex details of terminal control, history management, and user input processing.
+
+## License
+
+Readline is released under the GNU General Public License version 3.

+ 24 - 0
readline-8.3/usm-scripts/acquire.sh

@@ -0,0 +1,24 @@
+#!/bin/bash
+set -e
+
+# Readline 8.3 source acquisition script
+# Downloads and extracts the readline source code
+
+ARCHIVE_URL="https://ftp.gnu.org/gnu/readline/readline-8.3.tar.gz"
+ARCHIVE_NAME="readline-8.3.tar.gz"
+SOURCE_DIR="sources/readline"
+EXTRACT_DIR="."
+
+echo "Downloading readline-8.3 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} --strip-components=1
+
+echo "Cleaning up..."
+rm ${ARCHIVE_NAME}
+
+echo "Readline source acquisition complete."

+ 31 - 0
readline-8.3/usm-scripts/build.sh

@@ -0,0 +1,31 @@
+#!/bin/bash
+set -e
+
+# Readline 8.3 build script
+# Configures and compiles the readline library
+
+build_dir=$1
+
+echo "Building readline-8.3 in ${build_dir}"
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# Apply LFS-specific sed commands to prevent library conflicts
+sed -i '/MV.*old/d' sources/readline/Makefile.in
+sed -i '/{OLDSUFF}/c:' sources/readline/support/shlib-install
+
+# Prevent hard coding library search paths (rpath) into shared libraries
+sed -i 's/-Wl,-rpath,[^ ]*//' sources/readline/support/shobj-conf
+
+# Configure readline with LFS options
+echo "Configuring readline..."
+sources/readline/configure \
+    --prefix=${PREFIX} \
+    --disable-static \
+    --with-curses \
+    --docdir=${PREFIX}/share/doc/readline-8.3
+
+# Compile the package
+echo "Compiling readline..."
+make SHLIB_LIBS="-lncursesw"
+
+echo "Readline build complete."

+ 24 - 0
readline-8.3/usm-scripts/install.sh

@@ -0,0 +1,24 @@
+#!/bin/bash
+set -e
+
+# Readline 8.3 install script
+# Installs the readline library to the destination directory
+
+build_dir=$1
+install_dir=$2
+install_type=$3
+
+echo "Installing readline-8.3 to ${install_dir}"
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# Install the package
+make SHLIB_LIBS="-lncursesw" DESTDIR=${install_dir} install
+
+# Install documentation if desired
+if [ -d "doc" ]; then
+    echo "Installing documentation..."
+    mkdir -p ${install_dir}${DATADIR}/doc/readline-8.3
+    install -v -m644 doc/*.{ps,pdf,html,dvi} ${install_dir}${DATADIR}/doc/readline-8.3/ || true
+fi
+
+echo "Readline installation complete."