forked from pool/nload
- replace nload-ncurses.patch with form_h_paths.diff: There is no need to hardcoded these paths when we can detect them propertly and send patch upstream. - simplify spec file OBS-URL: https://build.opensuse.org/request/show/405659 OBS-URL: https://build.opensuse.org/package/show/network:utilities/nload?expand=0&rev=4
45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
Index: nload-0.7.4/configure.in
|
|
===================================================================
|
|
--- nload-0.7.4.orig/configure.in
|
|
+++ nload-0.7.4/configure.in
|
|
@@ -75,13 +75,16 @@ AC_CHECK_LIB(form, new_form)
|
|
|
|
dnl Checks for header files.
|
|
AC_HEADER_STDC
|
|
-AC_CHECK_HEADERS([limits.h stdlib.h string.h unistd.h curses.h form.h math.h sys/param.h sys/socket.h sys/time.h sys/ioctl.h arpa/inet.h netinet/in.h])
|
|
+AC_CHECK_HEADERS([limits.h stdlib.h string.h unistd.h curses.h form.h ncurses/form.h math.h sys/param.h sys/socket.h sys/time.h sys/ioctl.h arpa/inet.h netinet/in.h])
|
|
|
|
if test "$ac_cv_lib_ncurses_initscr $ac_cv_header_curses_h" != "yes yes"; then
|
|
AC_MSG_ERROR([ncurses library or development files not found. ncurses is required for $PACKAGE_NAME.])
|
|
fi
|
|
-if test "$ac_cv_lib_form_new_form $ac_cv_header_form_h" != "yes yes"; then
|
|
- AC_MSG_ERROR([form library or development files not found. These are part of ncurses which is required for $PACKAGE_NAME.])
|
|
+if test "$ac_cv_lib_form_new_form" != "yes"; then
|
|
+ AC_MSG_ERROR([form library not found. These are part of ncurses which is required for $PACKAGE_NAME.])
|
|
+fi
|
|
+if test "$ac_cv_header_form_h $ac_cv_header_ncurses_form_h" = "no no"; then
|
|
+ AC_MSG_ERROR([form development files not found. These are part of ncurses which is required for $PACKAGE_NAME.])
|
|
fi
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
Index: nload-0.7.4/src/form_field.h
|
|
===================================================================
|
|
--- nload-0.7.4.orig/src/form_field.h
|
|
+++ nload-0.7.4/src/form_field.h
|
|
@@ -18,8 +18,15 @@
|
|
#ifndef FORM_FIELD_H
|
|
#define FORM_FIELD_H
|
|
|
|
+#include "../config.h"
|
|
#include <curses.h>
|
|
+
|
|
+#if defined(HAVE_FORM_H)
|
|
#include <form.h>
|
|
+#elif defined(HAVE_NCURSES_FORM_H)
|
|
+#include <ncurses/form.h>
|
|
+#endif
|
|
+
|
|
#undef clear
|
|
#undef erase
|
|
#undef refresh
|