Skip to content

Instantly share code, notes, and snippets.

@peterhost
Created October 27, 2010 19:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterhost/649746 to your computer and use it in GitHub Desktop.
Save peterhost/649746 to your computer and use it in GitHub Desktop.
homebrew formula for screen, hacked from macports
require 'formula'
# This duplicates the system "screen", but fixes the ability
# to use vertical splits.
class Screen <Formula
# this tarball contains a quick and dirty fix :
# 1 - included a copy of the ".orig" files required by the 'patch-wrp_vertical_split.patch' :p0 patches,
# in the tarball's root dir
# 2 - copied 'vproc_priv.h' in the root of the tarball (required by 'patch-screen.c' (osX10.5) and
# patch-screen.c-leopard (osX10.6))
# SRC : http://www.opensource.apple.com/source/launchd/launchd-329.3/launchd/src/vproc_priv.h?txt
# Worked for me, no time (yet) to make this more portable (&& fix the patches form p0 to p1)
url 'http://public.virtualregions.net.s3.amazonaws.com/misc/MISC/screen-4.00.03.tar.gz'
homepage 'http://www.gnu.org/software/screen'
md5 'f01d28665218d93774f03a0340c779a3'
version '4.0.3'
#head 'git://git.savannah.gnu.org/screen.git', :branch => 'master'
def patches
if ARGV.build_head?
[
'http://gist.github.com/raw/619709/204445d49cbf06e0cfe609325b06ee11c794f34b/screen-mac-pbcopy.patch',
'http://gist.github.com/raw/626040/be6a04f0e64c56185ba5850415ac59dad4cd62a0/screen-utf8-nfd.patch'
]
else
{
# apply patches from MACPORT http://trac.macports.org/browser/trunk/dports/sysutils/screen
:p0 => [
'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-config.h.in',
'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-configure',
'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-Makefile.in',
'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-maxargs',
'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-pty.c',
#'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-screen.c',
# ^__ use this one on osX10.5
'http://gist.github.com/raw/649710/f4aa493d5e7d67456c5d5414c2ad562905e4b7e2/patch-screen.c-leopard-modif.diff',
#'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-screen.c-leopard',
# ^__ dirty-fixed the diff, the _vprocmgr_move_subset_to_user function needs 3 arguments
# use this one on osX10.6
'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-window.c',
'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-windowsize',
'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-wrp_vertical_split',
'http://trac.macports.org/export/72799/trunk/dports/sysutils/screen/files/patch-process.c',
],
:p1 => [
# orig patches
#'http://trac.macports.org/raw-attachment/ticket/20862/screen-4.0.3-snowleopard.patch',
'http://gist.github.com/raw/619709/6ba149734cbb3b24033b16110c1d71302b101e64/screen-mac-pbcopy.patch',
'http://gist.github.com/raw/632245/7adc4a7b85f66dcc7cbb1839d5c10d295567b287/screen-utf8-nfd.patch'
],
:p2 => []
}
end
end
def install
if ARGV.build_head?
cd 'src'
system "autoconf"
system "autoheader"
end
system "./configure", "--prefix=#{prefix}", "--mandir=#{man}",
"--enable-colors256", "--infodir=#{info}",
"--enable-rxvt_osc", "--enable-locale",
"--enable-telnet"
system "make"
system "make install"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment