aboutsummaryrefslogtreecommitdiffstats
path: root/editors/openoffice.org-2-RC/files/patch-epm
blob: 8808325b529d72d8f5b5563ab160a623b37b69b3 (plain) (blame)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Index: epm/epm-3.7.patch
===================================================================
RCS file: /cvs/external/epm/epm-3.7.patch,v
retrieving revision 1.8
diff -u -r1.8 epm-3.7.patch
--- epm/epm-3.7.patch   3 Feb 2006 17:32:08 -0000   1.8
+++ epm/epm-3.7.patch   11 Feb 2006 09:28:33 -0000
@@ -546,3 +546,116 @@
   }
   
 --- 457,462 ----
+*** misc/epm-3.7/bsd.c Wed Jan 15 02:05:01 2003
+--- misc/build/epm-3.7/bsd.c   Thu Jan 19 17:05:43 2006
+***************
+*** 26,31 ****
+--- 26,38 ----
+  
+  #include "epm.h"
+  
++ void cr2semicolon(char *command)
++ {
++   int len, i;
++   len=strlen(command);
++   for (i=0;i<len;i++)
++     if(*(command+i)=='\n') *(command+i)=';';
++ }
+  
+  /*
+   * 'make_bsd()' - Make a FreeBSD software distribution package.
+***************
+*** 149,156 ****
+  
+    for (i = dist->num_depends, d = dist->depends; i > 0; i --, d ++)
+    {
+!     if (d->type == DEPEND_REQUIRES)
+!       fprintf(fp, "@pkgdep %s", d->product);
+      else
+  #ifdef __FreeBSD__
+       /*
+--- 156,172 ----
+  
+    for (i = dist->num_depends, d = dist->depends; i > 0; i --, d ++)
+    {
+! #ifdef __FreeBSD__
+!     if (d->type == DEPEND_REQUIRES) {
+!       if (dist->relnumber)
+!    fprintf(fp, "@pkgdep %s-%s-%d-%s", d->product, dist->version, dist->relnumber, platname);
+!       else
+!    fprintf(fp, "@pkgdep %s-%s-%s", d->product, dist->version, platname);
+!     }
+! #else
+!     if (d->type == DEPEND_REQUIRES)
+!       fprintf(fp, "@pkgdep %s", d->product);
+! #endif
+      else
+  #ifdef __FreeBSD__
+       /*
+***************
+*** 179,187 ****
+--- 196,206 ----
+           "         by the BSD packager.\n", stderr);
+            break;
+        case COMMAND_POST_INSTALL :
++       cr2semicolon(c->command);
+            fprintf(fp, "@exec %s\n", c->command);
+     break;
+        case COMMAND_PRE_REMOVE :
++       cr2semicolon(c->command);
+            fprintf(fp, "@unexec %s\n", c->command);
+     break;
+        case COMMAND_POST_REMOVE :
+***************
+*** 199,205 ****
+        */
+  
+        fprintf(fp, "@exec /bin/mkdir -p %s\n", file->dst);
+!       fprintf(fp, "@exec /bin/chown %s:%s %s\n", file->user, file->group,
+                file->dst);
+        fprintf(fp, "@exec /bin/chmod %04o %s\n", file->mode, file->dst);
+      }
+--- 218,224 ----
+        */
+  
+        fprintf(fp, "@exec /bin/mkdir -p %s\n", file->dst);
+!       fprintf(fp, "@exec /usr/sbin/chown %s:%s %s\n", file->user, file->group,
+                file->dst);
+        fprintf(fp, "@exec /bin/chmod %04o %s\n", file->mode, file->dst);
+      }
+*** misc/epm-3.7/qprintf.c Tue Jan 28 06:48:03 2003
+--- misc/build/epm-3.7/qprintf.c   Thu Jan 19 17:04:22 2006
+***************
+*** 181,192 ****
+  
+              for (i = slen; i > 0; i --, s ++, bytes ++)
+       {
+         if (strchr("`~!#$%^&*()[{]}\\|;\'\"<>? ", *s))
+         {
+           putc('\\', fp);
+       bytes ++;
+         }
+! 
+         putc(*s, fp);
+       }
+  
+--- 181,199 ----
+  
+              for (i = slen; i > 0; i --, s ++, bytes ++)
+       {
++ #if defined(__FreeBSD__)
++        if (strchr("`~!#%^&*()[{]}\\|;\'\"<>? ", *s))
++        {
++          putc('\\', fp);
++      bytes ++;
++        }
++ #else
+         if (strchr("`~!#$%^&*()[{]}\\|;\'\"<>? ", *s))
+         {
+           putc('\\', fp);
+       bytes ++;
+         }
+! #endif
+         putc(*s, fp);
+       }
+