Ticket #64916: patch-universal-powerpc-alternative.diff

File patch-universal-powerpc-alternative.diff, 4.8 KB (added by barracuda156, 2 years ago)

Patch based on python27 one. (I also removed the last part of patch-configure.diff to match python27 patch.)

  • configure

    # Patch allowing building universal Python (ppc+ppc64). Supported only for 10.5.x
    
    old new  
    15231523                          specify the kind of macOS universal binary that
    15241524                          should be created. This option is only valid when
    15251525                          --enable-universalsdk is set; options are:
    1526                           ("universal2", "intel-64", "intel-32", "intel",
     1526                          ("universal2", "intel-64", "intel-32", "intel", "powerpc",
    15271527                          "32-bit", "64-bit", "3-way", or "all") see
    15281528                          Mac/README.rst
    15291529  --with-framework-name=FRAMEWORK
     
    74977497        LIPO_INTEL64_FLAGS=""
    74987498        if test "${enable_universalsdk}"
    74997499        then
    7500             case "$UNIVERSAL_ARCHS" in
    7501             32-bit)
    7502                UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
    7503                LIPO_32BIT_FLAGS=""
    7504                ARCH_RUN_32BIT=""
    7505                ;;
    7506             64-bit)
    7507                UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
    7508                LIPO_32BIT_FLAGS=""
    7509                ARCH_RUN_32BIT="true"
    7510                ;;
    7511             all)
    7512                UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
    7513                LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
    7514                ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
    7515                ;;
    7516             universal2)
    7517                UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
    7518                LIPO_32BIT_FLAGS=""
    7519                LIPO_INTEL64_FLAGS="-extract x86_64"
    7520                ARCH_RUN_32BIT="true"
    7521                ;;
    7522             intel)
    7523                UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
    7524                LIPO_32BIT_FLAGS="-extract i386"
    7525                ARCH_RUN_32BIT="/usr/bin/arch -i386"
    7526                ;;
    7527             intel-32)
    7528                UNIVERSAL_ARCH_FLAGS="-arch i386"
    7529                LIPO_32BIT_FLAGS=""
    7530                ARCH_RUN_32BIT=""
    7531                ;;
    7532             intel-64)
    7533                UNIVERSAL_ARCH_FLAGS="-arch x86_64"
    7534                LIPO_32BIT_FLAGS=""
    7535                ARCH_RUN_32BIT="true"
    7536                ;;
    7537             3-way)
    7538                UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
    7539                LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
    7540                ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
    7541                ;;
    7542             *)
    7543                as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5
    7544                ;;
    7545             esac
     7500            UNIVERSAL_ARCH_FLAGS="__UNIVERSAL_ARCHFLAGS__"
     7501            ARCH_RUN_32BIT=""
     7502            LIPO_32BIT_FLAGS=""
    75467503
    75477504            if test "${UNIVERSALSDK}" != "/"
    75487505            then
     
    75847541            if test ${enable_universalsdk}
    75857542            then
    75867543                case "$UNIVERSAL_ARCHS" in
    7587                 all|3-way|intel|64-bit)
     7544                all|3-way|intel|powerpc|64-bit)
    75887545                    # These configurations were first supported in 10.5
    75897546                    cur_target='10.5'
    75907547                    ;;
  • Mac/BuildScript/build-installer.py

    old new  
    123123universal_opts_map = { 'universal2': ('arm64', 'x86_64'),
    124124                       '32-bit': ('i386', 'ppc',),
    125125                       '64-bit': ('x86_64', 'ppc64',),
    126                        'intel':  ('i386', 'x86_64'),
    127                        'intel-32':  ('i386',),
    128                        'intel-64':  ('x86_64',),
    129                        '3-way':  ('ppc', 'i386', 'x86_64'),
    130                        'all':    ('i386', 'ppc', 'x86_64', 'ppc64',) }
     126                       'intel': ('i386', 'x86_64'),
     127                       'intel-32': ('i386',),
     128                       'intel-64': ('x86_64',),
     129                       'powerpc': ('ppc', 'ppc64'),
     130                       '3-way': ('ppc', 'i386', 'x86_64'),
     131                       'all': ('i386', 'ppc', 'x86_64', 'ppc64',) }
    131132default_target_map = {
    132133        'universal2': '10.9',
    133134        '64-bit': '10.5',
     
    135136        'intel': '10.5',
    136137        'intel-32': '10.4',
    137138        'intel-64': '10.5',
     139        'powerpc': '10.5',
    138140        'all': '10.5',
    139141}
    140142
  • Lib/_osx_support.py

    old new  
    547547                machine = 'fat'
    548548            elif archs == ('i386', 'x86_64'):
    549549                machine = 'intel'
     550            elif archs == ('ppc', 'ppc64'):
     551                machine = 'powerpc'
    550552            elif archs == ('i386', 'ppc', 'x86_64'):
    551553                machine = 'fat3'
    552554            elif archs == ('ppc64', 'x86_64'):