#
-# TODO: C# (pnet or mono must be chosen)
-#
# Conditional build:
%bcond_without asprintf # without libasprintf C++ library
%bcond_without xemacs # without po-mode for xemacs
-%bcond_with gcj # with Java support by gcj requires gcj 3.x, but not 3.0.4+ (broken for now))
+%bcond_without gcj # with Java support by gcj (preferred over javac)
%bcond_with javac # with Java support by some javac
+%bcond_without dotnet # without .NET support
#
+%{?with_dotnet:%include /usr/lib/rpm/macros.mono}
+
+%ifnarch %{ix86} %{x8664} arm hppa ppc s390 s390x
+%undefine with_dotnet
+%endif
+
%undefine with_xemacs
%define build_java %{?with_gcj:1}%{!?with_gcj:%{?with_javac:1}%{!?with_javac:0}}
Summary(tr): Desteði için kitaplýk ve araçlar
Summary(uk): â¦Â̦ÏÔÅËÉ ÔÁ ÕÔÉ̦ÔÉ ÄÌÑ Ð¦ÄÔÒÉÍËÉ ÎÁæÏÎÁÌØÎÉÈ ÍÏ×
Name: gettext
-Version: 0.14.1
-Release: 3
+Version: 0.16
+Release: 2
License: LGPL (runtime), GPL (tools)
Group: Development/Tools
-Source0: ftp://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.gz
-# Source0-md5: 78f4b862510beb2e5d43223dd610e77d
+Source0: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
+# Source0-md5: 1560a460c2c4e05b6ff53acb12860750
Patch0: %{name}-info.patch
Patch1: %{name}-killkillkill.patch
-Patch2: %{name}-no_docs.patch
+Patch2: %{name}-pl.po-update.patch
+Patch3: %{name}-no_docs.patch
+Patch4: %{name}-ac.patch
+Patch5: %{name}-gettext.m4-fix.patch
URL: http://www.gnu.org/software/gettext/
-BuildRequires: autoconf >= 2.57
-BuildRequires: automake >= 1.7.5
+BuildRequires: autoconf >= 2.59
+# after dropping -ac.patch:
+#BuildRequires: autoconf >= 2.60
+BuildRequires: automake >= 1:1.10
%{?with_gcj:BuildRequires: gcj >= 3.0}
-%{?with_gcj:BuildRequires: gcj < 3.0.4}
%{?with_javac:BuildRequires: jdk >= 1.1}
%{?with_asprintf:BuildRequires: libstdc++-devel}
BuildRequires: libtool >= 1:1.4.2-9
+%{?with_dotnet:BuildRequires: mono-csharp}
BuildRequires: texinfo
%{?with_xemacs:BuildRequires: xemacs}
Obsoletes: gettext-base
Group: Development/Tools
Requires(post,postun): /sbin/ldconfig
Requires: %{name} = %{version}-%{release}
-Requires: autoconf >= 2.50
Requires: iconv
+Conflicts: autoconf < 2.52
%description devel
The gettext library provides an easy to use library and tools for
configure.ac i kopiuje do pakietu pliki infrastruktury nale¿±ce do tej
wersji.
+%package -n dotnet-gettext
+Summary: GNU gettext for C#
+Summary(pl): GNU gettext dla C#
+Group: Development/Tools
+
+%description -n dotnet-gettext
+GNU gettext for C#.
+
+%description -n dotnet-gettext -l pl
+GNU gettext dla C#.
+
%prep
%setup -q
%patch0 -p1
%patch1 -p1
-# patch2 not finished yet
-#%patch2 -p1
+%patch2 -p1
+# patch not finished yet
+#%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%{__perl} -pi -e 's/ no / nb /' gettext-runtime/po/LINGUAS gettext-tools/po/LINGUAS
mv -f gettext-runtime/po/{no,nb}.po
mv -f gettext-runtime/po/{no,nb}.gmo
mv -f gettext-tools/po/{no,nb}.po
mv -f gettext-tools/po/{no,nb}.gmo
+rm -f gettext-tools/po/stamp-po
%build
-# it's m4_included somewhere
-install %{_aclocaldir}/libtool.m4 config/m4/libtool.m4
%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__automake}
cd autoconf-lib-link
-%{__aclocal} -I m4 -I ../config/m4
+%{__aclocal} -I m4 -I ../m4
%{__autoconf}
%{__automake}
cd ../gettext-runtime
-%{__aclocal} -I m4 -I ../autoconf-lib-link/m4 -I ../gettext-tools/m4 -I ../config/m4
+%{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4
%{__autoconf}
+%{__autoheader}
%{__automake}
-cd ../gettext-tools
-%{__aclocal} -I m4 -I ../gettext-runtime/m4 -I ../autoconf-lib-link/m4 -I ../config/m4
+cd libasprintf
+%{__aclocal} -I ../m4 -I ../../m4
%{__autoconf}
+%{__autoheader}
+%{__automake}
+cd ../../gettext-tools
+%{__aclocal} -I m4 -I gnulib-m4 -I libgettextpo/gnulib-m4 -I ../autoconf-lib-link/m4 -I ../gettext-runtime/m4 -I ../m4
+%{__autoconf}
+%{__autoheader}
%{__automake}
cd ..
+%{__aclocal}
+%{__autoconf}
+%{__automake}
%configure \
%{?with_xemacs:--with-lispdir=%{_datadir}/xemacs-packages/lisp/po-mode} \
--enable-nls \
- --disable-csharp \
+ %{!?with_dotnet:--disable-csharp} \
+ %{?with_dotnet:--enable-csharp=mono} \
--without-included-gettext
%{__make}
mv -f $RPM_BUILD_ROOT%{_bindir}/{,n}gettext $RPM_BUILD_ROOT/bin
# these static libs are removed in install-exec-clean
-install gettext-tools/lib/.libs/libgettextlib.a \
+install gettext-tools/gnulib-lib/.libs/libgettextlib.a \
gettext-tools/src/.libs/libgettextsrc.a $RPM_BUILD_ROOT%{_libdir}
+rm -r $RPM_BUILD_ROOT%{_docdir}/gettext
+
%find_lang %{name}-runtime
%find_lang %{name}-tools
%{_mandir}/man1/envsubst.1*
%{_mandir}/man1/gettext.1*
%{_mandir}/man1/ngettext.1*
+%dir %{_libdir}/gettext
%dir %{_datadir}/gettext
%files devel -f %{name}-tools.lang
# libgettextpo is for other programs, not used by gettext tools themselves
%attr(755,root,root) %{_libdir}/libgettextpo.so.*.*.*
%attr(755,root,root) %{_libdir}/preloadable_libintl.so
-%dir %{_libdir}/gettext
%attr(755,root,root) %{_libdir}/gettext/hostname
%attr(755,root,root) %{_libdir}/gettext/project-id
%attr(755,root,root) %{_libdir}/gettext/urlget
%{_datadir}/gettext/intl/[!c]*
%attr(755,root,root) %{_datadir}/gettext/intl/config.charset
%{_datadir}/gettext/msgunfmt.tcl
-%attr(755,root,root) %{_datadir}/gettext/mkinstalldirs
%{_datadir}/gettext/po
%dir %{_datadir}/gettext/projects
%{_datadir}/gettext/projects/index
%doc gettext-runtime/intl-java/javadoc2
%attr(755,root,root) %{_libdir}/gettext/gnu.gettext.DumpResource
%attr(755,root,root) %{_libdir}/gettext/gnu.gettext.GetURL
-%{_datadir}/gettext/gettext.jar
%endif
%if %{with xemacs}
%attr(755,root,root) %{_bindir}/autopoint
%{_datadir}/gettext/archive.tar.gz
%{_mandir}/man1/autopoint.1*
+
+%if %{with dotnet}
+%files -n dotnet-gettext
+%defattr(644,root,root,755)
+%{_libdir}/GNU.Gettext.dll
+%{_libdir}/gettext/msgfmt.net.exe
+%{_libdir}/gettext/msgunfmt.net.exe
+%endif