# HG changeset patch
# User John Donoghue
# Date 1428947579 14400
# Node ID cc946e55afb3507e6bac91b28f23c72aad6c37ab
# Parent 5f92c505c86a2b4b8e4dd601cef8a2f3fc53ae11
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
diff -r 5f92c505c86a -r cc946e55afb3 Makefile.in
--- 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)))
diff -r 5f92c505c86a -r cc946e55afb3 dist-files.mk
--- 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 \
diff -r 5f92c505c86a -r cc946e55afb3 index.html
--- 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 @@
Octave Forge statistics package |
+ of-strings |
+ Octave Forge strings package |
+
+
of-struct |
Octave Forge struct package |
diff -r 5f92c505c86a -r cc946e55afb3 src/of-strings-1-fixes.patch
--- /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
+-##
+-## 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 .
+-
+-## -*- 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 *~
diff -r 5f92c505c86a -r cc946e55afb3 src/of-strings.mk
--- /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