Skip to content
Snippets Groups Projects
Commit a5d653ac authored by baptiste daroussin's avatar baptiste daroussin
Browse files

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
----
parent 335c1f36
No related branches found
No related tags found
No related merge requests found
......@@ -791,6 +791,7 @@
SUBDIR += gettext-msghack
SUBDIR += gettext-po-mode
SUBDIR += gettext-runtime
SUBDIR += gettext-tiny
SUBDIR += gettext-tools
SUBDIR += gflags
SUBDIR += gh
......
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>
TIMESTAMP = 1618476901
SHA256 (gettext-tiny-0.3.2.tar.xz) = a9a72cfa21853f7d249592a3c6f6d36f5117028e24573d092f9184ab72bbe187
SIZE (gettext-tiny-0.3.2.tar.xz) = 48836
--- 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 $< $@
lightweight replacements for tools typically used from the GNU gettext suite
WWW: https://github.com/sabotage-linux/gettext-tiny
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment