diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 50f3f7ca3ba888..e020422a18e425 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -66,6 +66,12 @@ function run_make_install() { run_command make $INSTALLOPTS install "$@" } +function run_send_to_file() { + echo "+ rewrite '$1'" + (cd "$PORT_DIR" && echo "$2" > "$1") + echo "+ FINISHED" +} + if [ -z "$1" ]; then echo "+ Fetching..." fetch diff --git a/Ports/ncurses/allow-serenity-os-ncurses.patch b/Ports/ncurses/allow-serenity-os-ncurses.patch new file mode 100644 index 00000000000000..fc60845e576697 --- /dev/null +++ b/Ports/ncurses/allow-serenity-os-ncurses.patch @@ -0,0 +1,13 @@ +diff --git a/config.sub b/config.sub +index a44fd8ae..eb9be19b 100755 +--- a/config.sub ++++ b/config.sub +@@ -1367,7 +1367,7 @@ case $os in + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ +- | midnightbsd* | amdhsa* | unleashed* | emscripten*) ++ | midnightbsd* | amdhsa* | unleashed* | emscripten* | *serenity* ) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + qnx*) diff --git a/Ports/ncurses/ncurses.sh b/Ports/ncurses/ncurses.sh new file mode 100755 index 00000000000000..4d8ef0afb6a3e9 --- /dev/null +++ b/Ports/ncurses/ncurses.sh @@ -0,0 +1,18 @@ +#!/bin/sh +PORT_DIR=ncurses +INSTALLOPTS="DESTDIR=$SERENITY_ROOT/Root/" + +function fetch() { + run_fetch_git "https://github.com/mirror/ncurses.git" + run_patch allow-serenity-os-ncurses.patch -p1 +} +function configure() { + run_configure_autotools +} +function build() { + run_make +} +function install() { + run_make_install +} +source ../.port_include.sh diff --git a/Ports/vim/vim.sh b/Ports/vim/vim.sh new file mode 100755 index 00000000000000..cf4407190df822 --- /dev/null +++ b/Ports/vim/vim.sh @@ -0,0 +1,30 @@ +#!/bin/sh +PORT_DIR=vim +INSTALLOPTS="DESTDIR=$SERENITY_ROOT/Root/" + +function fetch() { + run_fetch_git "https://github.com/vim/vim.git" +} + +function configure() { + run_send_to_file src/auto/config.cache " + vim_cv_getcwd_broken=no + vim_cv_memmove_handles_overlap=yes + vim_cv_stat_ignores_slash=yes + vim_cv_tgetent=zero + vim_cv_terminfo=yes + vim_cv_toupper_broken=no + vim_cv_tty_group=world + " + run_configure_autotools --with-tlib=ncurses --with-features=small +} + +function build() { + run_make +} + +function install() { + run_make_install +} + +source ../.port_include.sh