]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - gettext/gettext.nm
gettext: Drop unneccessary stuff
[ipfire-3.x.git] / gettext / gettext.nm
index 22f45f667a6b2465dd6b05ea1a045abed082caa8..f49862f0dd20d2712328615ae3b46a4044d73840 100644 (file)
@@ -4,11 +4,11 @@
 ###############################################################################
 
 name       = gettext
-version    = 0.19.5
-release    = 1
+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,7 +25,8 @@ 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
@@ -33,7 +34,6 @@ build
                chrpath
                expat-devel
                glib2-devel
-               libcroco-devel
                libunistring-devel
                libxml2-devel
                ncurses-devel
@@ -44,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
@@ -58,12 +65,30 @@ build
 
                # 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)
+               provides
+                       bundled(gnulib)
+                       bundled(libcroco) = 0.6.12
+               end
+
+               filter_requires = (Shell)
        end
 
        package %{name}-common-devel
@@ -74,6 +99,8 @@ packages
                files
                        /usr/share/gettext/
                end
+
+               filter_requires = (Shell)
        end
 
        package %{name}-devel
@@ -85,6 +112,8 @@ packages
                        git
                end
 
+               filter_requires = (Shell)
+
                files += \
                        /usr/bin/autopoint \
                        /usr/share/man/man1/autopoint.1
@@ -93,6 +122,8 @@ packages
        package %{name}-libs
                template LIBS
 
+               filter_requires = (Shell)
+
                files
                        %{libdir}/libgettextlib-*.so
                        %{libdir}/libgettextpo.so.*