one binary to shrink them all and in a small package bind them...

This commit is contained in:
espie 2002-03-26 17:49:58 +00:00
parent 0238a843df
commit 4b5854ca00
10 changed files with 176 additions and 0 deletions

View File

@ -0,0 +1,44 @@
$OpenBSD: patch-src_Makefile_in,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/Makefile.in.orig Sat Sep 15 02:47:52 2001
+++ src/Makefile.in Mon Mar 25 01:35:24 2002
@@ -156,10 +156,17 @@ bin_PROGRAMS = gettext$(EXEEXT) ngettex
msgfmt$(EXEEXT) msgmerge$(EXEEXT) msgunfmt$(EXEEXT) xgettext$(EXEEXT) \
msgcomm$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
+bin_PROGRAMS = wrapper
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+wrapper_OBJECTS= gettext.o ngettext.o msgcmp.o message.o msgfmt.o msgmerge.o msgunfmt.o xgettext.o msgcomm.o open-po.o po-gram-gen.o po-hash-gen.o po-lex.o po.o str-list.o dir-list.o write-po.o wrapper.o xget-lex.o
+
+wrapper_LDADD = $(LDADD)
+wrapper_DEPENDENCIES = ../lib/libnlsut.a
+wrapper_LDFLAGS =
+
gettext_OBJECTS = gettext.$(OBJEXT)
gettext_LDADD = $(LDADD)
gettext_DEPENDENCIES = ../lib/libnlsut.a
@@ -240,6 +247,11 @@ distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) wrapper $(DESTDIR)$(bindir)/gettext
+ for i in ngettext msgcmp msgfmt msgmerge msgunfmt xgettext \
+ msgcomm; do ln ${DESTDIR}$(bindir)/gettext ${DESTDIR}$(bindir)/$$i; done
+
+oinstall-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
@@ -298,6 +310,10 @@ clean-libtool:
distclean-libtool:
maintainer-clean-libtool:
+
+wrapper: $(wrapper_OBJECTS) $(wrapper_DEPENDENCIES)
+ @rm -f wrapper
+ $(LINK) $(wrapper_LDFLAGS) $(wrapper_OBJECTS) $(wrapper_LDADD) $(LIBS)
gettext$(EXEEXT): $(gettext_OBJECTS) $(gettext_DEPENDENCIES)
@rm -f gettext$(EXEEXT)

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-src_gettext_c,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/gettext.c.orig Wed Apr 4 23:39:11 2001
+++ src/gettext.c Mon Mar 25 01:21:05 2002
@@ -72,7 +72,11 @@ static void usage PARAMS ((int __status)
static const char *expand_escape PARAMS ((const char *__str));
int
+#ifdef TESTS
main (argc, argv)
+#else
+main_gettext (argc, argv)
+#endif
int argc;
char *argv[];
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_msgcmp_c,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/msgcmp.c.orig Mon Mar 25 01:08:55 2002
+++ src/msgcmp.c Mon Mar 25 01:09:28 2002
@@ -85,7 +85,7 @@ static void compare_parse_debrief PARAMS
int
-main (argc, argv)
+main_msgcmp (argc, argv)
int argc;
char *argv[];
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_msgcomm_c,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/msgcomm.c.orig Mon Mar 25 01:08:55 2002
+++ src/msgcomm.c Mon Mar 25 01:09:34 2002
@@ -129,7 +129,7 @@ static void read_po_file PARAMS ((const
int
-main (argc, argv)
+main_msgcomm (argc, argv)
int argc;
char *argv[];
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_msgfmt_c,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/msgfmt.c.orig Mon Mar 25 01:08:55 2002
+++ src/msgfmt.c Mon Mar 25 01:09:39 2002
@@ -191,7 +191,7 @@ static const char *add_mo_suffix PARAMS
int
-main (argc, argv)
+main_msgfmt (argc, argv)
int argc;
char *argv[];
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_msgmerge_c,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/msgmerge.c.orig Mon Mar 25 01:08:55 2002
+++ src/msgmerge.c Mon Mar 25 01:09:45 2002
@@ -139,7 +139,7 @@ static void compendium PARAMS ((const ch
int
-main (argc, argv)
+main_msgmerge (argc, argv)
int argc;
char **argv;
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_msgunfmt_c,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/msgunfmt.c.orig Mon Mar 25 01:08:55 2002
+++ src/msgunfmt.c Mon Mar 25 01:09:50 2002
@@ -88,7 +88,7 @@ static message_list_ty *read_mo_file PAR
int
-main (argc, argv)
+main_msgunfmt (argc, argv)
int argc;
char **argv;
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_ngettext_c,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/ngettext.c.orig Mon Mar 25 01:08:55 2002
+++ src/ngettext.c Mon Mar 25 01:09:55 2002
@@ -57,7 +57,7 @@ static void usage PARAMS ((int __status)
static const char *expand_escape PARAMS ((const char *__str));
int
-main (argc, argv)
+main_ngettext (argc, argv)
int argc;
char *argv[];
{

View File

@ -0,0 +1,33 @@
$OpenBSD: patch-src_wrapper_c,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/wrapper.c.orig Mon Mar 25 03:27:03 2002
+++ src/wrapper.c Mon Mar 25 03:28:04 2002
@@ -0,0 +1,29 @@
+#include <string.h>
+
+
+int
+main(int argc, char *argv[])
+{
+ char *n = strrchr(argv[0], '/');
+ if (n)
+ n++;
+ else
+ n = argv[0];
+ if (strcmp(n, "gettext")==0)
+ return main_gettext(argc, argv);
+ if (strcmp(n, "ngettext")==0)
+ return main_ngettext(argc, argv);
+ if (strcmp(n, "msgcmp")==0)
+ return main_msgcmp(argc, argv);
+ if (strcmp(n, "msgfmt")==0)
+ return main_msgfmt(argc, argv);
+ if (strcmp(n, "msgmerge")==0)
+ return main_msgmerge(argc, argv);
+ if (strcmp(n, "msgunfmt")==0)
+ return main_msgunfmt(argc, argv);
+ if (strcmp(n, "xgettext")==0)
+ return main_xgettext(argc, argv);
+ if (strcmp(n, "msgcomm")==0)
+ return main_msgcomm(argc, argv);
+ return 1;
+}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_xgettext_c,v 1.1 2002/03/26 17:49:58 espie Exp $
--- src/xgettext.c.orig Mon Mar 25 01:08:55 2002
+++ src/xgettext.c Mon Mar 25 01:10:01 2002
@@ -195,7 +195,7 @@ static scanner_fp language_to_scanner PA
int
-main (argc, argv)
+main_xgettext (argc, argv)
int argc;
char *argv[];
{