[ACTION REQUIRED] ARCH=noarch uploads with cygport 0.22.0

Yaakov Selkowitz yselkowitz@cygwin.com
Wed May 11 21:31:00 GMT 2016


On 2016-05-11 16:02, Marco Atzeri wrote:
> On 11/05/2016 22:48, Yaakov Selkowitz wrote:
>> But what about the following?
>>
>> octave-nan
>> octave-octcdf
>> octave-stk
>> octave-tsa
>
> /usr/lib/octave/packages/
> contains the arch specific in this case in mex variant.

Oops, it seems cygport knows nothing of this, only of .oct.  Could you 
please try rebuilding one of those with the following patch to cygport 
and see if it behaves properly (.mex are executable, stripped, and 
binary dependencies listed in requires:)?

-- 
Yaakov
-------------- next part --------------
From 9f9128505f8f8dbaf5880648b4842118331a0242 Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Wed, 11 May 2016 16:26:21 -0500
Subject: [PATCH] Handle Octave .mex extensions as DLLs

---
 cygclass/octave.cygclass | 7 ++++---
 lib/pkg_info.cygpart     | 5 +++--
 lib/src_postinst.cygpart | 9 +++++----
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/cygclass/octave.cygclass b/cygclass/octave.cygclass
index 789c81a..9fac2ed 100644
--- a/cygclass/octave.cygclass
+++ b/cygclass/octave.cygclass
@@ -27,7 +27,8 @@
 #  DESCRIPTION
 #  GNU Octave is a programming language primarily designed for numerical
 #  computations, and is mostly compatible with MATLAB.  It is extendible
-#  with both scripts (.m) and dynamic modules (.oct, but are ordinary DLLs).
+#  with both scripts (.m) and dynamic modules (.oct or .mex, but are ordinary
+#  DLLs).
 #
 #  This cygclass provides definitions for packages dependent on Octave.
 #  REQUIRES
@@ -47,7 +48,7 @@ OCTAVE=/usr/bin/octave
 
 #****d* octave.cygclass/MKOCTFILE
 #  DESCRIPTION
-#  Absolute path to the Octave dynamic module (.oct) compiler/linker.
+#  Absolute path to the Octave dynamic module (.oct/.mex) compiler/linker.
 #****
 MKOCTFILE=/usr/bin/mkoctfile
 
@@ -113,6 +114,6 @@ OCTAVE_M_SITEDIR=$(${OCTAVE_CONFIG} --m-site-dir)
 
 #****d* octave.cygclass/OCTAVE_OCT_SITEDIR
 #  DESCRIPTION
-#  Installation path for third-party Octave dynamic modules (.oct).
+#  Installation path for third-party Octave dynamic modules (.oct/.mex).
 #****
 OCTAVE_OCT_SITEDIR=$(${OCTAVE_CONFIG} --oct-site-dir)
diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart
index 8fbf41f..7b2be88 100644
--- a/lib/pkg_info.cygpart
+++ b/lib/pkg_info.cygpart
@@ -167,8 +167,9 @@ __list_deps() {
 
 	# *.so: Apache2 modules, OCaml stublibs, Ruby modules
 	# *.oct: Octave modules
+	# *.mex: Octave MATLAB-compatible MEX modules
 	# *.cmxs: OCaml natdynlink modules: http://gallium.inria.fr/~frisch/ndl.txt
-	alldeps+=" "$(LC_ALL=C find "${@//^_^/ }" -type f -executable \( -name '*.exe' -o -name '*.dll' -o -name '*.so' -o -name '*.oct' -o -name '*.cmxs' \) \
+	alldeps+=" "$(LC_ALL=C find "${@//^_^/ }" -type f -executable \( -name '*.exe' -o -name '*.dll' -o -name '*.so' -o -name '*.oct' -o -name '*.mex' -o -name '*.cmxs' \) \
 		-exec ${OBJDUMP} -p '{}' + 2>/dev/null | grep "DLL Name:" | sort -u | \
 		cut -d ' ' -f 3 | xargs -r which || true)
 
@@ -177,7 +178,7 @@ __list_deps() {
 			${deps_prune} \
 			-o -path 'usr/share/gems/*' -prune \
 			-o -path 'usr/share/help/*' -prune \
-			-o -type f -executable ! -name '*.exe' ! -name '*.dll' ! -name '*.so' ! -name '*.cmxs' ! -name '*.oct' -print \
+			-o -type f -executable ! -name '*.exe' ! -name '*.dll' ! -name '*.so' ! -name '*.cmxs' ! -name '*.oct' ! -name '*.mex' -print \
 			| xargs -r sed -sne '1{/^#!/s|/env *|/|g;s|^#! *\([^ ]*\).*|\1|gp}' \
 			| sort -u)
 
diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 10d4174..abaca5d 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -820,10 +820,11 @@ __prepstrip() {
 
 	# *.so: Apache2 modules, OCaml stublibs, Ruby modules
 	# *.oct: Octave modules
+	# *.mex: Octave MATLAB-compatible MEX modules
 	# *.cmxs: OCaml natdynlink modules: http://gallium.inria.fr/~frisch/ndl.txt
 	find * -type f ! -name '*.dll.a' ! -name '*.lib' \
-		-a \( -name '*.a' -o -name '*.o' -o -name '*.dll' -o -name '*.exe' -o -name '*.so' -o -name '*.so.*' -o -name '*.oct' -o -name '*.cmxs' \) -print0 \
-		-o -type f -executable ! -name '*.dll' ! -name '*.exe' ! -name '*.so' ! -name '*.so.[0-9]*' ! -name '*.oct' ! -name '*.cmxs' ! -name '*.a' ! -name '*.la' ! -name '*.lib' ! -name '*.exe.manifest' ! -name '*.exe.config' ! -name '*.dll.config' ! -name '*.mdb' ! -name '*-config' ! -name '*.csh' ! -name '*.sh' ! -name '*.fish' ! -name '*.pl' ! -name '*.pm' ! -name '*.py' ! -name '*.rb' ! -name '*.tcl' -print0 | \
+		-a \( -name '*.a' -o -name '*.o' -o -name '*.dll' -o -name '*.exe' -o -name '*.so' -o -name '*.so.*' -o -name '*.oct' -o -name '*.mex' -o -name '*.cmxs' \) -print0 \
+		-o -type f -executable ! -name '*.dll' ! -name '*.exe' ! -name '*.so' ! -name '*.so.[0-9]*' ! -name '*.oct' ! -name '*.mex' ! -name '*.cmxs' ! -name '*.a' ! -name '*.la' ! -name '*.lib' ! -name '*.exe.manifest' ! -name '*.exe.config' ! -name '*.dll.config' ! -name '*.mdb' ! -name '*-config' ! -name '*.csh' ! -name '*.sh' ! -name '*.fish' ! -name '*.pl' ! -name '*.pm' ! -name '*.py' ! -name '*.rb' ! -name '*.tcl' -print0 | \
 	while read -d $'\0' exe
 	do
 		# assure this is actually a binary object
@@ -909,7 +910,7 @@ __prepstrip() {
 		x86_64-*-cygwin*)
 			case "${exe##*/}" in
 			cygwin1.dll|cyglsa64.dll|cyglto_plugin.dll) ;;
-			*.dll|*.so|*.oct|*.cmxs)
+			*.dll|*.so|*.oct|*.mex|*.cmxs)
 				if ${objdump} -p "${exe}" | sed -ne '/^ImageBase/s/.*\t/0x/gp' | gawk '{ exit (strtonum($1) <= 0x400000000 ? 0 : 1) }'
 				then
 					warning "${exe} was not linked with -Wl,--enable-auto-image-base"
@@ -922,7 +923,7 @@ __prepstrip() {
 		case ${CHOST} in
 		*-*-cygwin*|*-*-mingw*|*-*-msys*)
 			case "${exe##*/}" in
-			*.dll|*.exe|*.sfx|*.so|*.so.[0-9]*|*.oct|*.cmxs) ;;
+			*.dll|*.exe|*.sfx|*.so|*.so.[0-9]*|*.oct|*.mex|*.cmxs) ;;
 			# make sure this isn't some oddly named DLL
 			*)	if LC_ALL=C ${objdump} -f "${exe}" | grep -Eq '^start address 0x(0000000[01])?00401[0-9a-e][0-9a-e]0'
 				then
-- 
2.8.0



More information about the Cygwin-apps mailing list