pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/python312



Module Name:    pkgsrc
Committed By:   cheusov
Date:           Wed May  1 15:56:04 UTC 2024

Modified Files:
        pkgsrc/lang/python312: Makefile PLIST distinfo options.mk
Added Files:
        pkgsrc/lang/python312/patches: patch-Modules_readline.c

Log Message:
Add build option "readline". With its help we can build python3.12
with/without support of readline/editline.
Also, always build "_dbm" module on Linux just like on other OS.
Remove ".include ../../devel/gettext-lib..."


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/python312/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/lang/python312/PLIST \
    pkgsrc/lang/python312/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/python312/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python312/patches/patch-Modules_readline.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/python312/Makefile
diff -u pkgsrc/lang/python312/Makefile:1.15 pkgsrc/lang/python312/Makefile:1.16
--- pkgsrc/lang/python312/Makefile:1.15 Mon Apr  1 23:38:27 2024
+++ pkgsrc/lang/python312/Makefile      Wed May  1 15:56:03 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2024/04/01 23:38:27 charlotte Exp $
+# $NetBSD: Makefile,v 1.16 2024/05/01 15:56:03 cheusov Exp $
 
 .include "dist.mk"
 
@@ -47,10 +47,6 @@ CONFIGURE_ENV+=              py_cv_module__gdbm="n/a
 CONFIGURE_ENV+=                py_cv_module_xxlimited="n/a"
 PKGCONFIG_OVERRIDE+=   Misc/python.pc.in Misc/python-embed.pc.in
 
-# NetBSD-8 curses has enough support for py-curses
-USE_CURSES=            getsyx update_panels wide
-# But we build as ncurses still to get the full feature set easily
-FAKE_NCURSES=          yes
 # libpanelw seems to be a Linux thing?
 SUBST_CLASSES+=                panel
 SUBST_MESSAGE.panel=   Replacing panelw with panel.
@@ -63,6 +59,13 @@ PTHREAD_OPTS+=       require
 
 .include "../../mk/bsd.prefs.mk"
 
+# NetBSD-8 curses has enough support for py-curses
+USE_CURSES=            getsyx update_panels wide
+# But we build as ncurses still to get the full feature set easily
+.if ${OPSYS} == "NetBSD"
+FAKE_NCURSES=          yes
+.endif
+
 .if ${USE_CROSS_COMPILE:U:tl} == yes
 TOOL_DEPENDS+=         ${PKGNAME}:../../${PKGPATH}
 CONFIGURE_ARGS+=       --with-build-python=${TOOLBASE:Q}/bin/python3.12
@@ -110,10 +113,7 @@ CFLAGS+=   -I${OSX_SDK_PATH:Q}/usr/include
 
 LDFLAGS.SunOS+=        -lresolv
 
-PLIST_VARS+=   dbm nis tkinter
-.if ${OPSYS} != "Linux"
-PLIST.dbm=     yes
-.endif
+PLIST_VARS+=   nis tkinter
 .for incdir in ${_OPSYS_INCLUDE_DIRS}
 .  if exists(${incdir}/rpc/rpc.h)
 HAVE_RPC_H=    yes
@@ -234,16 +234,17 @@ setuptools-preinstall:
        ${INSTALL_DATA} ${.CURDIR}/../../devel/py-setuptools/files/_distutils_system_mod \
                ${DESTDIR}${PREFIX}/lib/python${PY_VER_SUFFIX}/site-packages/_distutils_system_mod.py
 
+.if ${OPSYS} == "Linux"
+.include "../../databases/gdbm_compat/buildlink3.mk"
+.endif
 .include "../../archivers/bzip2/buildlink3.mk"
 .include "../../archivers/xz/buildlink3.mk"
 .include "../../databases/sqlite3/buildlink3.mk"
-.include "../../devel/gettext-lib/buildlink3.mk"
 .if ${USE_BUILTIN.gettext:U:tl} == no
 CONFIGURE_ENV+=                ac_cv_lib_intl_textdomain=yes
 .endif
 .include "../../devel/libffi/buildlink3.mk"
 .include "../../devel/libuuid/buildlink3.mk"
-.include "../../devel/readline/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
 .include "../../textproc/expat/buildlink3.mk"

Index: pkgsrc/lang/python312/PLIST
diff -u pkgsrc/lang/python312/PLIST:1.5 pkgsrc/lang/python312/PLIST:1.6
--- pkgsrc/lang/python312/PLIST:1.5     Tue Apr  9 16:57:45 2024
+++ pkgsrc/lang/python312/PLIST Wed May  1 15:56:03 2024
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2024/04/09 16:57:45 adam Exp $
+@comment $NetBSD: PLIST,v 1.6 2024/05/01 15:56:03 cheusov Exp $
 bin/2to3-${PY_VER_SUFFIX}
 bin/idle${PY_VER_SUFFIX}
 bin/pydoc${PY_VER_SUFFIX}
@@ -1644,7 +1644,7 @@ lib/python${PY_VER_SUFFIX}/lib-dynload/_
 lib/python${PY_VER_SUFFIX}/lib-dynload/_curses.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/_curses_panel.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/_datetime.so
-${PLIST.dbm}lib/python${PY_VER_SUFFIX}/lib-dynload/_dbm.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/_dbm.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/_decimal.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/_elementtree.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/_hashlib.so
@@ -1692,7 +1692,7 @@ lib/python${PY_VER_SUFFIX}/lib-dynload/m
 lib/python${PY_VER_SUFFIX}/lib-dynload/mmap.so
 ${PLIST.nis}lib/python${PY_VER_SUFFIX}/lib-dynload/nis.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/pyexpat.so
