comparison src/of-strings-1-fixes.patch @ 3962:76247f439f51

of-strings: update to v1.2.0 * src/of-strings.mk: update version, checksum, subdir * src/of-strings-1-fixes.patch: update cross build patch * build_packages.m: update strings version number
author John Donoghue
date Mon, 08 Jun 2015 13:49:11 -0400
parents cc946e55afb3
children 00e61c4a5657
comparison
equal deleted inserted replaced
3961:808ff354717a 3962:76247f439f51
1 diff -urN strings.orig/inst/strjoin.m strings/inst/strjoin.m 1 diff -ur strings-1.2.0.orig/src/Makefile strings-1.2.0/src/Makefile
2 --- strings.orig/inst/strjoin.m 2015-04-13 21:40:26.000000000 -0400 2 --- strings-1.2.0.orig/src/Makefile 2015-06-08 13:43:45.551556353 -0400
3 +++ strings/inst/strjoin.m 1969-12-31 19:00:00.000000000 -0500 3 +++ strings-1.2.0/src/Makefile 2015-06-08 13:45:22.693478306 -0400
4 @@ -1,54 +0,0 @@ 4 @@ -1,11 +1,7 @@
5 -## Copyright (C) 2007 Muthiah Annamalai <muthiah.annamalai@uta.edu> 5 OCTAVE ?= octave
6 -## 6 MKOCTFILE ?= mkoctfile -Wall
7 -## This program is free software; you can redistribute it and/or modify it under
8 -## the terms of the GNU General Public License as published by the Free Software
9 -## Foundation; either version 3 of the License, or (at your option) any later
10 -## version.
11 -##
12 -## This program is distributed in the hope that it will be useful, but WITHOUT
13 -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 -## details.
16 -##
17 -## You should have received a copy of the GNU General Public License along with
18 -## this program; if not, see <http://www.gnu.org/licenses/>.
19 -
20 -## -*- texinfo -*-
21 -## @deftypefn {Function File} {@var{rval} =} strjoin (@var{prefixstr}, @var{stringcell})
22 -## @deftypefnx {Function File} {@var{rval} =} strjoin (@var{prefixstr}, @var{varargs})
23 -## Joins the strings in @var{stringcell} with the @var{prefixstr} like the list-join
24 -## function in Python; the second version allows usage with variable number of arguments.
25 -## Note that, if using cell-array as a second argument, only 2 arguments are accepted.
26 -## Also note that, both the arguments are strings or containers of strings (cells).
27 -##
28 -## @example
29 -## @group
30 -## strjoin(' loves-> ','marie','amy','beth')
31 -## ##returns 'marie loves-> amy loves-> beth'
32 -##
33 -## strjoin('*',@{'Octave','Scilab','Lush','Yorick'@})
34 -## ##returns 'Octave*Scilab*Lush*Yorick'
35 -## @end group
36 -## @end example
37 -## @seealso {strcmp}
38 -## @end deftypefn
39 -
40 -function rval = strjoin (spacer, varargin)
41 - if (nargin < 2) || (nargin > 2 && iscell(varargin{1}) )
42 - print_usage();
43 - end
44 -
45 - if iscell(varargin{1})
46 - varargin=varargin{1};
47 - end
48 -
49 - rval="";
50 - L=length(varargin);
51 - for idx=1:(L-1)
52 - rval=strcat(rval,sprintf('%s%s',varargin{idx},spacer));
53 - end
54 - rval=strcat(rval,varargin{L});
55 -endfunction
56 -
57 -%!assert(strjoin("-","hello"),"hello")
58 -%!assert(strjoin('*',{'Octave','Scilab','Lush','Yorick'}),'Octave*Scilab*Lush*Yorick')
59 diff -urN strings.orig/src/Makefile strings/src/Makefile
60 --- strings.orig/src/Makefile 2015-04-13 21:40:26.000000000 -0400
61 +++ strings/src/Makefile 2015-04-13 21:40:48.000000000 -0400
62 @@ -1,9 +1,10 @@
63 MKOCTFILE = mkoctfile -Wall
64 +PCRE_LIBS := $(shell pcre-config --libs)
65 7
66 all: pcregexp.oct 8 -PCRE_SWITCHES := $(shell $(OCTAVE) \
9 - --no-gui --no-init-file --no-site-file --silent --no-history \
10 - --eval 'disp (octave_config_info ("PCRE_LIBS"));' \
11 - --eval 'disp (octave_config_info ("PCRE_CPPFLAGS"));' \
12 - )
13 +PCRE_SWITCHES := $(shell pcre-config --libs)
67 14
68 %.oct: %.cc 15 pcregexp.oct: %.oct: %.cc
69 - $(MKOCTFILE) $< 16 $(MKOCTFILE) $(PCRE_SWITCHES) -o $@ $<
70 + $(MKOCTFILE) $< $(PCRE_LIBS)
71
72 clean:
73 rm -f *.o octave-core core *.oct *~