From 4b5854ca00baf65bae36b69376faf0295c319570 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 26 Mar 2002 17:49:58 +0000 Subject: [PATCH] one binary to shrink them all and in a small package bind them... --- devel/gettext/patches/patch-src_Makefile_in | 44 +++++++++++++++++++++ devel/gettext/patches/patch-src_gettext_c | 15 +++++++ devel/gettext/patches/patch-src_msgcmp_c | 12 ++++++ devel/gettext/patches/patch-src_msgcomm_c | 12 ++++++ devel/gettext/patches/patch-src_msgfmt_c | 12 ++++++ devel/gettext/patches/patch-src_msgmerge_c | 12 ++++++ devel/gettext/patches/patch-src_msgunfmt_c | 12 ++++++ devel/gettext/patches/patch-src_ngettext_c | 12 ++++++ devel/gettext/patches/patch-src_wrapper_c | 33 ++++++++++++++++ devel/gettext/patches/patch-src_xgettext_c | 12 ++++++ 10 files changed, 176 insertions(+) create mode 100644 devel/gettext/patches/patch-src_Makefile_in create mode 100644 devel/gettext/patches/patch-src_gettext_c create mode 100644 devel/gettext/patches/patch-src_msgcmp_c create mode 100644 devel/gettext/patches/patch-src_msgcomm_c create mode 100644 devel/gettext/patches/patch-src_msgfmt_c create mode 100644 devel/gettext/patches/patch-src_msgmerge_c create mode 100644 devel/gettext/patches/patch-src_msgunfmt_c create mode 100644 devel/gettext/patches/patch-src_ngettext_c create mode 100644 devel/gettext/patches/patch-src_wrapper_c create mode 100644 devel/gettext/patches/patch-src_xgettext_c diff --git a/devel/gettext/patches/patch-src_Makefile_in b/devel/gettext/patches/patch-src_Makefile_in new file mode 100644 index 00000000000..8adee5b2f5a --- /dev/null +++ b/devel/gettext/patches/patch-src_Makefile_in @@ -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) diff --git a/devel/gettext/patches/patch-src_gettext_c b/devel/gettext/patches/patch-src_gettext_c new file mode 100644 index 00000000000..55fad372fe1 --- /dev/null +++ b/devel/gettext/patches/patch-src_gettext_c @@ -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[]; + { diff --git a/devel/gettext/patches/patch-src_msgcmp_c b/devel/gettext/patches/patch-src_msgcmp_c new file mode 100644 index 00000000000..b5f27eae237 --- /dev/null +++ b/devel/gettext/patches/patch-src_msgcmp_c @@ -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[]; + { diff --git a/devel/gettext/patches/patch-src_msgcomm_c b/devel/gettext/patches/patch-src_msgcomm_c new file mode 100644 index 00000000000..e2129315d14 --- /dev/null +++ b/devel/gettext/patches/patch-src_msgcomm_c @@ -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[]; + { diff --git a/devel/gettext/patches/patch-src_msgfmt_c b/devel/gettext/patches/patch-src_msgfmt_c new file mode 100644 index 00000000000..f8ca7983c10 --- /dev/null +++ b/devel/gettext/patches/patch-src_msgfmt_c @@ -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[]; + { diff --git a/devel/gettext/patches/patch-src_msgmerge_c b/devel/gettext/patches/patch-src_msgmerge_c new file mode 100644 index 00000000000..7870007774b --- /dev/null +++ b/devel/gettext/patches/patch-src_msgmerge_c @@ -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; + { diff --git a/devel/gettext/patches/patch-src_msgunfmt_c b/devel/gettext/patches/patch-src_msgunfmt_c new file mode 100644 index 00000000000..5ae0287bd30 --- /dev/null +++ b/devel/gettext/patches/patch-src_msgunfmt_c @@ -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; + { diff --git a/devel/gettext/patches/patch-src_ngettext_c b/devel/gettext/patches/patch-src_ngettext_c new file mode 100644 index 00000000000..5f07d14ff61 --- /dev/null +++ b/devel/gettext/patches/patch-src_ngettext_c @@ -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[]; + { diff --git a/devel/gettext/patches/patch-src_wrapper_c b/devel/gettext/patches/patch-src_wrapper_c new file mode 100644 index 00000000000..052328e1e43 --- /dev/null +++ b/devel/gettext/patches/patch-src_wrapper_c @@ -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 ++ ++ ++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; ++} diff --git a/devel/gettext/patches/patch-src_xgettext_c b/devel/gettext/patches/patch-src_xgettext_c new file mode 100644 index 00000000000..fe6bff09376 --- /dev/null +++ b/devel/gettext/patches/patch-src_xgettext_c @@ -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[]; + {