1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
%global __strip %{_cygwin_strip}
%global __objdump %{_cygwin_objdump}
%global _use_internal_dependency_generator 0
%global __find_requires %{_cygwin_findrequires}
%global __find_provides %{_cygwin_findprovides}
Name: cygwin-libiconv
Version: 1.14
Release: 1
Summary: GNU libraries and utilities for character set conversion
License: GPLv2+ and LGPLv2+
Group: Development/Libraries
URL: http://www.gnu.org/software/libiconv/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{version}.tar.gz
Patch0: libiconv-1.14-wchar.patch
BuildRequires: cygwin-filesystem >= 2
BuildRequires: cygwin-gcc
BuildRequires: cygwin-binutils
BuildRequires: autoconf, automake, libtool, gettext-devel
# There's a quasi-circular dependency between cygwin-libiconv and
# cygwin-gettext. If gettext is installed when you build this then
# iconv will create *.mo files. When this package is added to Fedora
# we can consider adding this circular dep:
#BuildRequires: cygwin-gettext
%description
Cygwin Iconv library
%package static
Summary: Static version of the Cygwin Iconv library
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries
%description static
Static version of the Cygwin Iconv library.
%prep
%setup -q -n libiconv-%{version}
rm -f m4/libtool.m4 m4/lt*.m4
%patch0 -p2
autoreconf -f -i -v -I `pwd`/m4 -I `pwd`/srcm4
%build
%{_cygwin_configure} \
--enable-static --enable-shared \
am_cv_proto_iconv_arg1= \
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
# Remove documentation which duplicates what is already in
# Fedora native packages.
rm -rf $RPM_BUILD_ROOT%{_cygwin_docdir}/libiconv/
rm -rf $RPM_BUILD_ROOT%{_cygwin_mandir}
# If cygwin-gettext was installed during the build, remove the *.mo
# files. If cygwin-gettext wasn't installed then there won't be any.
rm -rf $RPM_BUILD_ROOT%{_cygwin_datadir}/locale
# We intentionally don't ship *.la files
rm -f $RPM_BUILD_ROOT%{_cygwin_libdir}/*.la
# Remove unnecessary Cygwin native binaries
rm -f $RPM_BUILD_ROOT%{_cygwin_bindir}/*.exe
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING COPYING.LIB
%{_cygwin_bindir}/cygcharset-1.dll
%{_cygwin_bindir}/cygiconv-2.dll
%{_cygwin_includedir}/iconv.h
%{_cygwin_includedir}/libcharset.h
%{_cygwin_includedir}/localcharset.h
%{_cygwin_libdir}/charset.alias
%{_cygwin_libdir}/libcharset.dll.a
%{_cygwin_libdir}/libiconv.dll.a
%files static
%defattr(-,root,root,-)
%{_cygwin_libdir}/libcharset.a
%{_cygwin_libdir}/libiconv.a
%changelog
* Wed Aug 31 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.14-1
- Version bump.
* Wed Feb 16 2011 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.13.1-1
- Initial RPM release, largely based on mingw32-iconv.
|