X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 0C251DC039B for ; Tue, 9 Sep 2014 05:27:49 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id fa1so3990708pad.2 for ; Mon, 08 Sep 2014 22:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=yNTSSrs/0vbw5cYztNt9FyTdgFH8iWLciXFpAN+XGbY=; b=P9DK3CHpkfIyMhjVbTe+1iACxfQYybVQOy6LxYCNeMPjpeTCLtyOlzEkQy0KtzglOi iJWHEMM5QxeTRAk2VO4oIYjubZTeYHMRzt2zj2RYkg9n9dcojQ0CdAXeVBOQnLsUHvxw xfKNtsYng0eP+J+OJLqeajYZHKtXHy1daN/7SbNMxUDL3a3UwyTDU3k8n/daHAes2SSQ ze8M0E6eWyTXatpyaifbbrctU6IpmjLR07nDKnAUkU7XFfnmr+AqHZkWRPzGCC6BQTM8 NSeqSK7R+OgP9YPDwnP7XplF167RNKKAKMWbSA6VOee6N35fhacswjG5pSIxno750jmS ilzw== X-Received: by 10.68.238.137 with SMTP id vk9mr1729289pbc.165.1410240159025; Mon, 08 Sep 2014 22:22:39 -0700 (PDT) Received: from localhost.localdomain ([50.0.225.234]) by mx.google.com with ESMTPSA id ic5sm10365499pbb.3.2014.09.08.22.22.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Sep 2014 22:22:38 -0700 (PDT) From: Isaac Dunham To: alpine-devel@lists.alpinelinux.org Cc: Isaac Dunham Subject: [alpine-devel] [PATCH 1/2] testing/py-tkinter: add new aport Date: Mon, 8 Sep 2014 22:22:28 -0700 Message-Id: <1410240149-6592-1-git-send-email-ibid.ag@gmail.com> X-Mailer: git-send-email 2.1.0 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: This is the GUI part of python. --- testing/py-tkinter/APKBUILD | 80 ++++++++++++++++++++++++++++++++ testing/py-tkinter/find_library.patch | 11 +++++ testing/py-tkinter/unchecked-ioctl.patch | 11 +++++ 3 files changed, 102 insertions(+) create mode 100644 testing/py-tkinter/APKBUILD create mode 100644 testing/py-tkinter/find_library.patch create mode 100644 testing/py-tkinter/unchecked-ioctl.patch diff --git a/testing/py-tkinter/APKBUILD b/testing/py-tkinter/APKBUILD new file mode 100644 index 0000000..6c7c114 --- /dev/null +++ b/testing/py-tkinter/APKBUILD @@ -0,0 +1,80 @@ +# Maintainer: Isaac Dunham +# This depends on the current packaging of Python, +# which includes idle, the tkinter and idle *.py* files, but not _tkinter.so +pkgname=py-tkinter +_pkgname=python +pkgver=2.7.8 +_verbase=${pkgver%.*} +pkgrel=0 +pkgdesc="Tk interface for Python" +url="http://www.python.org" +arch="all" +license="custom" +subpackages="" +depends="" +makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev + libffi-dev paxctl tk-dev" +source="http://www.$pkgname.org/ftp/$_pkgname/$pkgver/Python-$pkgver.tar.xz + find_library.patch + unchecked-ioctl.patch + " + +prepare() { + cd "$srcdir/Python-$pkgver" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1 + esac + done + + # Make sure we use system libs + rm -r Modules/expat Modules/_ctypes/libffi* Modules/zlib || return 1 + + # make sure our /dev/shm is world writeable + if ! touch /dev/shm/"$pkgname-$pkgver"; then + error "/dev/shm is not world writeable. this will cause a broken python build" + return 1 + fi + rm /dev/shm/"$pkgname-$pkgver" +} + +build() { + cd "$srcdir/Python-$pkgver" + export OPT="$CFLAGS" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --enable-shared \ + --with-threads \ + --enable-ipv6 \ + --with-system-ffi \ + --with-system-expat \ + --with-system-zlib \ + --enable-unicode=ucs4 \ + --with-tcltk-libs="`pkg-config --libs tk`" \ + --with-tcltk-includes="`pkg-config --cflags tk`" \ + || return 1 + make || return 1 +} + +package() { + cd "$srcdir/Python-$pkgver" + make -j1 DESTDIR="$pkgdir" install || return 1 + find "$pkgdir/" -type f ! -name _tkinter.so -exec rm -f '{}' + \ + || return 1 + find "$pkgdir/" -type l -exec rm -f '{}' + || return 1 + find "$pkgdir/" -type d -exec rmdir -p '{}' \; || true + ls "$pkgdir/usr/lib/$_pkgname$_verbase/lib-dynload/_tkinter.so" \ + || return 1 +} + +md5sums="d235bdfa75b8396942e360a70487ee00 Python-2.7.8.tar.xz +5d8ca92fa6f187573104593470a9d3d5 find_library.patch +dada786a50fa332686a9b9260d84c110 unchecked-ioctl.patch" +sha256sums="edde10a0cb7d14e2735e682882d5b287028d1485c456758154c19573db68075a Python-2.7.8.tar.xz +63b2b1489c2b97b450bb2d19b64f2ae6cca5c43d549c131c7807fbe52b7bbf21 find_library.patch +f9d37609bab83d9ffff96ec9a33e16568cfb14980d389f7fe34a1c837397e359 unchecked-ioctl.patch" +sha512sums="0a992e34b6b704f028f5178c0404f8ca5fd9a7ab9da1879a20f0c72ffa712dc4925e45eb78e9368d6a17ee618259fc3f078d71766b314a732a1a28e526511a5e Python-2.7.8.tar.xz +cbb18c23b1b55025ba8a08debd545b68317eef2732f9f631d2629ed71b603b9a90843bca5df9db7072e83e29c928b0e9c557d0710955692052607db36a241c08 find_library.patch +5a8e013a4132d71c4360771f130d27b37275ae59330cf9a75378dc8a11236017f540eb224f2a148984e82ca3fb6b29129375b1080ba05b81044faa717520ab82 unchecked-ioctl.patch" diff --git a/testing/py-tkinter/find_library.patch b/testing/py-tkinter/find_library.patch new file mode 100644 index 0000000..c497525 --- /dev/null +++ b/testing/py-tkinter/find_library.patch @@ -0,0 +1,11 @@ +--- ./Lib/ctypes/util.py.orig ++++ ./Lib/ctypes/util.py +@@ -227,7 +227,7 @@ + abi_type = mach_map.get(machine, 'libc6') + + # XXX assuming GLIBC's ldconfig (with option -p) +- expr = r'\s+(lib%s\.[^\s]+)\s+\(%s' % (re.escape(name), abi_type) ++ expr = r'\s+(lib%s\.[^\s]+)\s+\(' % (re.escape(name)) + f = os.popen('/sbin/ldconfig -p 2>/dev/null') + try: + data = f.read() diff --git a/testing/py-tkinter/unchecked-ioctl.patch b/testing/py-tkinter/unchecked-ioctl.patch new file mode 100644 index 0000000..4d5564c --- /dev/null +++ b/testing/py-tkinter/unchecked-ioctl.patch @@ -0,0 +1,11 @@ +--- ./Modules/fcntlmodule.c.orig ++++ ./Modules/fcntlmodule.c +@@ -118,7 +118,7 @@ + int mutate_arg = 1; + char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */ + +- if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl", ++ if (PyArg_ParseTuple(args, "O&Iw#|n:ioctl", + conv_descriptor, &fd, &code, + &str, &len, &mutate_arg)) { + char *arg; -- 2.1.0 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---