Bug 155310 - [patch] make lang/python27 work on powerpc64
Summary: [patch] make lang/python27 work on powerpc64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mark Linimon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-06 13:30 UTC by Andreas Tobler
Modified: 2011-03-11 05:40 UTC (History)
0 users

See Also:


Attachments
file.diff (701 bytes, patch)
2011-03-06 13:30 UTC, Andreas Tobler
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Tobler freebsd_committer freebsd_triage 2011-03-06 13:30:10 UTC
Once again a uname -p/m issue. The uname -m reports the hw arch while uname  -p reports the processor arch.
To build all packages correctly we should export UNAME_m="powerpc64" for powerpc64.

The attached patch does this. It includes also the correct bits for libffi.

Fix: Apply the following to the Makefile:

[andreast@bohrium] /usr/ports/lang/python27/> diff -u Makefile.orig Makefile
--- Makefile.orig	2010-11-30 04:34:54.000000000 +0100
+++ Makefile	2011-03-06 14:18:17.000000000 +0100
@@ -121,11 +121,14 @@
 .else
 PLIST_SUB+=	X86_ONLY="@comment "
 .endif
-.if ${ARCH} == amd64 || ${ARCH} == ia64 || ${ARCH} == sparc64 || ${ARCH} == alpha
+.if ${ARCH} == amd64 || ${ARCH} == ia64 || ${ARCH} == sparc64 || ${ARCH} == alpha || ${ARCH} == powerpc64
 PLIST_SUB+=	32BIT_ONLY="@comment "
 .else
 PLIST_SUB+=	32BIT_ONLY=""
 .endif
+.if ${ARCH} == powerpc64
+MAKE_ENV+= UNAME_m="powerpc64"
+.endif
 .if ${ARCH} == sparc64
 CFLAGS+=	-DPYTHON_DEFAULT_RECURSION_LIMIT=900
 .endif


And the attached patch belongs to files. 


Patch attached with submission follows:
How-To-Repeat: Always
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-03-06 13:30:24 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-python

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Li-Wen Hsu freebsd_committer freebsd_triage 2011-03-07 16:50:36 UTC
Responsible Changed
From-To: freebsd-python->andreast

We don't have powerpc64 hardware currently, please commit it if you've 
tested.  Thanks very much!
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2011-03-10 22:49:22 UTC
State Changed
From-To: open->feedback

The configure file doesn't patch for me at all on python27.  (I don't 
see the second stanza in any of our current *ffi* files on any of the 
pythons.) 

Is it possible that you were patching against an older version? 


Comment 4 Mark Linimon freebsd_committer freebsd_triage 2011-03-10 22:49:22 UTC
Responsible Changed
From-To: andreast->linimon
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2011-03-11 05:37:56 UTC
State Changed
From-To: feedback->closed

Committed after testing for regression on i386.
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-03-11 05:39:11 UTC
linimon     2011-03-11 05:38:57 UTC

  FreeBSD ports repository

  Modified files:
    lang/python27        Makefile 
    lang/python27/files  patch-Modules-_ctypes-libffi-configure 
  Log:
  Enable build on powerpc64.  Tested on i386, no regression.
  
  PR:             ports/155310
  Submitted by:   andreast
  Approved by:    lwhsu (python team)
  
  Revision  Changes    Path
  1.172     +4 -1      ports/lang/python27/Makefile
  1.5       +13 -2     ports/lang/python27/files/patch-Modules-_ctypes-libffi-configure
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"