[mingw-leptonica] Initial import

Sandro Mani smani at fedoraproject.org
Sun Jul 7 19:58:03 UTC 2013


commit 16ec96e1c80360f0d082d99d1953a1dde60c0128
Author: Sandro Mani <manisandro at gmail.com>
Date:   Sun Jul 7 21:57:44 2013 +0200

    Initial import

 .gitignore                 |    1 +
 leptonica_pkg-config.patch |   45 +++++++++++++++
 leptonica_typo.patch       |   12 ++++
 mingw-leptonica.spec       |  128 ++++++++++++++++++++++++++++++++++++++++++++
 sources                    |    1 +
 5 files changed, 187 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4ca7119 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/leptonica-1.69.tar.gz
diff --git a/leptonica_pkg-config.patch b/leptonica_pkg-config.patch
new file mode 100644
index 0000000..53e04ba
--- /dev/null
+++ b/leptonica_pkg-config.patch
@@ -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
diff --git a/leptonica_typo.patch b/leptonica_typo.patch
new file mode 100644
index 0000000..84da09a
--- /dev/null
+++ b/leptonica_typo.patch
@@ -0,0 +1,12 @@
+diff -rupN leptonica-1.69/src/utils.c leptonica-1.69-new/src/utils.c
+--- leptonica-1.69/src/utils.c	2012-01-22 19:29:15.000000000 +0100
++++ leptonica-1.69-new/src/utils.c	2013-05-08 02:36:37.967624152 +0200
+@@ -2298,7 +2298,7 @@ lept_direxists(const char  *dirname,
+     HANDLE  hFind = INVALID_HANDLE_VALUE;
+     WIN32_FIND_DATAA  ffd;
+         hFind = FindFirstFileA(dirname, &ffd);
+-        if (hfind != INVALID_HANDLE_VALUE) {
++        if (hFind != INVALID_HANDLE_VALUE) {
+             *pexists = 1;
+             FindClose(hFind);
+         }
diff --git a/mingw-leptonica.spec b/mingw-leptonica.spec
new file mode 100644
index 0000000..74317d8
--- /dev/null
+++ b/mingw-leptonica.spec
@@ -0,0 +1,128 @@
+%{?mingw_package_header}
+
+%global pkgname leptonica
+
+Name:          mingw-%{pkgname}
+Version:       1.69
+Release:       2%{?dist}
+Summary:       MinGW Windows Leptonica library
+License:       Leptonica
+Group:         Development/Libraries
+BuildArch:     noarch
+URL:           http://code.google.com/p/leptonica/
+Source0:       http://leptonica.googlecode.com/files/%{pkgname}-%{version}.tar.gz
+# Provide pkg-config file (is already upstream)
+Patch0:        leptonica_pkg-config.patch
+# Fix a typo (is already upstream)
+Patch1:        leptonica_typo.patch
+
+# Until new upstream version is released with Patch0
+BuildRequires: autoconf automake libtool
+
+BuildRequires: mingw32-filesystem >= 95
+BuildRequires: mingw32-gcc
+BuildRequires: mingw32-libjpeg-turbo
+BuildRequires: mingw32-libtiff
+BuildRequires: mingw32-libpng
+BuildRequires: mingw32-zlib
+BuildRequires: mingw32-giflib
+BuildRequires: mingw32-libwebp
+
+BuildRequires: mingw64-filesystem >= 95
+BuildRequires: mingw64-gcc
+BuildRequires: mingw64-libjpeg-turbo
+BuildRequires: mingw64-libtiff
+BuildRequires: mingw64-libpng
+BuildRequires: mingw64-zlib
+BuildRequires: mingw64-giflib
+BuildRequires: mingw64-libwebp
+
+
+%description
+MinGW Windows Leptonica library.
+
+
+%package -n mingw32-%{pkgname}
+Summary:       MinGW Windows Leptonica library
+
+%description -n mingw32-%{pkgname}
+MinGW Windows Leptonica library.
+
+
+%package -n mingw32-%{pkgname}-static
+Summary:       Static version of the MinGW Windows Leptonica library
+Requires:      mingw32-%{pkgname} = %{version}-%{release}
+
+%description -n mingw32-%{pkgname}-static
+Static version of the MinGW Windows Leptonica library.
+
+
+%package -n mingw64-%{pkgname}
+Summary:       MinGW Windows Leptonica library
+
+%description -n mingw64-%{pkgname}
+MinGW Windows Leptonica library.
+
+
+%package -n mingw64-%{pkgname}-static
+Summary:       Static version of the MinGW Windows Leptonica library
+Requires:      mingw64-%{pkgname} = %{version}-%{release}
+
+%description -n mingw64-%{pkgname}-static
+Static version of the MinGW Windows Leptonica library.
+
+
+%{?mingw_debug_package}
+
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+%patch0 -p1
+%patch1 -p1
+
+
+%build
+autoreconf -i
+%mingw_configure
+%mingw_make %{?_smp_mflags}
+
+
+%install
+%mingw_make DESTDIR=%{buildroot} install
+
+# Delete *.la files
+find %{buildroot} -name '*.la' -exec rm -f {} ';'
+
+# Delete *.exe files
+rm -rf %{buildroot}%{mingw32_bindir}/*.exe
+rm -rf %{buildroot}%{mingw64_bindir}/*.exe
+
+
+%files -n mingw32-%{pkgname}
+%doc leptonica-license.txt README.html version-notes.html
+%{mingw32_bindir}/liblept-3.dll
+%{mingw32_includedir}/leptonica/
+%{mingw32_libdir}/liblept.dll.a
+%{mingw32_libdir}/pkgconfig/lept.pc
+
+%files -n mingw32-%{pkgname}-static
+%{mingw32_libdir}/liblept.a
+
+%files -n mingw64-%{pkgname}
+%doc leptonica-license.txt README.html version-notes.html
+%{mingw64_bindir}/liblept-3.dll
+%{mingw64_includedir}/leptonica/
+%{mingw64_libdir}/liblept.dll.a
+%{mingw64_libdir}/pkgconfig/lept.pc
+
+%files -n mingw64-%{pkgname}-static
+%{mingw64_libdir}/liblept.a
+
+
+%changelog
+* Sun May 19 2013 Sandro Mani <manisandro at gmail.com> - 1.69-2
+- Remove mingw_build_win32/64 macros
+- Properly version mingw32-filesystem BuildRequires
+
+* Wed May 08 2013 Sandro Mani <manisandro at gmail.com> - 1.69-1
+- Initial Fedora package
diff --git a/sources b/sources
index e69de29..699fcef 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+274c921dcc47a97637ecc49c9e4a7b50  leptonica-1.69.tar.gz


More information about the scm-commits mailing list