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
This commit is contained in:
parent
8d35b47c49
commit
b27e6bdc4e
@ -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
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c88a5e4af83c5f40dda8455886ac98923a9c33125699742603a88a0253fcc8c5
|
||||
size 502792
|
3
libedit-20180525-3.1.tar.gz
Normal file
3
libedit-20180525-3.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c41bea8fd140fb57ba67a98ec1d8ae0b8ffa82f4aba9c35a87e5a9499e653116
|
||||
size 521999
|
@ -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 <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <sys/wait.h>
|
||||
+#include <fcntl.h>
|
||||
|
||||
#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);
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
37
libedit.spec
37
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user