SHA256
1
0
forked from pool/dialog

Accepting request 156182 from home:Dmitry_R:WIP

Update to version 1.2-20121230

OBS-URL: https://build.opensuse.org/request/show/156182
OBS-URL: https://build.opensuse.org/package/show/Base:System/dialog?expand=0&rev=20
This commit is contained in:
2013-02-23 12:47:36 +00:00
committed by Git OBS Bridge
parent d9a34c52d5
commit e215f966cd
8 changed files with 101 additions and 140 deletions

View File

@@ -1,125 +0,0 @@
--- dialog.h
+++ dialog.h 2008-04-10 13:28:27.840374000 +0200
@@ -38,6 +38,23 @@
#include <string.h>
#include <signal.h> /* fork() etc. */
#include <math.h> /* sqrt() */
+#include <sys/ioctl.h> /* struct winsize */
+
+#ifndef GCC_NORETURN
+#if defined(__GNUC__)
+#define GCC_NORETURN __attribute__((noreturn))
+#else
+#define GCC_NORETURN /*nothing*/
+#endif
+#endif
+
+#ifndef GCC_UNUSED
+#if defined(__GNUC__)
+#define GCC_UNUSED __attribute__((unused))
+#else
+#define GCC_UNUSED /*nothing*/
+#endif
+#endif
#if defined(HAVE_NCURSESW_NCURSES_H)
#include <ncursesw/ncurses.h>
@@ -71,14 +88,6 @@
#define _(s) s
#endif
-#ifndef GCC_NORETURN
-#define GCC_NORETURN /*nothing*/
-#endif
-
-#ifndef GCC_UNUSED
-#define GCC_UNUSED /*nothing*/
-#endif
-
#ifndef HAVE_WGET_WCH
#undef USE_WIDE_CURSES
#endif
--- dlg_colors.h
+++ dlg_colors.h 2006-07-10 14:42:18.000000000 +0200
@@ -42,13 +42,13 @@
#define DLGC_FG_SHADOW COLOR_BLACK
#define DLGC_BG_SHADOW COLOR_BLACK
-#define DLGC_HL_SHADOW TRUE
+#define DLGC_HL_SHADOW FALSE
#define DLGC_FG_DIALOG COLOR_BLACK
#define DLGC_BG_DIALOG COLOR_WHITE
#define DLGC_HL_DIALOG FALSE
-#define DLGC_FG_TITLE COLOR_BLUE
+#define DLGC_FG_TITLE COLOR_YELLOW
#define DLGC_BG_TITLE COLOR_WHITE
#define DLGC_HL_TITLE TRUE
@@ -96,7 +96,7 @@
#define DLGC_BG_SEARCHBOX COLOR_WHITE
#define DLGC_HL_SEARCHBOX FALSE
-#define DLGC_FG_SEARCHBOX_TITLE COLOR_BLUE
+#define DLGC_FG_SEARCHBOX_TITLE COLOR_YELLOW
#define DLGC_BG_SEARCHBOX_TITLE COLOR_WHITE
#define DLGC_HL_SEARCHBOX_TITLE TRUE
@@ -104,7 +104,7 @@
#define DLGC_BG_SEARCHBOX_BORDER COLOR_WHITE
#define DLGC_HL_SEARCHBOX_BORDER TRUE
-#define DLGC_FG_POSITION_INDICATOR COLOR_BLUE
+#define DLGC_FG_POSITION_INDICATOR COLOR_YELLOW
#define DLGC_BG_POSITION_INDICATOR COLOR_WHITE
#define DLGC_HL_POSITION_INDICATOR TRUE
@@ -124,7 +124,7 @@
#define DLGC_BG_ITEM_SELECTED COLOR_BLUE
#define DLGC_HL_ITEM_SELECTED TRUE
-#define DLGC_FG_TAG COLOR_BLUE
+#define DLGC_FG_TAG COLOR_YELLOW
#define DLGC_BG_TAG COLOR_WHITE
#define DLGC_HL_TAG TRUE
--- guage.c
+++ guage.c 2008-04-10 12:53:27.303792000 +0200
@@ -229,7 +229,7 @@ dialog_gauge(const char *title,
#endif
fclose(dialog_state.pipe_input);
- dialog_state.pipe_input = 0;
+ dialog_state.pipe_input = (FILE*)0;
curs_set(1);
dlg_del_window(dialog);
--- util.c
+++ util.c 2008-08-14 11:45:04.905477461 +0200
@@ -1144,12 +1144,12 @@ dlg_exit(int code)
*/
if (dialog_state.input) {
fclose(dialog_state.input);
- dialog_state.input = 0;
+ dialog_state.input = (FILE*)0;
}
if (dialog_state.pipe_input) {
if (dialog_state.pipe_input != stdin) {
fclose(dialog_state.pipe_input);
- dialog_state.pipe_input = 0;
+ dialog_state.pipe_input = (FILE*)0;
}
}
_exit(code);
@@ -1520,8 +1520,10 @@ dlg_move_window(WINDOW *win, int height,
#ifdef HAVE_COLOR
if (p->shadow != 0) {
if (dialog_state.use_shadow) {
+ (void) wresize(p->shadow, height, width);
(void) mvwin(p->shadow, y + SHADOW_ROWS, x + SHADOW_COLS);
} else {
+ delwin(p->shadow);
p->shadow = 0;
}
}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fa8d1405705079c779a5c198c5125eb31d11e948dce4147b2c3d4051e2bf6998
size 301155

3
dialog-1.2-20121230.tgz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1fb4ea11ceba8f105c2c6b48186bf715d98a144a738653627d7bf2bd12e21034
size 431584

43
dialog-gcc-warnings.patch Normal file
View File

@@ -0,0 +1,43 @@
Index: dialog-1.2-20121230/dialog.h
===================================================================
--- dialog-1.2-20121230.orig/dialog.h
+++ dialog-1.2-20121230/dialog.h
@@ -43,6 +43,23 @@
#include <string.h>
#include <signal.h> /* fork() etc. */
#include <math.h> /* sqrt() */
+#include <sys/ioctl.h> /* struct winsize */
+
+#ifndef GCC_NORETURN
+#if defined(__GNUC__)
+#define GCC_NORETURN __attribute__((noreturn))
+#else
+#define GCC_NORETURN /*nothing*/
+#endif
+#endif
+
+#ifndef GCC_UNUSED
+#if defined(__GNUC__)
+#define GCC_UNUSED __attribute__((unused))
+#else
+#define GCC_UNUSED /*nothing*/
+#endif
+#endif
/* header conflict with Solaris xpg4 versus <sys/regset.h> */
#if defined(ERR) && (ERR == 13)
@@ -99,14 +116,6 @@
#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
#endif
-#ifndef GCC_NORETURN
-#define GCC_NORETURN /*nothing*/
-#endif
-
-#ifndef GCC_UNUSED
-#define GCC_UNUSED /*nothing*/
-#endif
-
#ifndef HAVE_WGET_WCH
#undef USE_WIDE_CURSES
#endif

18
dialog-libs.patch Normal file
View File

@@ -0,0 +1,18 @@
Index: dialog-1.2-20121230/makefile.in
===================================================================
--- dialog-1.2-20121230.orig/makefile.in
+++ dialog-1.2-20121230/makefile.in
@@ -179,11 +179,11 @@ dialog$o \
$(OBJECTS) : $(srcdir)/dialog.h $(srcdir)/dlg_keys.h dlg_config.h VERSION
$(LIB) : $(LIB_OBJECT)
- $(LIBTOOL_CREATE) $(LIB) $(LIB_OBJECT)
+ $(LIBTOOL_CREATE) $(LIB) $(LIB_OBJECT) $(LIBS)
$(RANLIB) $@
$(PROG)$x : $(LIB) dialog$o @INTLDIR_MAKE@ @INTLLIBS@
- $(LINK) -o $@ dialog$o -L. -l@PACKAGE@ $(LDFLAGS) $(LIBS)
+ $(LINK) -o $@ dialog$o -L. -l@PACKAGE@ $(LDFLAGS)
clean \
distclean \

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Feb 22 22:20:50 UTC 2013 - dmitry_r@opensuse.org
- Update to version 1.2-20121230
* See included CHANGES file for detailes
-------------------------------------------------------------------
Fri Feb 22 22:01:06 UTC 2013 - dmitry_r@opensuse.org
- Fix libraries
* dialog-libs.patch
-------------------------------------------------------------------
Thu Jan 31 16:15:05 UTC 2013 - cfarrell@suse.com

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f81ee4f183791b0bb4ad09534ffc702da31c6d1de8e6aa098388932df11ae0a
size 572

View File

@@ -18,18 +18,18 @@
Name: dialog
Url: http://invisible-island.net/dialog/
Version: 1.1
Version: 1.2
Release: 0
%define somajor 6
%define src_date 20121230
%define somajor 11
Summary: Menus and Input Boxes for Shell Scripts
License: LGPL-2.1
Group: Development/Tools/Other
Source: dialog-1.1-20080727.tar.bz2
Source1: dialog.ko.po.bz2
Patch: dialog-1.1-20080727.dif
Source: ftp://invisible-island.net/dialog/%{name}-%{version}-%{src_date}.tgz
Patch1: dialog-libs.patch
Patch2: dialog-gcc-warnings.patch
BuildRequires: libtool
BuildRequires: ncurses-devel
#BuildRequires: gpm
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -50,10 +50,20 @@ Requires: libdialog%{somajor} = %{version}
%description devel
This program lets you use menus and dialog boxes in shell scripts.
%package examples
Summary: Examples of using dialog tool
Group: Development/Libraries/Other
Requires: %{name} = %{version}
BuildArch: noarch
%description examples
Examples of using menus and dialog boxes in shell scripts.
%prep
%setup -n dialog-1.1-20080727
bzcat %{S:1} > po/ko.po
%patch
%setup -n %{name}-%{version}-%{src_date}
%patch1 -p1
%patch2 -p1
chmod -x samples/*
%build
CC=gcc
@@ -68,6 +78,7 @@ bzcat %{S:1} > po/ko.po
break
done
export CC LIBS CFLAGS
%configure \
--enable-nls \
--enable-included-msgs \
@@ -75,6 +86,7 @@ bzcat %{S:1} > po/ko.po
--with-ncursesw \
--with-libtool \
--includedir=%{_includedir}/dialog
make %{?_smp_mflags}
%install
@@ -108,4 +120,8 @@ rm -rf %{buildroot}%{_datadir}/locale/rm/ # Rhaeto-Romance
%{_includedir}/dialog/
%{_mandir}/man3/dialog.3.gz
%files examples
%defattr(-,root,root)
%doc samples/*
%changelog