-lib/python${PY_VER_SUFFIX}/lib-dynload/readline.so
+${PLIST.readline}lib/python${PY_VER_SUFFIX}/lib-dynload/readline.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/resource.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/select.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/syslog.so
Index: pkgsrc/lang/python312/distinfo
diff -u pkgsrc/lang/python312/distinfo:1.5 pkgsrc/lang/python312/distinfo:1.6
--- pkgsrc/lang/python312/distinfo:1.5  Tue Apr  9 16:57:45 2024
+++ pkgsrc/lang/python312/distinfo      Wed May  1 15:56:03 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2024/04/09 16:57:45 adam Exp $
+$NetBSD: distinfo,v 1.6 2024/05/01 15:56:03 cheusov Exp $
 
 BLAKE2s (Python-3.12.3.tar.xz) = 260855a18335d0355f7472b5ff81b1cea27cc9ccbf5c1346322681bb40a510e2
 SHA512 (Python-3.12.3.tar.xz) = 4a2213b108e7f1f1525baa8348e68b2a2336d925e60d0a59f0225fc470768a2c8031edafc0b8243f94dbae18afda335ee5adf2785328c2218fd64cbb439f13a4
@@ -8,5 +8,6 @@ SHA1 (patch-Lib_ctypes_util.py) = 3dec1b
 SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 593c4e93c5653ab400f0a98b91db92630c0a7390
 SHA1 (patch-Lib_sysconfig.py) = bc6d91bf8f7121456b26ea7f080f588c96f2596f
 SHA1 (patch-Makefile.pre.in) = 03403a42fc77e4d244fe22335563927f97be6980
+SHA1 (patch-Modules_readline.c) = 232f6ac43b5a0e87c915f13117bae91ef069a6c1
 SHA1 (patch-Modules_socketmodule.c) = 9d88a801af6e2cbd36b9935a46c8a86727222d56
 SHA1 (patch-configure) = b040e4ddffa12d4f1512e8fd8cd2e914e22d5118

Index: pkgsrc/lang/python312/options.mk
diff -u pkgsrc/lang/python312/options.mk:1.2 pkgsrc/lang/python312/options.mk:1.3
--- pkgsrc/lang/python312/options.mk:1.2        Fri Dec  8 09:22:42 2023
+++ pkgsrc/lang/python312/options.mk    Wed May  1 15:56:03 2024
@@ -1,13 +1,13 @@
-# $NetBSD: options.mk,v 1.2 2023/12/08 09:22:42 adam Exp $
+# $NetBSD: options.mk,v 1.3 2024/05/01 15:56:03 cheusov Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.python312
-PKG_SUPPORTED_OPTIONS= dtrace pymalloc tkinter x11
+PKG_SUPPORTED_OPTIONS= dtrace pymalloc tkinter x11 readline
 PKG_SUGGESTED_OPTIONS= x11
 
 .include "../../mk/bsd.prefs.mk"
 .include "../../mk/bsd.options.mk"
 
-PLIST_VARS+=           dtrace
+PLIST_VARS+=           dtrace readline
 
 .if !empty(PKG_OPTIONS:Mdtrace)
 CONFIGURE_ARGS+=       --with-dtrace
@@ -41,3 +41,17 @@ CONFIGURE_ARGS+=     --with-pymalloc
 .else
 CONFIGURE_ARGS+=       --without-pymalloc
 .endif
+
+# readline/editline
+.if empty(PKG_OPTIONS:Mreadline)
+.info "Disable readline"
+CONFIGURE_ARGS+= --without-readline
+.else
+.include "../../mk/readline.buildlink3.mk"
+.if ${READLINE_TYPE} == "editline"
+CONFIGURE_ARGS+= --with-readline=editline
+.else
+CONFIGURE_ARGS+= --with-readline
+.endif
+PLIST.readline=        yes
+.endif

Added files:

Index: pkgsrc/lang/python312/patches/patch-Modules_readline.c
diff -u /dev/null pkgsrc/lang/python312/patches/patch-Modules_readline.c:1.1
--- /dev/null   Wed May  1 15:56:04 2024
+++ pkgsrc/lang/python312/patches/patch-Modules_readline.c      Wed May  1 15:56:04 2024
@@ -0,0 +1,26 @@
+$NetBSD: patch-Modules_readline.c,v 1.1 2024/05/01 15:56:04 cheusov Exp $
+
+pkgsrc buildlink framework installs libedit headers to readline/ subdirectory.
+
+VFunction type is not available on NetBSD`s native libedit.
+
+--- Modules/readline.c.orig    2024-04-02 08:25:04.000000000 +0000
++++ Modules/readline.c
+@@ -29,7 +29,7 @@
+ #endif
+ 
+ #ifdef WITH_EDITLINE
+-#  include <editline/readline.h>
++#  include <readline/readline.h>
+ #else
+ /* GNU readline definitions */
+ #  undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */
+@@ -443,7 +443,7 @@ readline_set_completion_display_matches_
+ #if defined(HAVE_RL_COMPDISP_FUNC_T)
+         (rl_compdisp_func_t *)on_completion_display_matches_hook : 0;
+ #else
+-        (VFunction *)on_completion_display_matches_hook : 0;
++        on_completion_display_matches_hook : 0;
+ #endif
+ #endif
+     return result;



Home | Main Index | Thread Index | Old Index