Files
openwrt-packages/utils/gzip/Makefile
Josef Schlehofer 3bf64e39b2 gzip: update to version 1.14
Add TARGET_CFLAGS += -std=gnu17
to fix following error discovered by CI/CD:
2025-09-30T23:53:47.3168066Z In file included from gzip.c:66:
2025-09-30T23:53:47.3189341Z gzip.c:131:34: error: expected declaration specifiers or '...' before numeric constant
2025-09-30T23:53:47.3190258Z   131 | # define BUFFER_ALIGNED alignas (4096)
2025-09-30T23:53:47.3190760Z       |                                  ^~~~
2025-09-30T23:53:47.3191259Z gzip.h:108:39: note: in definition of macro 'DECLARE'
2025-09-30T23:53:47.3191864Z   108 | #  define DECLARE(type, array, size)  type array[size]
2025-09-30T23:53:47.3192411Z       |                                       ^~~~
2025-09-30T23:53:47.3192942Z gzip.c:135:13: note: in expansion of macro 'BUFFER_ALIGNED'
2025-09-30T23:53:47.3193587Z   135 | DECLARE(uch BUFFER_ALIGNED, inbuf,  INBUFSIZ +INBUF_EXTRA);
2025-09-30T23:53:47.3194137Z       |             ^~~~~~~~~~~~~~
2025-09-30T23:53:47.3194752Z gzip.c:131:34: error: expected declaration specifiers or '...' before numeric constant
2025-09-30T23:53:47.3195442Z   131 | # define BUFFER_ALIGNED alignas (4096)
2025-09-30T23:53:47.3195880Z       |                                  ^~~~
2025-09-30T23:53:47.3196330Z gzip.h:108:39: note: in definition of macro 'DECLARE'
2025-09-30T23:53:47.3197297Z   108 | #  define DECLARE(type, array, size)  type array[size]
2025-09-30T23:53:47.3197829Z       |                                       ^~~~
2025-09-30T23:53:47.3198342Z gzip.c:136:13: note: in expansion of macro 'BUFFER_ALIGNED'
2025-09-30T23:53:47.3199113Z   136 | DECLARE(uch BUFFER_ALIGNED, outbuf, OUTBUFSIZ+OUTBUF_EXTRA);
2025-09-30T23:53:47.3199957Z       |             ^~~~~~~~~~~~~~
2025-09-30T23:53:47.3200589Z gzip.c:131:34: error: expected declaration specifiers or '...' before numeric constant
2025-09-30T23:53:47.3201250Z   131 | # define BUFFER_ALIGNED alignas (4096)
2025-09-30T23:53:47.3201688Z       |                                  ^~~~
2025-09-30T23:53:47.3202128Z gzip.h:108:39: note: in definition of macro 'DECLARE'
2025-09-30T23:53:47.3202665Z   108 | #  define DECLARE(type, array, size)  type array[size]
2025-09-30T23:53:47.3203150Z       |                                       ^~~~
2025-09-30T23:53:47.3203642Z gzip.c:138:13: note: in expansion of macro 'BUFFER_ALIGNED'
2025-09-30T23:53:47.3204203Z   138 | DECLARE(uch BUFFER_ALIGNED, window, 2L*WSIZE);
2025-09-30T23:53:47.3204684Z       |             ^~~~~~~~~~~~~~

- Release announcement:
https://lists.gnu.org/archive/html/info-gnu/2025-04/msg00007.html

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2025-10-02 17:07:06 +03:00

59 lines
1.5 KiB
Makefile

#
# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=gzip
PKG_VERSION:=1.14
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gzip
PKG_HASH:=01a7b881bd220bfdf615f97b8718f80bdfd3f6add385b993dcf6efd14e8c0ac6
PKG_LICENSE:=GPL-3.0-or-later
PKG_CPE_ID:=cpe:/a:gnu:gzip
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/gzip
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Compression
TITLE:=gzip (GNU zip) is a compression utility.
URL:=https://www.gnu.org/software/gzip/
MAINTAINER:=Christian Beier <dontmind@freeshell.org>
ALTERNATIVES:=\
300:/bin/gunzip:/usr/libexec/gunzip-gnu \
300:/bin/gzip:/usr/libexec/gzip-gnu \
300:/bin/zcat:/usr/libexec/zcat-gnu
endef
define Package/gzip/description
gzip (GNU zip) is a compression utility designed to be a \
replacement for compress.
endef
TARGET_CFLAGS += -std=gnu17
CONFIGURE_VARS += \
gl_cv_func_getopt_gnu=yes \
ac_cv_search_clock_gettime=no
define Package/gzip/install
$(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
$(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gunzip $(1)/usr/libexec/gunzip-gnu
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gzip $(1)/usr/libexec/gzip-gnu
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zcat $(1)/usr/libexec/zcat-gnu
endef
$(eval $(call BuildPackage,gzip))