Skip to content

Commit

Permalink
Ports: Vim and ncurses
Browse files Browse the repository at this point in the history
  • Loading branch information
alexispurslane authored and awesomekling committed May 28, 2019
1 parent faafaf9 commit 674be46
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Ports/.port_include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions Ports/ncurses/allow-serenity-os-ncurses.patch
Original file line number Diff line number Diff line change
@@ -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*)
18 changes: 18 additions & 0 deletions Ports/ncurses/ncurses.sh
Original file line number Diff line number Diff line change
@@ -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
30 changes: 30 additions & 0 deletions Ports/vim/vim.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 674be46

Please sign in to comment.