Opened 18 years ago
Closed 12 years ago
#11747 closed enhancement (fixed)
make 'file' universal-aware
Reported by: | pipping@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Low | Milestone: | |
Component: | ports | Version: | |
Keywords: | universal | Cc: | jay-macports@…, ryandesign (Ryan Carsten Schmidt) |
Port: | file |
Description
I've been working on making file universal-aware, by modifying Apple's patches for 4.10 to match 4.20.
Anyway, rather than throwing what I've got so far into the trash, I'm posting it here.
Attachments (2)
Change History (14)
Changed 18 years ago by pipping@…
Attachment: | file-4.20_unfinished.diff added |
---|
Changed 18 years ago by pipping@…
Attachment: | file-4.10_outdated-but-working added |
---|
comment:1 Changed 18 years ago by pipping@…
note that 'file-4.10_outdated-but-working' requires the trunk to work.
comment:2 Changed 17 years ago by nox@…
Priority: | Nice to have → Low |
---|---|
Summary: | TASK: make 'file' universal-aware → make 'file' universal-aware |
Type: | task → enhancement |
comment:3 Changed 16 years ago by blb@…
Cc: | jay-macports@… added |
---|---|
Keywords: | file removed |
Port: | file added |
comment:4 Changed 16 years ago by jay-macports@…
Good timing; I tried to upload the updates for file-5.00 the other day, but trac was misbehaving. I'm happy to roll in these patches, but I can't tell from just the patches what "universal aware" means, and how I'd know if port now works that way out of the box.. - any pointers?
comment:5 Changed 16 years ago by blb@…
It looks like pipping had started to port Apple's patches for file to 4.20 (which was probably current at the time); these patches add the ability to file to better detect universally-compiled programs/libraries. For example:
$ file /bin/ls /bin/ls: Mach-O universal binary with 2 architectures /bin/ls (for architecture i386): Mach-O executable i386 /bin/ls (for architecture ppc7400): Mach-O executable ppc $ gfile /bin/ls /bin/ls: Mach-O fat file with 2 architectures
Of course since the patches are incomplete (and probably won't apply to 5.00 as cleanly), you don't have to try to implement them.
comment:6 follow-up: 11 Changed 16 years ago by jay-macports@…
Ohhh, OK. It's nothing to do with a +universal variant; it's getting file to understand universal-format binaries.
Magic's been completely changed for file-5.00, as I understand it, but I'll take a look, and get some help from the file devs.
comment:7 Changed 16 years ago by (none)
Milestone: | Port Enhancements |
---|
Milestone Port Enhancements deleted
comment:8 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
I've got an idea. Why doesn't Apple submit their patches to the developers of the "file" program for inclusion in their master sources, so that neither Apple nor MacPorts has to have their own patchfiles.
comment:9 Changed 15 years ago by pipping@…
Owner: | changed from pipping@… to not-me@… |
---|
comment:10 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from not-me@… to macports-tickets@… |
---|
comment:11 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to jay-macports@…:
Ohhh, OK. It's nothing to do with a +universal variant;
FYI, I reenabled the standard universal variant in r65382. It was disabled in r43943 because it apparently failed at that time, but now it seems to work fine for me, at least on Snow Leopard.
comment:12 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
I reported the problem to the developers of file: http://bugs.gw.com/view.php?id=211 and the current version now correctly identifies the architectures in a universal file:
$ port -v installed file The following ports are currently installed: file @5.14_0+universal (active) platform='darwin 12' archs='i386 x86_64' $ /opt/local/bin/file /opt/local/bin/file /opt/local/bin/file: Mach-O universal binary with 2 architectures: [x86_64: Mach-O 64-bit x86_64 executable] [i386: Mach-O i386 executable]
patch to apply the official patches to 4.10 - working but no different to what comes with the system