[MacPorts] #24545: python27 @2.7b1 patch of Makefile.pre.in fails on 10.6.3
#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
#24545: python27 @2.7b1 patch of Makefile.pre.in fails on 10.6.3 ----------------------------------------+----------------------------------- Reporter: macports-trac@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: python27 ----------------------------------------+----------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => jwa@… -- Ticket URL: <http://trac.macports.org/ticket/24545#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24545: python27 @2.7b1 patch of Makefile.pre.in fails on 10.6.3 ----------------------------------------+----------------------------------- Reporter: macports-trac@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: python27 ----------------------------------------+----------------------------------- Comment(by charlie.clark@…): I copied the two lines to be replaced from the Makefile-in Put my patch in /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/python27/files. I think the diff headers may need correcting but Python 2.7 builds and runs. -- Ticket URL: <http://trac.macports.org/ticket/24545#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24545: python27 @2.7b1 patch of Makefile.pre.in fails on 10.6.3 -----------------------------------------+---------------------------------- Reporter: macports-trac@… | Owner: jwa@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: fixed | Keywords: Port: python27 | -----------------------------------------+---------------------------------- Changes (by snc@…): * status: new => closed * resolution: => fixed Comment: Fixed patchfile in r67469. Maintainer timeout. -- Ticket URL: <http://trac.macports.org/ticket/24545#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts