Date: Thu, 15 Apr 2021 09:21:45 GMT From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: a5d653acf8bf - main - devel/gettext-tiny: new port Message-ID: <202104150921.13F9Lj29035384@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=a5d653acf8bfc2c05a1cf2be3b31f7751ed5d499 commit a5d653acf8bfc2c05a1cf2be3b31f7751ed5d499 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2021-04-15 09:20:24 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2021-04-15 09:21:38 +0000 devel/gettext-tiny: new port To avoid runtime conflict with GNU gettext prefix all the binaries with "tiny-" --- lightweight replacements for tools typically used from the GNU gettext suite WWW: https://github.com/sabotage-linux/gettext-tiny ---- --- devel/Makefile | 1 + devel/gettext-tiny/Makefile | 31 ++++++++++ devel/gettext-tiny/distinfo | 3 + devel/gettext-tiny/files/patch-Makefile | 102 ++++++++++++++++++++++++++++++++ devel/gettext-tiny/pkg-descr | 3 + 5 files changed, 140 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 2c110b86fa44..4d217d6a5035 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -791,6 +791,7 @@ SUBDIR += gettext-msghack SUBDIR += gettext-po-mode SUBDIR += gettext-runtime + SUBDIR += gettext-tiny SUBDIR += gettext-tools SUBDIR += gflags SUBDIR += gh diff --git a/devel/gettext-tiny/Makefile b/devel/gettext-tiny/Makefile new file mode 100644 index 000000000000..08d07023b2a3 --- /dev/null +++ b/devel/gettext-tiny/Makefile @@ -0,0 +1,31 @@ +PORTNAME= gettext-tiny +PORTVERSION= 0.3.2 +CATEGORIES= devel +MASTER_SITES= https://ftp.barfooze.de/pub/sabotage/tarballs/ \ + http://ftp.barfooze.de/pub/sabotage/tarballs/ + +MAINTAINER= bapt@FreeBSD.org +COMMENT= Replacements for tools typically used from the GNU gettext suite + +LICENSE= MIT +LICENSE_FILES= ${WRKSRC}/LICENSE + +USES= tar:xz +TOOLS= msgfmt msgmerge +SCRIPTS= xgettext + +PLIST_FILES= ${TOOLS:C,^,bin/tiny-,} \ + ${SCRIPTS:C,^,bin/tiny-,} + +MAKE_ARGS= prefix=${PREFIX} + +do-install: +.for t in ${TOOLS} + ${INSTALL_PROGRAM} ${WRKSRC}/$t ${STAGEDIR}${PREFIX}/bin/tiny-$t +.endfor +.for s in ${SCRIPTS} + ${INSTALL_SCRIPT} ${WRKSRC}/$s ${STAGEDIR}${PREFIX}/bin/tiny-$s +.endfor + +.include <bsd.port.mk> + diff --git a/devel/gettext-tiny/distinfo b/devel/gettext-tiny/distinfo new file mode 100644 index 000000000000..efcf84a6fde0 --- /dev/null +++ b/devel/gettext-tiny/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1618476901 +SHA256 (gettext-tiny-0.3.2.tar.xz) = a9a72cfa21853f7d249592a3c6f6d36f5117028e24573d092f9184ab72bbe187 +SIZE (gettext-tiny-0.3.2.tar.xz) = 48836 diff --git a/devel/gettext-tiny/files/patch-Makefile b/devel/gettext-tiny/files/patch-Makefile new file mode 100644 index 000000000000..7e83facbc976 --- /dev/null +++ b/devel/gettext-tiny/files/patch-Makefile @@ -0,0 +1,102 @@ +--- Makefile.orig 2020-04-06 10:43:29 UTC ++++ Makefile +@@ -7,17 +7,13 @@ datarootdir=$(prefix)/share + datadir=$(datarootdir)/gettext-tiny + acdir=$(datarootdir)/aclocal + +-ifeq ($(LIBINTL), MUSL) +- LIBSRC = libintl/libintl-musl.c +- HEADERS = +-else ifeq ($(LIBINTL), NONE) +- LIBSRC = +- HEADERS = +-else +- LIBSRC = libintl/libintl.c +- HEADERS = libintl.h +-endif +-PROGSRC = $(sort $(wildcard src/*.c)) ++LIBSRC = ++HEADERS = ++PROGSRC = \ ++ src/StringEscape.c \ ++ src/msgfmt.c \ ++ src/msgmerge.c \ ++ src/poparser.c + + PARSEROBJS = src/poparser.o src/StringEscape.o + PROGOBJS = $(PROGSRC:.c=.o) +@@ -25,25 +21,56 @@ LIBOBJS = $(LIBSRC:.c=.o) + OBJS = $(PROGOBJS) $(LIBOBJS) + + ALL_INCLUDES = $(HEADERS) +-ifneq ($(LIBINTL), NONE) +-ALL_LIBS=libintl.a +-endif + ALL_TOOLS=msgfmt msgmerge xgettext autopoint +-ALL_M4S=$(sort $(wildcard m4/*.m4)) +-ALL_DATA=$(sort $(wildcard data/*)) ++ALL_M4S= \ ++ m4/ansi-c++.m4 \ ++ m4/codeset.m4 \ ++ m4/configheader.m4 \ ++ m4/fcntl-o.m4 \ ++ m4/gettext.m4 \ ++ m4/glibc2.m4 \ ++ m4/glibc21.m4 \ ++ m4/iconv.m4 \ ++ m4/intdiv0.m4 \ ++ m4/intl.m4 \ ++ m4/intldir.m4 \ ++ m4/intlmacosx.m4 \ ++ m4/intmax.m4 \ ++ m4/inttypes-pri.m4 \ ++ m4/inttypes_h.m4 \ ++ m4/lcmessage.m4 \ ++ m4/lib-ld.m4 \ ++ m4/lib-link.m4 \ ++ m4/lib-prefix.m4 \ ++ m4/lock.m4 \ ++ m4/longlong.m4 \ ++ m4/nls.m4 \ ++ m4/po.m4 \ ++ m4/printf-posix.m4 \ ++ m4/progtest.m4 \ ++ m4/size_max.m4 \ ++ m4/stdint_h.m4 \ ++ m4/threadlib.m4 \ ++ m4/uintmax_t.m4 \ ++ m4/visibility.m4 \ ++ m4/wchar_t.m4 \ ++ m4/wint_t.m4 \ ++ m4/xsize.m4 + +-CFLAGS=-O0 -fPIC ++ALL_DATA= \ ++ data/Makevars.template \ ++ data/autopoint_Makefile.in + ++CFLAGS ?=-O0 -fPIC ++ + AR ?= $(CROSS_COMPILE)ar + RANLIB ?= $(CROSS_COMPILE)ranlib + CC ?= $(CROSS_COMPILE)cc + + INSTALL ?= ./install.sh + +--include config.mak ++LDLIBS= + +-LDLIBS:=$(shell echo "int main(){}" | $(CC) -liconv -x c - >/dev/null 2>&1 && printf %s -liconv) +- + BUILDCFLAGS=$(CFLAGS) + + all: $(ALL_LIBS) $(ALL_TOOLS) +@@ -73,7 +100,7 @@ xgettext: + cp src/xgettext.sh ./xgettext + + autopoint: src/autopoint.in +- cat $< | sed 's,@datadir@,$(datadir),' > $@ ++ cat $> | sed 's,@datadir@,$(datadir),' > $@ + + $(DESTDIR)$(libdir)/%.a: %.a + $(INSTALL) -D -m 755 $< $@ diff --git a/devel/gettext-tiny/pkg-descr b/devel/gettext-tiny/pkg-descr new file mode 100644 index 000000000000..a198db56d10b --- /dev/null +++ b/devel/gettext-tiny/pkg-descr @@ -0,0 +1,3 @@ +lightweight replacements for tools typically used from the GNU gettext suite + +WWW: https://github.com/sabotage-linux/gettext-tiny
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104150921.13F9Lj29035384>