New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #28678 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

fossil: universal, build_arch, compiler

Reported by: ryandesign@… Owned by: ciserlohn@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: fossil

Description

Because the fossil software does not have a standard configure script, the fossil portfile must manually take care of details such as supporting build_arch and universal builds and UsingTheRightCompiler.

Attachments

Portfile.diff (658 bytes) - added by ciserlohn@… 2 years ago.
fossil.diff (1.8 KB) - added by ryandesign@… 2 years ago.
proposed patch
Portfile.2.diff (1.1 KB) - added by ciserlohn@… 2 years ago.
new proposal

Change History

Changed 2 years ago by ciserlohn@…

comment:1 Changed 2 years ago by ciserlohn@…

Please see the diff file. Changes:

  • use the right compiler
  • support build_arch

Changed 2 years ago by ryandesign@…

proposed patch

comment:2 Changed 2 years ago by ryandesign@…

Attached is an alternate proposal, which also includes a universal variant. What do you think?

comment:3 follow-up: ↓ 4 Changed 2 years ago by ciserlohn@…

I left out the universal variant intentionally because i can't test the universal variant (no PPC machine). But otherwise it seems ok to me. I am not quite sure about the patch to the Makefile. Since it is generated by makemake.tcl it should be patched afterwards. This should be more robust.

Changed 2 years ago by ciserlohn@…

new proposal

comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 2 years ago by ryandesign@…

Replying to ciserlohn@…:

I left out the universal variant intentionally because i can't test the universal variant (no PPC machine). But otherwise it seems ok to me.

Universal doesn't necessarily mean ppc and i386. On Snow Leopard, by default, it means i386 and x86_64. I verified it built ok on Snow Leopard for i386 and x86_64, so unless you have specific information about a build or runtime failure with universal on some system, we should add the universal variant.

I am not quite sure about the patch to the Makefile. Since it is generated by makemake.tcl it should be patched afterwards. This should be more robust.

If that's the case, then it should be a patchfile for makemake.tcl. Patchfiles should be preferred to reinplaces, especially when there is no variable content that needs to be inserted at build time, and only a few lines of changes. I tested my patch before attaching it here, and it worked correctly, i.e., it made the port build with "/usr/bin/gcc-4.2" instead of "gcc", and the build completed. I guess that means makemake.tcl simply didn't regenerate the Makefile for me, perhaps because the Makefile was newer due to the patch?

comment:5 in reply to: ↑ 4 Changed 2 years ago by ciserlohn@…

Replying to ryandesign@…:

Thanks for the helpful hints.

Replying to ciserlohn@…:

I left out the universal variant intentionally because i can't test the universal variant (no PPC machine). But otherwise it seems ok to me.

Universal doesn't necessarily mean ppc and i386. On Snow Leopard, by default, it means i386 and x86_64. I verified it built ok on Snow Leopard for i386 and x86_64, so unless you have specific information about a build or runtime failure with universal on some system, we should add the universal variant.


I see. Maybe the documentation should be updated:


5.3.7.1. Configure Universal

Universal keywords are used to make a port compile on the Mac OS X platform to run on both PPC and Intel processors.


You can figure out that this don't hold true for Snow Leopard from the details of the various configure.universal_* flags. But it is a bit confusing for newbies.

I am not quite sure about the patch to the Makefile. Since it is generated by makemake.tcl it should be patched afterwards. This should be more robust.

If that's the case, then it should be a patchfile for makemake.tcl. Patchfiles should be preferred to reinplaces, especially when there is no variable content that needs to be inserted at build time, and only a few lines of changes. I tested my patch before attaching it here, and it worked correctly, i.e., it made the port build with "/usr/bin/gcc-4.2" instead of "gcc", and the build completed. I guess that means makemake.tcl simply didn't regenerate the Makefile for me, perhaps because the Makefile was newer due to the patch?


Looked again at makemake.tcl and the build process. It does not generate the makefile - at least on *nix systems. It does generate it on windows systems. On *nix systems it generates src/main.mk, which gets included by the makefile but does not have a reference to 'gcc'. So patching the makefile should be safe.

Could you please apply your proposed patch?

comment:6 Changed 2 years ago by ryandesign@…

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.