[MacPorts] #24545: python27 @2.7b1 patch of Makefile.pre.in fails on 10.6.3

MacPorts noreply at macports.org
Sun Apr 18 13:39:05 PDT 2010


#24545: python27 @2.7b1 patch of Makefile.pre.in fails on 10.6.3
----------------------------------------+-----------------------------------
 Reporter:  macports-trac@…             |       Owner:  macports-tickets@…                   
     Type:  defect                      |      Status:  new                                  
 Priority:  Normal                      |   Milestone:                                       
Component:  ports                       |     Version:  1.8.2                                
 Keywords:                              |        Port:  python27                             
----------------------------------------+-----------------------------------
 This is verified with a total uninstall/clean --all/install of python27.

 Problem: the patch file patch-Makefile.pre.in.diff fails on the first hunk
 because the diff isn't based on the same Makefile.pre.in that ships with
 the port.

 Patch file says:
 {{{
 @@ -394,8 +394,8 @@
  # Build the shared modules
  sharedmods: $(BUILDPYTHON)
         @case $$MAKEFLAGS in \
 -       *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)'
 ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
 -       *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)'
 ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
 +       *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)'
 ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q --no-user-cfg build;; \
 +       *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)'
 ./$(BUILDPYTHON) -E $(srcdir)/setup.py --no-user-cfg build;; \
         esac

  # Build static library
 }}}

 But Makefile.pre.in from the port starts at line 394 with:
 {{{
 # Build the interpreter
 $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
                 $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
                         Modules/python.o \
                         $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
 $(LDLAST)

 platform: $(BUILDPYTHON)
         $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig
 import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform


 # Build the shared modules
 sharedmods: $(BUILDPYTHON)
         @case $$MAKEFLAGS in \
         *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)'
 LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py
 -q build;; \
         *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)'
 LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py
 build;; \
         esac

 # Build static library
 }}}

 Output snippet showing the failure:
 {{{
 & /usr/bin/patch -p0'
 patching file Makefile.pre.in
 Hunk #1 FAILED at 394.
 Hunk #2 succeeded at 1043 (offset 50 lines).
 Hunk #3 succeeded at 1116 (offset 43 lines).
 1 out of 3 hunks FAILED -- saving rejects to file Makefile.pre.in.rej
 Error: Target org.macports.patch returned: shell command " cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python27/work/Python-2.7b1"
 && /usr/bin/patch -p0 <
 '/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/python27/files
 /patch-Makefile.pre.in.diff'" returned error 1
 DEBUG: Backtrace: shell command " cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python27/work/Python-2.7b1"
 && /usr/bin/patch -p0 <
 '/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/python27/files
 /patch-Makefile.pre.in.diff'" returned error 1
     while executing
 "command_exec patch "" "< '$patch'""
     (procedure "portpatch::patch_main" line 33)
     invoked from within
 "$procedure $targetname"
 Warning: the following items did not execute (for python27):
 org.macports.destroot org.macports.patch org.macports.configure
 org.macports.build

 }}}

 Workaround:

 1. Edit portfile to remove patch-Makefile.pre.in.diff from the list of
 patchfiles.

 2. Edit Makefile.pre.in to look like what the patch is trying to do.

-- 
Ticket URL: <http://trac.macports.org/ticket/24545>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list