[packages/libfep] - new - added gets patch to allow build with C11-based libc

qboosh qboosh at pld-linux.org
Thu Nov 22 21:03:34 CET 2012


commit ccd099189a98be22e99ccf66356b21c270b36e49
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Nov 22 21:03:36 2012 +0100

    - new
    - added gets patch to allow build with C11-based libc

 libfep-gets.patch |  28 ++++++++++
 libfep.spec       | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 186 insertions(+)
---
diff --git a/libfep.spec b/libfep.spec
new file mode 100644
index 0000000..722dfd6
--- /dev/null
+++ b/libfep.spec
@@ -0,0 +1,158 @@
+#
+# Conditional build:
+%bcond_without	apidocs		# do not build and package API docs
+%bcond_without	static_libs	# don't build static libraries
+#
+Summary:	Library to implement FEP (front end processor) on ANSI terminals
+Summary(pl.UTF-8):	Biblioteka do implementacji FEP (procesorów frontendowych) na terminalach ANSI
+Name:		libfep
+Version:	0.0.8
+Release:	1
+License:	GPL v3+
+Group:		Libraries
+#Source0Download: https://github.com/ueno/libfep/downloads
+Source0:	https://github.com/downloads/ueno/libfep/%{name}-%{version}.tar.gz
+# Source0-md5:	a360b049822506c53e9243d9e0a3f879
+Patch0:		%{name}-gets.patch
+URL:		https://github.com/ueno/libfep/
+BuildRequires:	glib2-devel >= 2.0
+BuildRequires:	gobject-introspection-devel >= 0.9.0
+BuildRequires:	pkgconfig
+BuildRequires:	pkgconfig(ncurses)
+BuildRequires:	gtk-doc >= 1.14
+BuildRequires:	ncurses-devel
+# not needed for releases
+#BuildRequires:	vala
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libfep is a library to implement FEP (front end processor) on ANSI
+terminals. Features:
+- render text at the bottom of the terminal,
+- render text at the cursor position,
+- send text to the child process,
+- monitor key strokes typed on the terminal.
+
+%description -l pl.UTF-8
+libfep to biblioteka do implementacji FEP (procesorów frontendowych)
+na terminalach ANSI. Możliwości:
+- renderowanie tekstu na dole terminala,
+- renderowanie tekstu na pozycji kursora,
+- wysyłanie tekstu do procesu potomnego,
+- monitorowanie naciśnięć klawiszy na terminalu.
+
+%package devel
+Summary:	Header files for libfep library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki libfep
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	glib2-devel >= 2.0
+
+%description devel
+Header files for libfep library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libfep.
+
+%package static
+Summary:	Static libfep library
+Summary(pl.UTF-8):	Statyczna biblioteka libfep
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static libfep library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libfep.
+
+%package -n vala-libfep
+Summary:	Vala API for libfep library
+Summary(pl.UTF-8):	API języka Vala do biblioteki libfep
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+Requires:	vala
+
+%description -n vala-libfep
+Vala API for libfep library.
+
+%description -n vala-libfep -l pl.UTF-8
+API języka Vala do biblioteki libfep.
+
+%package apidocs
+Summary:	libfep API documentation
+Summary(pl.UTF-8):	Dokumentacja API biblioteki libfep
+Group:		Documentation
+
+%description apidocs
+API and internal documentation for libfep library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki libfep.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%configure \
+	%{?with_apidocs:--enable-gtk-doc} \
+	%{?with_static_libs:--enable-static} \
+	--with-html-dir=%{_gtkdocdir}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libfep*.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog README
+%attr(755,root,root) %{_bindir}/fep
+%attr(755,root,root) %{_bindir}/fepcli
+%attr(755,root,root) %{_libdir}/libfep.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfep.so.0
+%attr(755,root,root) %{_libdir}/libfep-glib.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfep-glib.so.0
+%{_libdir}/girepository-1.0/Fep-1.0.typelib
+%{_mandir}/man1/fep.1*
+%{_mandir}/man1/fepcli.1*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libfep.so
+%attr(755,root,root) %{_libdir}/libfep-glib.so
+%{_datadir}/gir-1.0/Fep-1.0.gir
+%{_includedir}/fep-1.0
+%{_pkgconfigdir}/libfep.pc
+%{_pkgconfigdir}/libfep-glib.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libfep.a
+%{_libdir}/libfep-glib.a
+%endif
+
+%files -n vala-libfep
+%defattr(644,root,root,755)
+%{_datadir}/vala/vapi/libfep-glib.deps
+%{_datadir}/vala/vapi/libfep-glib.vapi
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%{_gtkdocdir}/libfep
+%{_gtkdocdir}/libfep-glib
+%endif
diff --git a/libfep-gets.patch b/libfep-gets.patch
new file mode 100644
index 0000000..beaa3a2
--- /dev/null
+++ b/libfep-gets.patch
@@ -0,0 +1,28 @@
+--- libfep-0.0.8/lib/stdio.in.h.orig	2012-03-29 03:17:35.000000000 +0200
++++ libfep-0.0.8/lib/stdio.in.h	2012-11-22 18:53:14.053840934 +0100
+@@ -699,25 +699,6 @@
+ # endif
+ #endif
+ 
+-#if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-#   undef gets
+-#   define gets rpl_gets
+-#  endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-#  undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+-/* It is very rare that the developer ever has full control of stdin,
+-   so any use of gets warrants an unconditional warning.  Assume it is
+-   always declared, since it is required by C89.  */
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+-#endif
+-
+ 
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+ struct obstack;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libfep.git/commitdiff/ccd099189a98be22e99ccf66356b21c270b36e49



More information about the pld-cvs-commit mailing list