mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-11 05:22:40 -04:00
115 lines
4.1 KiB
Plaintext
115 lines
4.1 KiB
Plaintext
$NetBSD: patch-aa,v 1.4 2009/12/11 21:40:30 drochner Exp $
|
|
|
|
--- setup.py.orig 2009-11-15 17:06:10.000000000 +0100
|
|
+++ setup.py
|
|
@@ -85,6 +85,7 @@ except ImportError:
|
|
from distutils import sysconfig
|
|
from distutils.core import Extension, setup
|
|
from distutils.command.build_ext import build_ext
|
|
+from distutils.command.install import install
|
|
|
|
try:
|
|
import _tkinter
|
|
@@ -147,7 +148,7 @@ class pil_build_ext(build_ext):
|
|
add_directory(library_dirs, "/opt/local/lib")
|
|
add_directory(include_dirs, "/opt/local/include")
|
|
|
|
- add_directory(library_dirs, "/usr/local/lib")
|
|
+# add_directory(library_dirs, "/usr/local/lib")
|
|
# FIXME: check /opt/stuff directories here?
|
|
|
|
prefix = sysconfig.get_config_var("prefix")
|
|
@@ -208,8 +209,8 @@ class pil_build_ext(build_ext):
|
|
add_directory(include_dirs, tcl_dir)
|
|
|
|
# standard locations
|
|
- add_directory(library_dirs, "/usr/local/lib")
|
|
- add_directory(include_dirs, "/usr/local/include")
|
|
+# add_directory(library_dirs, "/usr/local/lib")
|
|
+# add_directory(include_dirs, "/usr/local/include")
|
|
|
|
add_directory(library_dirs, "/usr/lib")
|
|
add_directory(include_dirs, "/usr/include")
|
|
@@ -243,7 +244,7 @@ class pil_build_ext(build_ext):
|
|
if find_library_file(self, "tiff"):
|
|
feature.tiff = "tiff"
|
|
|
|
- if find_library_file(self, "freetype"):
|
|
+ if 0:
|
|
# look for freetype2 include files
|
|
freetype_version = 0
|
|
for dir in self.compiler.include_dirs:
|
|
@@ -264,9 +265,9 @@ class pil_build_ext(build_ext):
|
|
if dir:
|
|
add_directory(self.compiler.include_dirs, dir, 0)
|
|
|
|
- if find_include_file(self, "lcms.h"):
|
|
- if find_library_file(self, "lcms"):
|
|
- feature.lcms = "lcms"
|
|
+# if find_include_file(self, "lcms.h"):
|
|
+# if find_library_file(self, "lcms"):
|
|
+# feature.lcms = "lcms"
|
|
|
|
if _tkinter and find_include_file(self, "tk.h"):
|
|
# the library names may vary somewhat (e.g. tcl84 or tcl8.4)
|
|
@@ -302,9 +303,10 @@ class pil_build_ext(build_ext):
|
|
if struct.unpack("h", "\0\1")[0] == 1:
|
|
defs.append(("WORDS_BIGENDIAN", None))
|
|
|
|
- exts = [(Extension(
|
|
- "_imaging", files, libraries=libs, define_macros=defs
|
|
- ))]
|
|
+# exts = [(Extension(
|
|
+# "_imaging", files, libraries=libs, define_macros=defs
|
|
+# ))]
|
|
+ exts = []
|
|
|
|
#
|
|
# additional libraries
|
|
@@ -360,8 +362,8 @@ class pil_build_ext(build_ext):
|
|
libraries=[feature.tcl, feature.tk]
|
|
))
|
|
|
|
- if os.path.isfile("_imagingmath.c"):
|
|
- exts.append(Extension("_imagingmath", ["_imagingmath.c"]))
|
|
+# if os.path.isfile("_imagingmath.c"):
|
|
+# exts.append(Extension("_imagingmath", ["_imagingmath.c"]))
|
|
|
|
self.extensions[:] = exts
|
|
|
|
@@ -445,6 +447,10 @@ class pil_build_ext(build_ext):
|
|
if m.group(1) < "1.2.3":
|
|
return m.group(1)
|
|
|
|
+class pkgsrcinstall(install):
|
|
+ def initialize_options(self):
|
|
+ install.initialize_options(self)
|
|
+ self.install_path_file = 0
|
|
#
|
|
# build!
|
|
|
|
@@ -470,7 +476,8 @@ if __name__ == "__main__":
|
|
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
|
|
"Topic :: Multimedia :: Graphics :: Viewers",
|
|
],
|
|
- cmdclass = {"build_ext": pil_build_ext},
|
|
+ cmdclass = {"build_ext": pil_build_ext,
|
|
+ "install": pkgsrcinstall},
|
|
description=DESCRIPTION,
|
|
download_url=DOWNLOAD_URL % (NAME, VERSION),
|
|
ext_modules = [Extension("_imaging", ["_imaging.c"])], # dummy
|
|
@@ -478,10 +485,10 @@ if __name__ == "__main__":
|
|
license="Python (MIT style)",
|
|
long_description=DESCRIPTION,
|
|
name=NAME,
|
|
- package_dir={"": "PIL"},
|
|
- packages=[""],
|
|
+# package_dir={"": "PIL"},
|
|
+# packages=[""],
|
|
platforms="Python 1.5.2 and later.",
|
|
- scripts = glob.glob("Scripts/pil*.py"),
|
|
+# scripts = glob.glob("Scripts/pil*.py"),
|
|
url=HOMEPAGE,
|
|
version=VERSION,
|
|
)
|