summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-05-28 18:55:49 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-28 20:06:47 +0200
commitb7d315319d600cf1a49333082da87b32c5815eeb (patch)
treeafbf71d334df25f5a21582f37f5b76efa0424bf3 /Ports
parent674be46afd74fd006bb007d1127b171cecb9097d (diff)
downloadserenity-b7d315319d600cf1a49333082da87b32c5815eeb.zip
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.
Diffstat (limited to 'Ports')
-rwxr-xr-xPorts/.port_include.sh17
-rwxr-xr-xPorts/links/links.sh16
2 files changed, 33 insertions, 0 deletions
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