Fixed Bug 904805

This commit is contained in:
Ding-Yi Chen 2013-04-16 11:48:30 +10:00
parent c023a373d3
commit d73e050e82
2 changed files with 63 additions and 3 deletions

View File

@ -0,0 +1,45 @@
diff -up ./configure.ac.pkg-config ./configure.ac
--- ./configure.ac.pkg-config 2011-08-23 03:30:10.000000000 +1000
+++ ./configure.ac 2013-04-16 11:03:09.418009954 +1000
@@ -16,7 +16,6 @@ AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
-AC_PROG_LIBTOOL
AC_PROG_LN_S
AC_PROG_MAKE_SET
@@ -105,5 +104,5 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
# Checks for library functions.
AC_CHECK_FUNCS([fmemopen])
-AC_CONFIG_FILES([Makefile src/endianness.h src/Makefile prog/Makefile])
+AC_CONFIG_FILES([Makefile lept.pc src/endianness.h src/Makefile prog/Makefile])
AC_OUTPUT
diff -up ./lept.pc.in.pkg-config ./lept.pc.in
--- ./lept.pc.in.pkg-config 2013-04-16 10:48:38.238982664 +1000
+++ ./lept.pc.in 2013-04-16 10:48:38.238982664 +1000
@@ -0,0 +1,10 @@
+libdir=@libdir@
+includedir=@includedir@/leptonica
+
+Name: leptonica
+Description: An open source C library for efficient image processing and image analysis operations
+Version: @VERSION@
+Libs: -L${libdir} -llept
+Libs.private: @ZLIB_LIBS@ @LIBPNG_LIBS@ @JPEG_LIBS@ @GIFLIB_LIBS@ @LIBTIFF_LIBS@ @LIBWEBP_LIBS@
+Cflags: -I${includedir}
+
diff -up ./Makefile.am.pkg-config ./Makefile.am
--- ./Makefile.am.pkg-config 2010-11-09 05:09:39.000000000 +1000
+++ ./Makefile.am 2013-04-16 10:48:38.239982664 +1000
@@ -2,6 +2,9 @@ ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = config README.html leptonica-license.txt moller52.jpg version-notes.html make-for-auto make-for-local autobuild
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = lept.pc
+
if ENABLE_PROGRAMS
PROGRAMS_SUBDIR = prog
endif

View File

@ -1,13 +1,16 @@
%global libname liblept
%global shortname lept
%global libname lib%{shortname}
%global pkg_config_dir %{_libdir}/pkgconfig
Name: leptonica
Version: 1.69
Release: 8%{?dist}
Release: 9%{?dist}
Summary: C library for efficient image processing and image analysis operations
Group: System Environment/Libraries
License: Leptonica
URL: http://code.google.com/p/leptonica/
Source0: http://leptonica.googlecode.com/files/%{name}-%{version}.tar.gz
Patch0: %{name}-%{version}.pkg-config.patch
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
@ -15,6 +18,9 @@ BuildRequires: libpng-devel
BuildRequires: zlib-devel
BuildRequires: giflib-devel
BuildRequires: libwebp-devel
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -48,8 +54,10 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1 -b .pkg-config
%build
autoreconf -ivf
%configure --disable-static --disable-rpath --program-prefix=leptonica-
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
@ -61,6 +69,8 @@ rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/%{libname}.la
rm -rf %{buildroot}%{_bindir}
mkdir -p %{buildroot}/%{pkg_config_dir}
install %{shortname}.pc %{buildroot}/%{pkg_config_dir}
%clean
rm -rf %{buildroot}
@ -75,8 +85,13 @@ rm -rf %{buildroot}
%files devel
%{_includedir}/%{name}
%{_libdir}/%{libname}.so
%{pkg_config_dir}/%{shortname}.pc
%changelog
* Fri Mar 08 2013 Ding-Yi Chen <dchen at redhat.com> - 1.69-9
- Fixed Bug 904805 - [PATCH] Provide pkg-config file
* Fri Mar 08 2013 Ding-Yi Chen <dchen at redhat.com> - 1.69-8
- Rebuild to resolves #914124
@ -99,7 +114,7 @@ rm -rf %{buildroot}
* Thu Aug 02 2012 Ding-Yi Chen <dchen at redhat.com> - 1.69-2
- Fixed issues addressed in Review Request comment #8.
* Wed Jul 24 2012 Ding-Yi Chen <dchen at redhat.com> - 1.69-1
* Wed Jul 25 2012 Ding-Yi Chen <dchen at redhat.com> - 1.69-1
- Upstream update to 1.69
- Add program-prefix in configure.