From b27e6bdc4e34bc71dcf3ec2d80c5ea3c0aed5cf27c8bb8695a3e2e1fafe499e9 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 2 Aug 2018 07:10:49 +0000 Subject: [PATCH] Accepting request 624653 from home:pluskalm:branches:devel:libraries:c_c++ - Update to version 20180525-3.1: * Sync with upstream sources - Drop no longer needed patches: * libedit-20100424-3.0-ncurses.patch * libedit-ocloexec.patch * libedit-visibility.patch - Trim unused dependencies - Drop %check section (there are no tests available) OBS-URL: https://build.opensuse.org/request/show/624653 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libedit?expand=0&rev=59 --- libedit-20100424-3.0-ncurses.patch | 37 -------------- libedit-20150325-3.1.tar.gz | 3 -- libedit-20180525-3.1.tar.gz | 3 ++ libedit-ocloexec.patch | 79 ------------------------------ libedit-visibility.patch | 22 --------- libedit.changes | 12 +++++ libedit.spec | 37 +++++--------- 7 files changed, 26 insertions(+), 167 deletions(-) delete mode 100644 libedit-20100424-3.0-ncurses.patch delete mode 100644 libedit-20150325-3.1.tar.gz create mode 100644 libedit-20180525-3.1.tar.gz delete mode 100644 libedit-ocloexec.patch delete mode 100644 libedit-visibility.patch diff --git a/libedit-20100424-3.0-ncurses.patch b/libedit-20100424-3.0-ncurses.patch deleted file mode 100644 index 1d59054..0000000 --- a/libedit-20100424-3.0-ncurses.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: configure.ac -=================================================================== ---- configure.ac.orig 2014-07-28 16:16:14.800585267 +0200 -+++ configure.ac 2014-07-28 16:16:17.338585263 +0200 -@@ -52,7 +52,7 @@ AC_CHECK_LIB(tinfo, tgetent,, - [AC_CHECK_LIB(termcap, tgetent,, - [AC_CHECK_LIB(termlib, tgetent,, - [AC_CHECK_LIB(curses, tgetent,, -- [AC_CHECK_LIB(ncurses, tgetent,, -+ [AC_CHECK_LIB(ncursesw, tgetent,, - [AC_MSG_ERROR([libcurses or libncurses are required!])] - )] - )] -Index: src/Makefile.am -=================================================================== ---- src/Makefile.am.orig 2014-07-28 16:16:14.800585267 +0200 -+++ src/Makefile.am 2014-07-28 16:17:25.508585142 +0200 -@@ -66,5 +66,6 @@ nobase_include_HEADERS = histedit.h edit - - nodist_libedit_la_SOURCES = $(BUILT_SOURCES) - --libedit_la_LDFLAGS = -no-undefined -version-info $(LT_VERSION) -+libedit_la_CFLAGS = $(shell ncursesw6-config --cflags) -+libedit_la_LDFLAGS = $(shell ncursesw6-config --libs) -no-undefined -version-info $(LT_VERSION) - -Index: libedit.pc.in -=================================================================== ---- libedit.pc.in.orig 2014-07-28 16:16:14.800585267 +0200 -+++ libedit.pc.in 2014-07-28 16:16:17.338585263 +0200 -@@ -7,6 +7,6 @@ Name: libedit - Description: command line editor library provides generic line editing, history, and tokenization functions. - Version: @VERSION@ - Requires: --Libs: -L${libdir} -ledit @LIBS@ -+Libs: -ledit - Cflags: -I${includedir} -I${includedir}/editline - diff --git a/libedit-20150325-3.1.tar.gz b/libedit-20150325-3.1.tar.gz deleted file mode 100644 index 7da5fc6..0000000 --- a/libedit-20150325-3.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c88a5e4af83c5f40dda8455886ac98923a9c33125699742603a88a0253fcc8c5 -size 502792 diff --git a/libedit-20180525-3.1.tar.gz b/libedit-20180525-3.1.tar.gz new file mode 100644 index 0000000..302f609 --- /dev/null +++ b/libedit-20180525-3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c41bea8fd140fb57ba67a98ec1d8ae0b8ffa82f4aba9c35a87e5a9499e653116 +size 521999 diff --git a/libedit-ocloexec.patch b/libedit-ocloexec.patch deleted file mode 100644 index a7882f1..0000000 --- a/libedit-ocloexec.patch +++ /dev/null @@ -1,79 +0,0 @@ -Index: src/readline.c -=================================================================== ---- src/readline.c.orig 2014-07-28 16:17:56.006585088 +0200 -+++ src/readline.c 2014-07-28 16:17:58.431585084 +0200 -@@ -1190,15 +1190,15 @@ history_truncate_file (const char *filen - - if (filename == NULL && (filename = _default_history_file()) == NULL) - return errno; -- if ((fp = fopen(filename, "r+")) == NULL) -+ if ((fp = fopen(filename, "r+e")) == NULL) - return errno; - strcpy(template, _history_tmp_template); -- if ((fd = mkstemp(template)) == -1) { -+ if ((fd = mkostemp(template, O_CLOEXEC)) == -1) { - ret = errno; - goto out1; - } - -- if ((tp = fdopen(fd, "r+")) == NULL) { -+ if ((tp = fdopen(fd, "r+e")) == NULL) { - close(fd); - ret = errno; - goto out2; -Index: src/vi.c -=================================================================== ---- src/vi.c.orig 2014-07-28 16:17:56.006585088 +0200 -+++ src/vi.c 2014-07-28 16:17:58.432585084 +0200 -@@ -37,6 +37,7 @@ - #include - #include - #include -+#include - - #if !defined(lint) && !defined(SCCSID) - #if 0 -@@ -1007,7 +1008,7 @@ vi_histedit(EditLine *el, Int c __attrib - return CC_ERROR; - } - -- fd = mkstemp(tempfile); -+ fd = mkostemp(tempfile, O_CLOEXEC); - if (fd < 0) - return CC_ERROR; - len = (size_t)(el->el_line.lastchar - el->el_line.buffer); -Index: src/el.c -=================================================================== ---- src/el.c.orig 2014-07-28 16:17:56.006585088 +0200 -+++ src/el.c 2014-07-28 16:17:58.432585084 +0200 -@@ -557,7 +557,7 @@ el_source(EditLine *el, const char *fnam - fname = path; - } - if (fp == NULL) -- fp = fopen(fname, "r"); -+ fp = fopen(fname, "re"); - if (fp == NULL) { - el_free(path); - return -1; -Index: src/history.c -=================================================================== ---- src/history.c.orig 2014-07-28 16:17:56.007585088 +0200 -+++ src/history.c 2014-07-28 16:18:38.101585014 +0200 -@@ -743,7 +743,7 @@ history_load(TYPE(History) *h, const cha - static ct_buffer_t conv; - #endif - -- if ((fp = fopen(fname, "r")) == NULL) -+ if ((fp = fopen(fname, "re")) == NULL) - return i; - - if ((line = fgetln(fp, &sz)) == NULL) -@@ -844,7 +844,7 @@ history_save(TYPE(History) *h, const cha - FILE *fp; - int i; - -- if ((fp = fopen(fname, "w")) == NULL) -+ if ((fp = fopen(fname, "we")) == NULL) - return -1; - - i = history_save_fp(h, fp); diff --git a/libedit-visibility.patch b/libedit-visibility.patch deleted file mode 100644 index f87adb8..0000000 --- a/libedit-visibility.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: libedit-20110802-3.0/src/sys.h -=================================================================== ---- libedit-20110802-3.0.orig/src/sys.h -+++ libedit-20110802-3.0/src/sys.h -@@ -63,7 +63,7 @@ - #endif - - #ifndef public --# define public /* Externally visible functions/variables */ -+# define public __attribute__ ((visibility ("default"))) /* Externally visible functions/variables */ - #endif - - #ifndef private -@@ -71,7 +71,7 @@ - #endif - - #ifndef protected --# define protected /* Redefined from elsewhere to "static" */ -+# define protected __attribute__ ((visibility ("hidden"))) /* Redefined from elsewhere to "static" */ - /* When we want to hide everything */ - #endif - diff --git a/libedit.changes b/libedit.changes index 20bb3da..769ca68 100644 --- a/libedit.changes +++ b/libedit.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Jul 23 06:41:08 UTC 2018 - mpluskal@suse.com + +- Update to version 20180525-3.1: + * Sync with upstream sources +- Drop no longer needed patches: + * libedit-20100424-3.0-ncurses.patch + * libedit-ocloexec.patch + * libedit-visibility.patch +- Trim unused dependencies +- Drop %check section (there are no tests available) + ------------------------------------------------------------------- Wed Mar 28 09:30:51 UTC 2018 - dmueller@suse.com diff --git a/libedit.spec b/libedit.spec index e54c47c..32a8019 100644 --- a/libedit.spec +++ b/libedit.spec @@ -16,7 +16,7 @@ # -%define pkg_version 20150325-3.1 +%define pkg_version 20180525-3.1 %define soname 0 %define library_name libedit%{soname} Name: libedit @@ -25,18 +25,13 @@ Release: 0 Summary: Command Line Editing and History Library License: BSD-3-Clause Group: Development/Libraries/C and C++ -Url: http://www.thrysoee.dk/editline/ +URL: http://www.thrysoee.dk/editline/ Source: http://thrysoee.dk/editline/libedit-%{pkg_version}.tar.gz Source1: README.SUSE Source2: baselibs.conf -Patch2: libedit-20100424-3.0-ncurses.patch -Patch3: libedit-ocloexec.patch -Patch4: libedit-visibility.patch -BuildRequires: gcc-c++ -BuildRequires: libtool -BuildRequires: ncurses-devel +#BuildRequires: gcc-c++ BuildRequires: pkgconfig -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: pkgconfig(ncurses) %description libedit is a command line editing and history library. It is designed @@ -71,44 +66,34 @@ This package holds the development files for libedit. %prep %setup -q -n %{name}-%{pkg_version} cp %{SOURCE1} . -%patch2 -%patch3 -%patch4 -p1 %build -autoreconf -fiv %configure \ - --disable-static \ - --with-pic \ - --disable-silent-rules \ - --enable-widec + --disable-static \ + --with-pic \ + --disable-silent-rules make %{?_smp_mflags} %install -make DESTDIR=%{buildroot} install %{?_smp_mflags} +%make_install find %{buildroot} -type f -name "*.la" -delete -print -%check -make %{?_smp_mflags} check - %post -n %{library_name} -p /sbin/ldconfig - %postun -n %{library_name} -p /sbin/ldconfig %files -n %{library_name} -%defattr(-,root,root,-) %{_libdir}/libedit.so.%{soname} %{_libdir}/libedit.so.%{soname}.* -%{_mandir}/man5/editrc.5%{ext_man} +%{_mandir}/man5/editrc.5%{?ext_man} %license COPYING %doc ChangeLog %files -n libedit-devel -%defattr(-,root,root,-) %{_libdir}/libedit.so %{_includedir}/histedit.h %{_includedir}/editline/ -%{_mandir}/man3/*.3%{ext_man} +%{_mandir}/man3/*.3%{?ext_man} +%{_mandir}/man7/*.7%{?ext_man} %{_libdir}/pkgconfig/libedit.pc %doc examples/*c THANKS README.SUSE