summaryrefslogtreecommitdiff
path: root/recipes/gcc/gcc-4.3.3/debian/gcc-textdomain.dpatch
blob: 6315a19de5f41d6a35c3e2de7c7b6f5175205a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#! /bin/sh -e

# DP: Set gettext's domain and textdomain to the versioned package name.

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0


--- gcc/Makefile.in.orig	2005-09-04 23:32:54.003440040 +0000
+++ gcc/Makefile.in	2005-09-04 23:40:10.954013456 +0000
@@ -4565,8 +4565,8 @@
 	  dir=$(localedir)/$$lang/LC_MESSAGES; \
 	  echo $(mkinstalldirs) $(DESTDIR)$$dir; \
 	  $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
-	  echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
-	  $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
+	  echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.3.mo; \
+	  $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.3.mo; \
 	done
 
 # Rule for regenerating the message template (gcc.pot).
--- gcc/intl.c.orig	2005-09-04 23:32:54.006439584 +0000
+++ gcc/intl.c	2005-09-04 23:36:37.933397512 +0000
@@ -51,8 +51,8 @@
   setlocale (LC_ALL, "");
 #endif
 
-  (void) bindtextdomain ("gcc", LOCALEDIR);
-  (void) textdomain ("gcc");
+  (void) bindtextdomain ("gcc-4.3", LOCALEDIR);
+  (void) textdomain ("gcc-4.3");
 
   /* Opening quotation mark.  */
   open_quote = _("`");
--- libcpp/Makefile.in.orig	2005-09-04 23:32:54.009439128 +0000
+++ libcpp/Makefile.in	2005-09-04 23:33:24.607787472 +0000
@@ -47,6 +47,7 @@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
 PACKAGE = @PACKAGE@
+PACKAGE_SUFFIX = -4.3
 RANLIB = @RANLIB@
 SHELL = @SHELL@
 USED_CATALOGS = @USED_CATALOGS@
@@ -66,6 +67,7 @@
 
 INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
 	-I$(srcdir)/include
+CPPFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\"
 
 ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
 
@@ -156,8 +158,8 @@
 	  else continue; \
 	  fi; \
 	  dir=$(localedir)/$$lang/LC_MESSAGES; \
-	  echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
-	  $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+	  echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
+	  $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
 	done
 
 mostlyclean:
--- libcpp/system.h.orig	2005-09-04 23:32:54.006439584 +0000
+++ libcpp/system.h	2005-09-04 23:33:24.606787624 +0000
@@ -260,7 +260,7 @@
 #endif
 
 #ifndef _
-# define _(msgid) dgettext (PACKAGE, msgid)
+# define _(msgid) dgettext (PACKAGE PACKAGE_SUFFIX, msgid)
 #endif
 
 #ifndef N_
--- libcpp/init.c.orig	2005-09-04 23:32:54.008439280 +0000
+++ libcpp/init.c	2005-09-04 23:33:24.607787472 +0000
@@ -122,7 +122,7 @@
       init_trigraph_map ();
 
 #ifdef ENABLE_NLS
-       (void) bindtextdomain (PACKAGE, LOCALEDIR);
+       (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR);
 #endif
     }
 }