Opened 14 years ago

Closed 14 years ago

#28678 closed defect (fixed)

fossil: universal, build_arch, compiler

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ci42
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 (3)

Portfile.diff (658 bytes) - added by ci42 14 years ago.
fossil.diff (1.8 KB) - added by ryandesign (Ryan Carsten Schmidt) 14 years ago.
proposed patch
Portfile.2.diff (1.1 KB) - added by ci42 14 years ago.
new proposal

Download all attachments as: .zip

Change History (9)

Changed 14 years ago by ci42

Attachment: Portfile.diff added

comment:1 Changed 14 years ago by ci42

Please see the diff file. Changes:

  • use the right compiler
  • support build_arch

Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: fossil.diff added

proposed patch

comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

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

comment:3 Changed 14 years ago by ci42

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 14 years ago by ci42

Attachment: Portfile.2.diff added

new proposal

comment:4 in reply to:  3 ; Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

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 14 years ago by ci42

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 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.