1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00

x11-toolkits/py-fltk: update the port to version 1.3.8

It has better compatibility with modern compilers and matches
our current FLTK version (adjust port description accordingly).
This commit is contained in:
Alexey Dokuchaev 2023-08-08 07:30:22 +00:00
parent bdfb6aecac
commit 97deaa15fc
4 changed files with 29 additions and 33 deletions

View File

@ -1,24 +1,27 @@
PORTNAME= fltk
PORTVERSION= 1.3.4.1
PORTVERSION= 1.3.8
CATEGORIES= x11-toolkits python
MASTER_SITES= SF/py${PORTNAME}/py${PORTNAME}/pyFltk-${PORTVERSION}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= pyFltk-${PORTVERSION}_py3
DISTNAME= pyFltk-${PORTVERSION}
MAINTAINER= python@FreeBSD.org
COMMENT= Python interface to FLTK window toolkit
WWW= http://pyfltk.sourceforge.net/
WWW= https://pyfltk.sourceforge.io/
LICENSE= LGPL20
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= swig:devel/swig
LIB_DEPENDS= libfltk.so:x11-toolkits/fltk
CFLAGS+= -DFL_LIBRARY
MAKE_ENV= FLTK_HOME=${LOCALBASE}/bin
USES= python xorg
USE_CXXSTD= c++14
USES= python shebangfix xorg
USE_PYTHON= autoplist distutils
PYDISTUTILS_CONFIGUREARGS= swig
SHEBANG_FILES= fltk/test/tree.py \
fltk/test/tree_demo.py \
fltk/test/fltk_threads.py
USE_XORG= x11
DOCSDIR= ${PREFIX}/share/doc/py-${PORTNAME}
@ -29,16 +32,9 @@ WRKSRC= ${WRKDIR}/pyFltk-${PORTVERSION}
OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
CFLAGS+= -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/setup.py
@${REINPLACE_CMD} -e '/#pragma GCC diagnostic/d' \
${WRKSRC}/python/fltk_wrap.cpp
@${REINPLACE_CMD} -e '/^%include fl_types/,+1 \
s|Enumerations|Fl_Export|' ${WRKSRC}/swig/fltk.i
post-build:
${REINPLACE_CMD} -e "s|\.\./docs|${DOCSDIR}/html|g" ${WRKSRC}/fltk/test/help.py
@ -48,7 +44,7 @@ post-install:
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}/html/
cd ${WRKSRC}/ && ${INSTALL_DATA} CHANGES README TODO ${STAGEDIR}${DOCSDIR}/
cd ${WRKSRC}/ && ${INSTALL_DATA} CHANGES README.md ${STAGEDIR}${DOCSDIR}/
cd ${WRKSRC}/fltk/docs/ && ${INSTALL_DATA} *.html *.jpg ${STAGEDIR}${DOCSDIR}/html/
post-install-EXAMPLES-on:

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1499054805
SHA256 (pyFltk-1.3.4.1_py3.tar.gz) = 9cbac496f124cd99a1eb0d329dbfdac0d1e160d25f9fd82a3dfb10abc86e069c
SIZE (pyFltk-1.3.4.1_py3.tar.gz) = 955717
TIMESTAMP = 1661553643
SHA256 (pyFltk-1.3.8.tar.gz) = f7c5012810022dce011f3ed9f3f004c56e08090823739bfe670881fce9611f80
SIZE (pyFltk-1.3.8.tar.gz) = 587221

View File

@ -1,19 +1,20 @@
--- setup.py.orig 2016-12-29 09:36:33 UTC
--- setup.py.orig 2022-08-26 05:16:56 UTC
+++ setup.py
@@ -106,7 +106,7 @@ elif sys.platform.startswith('linux'):
@@ -80,7 +80,7 @@ elif sys.platform.startswith('linux') or sys.platform
compile_arg_list.append('-Werror=format-security')
lib_dir_list = [fltk_lib_dir, '/usr/lib']
lib_list = ["fltk"]
-elif sys.platform in ['freebsd4','freebsd5','freebsd6','freebsd7', 'sunos5']:
+elif sys.platform[0:7] == 'freebsd':
print("Building for: %s"%sys.platform)
print(f"Building for: {sys.platform}")
def_list = [('UNIX', '1')]
lib_dir_list = [fltk_lib_dir,'/usr/X11R6/lib','/usr/lib']
@@ -323,7 +323,6 @@ setup (name = 'pyFltk',
description = 'This is a Python wrapper for the FLTK',
ext_modules = [module1],
packages = ['fltk'],
- package_data={'fltk': ['test/*.*', 'docs/*.*']},
)
@@ -297,7 +297,7 @@ class PySwigCommand(distutils.cmd.Command):
def run(self):
"""Run command."""
- command = ['swig', '-w302', '-w312', '-w325', '-w362', '-w389', '-w401', '-w473', '-w509', '-I./swig', '-DFL_EXPORT', '-DPYTHON', '-DPYTHON3', '-py3', '-c++', '-python', '-shadow', '-fastdispatch', '-outdir', 'fltk', '-o', 'fltk/fltk_wrap.cpp', './swig/fltk.i']
+ command = ['swig', '-w302', '-w312', '-w325', '-w362', '-w389', '-w401', '-w473', '-w509', '-I./swig', '-DPYTHON', '-DPYTHON3', '-c++', '-python', '-shadow', '-fastdispatch', '-outdir', 'fltk', '-o', 'fltk/fltk_wrap.cpp', './swig/fltk.i']
pos = command.index('-I./swig')+1
command[pos:pos] = self.include
self.announce(

View File

@ -1,4 +1,3 @@
pyFLTK is Python wrapper for the Fast Light Tool Kit cross-platform graphical
user-interface library.
This package wraps FLTK version 1.1 and is quite stable.
pyFLTK is Python wrapper for the Fast Light Tool Kit cross-platform
graphical user-interface library. It wraps FLTK version 1.3 and is
quite stable.