Skip to content

tools: osxcross-macports: Avoid universal packages if not explicitly requested#180

Open
jbruechert wants to merge 1 commit into
tpoechtrager:masterfrom
jbruechert:macports-avoid-universal
Open

tools: osxcross-macports: Avoid universal packages if not explicitly requested#180
jbruechert wants to merge 1 commit into
tpoechtrager:masterfrom
jbruechert:macports-avoid-universal

Conversation

@jbruechert

Copy link
Copy Markdown

The motivation behind doing this was that macdeployqt seems to be unable to handle universal libraries, and they would use more space than necessary anyway.

@jbruechert jbruechert changed the title tools: osxcross-macports: Avoid universal packages if not requested tools: osxcross-macports: Avoid universal packages if not explicitly requested May 30, 2019
@kmatheussen

Copy link
Copy Markdown

Thanks!

@kmatheussen

Copy link
Copy Markdown

I had to modify the patch a little bit. I also wanted it to resort to using universal package if individual package does not exist:

diff --git a/tools/osxcross-macports b/tools/osxcross-macports
index a3f45c9..f4b694c 100755
--- a/tools/osxcross-macports
+++ b/tools/osxcross-macports
@@ -290,13 +290,21 @@ getPkgUrl()
     return
   fi
 
-  verboseMsg " candidates for $pkgname:"
+  verboseMsg " candidates for $pkgname ($OSXVERSION / $ARCH):"
 
   for p in $pkgs; do
     verboseMsg "  $p"
   done
 
   local pkg=$(echo "$pkgs" | grep $OSXVERSION | grep $ARCH | uniq | tail -n1)
+  if [ $ARCH != "i386-x86_64" ]; then
+      local pkg=$(echo "$pkgs" | grep $OSXVERSION | grep $ARCH | grep --invert-match universal | uniq | tail -n1)
+      if [ -z "$pkg" ]; then
+          pkg=$(echo "$pkgs" | grep $OSXVERSION | grep $ARCH | uniq | tail -n1)
+      fi
+  else
+      local pkg=$(echo "$pkgs" | grep $OSXVERSION | grep $ARCH | uniq | tail -n1)
+  fi
   if [ -z "$pkg" ]; then
     pkg=$(echo "$pkgs" | grep $OSXVERSION | grep "noarch" | uniq | tail -n1)
   fi

@nephatrine

Copy link
Copy Markdown

How do you explicitly request universal libraries with osxcross-macports?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants