pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang python*: rework logic used to determine if PLIST....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/517b5bec325d
branches:  trunk
changeset: 321870:517b5bec325d
user:      maya <maya%pkgsrc.org@localhost>
date:      Wed Apr 03 13:17:27 2019 +0000

description:
python*: rework logic used to determine if PLIST.nis is used.

Match the logic used by setup.py: it looks for two headers in the default
include path. This helps newer glibc linux.

Omit PLIST.dll on python3* because it doesn't appear in the PLIST.
Make PLIST.dll true on all non-IRIX.

tested: NetBSD-current, FreeBSD 11.2, Ubuntu 18.10, CentOS 6.9, Source Mage

>From Dr. Thomas Orgis, myself, and with pointers to a change from leot.

PR pkg/53673

diffstat:

 lang/python27/Makefile |  34 ++++++++++++++--------------------
 lang/python34/Makefile |  25 +++++++++++--------------
 lang/python35/Makefile |  25 +++++++++++--------------
 lang/python36/Makefile |  25 +++++++++++--------------
 lang/python37/Makefile |  25 +++++++++++--------------
 5 files changed, 58 insertions(+), 76 deletions(-)

diffs (219 lines):

diff -r 9a09d8876da8 -r 517b5bec325d lang/python27/Makefile
--- a/lang/python27/Makefile    Wed Apr 03 09:31:59 2019 +0000
+++ b/lang/python27/Makefile    Wed Apr 03 13:17:27 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.78 2019/03/26 16:12:28 gdt Exp $
+# $NetBSD: Makefile,v 1.79 2019/04/03 13:17:27 maya Exp $
 
 .include "dist.mk"
 
@@ -103,28 +103,22 @@
 .  endif
 .endif
 
-.if ${OPSYS} == "IRIX"
-# Assume that IRIX (and IRIX alone) does not support a libpython.so.
-# Assume that 32-bit IRIX has NIS and 64-bit IRIX does not.
-.  if ${ABI} == "64"
-PLIST.no-nis=  yes
-.  else
-PLIST.nis=     yes
-.  endif
-.else
+.if ${OPSYS} != "IRIX"
 PLIST.dll=     yes
-# Determine if lib-dynload/nis.so (PLIST.nis) or
-# lib-dynload/nis-failed.so (PLIST.no-nis) will be built.
-.  if ${OPSYS} == "MirBSD" || "${OS_VARIANT}" == "chromeos"
-# neither nis nor no-nis
-.  elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
-# \todo Explain the "!= NetBSD"; that seems to declare that any
-# remaining system other than NetBSD will have NIS, even if ypcat is
-# missing.
+.endif
+
+.for incdir in ${_OPSYS_INCLUDE_DIRS}
+.  if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
+HAVE_RPC_H=    yes
+.  endif
+.  if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h))
+HAVE_YP_PROT_H=        yes
+.  endif
+.endfor
+.if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes)
 PLIST.nis=     yes
-.  else
+.else
 PLIST.no-nis=  yes
-.  endif
 .endif
 
 # configure complains about buggy getaddrinfo()
diff -r 9a09d8876da8 -r 517b5bec325d lang/python34/Makefile
--- a/lang/python34/Makefile    Wed Apr 03 09:31:59 2019 +0000
+++ b/lang/python34/Makefile    Wed Apr 03 13:17:27 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2019/03/20 19:29:11 adam Exp $
+# $NetBSD: Makefile,v 1.31 2019/04/03 13:17:27 maya Exp $
 
 .include "dist.mk"
 
@@ -75,22 +75,19 @@
 CFLAGS+=               -I${OSX_SDK_PATH:Q}/usr/include
 .endif
 
-PLIST_VARS+=   dll nis no-nis
-.if ${OPSYS} == "IRIX"
-.  if ${ABI} == "64"
-PLIST.no-nis=  yes
-.  else
+PLIST_VARS+=   nis no-nis
+.for incdir in ${_OPSYS_INCLUDE_DIRS}
+.  if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
+HAVE_RPC_H=    yes
+.  endif
+.  if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h))
+HAVE_YP_PROT_H=        yes
+.  endif
+.endfor
+.if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes)
 PLIST.nis=     yes
-.  endif
 .else
-PLIST.dll=     yes
-.  if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
-.    if "${OS_VARIANT}" != "chromeos"
-PLIST.nis=     yes
-.    endif
-.  else
 PLIST.no-nis=  yes
