From b7d315319d600cf1a49333082da87b32c5815eeb Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 28 May 2019 18:55:49 +0200 Subject: Ports: Add links Doesn't actually run yet. in_term's read() fails with EFAULT for reasons that are presently beyond me, points to a bug in Serenity. --- Ports/.port_include.sh | 17 +++++++++++++++++ Ports/links/links.sh | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 Ports/links/links.sh (limited to 'Ports') diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index e020422a18..06bc87fb28 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -41,6 +41,23 @@ function run_fetch_git() { fi } +function run_fetch_web() { + if [ -d "$PORT_DIR" ]; then + run_command_nocd rm -rf "$PORT_DIR" + fi + file=$(basename "$1") + run_command_nocd curl "$1" -o "$file" + mkdir "$PORT_DIR" + + # may need to make strip-components configurable, as I bet some sick person + # out there has an archive that isn't in a directory :shrug: + run_command_nocd tar xavf "$file" -C "$PORT_DIR" --strip-components=1 +} + +function run_export_env() { + export $1="$2" +} + function run_replace_in_file() { run_command perl -p -i -e "$1" $2 } diff --git a/Ports/links/links.sh b/Ports/links/links.sh new file mode 100755 index 0000000000..29a74aac6f --- /dev/null +++ b/Ports/links/links.sh @@ -0,0 +1,16 @@ +#!/bin/sh +PORT_DIR=links +function fetch() { + run_fetch_web "http://links.twibright.com/download/links-2.19.tar.bz2" +} +function configure() { + run_export_env CC i686-pc-serenity-gcc + run_configure_autotools +} +function build() { + run_make +} +function install() { + run_make_install DESTDIR="$SERENITY_ROOT"/Root +} +source ../.port_include.sh -- cgit v1.2.3