Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbruechert
Copy link

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

Thanks!

@kmatheussen
Copy link

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

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