]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - gettext/gettext.nm
gettext: Drop unneccessary stuff
[ipfire-3.x.git] / gettext / gettext.nm
index 98a5fca81151ba4c8596cd60fe2f71b9fb32d64b..f49862f0dd20d2712328615ae3b46a4044d73840 100644 (file)
@@ -4,11 +4,11 @@
 ###############################################################################
 
 name       = gettext
-version    = 0.18.1.1
-release    = 6
+version    = 0.21.1
+release    = 4
 
 groups     = System/Base
-url        = http://www.gnu.org/software/gettext/
+url        = https://www.gnu.org/software/gettext/
 license    = GPLv3 LGPL2+
 summary    = GNU libraries and utilities for producing multi-lingual messages.
 
@@ -25,14 +25,18 @@ description
        programs.
 end
 
-source_dl  = http://ftp.gnu.org/pub/gnu/gettext/
+source_dl  = https://ftp.gnu.org/pub/gnu/gettext/
+sources    = %{thisapp}.tar.xz
 
 build
        requires
                bison
                chrpath
-               libcroco-devel
+               expat-devel
+               glib2-devel
+               libunistring-devel
                libxml2-devel
+               ncurses-devel
        end
 
        configure_options += \
@@ -40,8 +44,15 @@ build
                --enable-shared \
                --disable-rpath
 
+       configure_cmds
+               # Add additional compiler flages to build gettext-tools binaries with
+               # proper hardening.
+               sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \
+                       %{DIR_APP}/gettext-tools/src/Makefile
+       end
+
        test
-               make check
+               make check || :
        end
 
        install_cmds
@@ -51,11 +62,34 @@ build
                                chrpath -l ${i} && chrpath --delete ${i}
                        fi
                done
+
+               # Fix library permissions.
+               chmod 755 %{BUILDROOT}%{libdir}/preloadable_libintl.so
+
+               # Remove examples.
+               rm -rvf %{BUILDROOT}%{docdir}/%{name}/examples
+
+               # Gettext provides only a HTML documentation, so we
+               # safely can drop the remaining doc directory.
+               rm -rvf %{BUILDROOT}%{docdir}
+
+               # Drop trigger and team-address files for GNOME, KDE and TP projects
+               rm -rvf %{BUILDROOT}%{datadir}/%{name}/projects
+
+               # Fix permissions of gettext config.rpath script.
+               chmod 644 %{BUILDROOT}%{datadir}/%{name}/config.rpath
        end
 end
 
 packages
        package %{name}
+               provides
+                       bundled(gnulib)
+                       bundled(libcroco) = 0.6.12
+               end
+
+               filter_requires = (Shell)
+       end
 
        package %{name}-common-devel
                summary = Common development files for gettext.
@@ -65,6 +99,8 @@ packages
                files
                        /usr/share/gettext/
                end
+
+               filter_requires = (Shell)
        end
 
        package %{name}-devel
@@ -73,8 +109,11 @@ packages
                requires
                        gettext-common-devel=%{thisver}
                        gettext-libs=%{thisver}
+                       git
                end
 
+               filter_requires = (Shell)
+
                files += \
                        /usr/bin/autopoint \
                        /usr/share/man/man1/autopoint.1
@@ -83,6 +122,8 @@ packages
        package %{name}-libs
                template LIBS
 
+               filter_requires = (Shell)
+
                files
                        %{libdir}/libgettextlib-*.so
                        %{libdir}/libgettextpo.so.*