diff --git a/libev-4.11-Add-pkgconfig-support.patch b/libev-4.11-Add-pkgconfig-support.patch new file mode 100644 index 0000000..8c478ca --- /dev/null +++ b/libev-4.11-Add-pkgconfig-support.patch @@ -0,0 +1,58 @@ +From 01d2c386b58afa49567ccc079c963f76dc2e60f3 Mon Sep 17 00:00:00 2001 +From: Mathieu Bridon +Date: Fri, 8 Feb 2013 15:40:51 +0800 +Subject: [PATCH] Add pkgconfig support + +--- + Makefile.am | 4 ++++ + configure.ac | 2 +- + libev.pc.in | 11 +++++++++++ + 3 files changed, 16 insertions(+), 1 deletion(-) + create mode 100644 libev.pc.in + +diff --git a/Makefile.am b/Makefile.am +index 059305b..9e556c0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -11,6 +11,10 @@ man_MANS = ev.3 + + include_HEADERS = ev.h ev++.h event.h + ++pkgconfigdir = $(libdir)/pkgconfig ++ ++pkgconfig_DATA = libev.pc ++ + lib_LTLIBRARIES = libev.la + + libev_la_SOURCES = ev.c event.c +diff --git a/configure.ac b/configure.ac +index 31d0a25..1af149a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -21,5 +21,5 @@ AC_PROG_LIBTOOL + + m4_include([libev.m4]) + +-AC_CONFIG_FILES([Makefile]) ++AC_CONFIG_FILES([Makefile libev.pc]) + AC_OUTPUT +diff --git a/libev.pc.in b/libev.pc.in +new file mode 100644 +index 0000000..3b6c636 +--- /dev/null ++++ b/libev.pc.in +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: libev ++Description: High-performance event loop/event model ++Version: @VERSION@ ++Libs: -L${libdir} -lev ++Libs.private: ++Cflags: -I${includedir} +-- +1.8.1 + diff --git a/libev.pc.in b/libev.pc.in deleted file mode 100644 index 3b6c636..0000000 --- a/libev.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libev -Description: High-performance event loop/event model -Version: @VERSION@ -Libs: -L${libdir} -lev -Libs.private: -Cflags: -I${includedir} diff --git a/libev.spec b/libev.spec index aacf66d..f7cd64a 100644 --- a/libev.spec +++ b/libev.spec @@ -8,8 +8,10 @@ Release: 1%{?dist} License: BSD or GPLv2+ URL: http://software.schmorp.de/pkg/libev.html Source0: http://dist.schmorp.de/libev/Attic/%{name}-%{version}.tar.gz -Source1: %{name}.pc.in -BuildRequires: automake libtool + +BuildRequires: autoconf automake libtool + +Patch0: libev-4.11-Add-pkgconfig-support.patch %description Libev is modeled (very loosely) after libevent and the Event Perl @@ -41,12 +43,9 @@ This package contains the source code for libev. %prep %setup -q -# Add pkgconfig support -cp -p %{SOURCE1} . -sed -i.pkgconfig -e 's|Makefile|Makefile libev.pc|' configure.ac configure -sed -i.pkgconfig -e 's|lib_LTLIBRARIES|pkgconfigdir = $(libdir)/pkgconfig\n\npkgconfig_DATA = libev.pc\n\nlib_LTLIBRARIES|' Makefile.am Makefile.in -aclocal -automake +%patch0 -p1 + +autoreconf -i %build @@ -90,6 +89,8 @@ install -p -m 0644 Changes ev.pod LICENSE README %{inst_srcdir} %changelog +- Make a patch out of Michal's pkgconfig support. + * Fri Sep 28 2012 Mathieu Bridon - 4.11-1 - Update to 4.11