tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

python/extension.mk PKGNAME_REQD issue breaks gnome build



meta-pkgs/gnome depends on time/hamster-applet. Building
hamster-applet works fine, but meta-pkgs/gnome trying to
build it fails with

make: "/pkgsrc/time/hamster-applet/Makefile" line 32: Malformed conditional (${PYPKGPREFIX} == "py24")
make: "/pkgsrc/time/hamster-applet/Makefile" line 32: Need an operator

This appears to be because hamster-applet includes
../../lang/python/extension.mk which tries to derive the
python version from PKGNAME_REQD, and fails.

Checking PKGNAME_REQD contains py([0-9][0-9])- seems to
resolve this.

Does anyone have any objections to this being committed?

Index: lang/python/extension.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python/extension.mk,v
retrieving revision 1.20
diff -u -r1.20 extension.mk
--- lang/python/extension.mk    6 Oct 2008 14:41:50 -0000       1.20
+++ lang/python/extension.mk    23 Dec 2008 11:10:41 -0000
 -2,9 +2,9 @@

 # derive a python version from the package name if possible
 # optionally handled quoted package names
-.if defined(PKGNAME_REQD)
+.if defined(PKGNAME_REQD) && !empty(${PKGNAME_REQD:Mpy([0-9][0-9])-})
 PYTHON_VERSION_REQD?= ${PKGNAME_REQD:C/(^.*-|^)py([0-9][0-9])-.*/\2/}
-.elif defined(PKGNAME_OLD)
+.elif defined(PKGNAME_OLD) && !empty(${PKGNAME_OLD:Mpy([0-9][0-9])-})
 PYTHON_VERSION_REQD?= ${PKGNAME_OLD:C/(^.*-|^)py([0-9][0-9])-.*/\2/}
 .endif


Home | Main Index | Thread Index | Old Index