python3.4: enable tk support

That addresses the following issues:
- Add tkinter ("Tk interface") support. Tkinter is the standard Python
  binding to the Tk GUI toolkit.
- Fix broken IDLE (the Python IDE) built with Tkinter.

Add two new subpkgs: python3.4-tkinter and idle-python3.4.

Remove --enable-unicode and --with-wctype-functions configure options.
Both have been removed from Python 3.x.
This commit is contained in:
Alessio Sergi 2014-08-17 14:34:34 +02:00
parent dd465c41b3
commit b4483f25c7
5 changed files with 163 additions and 5 deletions

1
srcpkgs/idle-python3.4 Symbolic link
View File

@ -0,0 +1 @@
python3.4

1
srcpkgs/python3.4-tkinter Symbolic link
View File

@ -0,0 +1 @@
python3.4

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=IDLE 3 (using Python3.4)
Comment=IDE for Python3.4
Exec=idle3
Icon=idle3
Terminal=false
Type=Application
Categories=Development;
StartupNotify=true

View File

@ -0,0 +1,124 @@
/* XPM */
static char *python[] = {
/* columns rows colors chars-per-pixel */
"16 16 102 2 ",
" c #EBBB18",
". c #EBBE21",
"X c #F3C11A",
"o c #FAC719",
"O c #FDCB1B",
"+ c #FFCC1C",
"@ c #EBC22A",
"# c #FFCF23",
"$ c #FFCF24",
"% c #FFD025",
"& c #FFD026",
"* c #FFD32D",
"= c #FDD22F",
"- c #FFD32E",
"; c #FFD32F",
": c #EBC534",
"> c #E8C73D",
", c #FFD330",
"< c #FFD430",
"1 c #FDD536",
"2 c #FFD637",
"3 c #FAD339",
"4 c #FFD738",
"5 c #FFD739",
"6 c #FFD73A",
"7 c #F9D53E",
"8 c #FFD83A",
"9 c #ECCE45",
"0 c #FDD941",
"q c #FFDA41",
"w c #FFDA42",
"e c #FFDB42",
"r c #FFDB43",
"t c #FFDB44",
"y c #FDDD4A",
"u c #FFDE4B",
"i c #FFDF4D",
"p c #FDDE4E",
"a c #FFDF4E",
"s c #FFE255",
"d c #FFE357",
"f c #FFE358",
"g c #FFE661",
"h c #FFE761",
"j c #FFE762",
"k c #F2E16E",
"l c #F5E36F",
"z c #FDE96A",
"x c #FFEB6C",
"c c #326087",
"v c #366690",
"b c #366791",
"n c #356892",
"m c #366993",
"M c #366994",
"N c #376896",
"B c #376A96",
"V c #396C96",
"C c #386C97",
"Z c #396D99",
"A c #3A6F9B",
"S c #3A709C",
"D c #3B709C",
"F c #3B709D",
"G c #3C719E",
"H c #3D73A0",
"J c #3D73A2",
"K c #3D74A1",
"L c #3E74A2",
"P c #3E75A3",
"I c #3F76A5",
"U c #4078A6",
"Y c #4078A7",
"T c #4179A8",
"R c #427BAA",
"E c #437CAB",
"W c #437DAD",
"Q c #437DAE",
"! c #447DAD",
"~ c #447EAD",
"^ c #457FAF",
"/ c #4680B0",
"( c #4680B1",
") c #4681B2",
"_ c #4781B2",
"` c #4883B4",
"' c #4884B5",
"] c #4885B6",
"[ c #4985B7",
"{ c #4A87B9",
"} c #4A86BA",
"| c #4B88BB",
" . c #4C89BC",
".. c #4C8ABC",
"X. c #4D8BBE",
"o. c #4C8ABF",
"O. c #4E8DC0",
"+. c #4F8DC1",
"@. c #508FC3",
"#. c #5291C6",
"$. c gray100",
"%. c None",
/* pixels */
"%.%.%.%.+.} ( W I G N %.%.%.%.%.",
"%.%.%.%...$.( R L S B %.%.%.%.%.",
"%.%.%.%.] ( R L D B m %.%.%.%.%.",
"%.%.o.] W L V v V B B %.%.%.%.%.",
"#.+. .` ^ U G A m B B %.s u 7 %.",
"@.o._ ^ R G A m m m c %.u q 1 %.",
"o.] _ R L G B B n c %.9 q 1 * %.",
"] _ E U m %.%.%.%.%.%.q 5 * # %.",
"( E U n %.k z j s a t 5 * $ O %.",
"W R K %.l x j f a t 5 * $ + X %.",
"%.K D %.x j f a q 8 * $ + + %.%.",
"%.%.%.%.j f a > : @ . %.%.%.",
"%.%.%.%.f a t 5 , % + %.%.%.%.%.",
"%.%.%.%.a t 5 < % $.O %.%.%.%.%.",
"%.%.%.%.%.3 , % + o %.%.%.%.%.%.",
"%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%."
};

View File

@ -1,7 +1,7 @@
# Template file for 'python3.4'
pkgname=python3.4
version=3.4.1
revision=6
revision=7
wrksrc="Python-${version}"
short_desc="Interpreted, interactive, object-oriented programming language (${version%.*} series)"
maintainer="Juan RP <xtraeme@gmail.com>"
@ -13,8 +13,9 @@ checksum=c595a163104399041fcbe1c5c04db4c1da94f917b82ce89e8944c8edff7aedc4
pycompile_version="3.4"
pycompile_dirs="usr/lib/python3.4"
makedepends="libffi-devel readline-devel>=6.3 gdbm-devel libressl-devel
expat-devel sqlite-devel bzip2-devel zlib-devel liblzma-devel"
makedepends="
libffi-devel readline-devel>=6.3 gdbm-devel libressl-devel expat-devel
sqlite-devel bzip2-devel zlib-devel liblzma-devel tcl-devel tk-devel libX11-devel"
pre_configure() {
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python3|" Lib/cgi.py
@ -38,8 +39,8 @@ do_configure() {
fi
./configure ${configure_args} --build=${XBPS_MACHINE}-unknown-linux-gnu \
--with-threads --enable-ipv6 --with-signal-module \
--with-system-ffi --enable-unicode=ucs4 --with-system-expat \
--with-wctype-functions --enable-shared --without-ensurepip \
--with-system-ffi --with-system-expat \
--enable-shared --without-ensurepip \
ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes \
ac_cv_have_long_long_format=yes
}
@ -79,3 +80,25 @@ python3.4-devel_package() {
${DESTDIR}/usr/include/python${version%.*}m
}
}
python3.4-tkinter_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - GUI toolkit for Python${version%.*}"
pkg_install() {
vmove usr/lib/python${version%.*}/tkinter
vmove usr/lib/python${version%.*}/turtle.py
vmove usr/lib/python${version%.*}/turtledemo
vmove usr/lib/python${version%.*}/lib-dynload/_tkinter.cpython-34m.so
}
}
idle-python3.4_package() {
depends="${sourcepkg}>=${version}_${revision} python3.4-tkinter"
short_desc+=" - IDE for Python${version%.*} using Tkinter"
pkg_install() {
vmove usr/bin/idle3*
vmove usr/lib/python${version%.*}/idlelib
vinstall ${FILESDIR}/idle3.xpm 644 usr/share/pixmaps
vinstall ${FILESDIR}/idle3.desktop 644 usr/share/applications
}
}