lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

010-fix-paths.patch (8123B)


      1 diff -rupN pillow-3.3.1.orig/setup.py pillow-3.3.1/setup.py
      2 --- pillow-3.3.1.orig/setup.py	2016-08-22 17:45:05.000000000 +0200
      3 +++ pillow-3.3.1/setup.py	2016-08-22 18:09:51.947745155 +0200
      4 @@ -111,12 +111,12 @@ except (ImportError, OSError):
      5  
      6  NAME = 'Pillow'
      7  PILLOW_VERSION = '3.3.1'
      8 -JPEG_ROOT = None
      9 +JPEG_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
     10  JPEG2K_ROOT = None
     11 -ZLIB_ROOT = None
     12 +ZLIB_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
     13  IMAGEQUANT_ROOT = None
     14 -TIFF_ROOT = None
     15 -FREETYPE_ROOT = None
     16 +TIFF_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
     17 +FREETYPE_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
     18  LCMS_ROOT = None
     19  
     20  
     21 @@ -221,161 +221,6 @@ class pil_build_ext(build_ext):
     22              _add_directory(include_dirs, os.path.join(prefix, "include"))
     23  
     24          #
     25 -        # add platform directories
     26 -
     27 -        if self.disable_platform_guessing:
     28 -            pass
     29 -        
     30 -        elif sys.platform == "cygwin":
     31 -            # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory
     32 -            _add_directory(library_dirs,
     33 -                           os.path.join("/usr/lib", "python%s" %
     34 -                                        sys.version[:3], "config"))
     35 -
     36 -        elif sys.platform == "darwin":
     37 -            # attempt to make sure we pick freetype2 over other versions
     38 -            _add_directory(include_dirs, "/sw/include/freetype2")
     39 -            _add_directory(include_dirs, "/sw/lib/freetype2/include")
     40 -            # fink installation directories
     41 -            _add_directory(library_dirs, "/sw/lib")
     42 -            _add_directory(include_dirs, "/sw/include")
     43 -            # darwin ports installation directories
     44 -            _add_directory(library_dirs, "/opt/local/lib")
     45 -            _add_directory(include_dirs, "/opt/local/include")
     46 -
     47 -            # if Homebrew is installed, use its lib and include directories
     48 -            try:
     49 -                prefix = subprocess.check_output(['brew', '--prefix']).strip(
     50 -                ).decode('latin1')
     51 -            except:
     52 -                # Homebrew not installed
     53 -                prefix = None
     54 -
     55 -            ft_prefix = None
     56 -
     57 -            if prefix:
     58 -                # add Homebrew's include and lib directories
     59 -                _add_directory(library_dirs, os.path.join(prefix, 'lib'))
     60 -                _add_directory(include_dirs, os.path.join(prefix, 'include'))
     61 -                ft_prefix = os.path.join(prefix, 'opt', 'freetype')
     62 -
     63 -            if ft_prefix and os.path.isdir(ft_prefix):
     64 -                # freetype might not be linked into Homebrew's prefix
     65 -                _add_directory(library_dirs, os.path.join(ft_prefix, 'lib'))
     66 -                _add_directory(include_dirs,
     67 -                               os.path.join(ft_prefix, 'include'))
     68 -            else:
     69 -                # fall back to freetype from XQuartz if
     70 -                # Homebrew's freetype is missing
     71 -                _add_directory(library_dirs, "/usr/X11/lib")
     72 -                _add_directory(include_dirs, "/usr/X11/include")
     73 -
     74 -        elif sys.platform.startswith("linux"):
     75 -            arch_tp = (plat.processor(), plat.architecture()[0])
     76 -            if arch_tp == ("x86_64", "32bit"):
     77 -                # 32-bit build on 64-bit machine.
     78 -                _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
     79 -            else:
     80 -                for platform_ in arch_tp:
     81 -
     82 -                    if not platform_:
     83 -                        continue
     84 -
     85 -                    if platform_ in ["x86_64", "64bit"]:
     86 -                        _add_directory(library_dirs, "/lib64")
     87 -                        _add_directory(library_dirs, "/usr/lib64")
     88 -                        _add_directory(library_dirs,
     89 -                                       "/usr/lib/x86_64-linux-gnu")
     90 -                        break
     91 -                    elif platform_ in ["i386", "i686", "32bit"]:
     92 -                        _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
     93 -                        break
     94 -                    elif platform_ in ["aarch64"]:
     95 -                        _add_directory(library_dirs, "/usr/lib64")
     96 -                        _add_directory(library_dirs,
     97 -                                       "/usr/lib/aarch64-linux-gnu")
     98 -                        break
     99 -                    elif platform_ in ["arm", "armv7l"]:
    100 -                        _add_directory(library_dirs,
    101 -                                       "/usr/lib/arm-linux-gnueabi")
    102 -                        break
    103 -                    elif platform_ in ["ppc64"]:
    104 -                        _add_directory(library_dirs, "/usr/lib64")
    105 -                        _add_directory(library_dirs,
    106 -                                       "/usr/lib/ppc64-linux-gnu")
    107 -                        _add_directory(library_dirs,
    108 -                                       "/usr/lib/powerpc64-linux-gnu")
    109 -                        break
    110 -                    elif platform_ in ["ppc"]:
    111 -                        _add_directory(library_dirs, "/usr/lib/ppc-linux-gnu")
    112 -                        _add_directory(library_dirs,
    113 -                                       "/usr/lib/powerpc-linux-gnu")
    114 -                        break
    115 -                    elif platform_ in ["s390x"]:
    116 -                        _add_directory(library_dirs, "/usr/lib64")
    117 -                        _add_directory(library_dirs,
    118 -                                       "/usr/lib/s390x-linux-gnu")
    119 -                        break
    120 -                    elif platform_ in ["s390"]:
    121 -                        _add_directory(library_dirs, "/usr/lib/s390-linux-gnu")
    122 -                        break
    123 -                else:
    124 -                    raise ValueError(
    125 -                        "Unable to identify Linux platform: `%s`" % platform_)
    126 -
    127 -                # XXX Kludge. Above /\ we brute force support multiarch. Here we
    128 -                # try Barry's more general approach. Afterward, something should
    129 -                # work ;-)
    130 -                self.add_multiarch_paths()
    131 -
    132 -        elif sys.platform.startswith("gnu"):
    133 -            self.add_multiarch_paths()
    134 -
    135 -        elif sys.platform.startswith("freebsd"):
    136 -            _add_directory(library_dirs, "/usr/local/lib")
    137 -            _add_directory(include_dirs, "/usr/local/include")
    138 -
    139 -        elif sys.platform.startswith("netbsd"):
    140 -            _add_directory(library_dirs, "/usr/pkg/lib")
    141 -            _add_directory(include_dirs, "/usr/pkg/include")
    142 -
    143 -        elif sys.platform.startswith("sunos5"):
    144 -            _add_directory(library_dirs, "/opt/local/lib")
    145 -            _add_directory(include_dirs, "/opt/local/include")
    146 -
    147 -        # FIXME: check /opt/stuff directories here?
    148 -
    149 -        # standard locations
    150 -        if not self.disable_platform_guessing:
    151 -            _add_directory(library_dirs, "/usr/local/lib")
    152 -            _add_directory(include_dirs, "/usr/local/include")
    153 -
    154 -            _add_directory(library_dirs, "/usr/lib")
    155 -            _add_directory(include_dirs, "/usr/include")
    156 -            # alpine, at least
    157 -            _add_directory(library_dirs, "/lib")
    158 -
    159 -        # on Windows, look for the OpenJPEG libraries in the location that
    160 -        # the official installer puts them
    161 -        if sys.platform == "win32":
    162 -            program_files = os.environ.get('ProgramFiles', '')
    163 -            best_version = (0, 0)
    164 -            best_path = None
    165 -            for name in os.listdir(program_files):
    166 -                if name.startswith('OpenJPEG '):
    167 -                    version = tuple([int(x) for x in name[9:].strip().split(
    168 -                        '.')])
    169 -                    if version > best_version:
    170 -                        best_version = version
    171 -                        best_path = os.path.join(program_files, name)
    172 -
    173 -            if best_path:
    174 -                _dbg('Adding %s to search list', best_path)
    175 -                _add_directory(library_dirs, os.path.join(best_path, 'lib'))
    176 -                _add_directory(include_dirs,
    177 -                               os.path.join(best_path, 'include'))
    178 -
    179 -        #
    180          # insert new dirs *before* default libs, to avoid conflicts
    181          # between Python PYD stub libs and real libraries
    182