git: 8cef01d3b3f0 - main - misc/getopt: Use util-linux repo as upstream

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 03 Nov 2024 11:50:27 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8cef01d3b3f0fb26a1f769c34a632c309ed1bfa4

commit 8cef01d3b3f0fb26a1f769c34a632c309ed1bfa4
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-11-03 11:32:39 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-11-03 11:35:07 +0000

    misc/getopt: Use util-linux repo as upstream
    
    - Unmark DEPRECATED and remove EXPIRATION_DATE
    - Bump PORTREVISION for package change
    
    Changes:        https://github.com/util-linux/util-linux/commits/master/misc-utils/getopt.c
                    https://github.com/util-linux/util-linux/commits/master/misc-utils/getopt.1.adoc
---
 misc/getopt/Makefile                | 42 ++++++++++++++-----------------
 misc/getopt/distinfo                |  6 ++---
 misc/getopt/files/patch-Makefile    | 49 -------------------------------------
 misc/getopt/files/patch-Makefile.in | 20 +++++++++++++++
 misc/getopt/files/patch-configure   | 11 +++++++++
 misc/getopt/pkg-plist               | 29 +++-------------------
 6 files changed, 55 insertions(+), 102 deletions(-)

diff --git a/misc/getopt/Makefile b/misc/getopt/Makefile
index 7dcb45220b28..364220576706 100644
--- a/misc/getopt/Makefile
+++ b/misc/getopt/Makefile
@@ -1,38 +1,32 @@
 PORTNAME=	getopt
 PORTVERSION=	1.1.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	misc
-MASTER_SITES=	http://frodo.looijaard.name/system/files/software/getopt/ \
-		LOCAL/sunpoet
+MASTER_SITES=	KERNEL_ORG/linux/utils/util-linux/v${UTIL_LINUX_PORTVERSION:R}/
+DISTNAME=	util-linux-${UTIL_LINUX_PORTVERSION}
 
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Replacement for getopt(1) that supports GNU-style long options
-WWW=		https://software.frodo.looijaard.name/getopt/
+WWW=		https://github.com/util-linux/util-linux
 
-LICENSE=	GPLv2 GPLv3
-LICENSE_COMB=	dual
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
 
-DEPRECATED=	Use getopt from devel/util-linux instead
-EXPIRATION_DATE=2024-10-31
+USES=		gmake pkgconfig shebangfix tar:xz
 
-OPTIONS_DEFINE=	DOCS NLS
-OPTIONS_SUB=	yes
+CONFIGURE_ARGS=	--disable-asciidoc \
+		--disable-all-programs \
+		--disable-gtk-doc \
+		--disable-nls \
+		--disable-makeinstall-chown \
+		--disable-makeinstall-setuid \
+		--with-pkgconfigdir=${PREFIX}/libdata/pkgconfig
+GNU_CONFIGURE=	yes
 
-MAKE_ARGS=	CC=${CC} LIBCGETOPT=0
-USES=		gmake
+SHEBANG_FILES=	misc-utils/getopt-example.bash
 
-PORTDOCS=	Changelog README
+UTIL_LINUX_PORTVERSION=	2.39.4
 
-NLS_MAKE_ARGS=		WITHOUT_GETTEXT=0
-NLS_MAKE_ARGS_OFF=	WITHOUT_GETTEXT=1
-NLS_LDFLAGS=		-lintl
-NLS_USES=		gettext localbase:ldflags
-
-post-install:
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/getopt
-
-post-install-DOCS-on:
-	${MKDIR} ${STAGEDIR}${DOCSDIR}/
-	cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/
+OPTIONS_DEFINE=	DOCS
 
 .include <bsd.port.mk>
