# # spec file for package gettext-csharp (Version 0.17) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: gettext-csharp BuildRequires: fdupes mono-devel perl-libintl-perl tcl Requires: mono Url: http://www.gnu.org/software/gettext/ License: LGPL v2.1 or later Group: Development/Tools/Other AutoReqProv: on Version: 0.17 Release: 50 Summary: Native Language Support (NLS) for C# PreReq: %{install_info_prereq} BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gettext-%{version}.tar.bz2 Source1: gettext-rpmlintrc Source2: suse-start-po-mode.el Source3: gettext-linkdupes.sh Patch: gettext-0.12.1-sigfpe.patch Patch2: gettext-0.12.1-gettextize.patch Patch3: gettext-codecleanup.patch Patch4: po-mode.diff Patch5: gettext-initialize_vars.patch Patch6: gettext-0.15-docdir.diff Patch7: gettext-autotools.patch Patch8: gettext-gl_AC_TYPE_LONG_LONG.patch Patch9: gettext-needlessly_init_vars.patch Patch10: gettext-open_missing_mode.patch %description Mono with its 'resgen' program uses a design that Microsoft created and that gives the power to the software vendor and not to the user: it doesn't allow the end-user to create his own localisations for existing programs. As documented in the gettext manual: The advantages of the .dll' format over the .resources' format are: 1. 1. Freedom to localize: Users can add their own translations to an application after it has been built and distributed. Whereas when the programmer uses a ResourceManager' constructor provided by the system, the set of .resources' files for an application must be specified when the application is built and cannot be extended afterwards. 2., 3., 4. ... The included GNU.Gettext.dll gives the user this freedom back and the also included msgfmt.net.exe and msgunfmt.net.exe handle PO files more reliably than 'resgen'. Authors: -------- Bruno Haible %prep %setup -q -n gettext-%{version} %patch %patch2 %patch3 %patch4 %patch5 %patch6 -p1 %patch7 %patch8 %patch9 %patch10 pushd gettext-tools/misc tar xfz archive.tar.gz find . -name gettext.m4,v -print0 | xargs -0 perl -spi -e 's/\(int\) /\(long\) /g' tar cfz archive.tar.gz archive/ popd autoreconf -fiv %build export CFLAGS="$RPM_OPT_FLAGS -pipe -W -Wall -Dgcc_is_lint" export CXXFLAGS="$RPM_OPT_FLAGS -pipe -W -Wall -Dgcc_is_lint" %configure --enable-shared --enable-csharp make GMSGFMT=../src/msgfmt %install export LC_CTYPE=ISO-8859-15 make install DESTDIR=$RPM_BUILD_ROOT mkdir examples mv $RPM_BUILD_ROOT/%{_datadir}/doc/gettext/examples/*csharp* examples mv $RPM_BUILD_ROOT/%{_datadir}/doc/gettext/csharpdoc csharpdoc cd examples fdupes -r *|while read dupe; do if [ -z "$dupe" ]; then startlink= elif [ -z "$startlink" ]; then startlink="$dupe" else ln -f "$startlink" "$dupe" fi done cd .. rm -rf $RPM_BUILD_ROOT/%{_datadir}/* mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} mv examples $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} mv csharpdoc $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc %{_defaultdocdir}/%{name} %exclude %_bindir %exclude %_libdir/lib* %exclude %_libdir/gettext/hostname %exclude %_libdir/gettext/project-id %exclude %_libdir/gettext/urlget %exclude %_libdir/gettext/user-email %exclude %_includedir %exclude %_libdir/preloadable_libintl.so %_libdir/GNU.Gettext.dll %_libdir/gettext/msgfmt.net.exe %_libdir/gettext/msgunfmt.net.exe %changelog * Tue Dec 04 2007 pth@suse.de - Add patch from upstreams to add the missing mode for the open call. * Fri Nov 23 2007 pth@suse.de - Remove the patch for disabling a test. * Fri Nov 16 2007 pth@suse.de - Don't run the testsuite. * Thu Nov 15 2007 pth@suse.de - Rename packages: gettext -> gettext-runtime and gettext-devel -> gettext->tools Packaging closely follows uptream recommendation with a few exceptions. - Initialize variable to shut up gcc. - Disable msgmerge-compendium-5 for now. - Update to 0.17: * License: The gettext related programs and tools are now licensed under the GPL version 3, instead of the GPL version 2. * PO file format: The Project-Id-Version field in the header entry may now already be filled in the POT file. In this case, the translators don't need to fill it in. xgettext has new options --package-name and --package-version that allow to specify the package name and version from a Makefile. * Colorized PO files: The msgcat program has new options --color and --style that produce a colorized PO file output, where keywords, strings, comments, or format directives can be highlighted. See the documentation section "Highlighting parts of PO files" for more info. * gettextize now has a --po-dir option that allows several PO directories to be updated all together. * Programming languages support: - Contexts (msgctxt) are now also supported for Java and C#. - C# with Qt: The support for Qt format strings has been updated for Qt 4. - C++ with KDE: xgettext has a new option --kde that triggers the recognition and marking of KDE 4 format strings. * Autoconf macros: - A new macro AM_XGETTEXT_OPTION can be used as an alternative to modifying po/Makevars. * libgettextpo library: - New functions are available for querying the list of supported format types. - The functions po_message_comments and po_message_extracted_comments return a multiline string where each line no longer starts with a redundant space. The leading space in every comment line is now stripped while reading the PO file. - Conversely, when you pass a multiline string to the function po_message_set_comments or po_message_set_extracted_comments, you normally don't pass a space at the beginning of each line, because such spaces are no longer trimmed during output. * Documentation: - The "Users" chapter has been completely rewritten. - New section "Highlighting parts of PO files". - A complete example showing the use of GNU gettext in Java with the Qt/Jambi GUI toolkit has been added. - Add tcl and perl-libintl-perl to BuildRequires (testsuite needs them). - Remove call to gl_AC_TYPE_LONG_LONG from libasprintf's configure.ac * Wed Oct 31 2007 mrueckert@suse.de - renamed rpmlintrc to gettext-rpmlintrc and added it to the spec as source 1 * Fri Aug 10 2007 bk@suse.de - Update to gettext 0.16.1, required by GnuPG 2.0.5 * Thu Aug 09 2007 bk@suse.de - re-enable make check * Tue Jul 10 2007 pth@suse.de - Split .NET/Mono support into a package with its own spec to avoid making the base gettext package dependent on mono(-devel).