[Pkg-octave-commit] [SCM] Debian packaging for octave-ocs branch, master, updated. ecae69f33be86759ae79c207268a5435c0eec506

Rafael Laboissiere rafael at laboissiere.net
Sat Mar 17 18:54:48 UTC 2012


The following commit has been merged in the master branch:
commit 1350d83356a39e8ba44e951f5fd9928fa2d4b279
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Sat Mar 17 15:03:03 2012 +0100

    Adapt patch set_nonarch_path_for_pkg_add for the new upstream release

diff --git a/debian/patches/set_nonarch_path_for_pkg_add b/debian/patches/set_nonarch_path_for_pkg_add
index 037c8fa..c5386ed 100644
--- a/debian/patches/set_nonarch_path_for_pkg_add
+++ b/debian/patches/set_nonarch_path_for_pkg_add
@@ -1,44 +1,41 @@
---- a/PKG_ADD
-+++ b/PKG_ADD
-@@ -1,10 +1,14 @@
- dirlist = {"utl","asm","tst","nls","prs","sbn"};
- dir     = fileparts (mfilename ("fullpath"));
+Description: Use the architecture-independent path
+ The *.m are installed under /usr/share/octave/packages/ocs-<version>/,
+ which is not the same as were the PKG_ADD file lands.  This patch remedies
+ the problem.
+Author: Rafael Laboissiere <rafael at laboissiere.net>
+Last-Update: 2012-03-17
+
+--- octave-ocs-0.1.3.orig/PKG_ADD
++++ octave-ocs-0.1.3/PKG_ADD
+@@ -1,10 +1,13 @@
+ dirlist = {"utl", "asm", "tst", "nls", "prs", "sbn"};
+ dirname = fileparts (canonicalize_file_name (mfilename ("fullpath")));
++dirname = sprintf ("%s%s",
++                   dirname (1 : strfind (dirname, "usr/lib/") - 1),
++                   "usr/share/octave/packages/ocs-0.1.3/");   
  
-+# set paths for octave 3.2 and ocs-0.1.1, so that the package can cope with the
-+# fact that the .oct files and the .m files are not in the same directory
-+dir = "/usr/share/octave/packages/3.2/ocs-0.1.1/";
-+
- if (! exist (fullfile (dir, "inst"), "dir"))      
-   ## Run this if the package is installed      
-   for ii=1:length(dirlist)
--    addpath (fullfile(dir,"..",dirlist{ii}),"-end")
-+    addpath (fullfile(dir,dirlist{ii}),"-end")
+ if (! exist (fullfile (dirname, "inst"), "dir"))
+   ## Run this if the package is installed
+   for ii=1:length (dirlist)
+-    addpath ( [ dirname "/../" dirlist{ii}],"-end")
++    addpath ( [ dirname dirlist{ii}],"-end")
    endfor
  else
-   ## Run this if we are testing the package is installed without installation
-@@ -13,4 +17,4 @@
-   endfor
- endif
- 
--clear dirlist dir
-\ No newline at end of file
-+clear dirlist dir
---- a/PKG_DEL
-+++ b/PKG_DEL
-@@ -1,6 +1,9 @@
- dirlist        = {"utl","asm","tst","nls","prs","sbn"};
- [basename,dir] = fileparts(fileparts (mfilename ("fullpath")));
+   ## Run this if we are testing the package without installation
+--- octave-ocs-0.1.3.orig/PKG_DEL
++++ octave-ocs-0.1.3/PKG_DEL
+@@ -1,10 +1,13 @@
+ dirlist = {"utl", "asm", "tst", "nls", "prs", "sbn"};
+ dirname = fileparts (canonicalize_file_name (mfilename ("fullpath")));
++dirname = sprintf ("%s%s",
++                   dirname (1 : strfind (dirname, "usr/lib/") - 1),
++                   "usr/share/octave/packages/ocs-0.1.3/");   
  
-+## Remove the changed path added in PKG_ADD
-+basename = "/usr/share/octave/packages/3.2/ocs-0.1.1/";
-+
- for ii=1:length(dirlist)
-   if (! exist (fullfile (basename, "inst"), "dir"))
+ for ii=1:length (dirlist)
+   if (! exist (fullfile (dirname, "inst"), "dir"))
      ## Run this if the package is installed
-@@ -9,4 +12,4 @@
-     ## Run this if we are testing the package is installed without installation
-     rmpath ( [ fileparts( mfilename("fullpath")) "/inst/" dirlist{ii}])
-   end
--end
-\ No newline at end of file
-+end
+-    rmpath ( [ dirname "/../" dirlist{ii}])
++    rmpath ( [ dirname dirlist{ii}])
+   else
+     ## Run this if we are testing the package without installation
+     rmpath ([ dirname "/inst/" dirlist{ii}])

-- 
Debian packaging for octave-ocs



More information about the Pkg-octave-commit mailing list