{"action":"opened","issue":{"url":"https://api.github.com/repos/tpoechtrager/osxcross/issues/62","labels_url":"https://api.github.com/repos/tpoechtrager/osxcross/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/tpoechtrager/osxcross/issues/62/comments","events_url":"https://api.github.com/repos/tpoechtrager/osxcross/issues/62/events","html_url":"https://github.com/tpoechtrager/osxcross/issues/62","id":124596655,"number":62,"title":"Macports disregards any arch","user":{"login":"TrueBrain","id":1663690,"avatar_url":"https://avatars.githubusercontent.com/u/1663690?v=3","gravatar_id":"","url":"https://api.github.com/users/TrueBrain","html_url":"https://github.com/TrueBrain","followers_url":"https://api.github.com/users/TrueBrain/followers","following_url":"https://api.github.com/users/TrueBrain/following{/other_user}","gists_url":"https://api.github.com/users/TrueBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/TrueBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrueBrain/subscriptions","organizations_url":"https://api.github.com/users/TrueBrain/orgs","repos_url":"https://api.github.com/users/TrueBrain/repos","events_url":"https://api.github.com/users/TrueBrain/events{/privacy}","received_events_url":"https://api.github.com/users/TrueBrain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-02T15:52:52Z","updated_at":"2016-01-02T15:52:52Z","closed_at":null,"body":"osxcross-macports loads the macports dir, sorted by modified time, and just picks the latest item matching the darwin_NN.\r\n\r\nThis is fine for x86_64, as most packages have either x86_64, or +universal containing the x86_64. Besides from looking a bit silly (some packages x86_64, others +universal), and wasting some bytes (in case of +universal), this seems to be working just fine.\r\n\r\nBut when you want/need i386 libraries, this often goes wrong.\r\n\r\nA quick solution is to filter on ARCH too. I used something like this:\r\n\r\n    sed -i 's/OSXVERSION | uniq/OSXVERSION | grep \"$ARCH\" | uniq/' tools/osxcross-macports\r\n\r\nThis allows me to run:\r\n\r\n    ARCH=i386 osxcross-macports upgrade\r\n\r\nand only receive i386 versions (which are most often universal). Of course this solution is a bit silly, but I am sure you get the point here :)\r\n"}}