diff --git a/misc/getopt/distinfo b/misc/getopt/distinfo
index 649952d571db..bcb689df13a7 100644
--- a/misc/getopt/distinfo
+++ b/misc/getopt/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1730633654
-SHA256 (getopt-1.1.6.tar.gz) = d0bf1dc642a993e7388a1cddfb9409bed375c21d5278056ccca3a0acd09dc5fe
-SIZE (getopt-1.1.6.tar.gz) = 58926
+TIMESTAMP = 1714112744
+SHA256 (util-linux-2.39.4.tar.xz) = 6c4f8723dafd41c39d93ecbf16509fc88c33cd5bd3277880ae5a1d97a014fd0e
+SIZE (util-linux-2.39.4.tar.xz) = 8541176
diff --git a/misc/getopt/files/patch-Makefile b/misc/getopt/files/patch-Makefile
deleted file mode 100644
index 3383ee09c28f..000000000000
--- a/misc/getopt/files/patch-Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
---- Makefile.orig	2014-11-24 12:33:39 UTC
-+++ Makefile
-@@ -1,9 +1,9 @@ DESTDIR=
- .SUFFIXES:
- 
- DESTDIR=
--prefix=/usr/local
-+prefix=$(PREFIX)
- bindir=$(prefix)/bin
--mandir=$(prefix)/man
-+mandir=$(prefix)/share/man
- man1dir=$(mandir)/man1
- sharedir=$(prefix)/share
- getoptdir=$(sharedir)/getopt
-@@ -32,18 +32,15 @@ MOFILES:=$(patsubst %,po/%.mo,$(LANGUAGES))
- LANGUAGES = ca cs da de es et eu fi fr gl hr hu id it ja nl pl pt_BR ru sl sv tr uk vi zh_CN zh_TW
- MOFILES:=$(patsubst %,po/%.mo,$(LANGUAGES))
- 
--CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITHOUT_GETTEXT=$(WITHOUT_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"$(PACKAGE)\"  -Dprogram_version=\"$(VERSION)\"
-+CPPFLAGS+=-DLIBCGETOPT=$(LIBCGETOPT) -DWITHOUT_GETTEXT=$(WITHOUT_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"$(PACKAGE)\"  -Dprogram_version=\"$(VERSION)\"
- ifeq ($(LIBCGETOPT),0)
--CPPFLAGS+=-I./gnu 
-+CPPFLAGS+=-I./gnu
- endif
- WARNINGS=-Wall \
-          -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual \
-          -Wcast-align -Wmissing-declarations \
-          -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-          -Wnested-externs -Winline
--OPTIMIZE=-O3 -fno-strength-reduce
--CFLAGS=$(WARNINGS) $(OPTIMIZE)
--LDFLAGS=
- 
- sources=getopt.c
- ifeq ($(LIBCGETOPT),0)
-@@ -54,11 +51,11 @@ binaries=getopt
- 
- binaries=getopt
- 
--.PHONY: all clean realclean 
-+.PHONY: all clean realclean
- all: $(binaries) all_po
- 
- clean: clean_po
--	-$(RM) $(objects) $(binaries) 
-+	-$(RM) $(objects) $(binaries)
- 
- getopt: $(objects)
- 	$(CC) $(LDFLAGS) -o $@ $(objects)
diff --git a/misc/getopt/files/patch-Makefile.in b/misc/getopt/files/patch-Makefile.in
new file mode 100644
index 000000000000..2e5784155571
--- /dev/null
+++ b/misc/getopt/files/patch-Makefile.in
@@ -0,0 +1,20 @@
+--- Makefile.in.orig	2024-04-04 09:13:52 UTC
++++ Makefile.in
+@@ -5335,7 +5335,7 @@ ADOCFILES_COMMON = man-common/bugreports.adoc man-comm
+ 	man-common/footer-lib.adoc man-common/help-version.adoc \
+ 	man-common/in-bytes.adoc man-common/manpage-stub.adoc \
+ 	man-common/translation.adoc
+-MANPAGES = lib/terminal-colors.d.5 $(am__append_20) $(am__append_44) \
++MANPAGES = $(am__append_20) $(am__append_44) \
+ 	$(am__append_91) $(am__append_94) $(am__append_97) \
+ 	$(am__append_100) $(am__append_103) $(am__append_106) \
+ 	$(am__append_109) $(am__append_112) $(am__append_115) \
+@@ -5436,7 +5436,7 @@ CLEANFILES = $(am__append_336) $(PATHFILES) $(EXTRA_LT
+ 	disk-utils/meson.build login-utils/meson.build \
+ 	$(PATHFILES:=.in) $(am__append_667) $(am__append_670)
+ CLEANFILES = $(am__append_336) $(PATHFILES) $(EXTRA_LTLIBRARIES)
+-SUBDIRS = po $(am__append_3) $(am__append_41) $(am__append_63) \
++SUBDIRS = $(am__append_3) $(am__append_41) $(am__append_63) \
+ 	$(am__append_73) $(am__append_87)
+ RCS_FIND_IGNORE = \( -name SCCS -o -name BitKeeper -o -name .svn -o \
+ 		-name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o
diff --git a/misc/getopt/files/patch-configure b/misc/getopt/files/patch-configure
new file mode 100644
index 000000000000..9a98bdbaa070
--- /dev/null
+++ b/misc/getopt/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig	2024-04-04 09:13:50 UTC
++++ configure
+@@ -35861,7 +35861,7 @@ fi
+   enable_getopt=$ul_default_estate
+   build_getopt=yes
+   if test "x$ul_default_estate" = xno; then
+-    build_getopt=no
++    build_getopt=yes
+   fi
+ else
+ 
diff --git a/misc/getopt/pkg-plist b/misc/getopt/pkg-plist
index c1a68f51212d..9750a1ad4723 100644
--- a/misc/getopt/pkg-plist
+++ b/misc/getopt/pkg-plist
@@ -1,28 +1,5 @@
 bin/getopt
-%%NLS%%share/locale/ca/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/cs/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/da/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/de/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/es/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/et/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/eu/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/fi/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/fr/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/gl/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/hr/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/hu/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/id/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/it/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/ja/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/nl/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/pl/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/pt_BR/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/ru/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/sl/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/sv/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/tr/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/uk/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/vi/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/zh_CN/LC_MESSAGES/getopt.mo
-%%NLS%%share/locale/zh_TW/LC_MESSAGES/getopt.mo
+share/bash-completion/completions/getopt
+%%PORTDOCS%%share/doc/util-linux/getopt-example.bash
+%%PORTDOCS%%share/doc/util-linux/getopt-example.tcsh
 share/man/man1/getopt.1.gz