Skip to content

Instantly share code, notes, and snippets.

@castor4bit castor4bit/newt.rb forked from d235j/newt.rb
Created Oct 8, 2011

Embed
What would you like to do?
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
You can’t perform that action at this time.