-.  endif
 .endif
 
 PLIST_SUBST+=  PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
diff -r 9a09d8876da8 -r 517b5bec325d lang/python35/Makefile
--- a/lang/python35/Makefile    Wed Apr 03 09:31:59 2019 +0000
+++ b/lang/python35/Makefile    Wed Apr 03 13:17:27 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2019/03/20 19:27:47 adam Exp $
+# $NetBSD: Makefile,v 1.18 2019/04/03 13:17:27 maya Exp $
 
 .include "dist.mk"
 
@@ -77,22 +77,19 @@
 CFLAGS+=               -I${OSX_SDK_PATH:Q}/usr/include
 .endif
 
-PLIST_VARS+=   dll nis no-nis
-.if ${OPSYS} == "IRIX"
-.  if ${ABI} == "64"
-PLIST.no-nis=  yes
-.  else
+PLIST_VARS+=   nis no-nis
+.for incdir in ${_OPSYS_INCLUDE_DIRS}
+.  if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
+HAVE_RPC_H=    yes
+.  endif
+.  if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h))
+HAVE_YP_PROT_H=        yes
+.  endif
+.endfor
+.if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes)
 PLIST.nis=     yes
-.  endif
 .else
-PLIST.dll=     yes
-.  if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
-.    if "${OS_VARIANT}" != "chromeos"
-PLIST.nis=     yes
-.    endif
-.  else
 PLIST.no-nis=  yes
-.  endif
 .endif
 
 PLIST_SUBST+=  PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
diff -r 9a09d8876da8 -r 517b5bec325d lang/python36/Makefile
--- a/lang/python36/Makefile    Wed Apr 03 09:31:59 2019 +0000
+++ b/lang/python36/Makefile    Wed Apr 03 13:17:27 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2019/03/02 13:23:36 adam Exp $
+# $NetBSD: Makefile,v 1.17 2019/04/03 13:17:27 maya Exp $
 
 .include "dist.mk"
 
@@ -78,22 +78,19 @@
 CFLAGS+=               -I${OSX_SDK_PATH:Q}/usr/include
 .endif
 
-PLIST_VARS+=   dll nis no-nis
-.if ${OPSYS} == "IRIX"
-.  if ${ABI} == "64"
-PLIST.no-nis=  yes
-.  else
+PLIST_VARS+=   nis no-nis
+.for incdir in ${_OPSYS_INCLUDE_DIRS}
+.  if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
+HAVE_RPC_H=    yes
+.  endif
+.  if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h))
+HAVE_YP_PROT_H=        yes
+.  endif
+.endfor
+.if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes)
 PLIST.nis=     yes
-.  endif
 .else
-PLIST.dll=     yes
-.  if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
-.    if "${OS_VARIANT}" != "chromeos"
-PLIST.nis=     yes
-.    endif
-.  else
 PLIST.no-nis=  yes
-.  endif
 .endif
 
 PLIST_SUBST+=  PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
diff -r 9a09d8876da8 -r 517b5bec325d lang/python37/Makefile
--- a/lang/python37/Makefile    Wed Apr 03 09:31:59 2019 +0000
+++ b/lang/python37/Makefile    Wed Apr 03 13:17:27 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2019/03/26 20:54:55 adam Exp $
+# $NetBSD: Makefile,v 1.6 2019/04/03 13:17:28 maya Exp $
 
 .include "dist.mk"
 
@@ -77,22 +77,19 @@
 CFLAGS+=               -I${OSX_SDK_PATH:Q}/usr/include
 .endif
 
-PLIST_VARS+=   dll nis no-nis
-.if ${OPSYS} == "IRIX"
-.  if ${ABI} == "64"
-PLIST.no-nis=  yes
-.  else
+PLIST_VARS+=   nis no-nis
+.for incdir in ${_OPSYS_INCLUDE_DIRS}
+.  if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
+HAVE_RPC_H=    yes
+.  endif
+.  if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h))
+HAVE_YP_PROT_H=        yes
+.  endif
+.endfor
+.if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes)
 PLIST.nis=     yes
-.  endif
 .else
-PLIST.dll=     yes
-.  if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
-.    if "${OS_VARIANT}" != "chromeos"
-PLIST.nis=     yes
-.    endif
-.  else
 PLIST.no-nis=  yes
-.  endif
 .endif
 
 PLIST_SUBST+=  PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}



Home | Main Index | Thread Index | Old Index