| 1 | # $Id$ |
|---|
| 2 | |
|---|
| 3 | NAME = Python |
|---|
| 4 | VERSION = 2.6.8 |
|---|
| 5 | CATEGORIES = lang |
|---|
| 6 | GARTYPE = v2 |
|---|
| 7 | VER = 2.6 |
|---|
| 8 | DVER = 2-6 |
|---|
| 9 | UVER = 2_6 |
|---|
| 10 | PVER = python$(VER) |
|---|
| 11 | CVER = |
|---|
| 12 | |
|---|
| 13 | # Known issues: |
|---|
| 14 | # |
|---|
| 15 | # - No 64-bit build |
|---|
| 16 | # - ctypes module doesn't compile |
|---|
| 17 | # - http://forums.sun.com/thread.jspa?threadID=5148204 |
|---|
| 18 | # - http://bugs.python.org/issue4902 |
|---|
| 19 | # - Python-2.6.1/Modules/_ctypes/libffi/src/x86/sysv.S |
|---|
| 20 | |
|---|
| 21 | SPKG_SOURCEURL = http://python.org/download/releases/$(VERSION) |
|---|
| 22 | |
|---|
| 23 | DESCRIPTION = A high-level scripting language. |
|---|
| 24 | define BLURB |
|---|
| 25 | Python is an interpreted, interactive, object-oriented programming language. |
|---|
| 26 | It combines remarkable power with very clear syntax, and isnt difficult to |
|---|
| 27 | learn. It has modules, classes, exceptions, very high level data types, and |
|---|
| 28 | dynamic typing. There are interfaces to many system calls and libraries, as |
|---|
| 29 | well as to various windowing systems (Tk, Mac, MFC, GTK+, Qt, wxWindows). |
|---|
| 30 | Newbuilt-in modules are easily written in C or C++. Python is also usable as |
|---|
| 31 | an extension language for applications that need a programmable interface. |
|---|
| 32 | endef |
|---|
| 33 | |
|---|
| 34 | MASTER_SITES = http://python.org/ftp/python/$(VERSION)/ |
|---|
| 35 | UPSTREAM_MASTER_SITES = http://python.org/ftp/python/ |
|---|
| 36 | |
|---|
| 37 | DISTFILES = $(DISTNAME).tar.bz2 |
|---|
| 38 | |
|---|
| 39 | PACKAGING_PLATFORMS = solaris9-sparc solaris9-i386 |
|---|
| 40 | # Some features are missing on Solaris 9, e.g. functionality required for the |
|---|
| 41 | # multiprocessing support. |
|---|
| 42 | # http://osdir.com/ml/opensolaris-discuss/2009-07/msg00865.html |
|---|
| 43 | # http://bugs.python.org/issue3770 |
|---|
| 44 | # However, this bug is about better detection of SEM_VALUE_MAX in Solaris |
|---|
| 45 | # http://bugs.python.org/issue3110 |
|---|
| 46 | |
|---|
| 47 | # There are header differences between Solaris 9 and 10. Programs that include |
|---|
| 48 | # pyconfig.h from Solaris 9 installed on Solaris 10 can get wrong settings, |
|---|
| 49 | # e.g. wrt _X_OPEN_SOURCE. |
|---|
| 50 | PACKAGING_PLATFORMS += solaris10-sparc solaris10-i386 |
|---|
| 51 | |
|---|
| 52 | # Patches |
|---|
| 53 | PATCHFILES += faqwiz.diff |
|---|
| 54 | PATCHFILES += makesetup.diff |
|---|
| 55 | PATCHFILES += modules.diff |
|---|
| 56 | PATCHFILES += multiprocess.diff |
|---|
| 57 | PATCHFILES += pyport.diff |
|---|
| 58 | PATCHFILES += site.diff |
|---|
| 59 | PATCHFILES += python-config-in.diff |
|---|
| 60 | PATCHFILES += setup.diff |
|---|
| 61 | PATCHFILES += 0001-FFI_DEFAULT_ABI-to-use-__i386.patch |
|---|
| 62 | # PATCHFILES += 0010-Hardcoding-the-use-of-libffi.patch |
|---|
| 63 | # PATCHFILES += 0011-OpenCSW-specific-libffi-include-dir.patch |
|---|
| 64 | # PATCHFILES += 0012-temporary-hack-to-compile-against-system-ffi.patch |
|---|
| 65 | PATCHFILES += 0013-Use-opt-csw-bin-python-in-cgi.py.patch |
|---|
| 66 | PATCHFILES += 0015-Adding-opt-csw-lib-to-dyld.py.patch |
|---|
| 67 | PATCHFILES += 0016-CSW-mimetypes.patch |
|---|
| 68 | PATCHFILES += 0017-Random-insignificant-removals-of-usr-local.patch |
|---|
| 69 | PATCHFILES += 0018-Removing-usr-local-from-mailcap.patch |
|---|
| 70 | |
|---|
| 71 | PATCHFILES_5.10 += 0019-Force-multiprocess-to-compile.patch |
|---|
| 72 | PATCHFILES += $(PATCHFILES_$(GAROSREL)) |
|---|
| 73 | |
|---|
| 74 | # Test for sunaudiodev fails. |
|---|
| 75 | SKIPTEST = 1 |
|---|
| 76 | |
|---|
| 77 | EXTRA_INC += $(prefix)/bdb47/include |
|---|
| 78 | EXTRA_LIB += $(prefix)/bdb47/lib |
|---|
| 79 | |
|---|
| 80 | # There is a file name conflict over libffi.so symlink between libffi package |
|---|
| 81 | # and a gcc-java package. While it will ultimately belong to libffi_dev, the |
|---|
| 82 | # symlink is currently under a subdirectory. |
|---|
| 83 | # pkgchk -L CSWlibffi-dev |
|---|
| 84 | # (...) |
|---|
| 85 | # /opt/csw/lib/ffi/libffi.so=../libffi.so.5.0.10 s none CSWlibffi-dev |
|---|
| 86 | EXTRA_LIB += $(libdir)/ffi |
|---|
| 87 | |
|---|
| 88 | BASECFLAGS = $(CFLAGS) |
|---|
| 89 | EXTRA_COMMON_EXPORTS = BASECFLAGS |
|---|
| 90 | |
|---|
| 91 | NOISALIST = 1 |
|---|
| 92 | CONFIGURE_ARGS = $(DIRPATHS) |
|---|
| 93 | CONFIGURE_ARGS += --enable-shared |
|---|
| 94 | CONFIGURE_ARGS += --enable-ipv6 |
|---|
| 95 | CONFIGURE_ARGS += --enable-unicode=ucs4 |
|---|
| 96 | CONFIGURE_ARGS += --without-gcc |
|---|
| 97 | CONFIGURE_ARGS += --with-signal-module |
|---|
| 98 | CONFIGURE_ARGS += --with-fpectl |
|---|
| 99 | CONFIGURE_ARGS += --with-system-ffi |
|---|
| 100 | |
|---|
| 101 | # This doesn't work here, as _PYCOMPILE_FILES is not the directory Python uses. |
|---|
| 102 | # PYCOMPILE = 1 |
|---|
| 103 | EXTRA_MERGE_EXCLUDE_FILES += .*\.pyo .*\.pyc |
|---|
| 104 | # use prototype filters to set the class |
|---|
| 105 | PROTOTYPE_FILTER = awk '$$$$3 ~/.*\.py$$$$/ { $$$$2 = "cswpycompile" } { print }' |
|---|
| 106 | |
|---|
| 107 | PACKAGES = CSWidle$(CVER) |
|---|
| 108 | PACKAGES += CSWpython$(CVER) |
|---|
| 109 | PACKAGES += CSWpython$(CVER)-dev |
|---|
| 110 | PACKAGES += CSWpython$(CVER)-test |
|---|
| 111 | PACKAGES += CSWpython$(CVER)-tk |
|---|
| 112 | PACKAGES += CSWlibpython$(DVER)-1-0 |
|---|
| 113 | CATALOGNAME_CSWlibpython$(DVER)-1-0 = libpython$(UVER)_1_0 |
|---|
| 114 | PKGFILES_CSWlibpython$(DVER)-1-0 += $(call baseisadirs,$(libdir),libpython$(VER)\.so\.1\.0(\.\d+)*) |
|---|
| 115 | SPKG_DESC_CSWlibpython$(DVER)-1-0 = Python shared library ($(VER)) |
|---|
| 116 | |
|---|
| 117 | INCOMPATIBLE_PKGS_CSWpython$(CVER) = CSWpydistutils |
|---|
| 118 | OBSOLETED_BY_CSWpython$(CVER)-dev = CSWpython$(CVER)-devel |
|---|
| 119 | |
|---|
| 120 | PKGFILES_CSWidle$(CVER) = $(libdir)/.*/idlelib/.* |
|---|
| 121 | PKGFILES_CSWidle$(CVER) += $(bindir)/idle |
|---|
| 122 | PKGFILES_CSWpython$(CVER)-dev = $(includedir)/.* |
|---|
| 123 | PKGFILES_CSWpython$(CVER)-dev += $(libdir)/.*/config/.* |
|---|
| 124 | PKGFILES_CSWpython$(CVER)-dev += $(bindir)/.*config.* |
|---|
| 125 | PKGFILES_CSWpython$(CVER)-dev += $(libdir)/libpython$(VER).so |
|---|
| 126 | # No idea why would this be in CSWpython, and no good idea for a better package |
|---|
| 127 | # to put it. |
|---|
| 128 | PKGFILES_CSWpython$(CVER)-dev += $(bindir)/smtpd.py |
|---|
| 129 | |
|---|
| 130 | PKGFILES_CSWpython$(CVER)-tk = $(libdir)/.*/lib-tk/.* |
|---|
| 131 | PKGFILES_CSWpython$(CVER)-tk += $(libdir)/.*/lib-dynload/_tkinter.so.* |
|---|
| 132 | PKGFILES_CSWpython$(CVER)-test = $(libdir)/python/test/.* |
|---|
| 133 | PKGFILES_CSWpython$(CVER)-test += $(libdir)/python/bsddb/test.* |
|---|
| 134 | PKGFILES_CSWpython$(CVER)-test += $(libdir)/python/ctypes/test.* |
|---|
| 135 | PKGFILES_CSWpython$(CVER)-test += $(libdir)/python/email/test.* |
|---|
| 136 | PKGFILES_CSWpython$(CVER)-test += $(libdir)/python/distutils/tests.* |
|---|
| 137 | PKGFILES_CSWpython$(CVER)-test += $(libdir)/python/json/tests.* |
|---|
| 138 | PKGFILES_CSWpython$(CVER)-test += $(libdir)/python/lib2to3/tests.* |
|---|
| 139 | PKGFILES_CSWpython$(CVER)-test += $(libdir)/python/sqlite3/test.* |
|---|
| 140 | |
|---|
| 141 | ARCHALL_CSWpython$(CVER)-test = 1 |
|---|
| 142 | ARCHALL_CSWidle$(CVER) = 1 |
|---|
| 143 | |
|---|
| 144 | RUNTIME_DEP_PKGS_CSWidle$(CVER) += CSWpython$(CVER) |
|---|
| 145 | RUNTIME_DEP_PKGS_CSWidle$(CVER) += CSWpython$(CVER)-tk |
|---|
| 146 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWbdb47 |
|---|
| 147 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibbz2-1-0 |
|---|
| 148 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibintl8 |
|---|
| 149 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibffi5 |
|---|
| 150 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibgdbm4 |
|---|
| 151 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibpython$(DVER)-1-0 |
|---|
| 152 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibncursesw5 |
|---|
| 153 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibpanel5 |
|---|
| 154 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibssl0-9-8 |
|---|
| 155 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibreadline6 |
|---|
| 156 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibsqlite3-0 |
|---|
| 157 | RUNTIME_DEP_PKGS_CSWpython$(CVER) += CSWlibz1 |
|---|
| 158 | RUNTIME_DEP_PKGS_CSWpython$(CVER)-dev += CSWlibpython$(DVER)-1-0 |
|---|
| 159 | RUNTIME_DEP_PKGS_CSWpython$(CVER)-dev += CSWpython$(CVER) |
|---|
| 160 | RUNTIME_DEP_PKGS_CSWpython$(CVER)-test += CSWpython$(CVER) |
|---|
| 161 | RUNTIME_DEP_PKGS_CSWpython$(CVER)-tk += CSWlibpython$(DVER)-1-0 |
|---|
| 162 | RUNTIME_DEP_PKGS_CSWpython$(CVER)-tk += CSWpython$(CVER) |
|---|
| 163 | RUNTIME_DEP_PKGS_CSWpython$(CVER)-tk += CSWtcl |
|---|
| 164 | RUNTIME_DEP_PKGS_CSWpython$(CVER)-tk += CSWtk |
|---|
| 165 | |
|---|
| 166 | BUILD_DEP_PKGS += CSWlibffi-dev |
|---|
| 167 | |
|---|
| 168 | # There are packages depending on libpython2.5, and listing CSWpython as the |
|---|
| 169 | # dependency. |
|---|
| 170 | RUNTIME_DEP_PKGS_CSWpython += CSWlibpython2-5-1-0 |
|---|
| 171 | CHECKPKG_OVERRIDES_CSWpython += surplus-dependency|CSWlibpython2-5-1-0 |
|---|
| 172 | |
|---|
| 173 | # This could be handled by automatic dependency detection |
|---|
| 174 | CHECKPKG_OVERRIDES_CSWidle$(CVER) += surplus-dependency|CSWpython$(CVER)-tk |
|---|
| 175 | |
|---|
| 176 | # This package is not meant to be released |
|---|
| 177 | CHECKPKG_OVERRIDES_CSWpython-test += file-with-bad-content |
|---|
| 178 | |
|---|
| 179 | CATALOGNAME_CSWidle$(CVER) = idle |
|---|
| 180 | CATALOGNAME_CSWpython$(CVER) = python |
|---|
| 181 | CATALOGNAME_CSWpython$(CVER)-dev = python$(CVER)_dev |
|---|
| 182 | CATALOGNAME_CSWpython$(CVER)-tk = python$(CVER)_tk |
|---|
| 183 | CATALOGNAME_CSWpython$(CVER)-test = python$(CVER)_test |
|---|
| 184 | |
|---|
| 185 | SPKG_DESC_CSWidle$(CVER) = Python IDE |
|---|
| 186 | SPKG_DESC_CSWpython$(CVER) = A high-level scripting language, $(VER) series |
|---|
| 187 | SPKG_DESC_CSWpython$(CVER)-dev = Development Files for Python |
|---|
| 188 | SPKG_DESC_CSWpython$(CVER)-tk = Python Tk Interface (TkInter) |
|---|
| 189 | SPKG_DESC_CSWpython$(CVER)-test = Python Test modules |
|---|
| 190 | |
|---|
| 191 | LICENSE = LICENSE |
|---|
| 192 | |
|---|
| 193 | # This is an exception, since these are original Python packages. |
|---|
| 194 | CHECKPKG_OVERRIDES_CSWidle$(CVER) += pkgname-does-not-start-with-CSWpy- |
|---|
| 195 | CHECKPKG_OVERRIDES_CSWidle$(CVER) += catalogname-does-not-start-with-py_ |
|---|
| 196 | CHECKPKG_OVERRIDES_CSWpython$(CVER)-test += pkgname-does-not-start-with-CSWpy- |
|---|
| 197 | CHECKPKG_OVERRIDES_CSWpython$(CVER)-test += catalogname-does-not-start-with-py_ |
|---|
| 198 | CHECKPKG_OVERRIDES_CSWpython$(CVER)-dev += pkgname-does-not-start-with-CSWpy- |
|---|
| 199 | CHECKPKG_OVERRIDES_CSWpython$(CVER)-dev += catalogname-does-not-start-with-py_ |
|---|
| 200 | CHECKPKG_OVERRIDES_CSWpython$(CVER)-tk += pkgname-does-not-start-with-CSWpy- |
|---|
| 201 | CHECKPKG_OVERRIDES_CSWpython$(CVER)-tk += catalogname-does-not-start-with-py_ |
|---|
| 202 | CHECKPKG_OVERRIDES_CSWpython$(CVER) += pkgname-does-not-start-with-CSWpy- |
|---|
| 203 | CHECKPKG_OVERRIDES_CSWpython$(CVER) += catalogname-does-not-start-with-py_ |
|---|
| 204 | |
|---|
| 205 | include gar/category.mk |
|---|
| 206 | |
|---|
| 207 | post-configure-modulated: |
|---|
| 208 | for f in Modules/Setup \ |
|---|
| 209 | Makefile \ |
|---|
| 210 | Makefile.pre \ |
|---|
| 211 | Lib/idlelib/EditorWindow.py \ |
|---|
| 212 | Lib/pydoc_topics.py \ |
|---|
| 213 | Lib/idlelib/config-main.def \ |
|---|
| 214 | ; do \ |
|---|
| 215 | gsed -i -e 's+/usr/local+/opt/csw+g' $(WORKSRC)/$${f}; \ |
|---|
| 216 | gsed -i -e 's+/usr/share+/opt/csw/share+g' $(WORKSRC)/$${f}; \ |
|---|
| 217 | done |
|---|
| 218 | @$(MAKECOOKIE) |
|---|