From 35ad8cc0ea5a0bb8235460772860b6cb1cf5a7b7 Mon Sep 17 00:00:00 2001 From: Guido Falsi Date: Wed, 22 Jan 2014 15:21:59 +0000 Subject: [PATCH] - Update to 5.0.23 - Convert to staging - Support NLS option - Remove uneeded file - Rename patch files according to standard PR: ports/185929 Submitted by: Lapo Luchini (maintainer) --- net/whois/Makefile | 24 ++++++++------ net/whois/distinfo | 4 +-- net/whois/files/have_nls-patch | 10 ------ net/whois/files/patch-Makefile | 33 ++++++++++++++++++++ net/whois/files/patch-aa | 52 ------------------------------- net/whois/files/patch-ac | 30 ------------------ net/whois/files/patch-po_Makefile | 26 ++++++++++++++++ net/whois/pkg-plist | 19 +++++++++++ 8 files changed, 94 insertions(+), 104 deletions(-) delete mode 100644 net/whois/files/have_nls-patch create mode 100644 net/whois/files/patch-Makefile delete mode 100644 net/whois/files/patch-aa delete mode 100644 net/whois/files/patch-ac create mode 100644 net/whois/files/patch-po_Makefile create mode 100644 net/whois/pkg-plist diff --git a/net/whois/Makefile b/net/whois/Makefile index 578e27b37485..cd6af7832b96 100644 --- a/net/whois/Makefile +++ b/net/whois/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= whois -PORTVERSION= 5.0.11 +PORTVERSION= 5.0.23 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL} DISTNAME= ${PORTNAME}_${PORTVERSION} @@ -14,20 +14,24 @@ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING USES= iconv gmake perl5 +USE_XZ= yes USE_PERL5= build +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +MAKE_ARGS= BASEDIR="${STAGEDIR}" -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +OPTIONS_DEFINE= NLS -MAKE_ARGS= OPTS="" +OPTIONS_SUB= yes +NLS_USES= gettext -MAN1= mwhois.1 mkpasswd.1 +.include -PLIST_FILES= bin/mwhois bin/mkpasswd - -NO_STAGE= yes post-patch: - @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g ; \ - s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/Makefile - @${REINPLACE_CMD} -e "s|/usr/share|${PREFIX}/share|g" ${WRKSRC}/po/Makefile + @${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/Makefile +.if ! ${PORT_OPTIONS:MNLS} + @${REINPLACE_CMD} -e "s| pos||" -e "s| install-pos||" \ + -e "s|-lintl||" ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e "s|# define ENABLE_NLS||" ${WRKSRC}/config.h +.endif .include diff --git a/net/whois/distinfo b/net/whois/distinfo index 36279c0205bd..f5fe2c0eab99 100644 --- a/net/whois/distinfo +++ b/net/whois/distinfo @@ -1,2 +1,2 @@ -SHA256 (whois_5.0.11.tar.gz) = 7f257a3104b14b7fe17f31a7b873e50c590df10e46cbab9942f9ad0a4a49c7ce -SIZE (whois_5.0.11.tar.gz) = 81195 +SHA256 (whois_5.0.23.tar.xz) = 6b486a42a4aa83b5f921083d518176726b6d2d903bc8dab5c6126ebe2bea1bf1 +SIZE (whois_5.0.23.tar.xz) = 70116 diff --git a/net/whois/files/have_nls-patch b/net/whois/files/have_nls-patch deleted file mode 100644 index 936dd2aeb5d0..000000000000 --- a/net/whois/files/have_nls-patch +++ /dev/null @@ -1,10 +0,0 @@ ---- config.h.orgi 2008-12-24 19:41:30.000000000 +0100 -+++ config.h 2008-12-24 19:42:35.000000000 +0100 -@@ -24,7 +24,6 @@ - /* which versions? */ - # define HAVE_GETOPT_LONG - # define HAVE_GETADDRINFO --# define ENABLE_NLS - # ifndef LOCALEDIR - # define LOCALEDIR "/usr/local/share/locale" - # endif diff --git a/net/whois/files/patch-Makefile b/net/whois/files/patch-Makefile new file mode 100644 index 000000000000..cb73e3c22c4a --- /dev/null +++ b/net/whois/files/patch-Makefile @@ -0,0 +1,33 @@ +--- Makefile.orig 2013-03-30 02:31:42.000000000 +0100 ++++ Makefile 2014-01-20 18:16:15.000000000 +0100 +@@ -1,6 +1,8 @@ +-prefix = /usr ++prefix = ${PREFIX} + + CFLAGS ?= -g -O2 ++LDFLAGS += -L/usr/local/lib -lintl ++CFLAGS += -I/usr/local/include + + PERL = perl + INSTALL = install +@@ -92,15 +94,15 @@ + + install-whois: whois + $(INSTALL) -d $(BASEDIR)$(prefix)/bin/ +- $(INSTALL) -d $(BASEDIR)$(prefix)/share/man/man1/ +- $(INSTALL) -m 0755 whois $(BASEDIR)$(prefix)/bin/ +- $(INSTALL) -m 0644 whois.1 $(BASEDIR)$(prefix)/share/man/man1/ ++ $(INSTALL) -d $(BASEDIR)$(prefix)/man/man1/ ++ $(INSTALL) -m 0755 whois $(BASEDIR)$(prefix)/bin/mwhois ++ $(INSTALL) -m 0644 whois.1 $(BASEDIR)$(prefix)/man/man1/mwhois.1 + + install-mkpasswd: mkpasswd + $(INSTALL) -d $(BASEDIR)$(prefix)/bin/ +- $(INSTALL) -d $(BASEDIR)$(prefix)/share/man/man1/ ++ $(INSTALL) -d $(BASEDIR)$(prefix)/man/man1/ + $(INSTALL) -m 0755 mkpasswd $(BASEDIR)$(prefix)/bin/ +- $(INSTALL) -m 0644 mkpasswd.1 $(BASEDIR)$(prefix)/share/man/man1/ ++ $(INSTALL) -m 0644 mkpasswd.1 $(BASEDIR)$(prefix)/man/man1/ + + install-pos: + cd po && $(MAKE) install diff --git a/net/whois/files/patch-aa b/net/whois/files/patch-aa deleted file mode 100644 index 1859b912f40e..000000000000 --- a/net/whois/files/patch-aa +++ /dev/null @@ -1,52 +0,0 @@ ---- Makefile.orgi 2008-12-24 19:32:32.000000000 +0100 -+++ Makefile 2008-12-24 19:33:58.000000000 +0100 -@@ -1,6 +1,9 @@ --prefix = /usr -+prefix = %%PREFIX%% - --CFLAGS = -g -O2 -+LDFLAGS+=-L%%LOCALBASE%%/lib -lintl -+CFLAGS+=-I%%LOCALBASE%%/include -+ -+CFLAGS += -g -O2 - - PERL = perl - INSTALL = install -@@ -21,7 +24,7 @@ - endif - - ifdef LOCALEDIR --DEFS += -DLOCALEDIR=\"$(BASEDIR)$(prefix)/share/locale\" -+DEFS += -DLOCALEDIR=\"$(prefix)/share/locale\" - endif - - ifdef HAVE_LIBIDN -@@ -68,19 +71,19 @@ - $(PERL) -w make_tld_serv.pl < tld_serv_list > $@ - - ############################################################################## --install: install-whois install-mkpasswd #install-pos -+install: install-whois install-mkpasswd - - install-whois: whois -- $(INSTALL) -d $(BASEDIR)$(prefix)/bin/ -- $(INSTALL) -d $(BASEDIR)$(prefix)/share/man/man1/ -- $(INSTALL) -m 0755 whois $(BASEDIR)$(prefix)/bin/ -- $(INSTALL) -m 0644 whois.1 $(BASEDIR)$(prefix)/share/man/man1/ -+ $(INSTALL) -d $(prefix)/bin/ -+ $(INSTALL) -d $(prefix)/man/man1/ -+ $(INSTALL) -m 0755 whois $(prefix)/bin/mwhois -+ $(INSTALL) -m 0644 whois.1 $(prefix)/man/man1/mwhois.1 - - install-mkpasswd: mkpasswd -- $(INSTALL) -d $(BASEDIR)$(prefix)/bin/ -- $(INSTALL) -d $(BASEDIR)$(prefix)/share/man/man1/ -- $(INSTALL) -m 0755 mkpasswd $(BASEDIR)$(prefix)/bin/ -- $(INSTALL) -m 0644 mkpasswd.1 $(BASEDIR)$(prefix)/share/man/man1/ -+ $(INSTALL) -d $(prefix)/bin/ -+ $(INSTALL) -d $(prefix)/man/man1/ -+ $(INSTALL) -m 0755 mkpasswd $(prefix)/bin/ -+ $(INSTALL) -m 0644 mkpasswd.1 $(prefix)/man/man1/ - - install-pos: - cd po && $(MAKE) install diff --git a/net/whois/files/patch-ac b/net/whois/files/patch-ac deleted file mode 100644 index da130295e525..000000000000 --- a/net/whois/files/patch-ac +++ /dev/null @@ -1,30 +0,0 @@ -*** work/whois-4.6.13/po/Makefile Thu Apr 15 15:58:17 2004 ---- po/Makefile Thu Apr 15 15:58:47 2004 -*************** -*** 7,12 **** ---- 7,14 ---- - - POTFILES=../whois.c ../mkpasswd.c - -+ .SUFFIXES: .po .mo -+ - all: $(PACKAGE).pot $(CATALOGS) - - $(PACKAGE).pot: $(POTFILES) -*************** -*** 31,37 **** - fi; \ - done - -! %.mo: %.po - msgfmt --statistics --check --verbose --output-file=$@ $< - - clean: ---- 33,39 ---- - fi; \ - done - -! .po.mo: - msgfmt --statistics --check --verbose --output-file=$@ $< - - clean: diff --git a/net/whois/files/patch-po_Makefile b/net/whois/files/patch-po_Makefile new file mode 100644 index 000000000000..4161407cf29c --- /dev/null +++ b/net/whois/files/patch-po_Makefile @@ -0,0 +1,26 @@ +--- po/Makefile.orig 2013-03-30 02:31:41.000000000 +0100 ++++ po/Makefile 2014-01-20 17:52:17.051238058 +0100 +@@ -1,4 +1,4 @@ +-prefix = /usr ++prefix = ${PREFIX} + + INSTALL= install + +@@ -10,6 +10,8 @@ + + POTFILES=../whois.c ../mkpasswd.c + ++.SUFFIXES: .po .mo ++ + all: $(PACKAGE).pot $(CATALOGS) + + $(PACKAGE).pot: $(POTFILES) +@@ -34,7 +36,7 @@ + fi; \ + done + +-%.mo: %.po ++.po.mo: + msgfmt --statistics --check --verbose --output-file=$@ $< + + clean: diff --git a/net/whois/pkg-plist b/net/whois/pkg-plist new file mode 100644 index 000000000000..fb1a8c46784c --- /dev/null +++ b/net/whois/pkg-plist @@ -0,0 +1,19 @@ +bin/mkpasswd +bin/mwhois +man/man1/mkpasswd.1.gz +man/man1/mwhois.1.gz +%%NLS%%share/locale/cs/LC_MESSAGES/whois.mo +%%NLS%%share/locale/da/LC_MESSAGES/whois.mo +%%NLS%%share/locale/de/LC_MESSAGES/whois.mo +%%NLS%%share/locale/el/LC_MESSAGES/whois.mo +%%NLS%%share/locale/es/LC_MESSAGES/whois.mo +%%NLS%%share/locale/eu/LC_MESSAGES/whois.mo +%%NLS%%share/locale/fi/LC_MESSAGES/whois.mo +%%NLS%%share/locale/fr/LC_MESSAGES/whois.mo +%%NLS%%share/locale/it/LC_MESSAGES/whois.mo +%%NLS%%share/locale/ja/LC_MESSAGES/whois.mo +%%NLS%%share/locale/no/LC_MESSAGES/whois.mo +%%NLS%%share/locale/pl/LC_MESSAGES/whois.mo +%%NLS%%share/locale/pt_BR/LC_MESSAGES/whois.mo +%%NLS%%share/locale/ru/LC_MESSAGES/whois.mo +%%NLS%%share/locale/zh_CN/LC_MESSAGES/whois.mo