Opened 11 years ago

Last modified 20 months ago

#40194 new defect

muniversal: pre-merge hook for each destroot

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: portgroup Cc: cooljeanius (Eric Gallager), ryandesign (Ryan Carsten Schmidt)
Port:

Description

We should have a hook that is executed for each arch's destroot prior to merging them in the muniversal PortGroup.

This would give us a good place to fix conflicts such as this one in mpich:

$ diff -Naurp /opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_science_mpich/mpich/work/destroot-{i386,x86_64}/opt/local/lib/pkgconfig/mpich.pc 
--- /opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_science_mpich/mpich/work/destroot-i386/opt/local/lib/pkgconfig/mpich.pc	2013-08-20 09:31:01.000000000 -0700
+++ /opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_science_mpich/mpich/work/destroot-x86_64/opt/local/lib/pkgconfig/mpich.pc	2013-08-20 09:30:58.000000000 -0700
@@ -9,12 +9,12 @@ Description: High Performance and portab
 Version: 3.0.4
 URL: http://www.mcs.anl.gov/research/projects/mpich
 Requires:
-Libs:  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch i386  -Wl,-flat_namespace -L${libdir} -lpmpich -lmpich -lopa -lmpl  -lpthread  
-Cflags:   -pipe -Os -arch i386  -I${includedir}
+Libs:  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64  -Wl,-flat_namespace -L${libdir} -lpmpich -lmpich -lopa -lmpl  -lpthread  
+Cflags:   -pipe -Os -arch x86_64  -I${includedir}
 
 # pkg-config does not understand Cxxflags, etc. So we allow users to
 # query them using the --variable option
 
-cxxflags=  -pipe -Os -arch i386  -I${includedir}
-fflags=-pipe -Os -m32  -I${includedir}
-fcflags=-pipe -Os -m32  -I${includedir}
+cxxflags=  -pipe -Os -arch x86_64  -I${includedir}
+fflags=-pipe -Os -m64  -I${includedir}
+fcflags=-pipe -Os -m64  -I${includedir}

We just need to strip the arch specific CFLAGS out of the pkgconfig file, but we have no good place to do that.

Change History (5)

comment:1 Changed 11 years ago by danielluke (Daniel J. Luke)

I agree that this would be useful. I recall doing something (ugly) in the clamav portfile for a similar issue, so there may be a way to work around it for now (I believe I copied the code from another port at the time).

comment:2 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

I fixed this specific need by making the merge code smarter about .pc files, but there are still other cases where this would be useful.

comment:3 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Yes a pre-merge hook might be helpful, however I don't think it's needed in this instance; you can do the fix at post-build time like many other ports already do. See wiki:PortfileRecipes#archflags.

comment:5 Changed 20 months ago by mascguy (Christopher Nielsen)

Keywords: portgroup added

Add keyword portgroup, to pg-related tickets

Note: See TracTickets for help on using tickets.