Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Mar 2014 20:18:24 GMT
From:      Corey Smith <corsmith@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/187400: [PATCH] devel/glib20: support python3.2+
Message-ID:  <201403092018.s29KIOIw043781@cgiserv.freebsd.org>
Resent-Message-ID: <201403092020.s29KK0F0042606@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187400
>Category:       ports
>Synopsis:       [PATCH] devel/glib20: support python3.2+
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 09 20:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Corey Smith
>Release:        9.2-RELEASE
>Organization:
>Environment:
FreeBSD corsmith 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Python 3.2+ supports different cache file locations based on the python interpreter in use.  The pkg-plist does not understand the cache directories and file names used in python 3.2+
>How-To-Repeat:
Try to build the port with the following in make.conf
DEFAULT_VERSIONS=python=3.3
>Fix:
Patch for devel/glib20 attached.

Patch attached with submission follows:

diff -urN /usr/local/poudriere/ports/default/devel/glib20/Makefile glib20/Makefile
--- /usr/local/poudriere/ports/default/devel/glib20/Makefile	2014-02-16 10:40:34.000000000 -0500
+++ glib20/Makefile	2014-02-25 23:12:07.000000000 -0500
@@ -46,6 +46,17 @@
 
 .include <bsd.port.pre.mk>
 
+_PYTHON_SHORT_VER=	${PYTHON_VERSION:S/^python//:S/.//}
+.if ${_PYTHON_SHORT_VER} > 31
+PLIST_SUB+=	PYCACHE="__pycache__/" \
+		PYC_SUFFIX=cpython-${_PYTHON_SHORT_VER}.pyc \
+		PYO_SUFFIX=cpython-${_PYTHON_SHORT_VER}.pyo
+.else
+PLIST_SUB+=	PYCACHE="" \
+		PYC_SUFFIX=pyc \
+		PYO_SUFFIX=pyo
+.endif
+
 # doesn't build yet
 #.if (${OSVERSION} < 800000) \
 #	|| (${OSVERSION} >= 800000 && ${OSVERSION} < 802000)
diff -urN /usr/local/poudriere/ports/default/devel/glib20/pkg-plist glib20/pkg-plist
--- /usr/local/poudriere/ports/default/devel/glib20/pkg-plist	2013-07-31 07:57:45.000000000 -0400
+++ glib20/pkg-plist	2014-02-25 23:20:04.000000000 -0500
@@ -292,30 +292,30 @@
 share/aclocal/glib-2.0.m4
 share/aclocal/glib-gettext.m4
 share/aclocal/gsettings.m4
+share/glib-2.0/codegen/%%PYCACHE%%__init__.%%PYC_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%__init__.%%PYO_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%codegen.%%PYC_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%codegen.%%PYO_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%codegen_docbook.%%PYC_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%codegen_docbook.%%PYO_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%codegen_main.%%PYC_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%codegen_main.%%PYO_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%config.%%PYC_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%config.%%PYO_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%dbustypes.%%PYC_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%dbustypes.%%PYO_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%parser.%%PYC_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%parser.%%PYO_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%utils.%%PYC_SUFFIX%%
+share/glib-2.0/codegen/%%PYCACHE%%utils.%%PYO_SUFFIX%%
 share/glib-2.0/codegen/__init__.py
-share/glib-2.0/codegen/__init__.pyc
-share/glib-2.0/codegen/__init__.pyo
 share/glib-2.0/codegen/codegen.py
-share/glib-2.0/codegen/codegen.pyc
-share/glib-2.0/codegen/codegen.pyo
 share/glib-2.0/codegen/codegen_docbook.py
-share/glib-2.0/codegen/codegen_docbook.pyc
-share/glib-2.0/codegen/codegen_docbook.pyo
 share/glib-2.0/codegen/codegen_main.py
-share/glib-2.0/codegen/codegen_main.pyc
-share/glib-2.0/codegen/codegen_main.pyo
 share/glib-2.0/codegen/config.py
-share/glib-2.0/codegen/config.pyc
-share/glib-2.0/codegen/config.pyo
 share/glib-2.0/codegen/dbustypes.py
-share/glib-2.0/codegen/dbustypes.pyc
-share/glib-2.0/codegen/dbustypes.pyo
 share/glib-2.0/codegen/parser.py
-share/glib-2.0/codegen/parser.pyc
-share/glib-2.0/codegen/parser.pyo
 share/glib-2.0/codegen/utils.py
-share/glib-2.0/codegen/utils.pyc
-share/glib-2.0/codegen/utils.pyo
 share/glib-2.0/gettext/po/Makefile.in.in
 share/glib-2.0/schemas/gschema.dtd
 share/locale/af/LC_MESSAGES/glib20.mo
@@ -472,6 +472,7 @@
 @dirrm share/glib-2.0/schemas
 @dirrm share/glib-2.0/gettext/po
 @dirrm share/glib-2.0/gettext
+@dirrmtry share/glib-2.0/codegen/__pycache__
 @dirrm share/glib-2.0/codegen
 @dirrm share/glib-2.0
 @dirrmtry share/bash-completion/completions


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403092018.s29KIOIw043781>