changeset 3902:cc946e55afb3

of-strings: add to mxe * src/of-strings.mk: new file * src/of-strings-1-fixes.patch: new file * index.html: add strings * Makefile.in: add strings to forge packages * dist-files.mk: add src/of-strings.mk src/of-strings-1-fixes.patch
author John Donoghue
date Mon, 13 Apr 2015 13:52:59 -0400
parents 5f92c505c86a
children 385f5f4412b7
files Makefile.in dist-files.mk index.html src/of-strings-1-fixes.patch src/of-strings.mk
diffstat 5 files changed, 102 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Mon Apr 13 21:36:27 2015 -0400
+++ b/Makefile.in	Mon Apr 13 13:52:59 2015 -0400
@@ -419,7 +419,7 @@
 endif
 
 OCTAVE_FORGE_BASE_URL := 'http://sourceforge.net/projects/octave/files/Octave Forge Packages/Individual Package Releases'
-OCTAVE_FORGE_PACKAGES := $(addprefix of-,miscellaneous struct optim specfun general signal communications image io statistics control geometry windows odepkg linear-algebra sockets zenity actuarial data-smoothing fuzzy-logic-toolkit quaternion fits fl-core tsa dicom netcdf ltfat database instrument-control generate_html nurbs)
+OCTAVE_FORGE_PACKAGES := $(addprefix of-,miscellaneous struct optim specfun general signal communications image io statistics control geometry windows odepkg linear-algebra sockets zenity actuarial data-smoothing fuzzy-logic-toolkit quaternion fits fl-core tsa dicom netcdf ltfat database instrument-control generate_html nurbs strings)
 # get ALL deps for all of- packages, regardless of whethe building the actual forge package in the installer
 OCTAVE_FORGE_DEPS:= $(sort $(foreach p,$(wildcard $(TOP_DIR)/src/of-*.mk),$(shell $(SED) -n 's/.*_DEPS.*:=\(.*\)/\1/p' $p)))
 
--- a/dist-files.mk	Mon Apr 13 21:36:27 2015 -0400
+++ b/dist-files.mk	Mon Apr 13 13:52:59 2015 -0400
@@ -479,6 +479,8 @@
   of-sockets.mk \
   of-specfun.mk \
   of-statistics.mk \
+  of-strings-1-fixes.patch \
+  of-strings.mk \
   of-struct.mk \
   of-tsa.mk \
   of-windows.mk \
--- a/index.html	Mon Apr 13 21:36:27 2015 -0400
+++ b/index.html	Mon Apr 13 13:52:59 2015 -0400
@@ -1938,6 +1938,10 @@
         <td class="website"><a href="http://octave.sf.net/">Octave Forge statistics package</a></td>
     </tr>
     <tr>
+        <td class="package">of-strings</td>
+        <td class="website"><a href="http://octave.sf.net/">Octave Forge strings package</a></td>
+    </tr>
+    <tr>
         <td class="package">of-struct</td>
         <td class="website"><a href="http://octave.sf.net/">Octave Forge struct package</a></td>
     </tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/of-strings-1-fixes.patch	Mon Apr 13 13:52:59 2015 -0400
@@ -0,0 +1,73 @@
+diff -urN strings.orig/inst/strjoin.m strings/inst/strjoin.m
+--- strings.orig/inst/strjoin.m	2015-04-13 21:40:26.000000000 -0400
++++ strings/inst/strjoin.m	1969-12-31 19:00:00.000000000 -0500
+@@ -1,54 +0,0 @@
+-## Copyright (C) 2007 Muthiah Annamalai <muthiah.annamalai@uta.edu>
+-##
+-## This program is free software; you can redistribute it and/or modify it under
+-## the terms of the GNU General Public License as published by the Free Software
+-## Foundation; either version 3 of the License, or (at your option) any later
+-## version.
+-##
+-## This program is distributed in the hope that it will be useful, but WITHOUT
+-## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-## details.
+-##
+-## You should have received a copy of the GNU General Public License along with
+-## this program; if not, see <http://www.gnu.org/licenses/>.
+-
+-## -*- texinfo -*-
+-## @deftypefn {Function File} {@var{rval} =} strjoin (@var{prefixstr}, @var{stringcell})
+-## @deftypefnx {Function File} {@var{rval} =} strjoin (@var{prefixstr}, @var{varargs})
+-## Joins the strings in @var{stringcell} with the @var{prefixstr} like the list-join
+-## function in Python; the second version allows usage with variable number of arguments.
+-## Note that, if using cell-array as a second argument, only 2 arguments are accepted.
+-## Also note that, both the arguments are strings or containers of strings (cells).
+-##
+-## @example
+-## @group
+-##           strjoin(' loves-> ','marie','amy','beth') 
+-##           ##returns 'marie loves-> amy loves-> beth'
+-##
+-##           strjoin('*',@{'Octave','Scilab','Lush','Yorick'@})
+-##           ##returns 'Octave*Scilab*Lush*Yorick'
+-## @end group
+-## @end example
+-## @seealso {strcmp}
+-## @end deftypefn
+-
+-function rval = strjoin (spacer, varargin)
+-  if (nargin < 2) || (nargin > 2  && iscell(varargin{1}) )
+-    print_usage();
+-  end
+-
+-  if iscell(varargin{1})
+-    varargin=varargin{1};
+-  end
+-
+-  rval="";
+-  L=length(varargin);
+-  for idx=1:(L-1)
+-    rval=strcat(rval,sprintf('%s%s',varargin{idx},spacer));
+-  end
+-  rval=strcat(rval,varargin{L});
+-endfunction
+-
+-%!assert(strjoin("-","hello"),"hello")
+-%!assert(strjoin('*',{'Octave','Scilab','Lush','Yorick'}),'Octave*Scilab*Lush*Yorick')
+diff -urN strings.orig/src/Makefile strings/src/Makefile
+--- strings.orig/src/Makefile	2015-04-13 21:40:26.000000000 -0400
++++ strings/src/Makefile	2015-04-13 21:40:48.000000000 -0400
+@@ -1,9 +1,10 @@
+ MKOCTFILE = mkoctfile -Wall
++PCRE_LIBS := $(shell pcre-config --libs)
+ 
+ all: pcregexp.oct
+ 
+ %.oct: %.cc
+-	$(MKOCTFILE) $<
++	$(MKOCTFILE) $< $(PCRE_LIBS)
+ 
+ clean:
+ 	rm -f *.o octave-core core *.oct *~
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/of-strings.mk	Mon Apr 13 13:52:59 2015 -0400
@@ -0,0 +1,22 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := of-strings
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 1.1.0
+$(PKG)_CHECKSUM := 55a77a68d3015d0aa471a723b099a9460838e82c
+$(PKG)_REMOTE_SUBDIR := 
+$(PKG)_SUBDIR   := strings
+$(PKG)_FILE     := strings-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL      := '$(OCTAVE_FORGE_BASE_URL)/$($(PKG)_FILE)/download'
+$(PKG)_DEPS     := 
+
+define $(PKG)_UPDATE
+    $(WGET) -q -O- 'http://$(SOURCEFORGE_MIRROR)/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/' | \
+    $(SED) -n 's,.*title="strings-\([0-9][^"]*\).tar.gz".*,\1,p' | \
+    head -1
+endef
+
+define $(PKG)_BUILD
+    $(OCTAVE_FORGE_PKG_BUILD)
+endef