Skip to content

Instantly share code, notes, and snippets.

@castor4bit
Forked from d235j/newt.rb
Created October 8, 2011 13:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save castor4bit/1272305 to your computer and use it in GitHub Desktop.
Save castor4bit/1272305 to your computer and use it in GitHub Desktop.
Patched newt.rb
require 'formula'
class Newt < Formula
url 'https://fedorahosted.org/releases/n/e/newt/newt-0.52.13.tar.gz'
homepage 'https://fedorahosted.org/newt/'
md5 '77de05b3f58540152a4ae32a1a64e5d0'
depends_on 'gettext'
depends_on 'slang'
depends_on 'popt'
def patches
# fixes python detection
DATA
end
def install
system "./configure", "--prefix=#{prefix}", "--without-tcl"
system "make install"
end
end
__END__
diff --git newt-0.52.13-orig/configure newt-0.52.13/configure
index b088b1a..8e2180a 100755
--- newt-0.52.13-orig/configure
+++ newt-0.52.13/configure
@@ -3455,7 +3455,7 @@ if test "x$with_python" = "xno"; then
$as_echo "skipped" >&6; }
PYTHONVERS=
else
- PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
+ PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | sed "s|/usr/include/||g"| sed "s|/Python.h||g" | tr '\n' ' ' 2> /dev/null)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHONVERS" >&5
$as_echo "$PYTHONVERS" >&6; }
fi
diff --git newt-0.52.13-orig/configure.ac newt-0.52.13/configure.ac
index b972805..22d8a3d 100644
--- newt-0.52.13-orig/configure.ac
+++ newt-0.52.13/configure.ac
@@ -59,7 +59,7 @@ if test "x$with_python" = "xno"; then
AC_MSG_RESULT([skipped])
PYTHONVERS=
else
- PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
+ PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | sed "s|/usr/include/||g"| sed "s|/Python.h||g" | tr '\n' ' ' 2> /dev/null)
AC_MSG_RESULT([$PYTHONVERS])
fi
AC_SUBST([PYTHONVERS])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment