diff --git a/databases/py-apsw/Makefile b/databases/py-apsw/Makefile index 6c4884bbb746..088f1c07b8b4 100644 --- a/databases/py-apsw/Makefile +++ b/databases/py-apsw/Makefile @@ -1,36 +1,38 @@ PORTNAME= apsw -PORTVERSION= 3.42.0.0 +PORTVERSION= 3.42.0.1 CATEGORIES= databases python MASTER_SITES= PYPI \ https://sqlite.org/2023/:sqlite PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTFILES= apsw-${PORTVERSION}${EXTRACT_SUFX} \ - sqlite-autoconf-${PORTVERSION:C|\.([0-9])[[:>:]]|0\1|g:C|\.||g}.tar.gz:sqlite + sqlite-autoconf-${APSW_SQLITE_VER}.tar.gz:sqlite MAINTAINER= sunpoet@FreeBSD.org COMMENT= Another Python SQLite Wrapper WWW= https://rogerbinns.github.io/apsw/ \ https://github.com/rogerbinns/apsw LICENSE= ZLIB LICENSE_FILE= ${WRKSRC}/LICENSE USES= localbase python USE_PYTHON= autoplist concurrent distutils unittest TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} +APSW_SQLITE_VER=${PORTVERSION:R:C|\.([0-9])[[:>:]]|0\1|g:C|\.||g}00 + OPTIONS_DEFINE= EXTENSION OPTIONS_DEFAULT=EXTENSION EXTENSION_DESC= Allow loadable extensions EXTENSION_VARS= PYDISTUTILS_BUILDARGS+=--enable=load_extension EXTENSION_VARS_OFF= PYDISTUTILS_BUILDARGS+=--omit=load_extension post-patch: - @${MV} ${WRKDIR}/sqlite-autoconf-${PORTVERSION:C|\.([0-9])[[:>:]]|0\1|g:C|\.||g} ${WRKSRC}/sqlite3 + @${MV} ${WRKDIR}/sqlite-autoconf-${APSW_SQLITE_VER} ${WRKSRC}/sqlite3 post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + .include diff --git a/databases/py-apsw/distinfo b/databases/py-apsw/distinfo index 608d9d1a180e..7f1b7d499d45 100644 --- a/databases/py-apsw/distinfo +++ b/databases/py-apsw/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1685792216 -SHA256 (apsw-3.42.0.0.tar.gz) = 8157920d1c11c072044aa14c7c0477ff6b1a36b5cd597127091a21fa10cf9208 -SIZE (apsw-3.42.0.0.tar.gz) = 371979 +TIMESTAMP = 1691070008 +SHA256 (apsw-3.42.0.1.tar.gz) = 3c827af1725d690bca50032bde889a84527920423e80545c0da40bcef4d0e0ae +SIZE (apsw-3.42.0.1.tar.gz) = 382876 SHA256 (sqlite-autoconf-3420000.tar.gz) = 7abcfd161c6e2742ca5c6c0895d1f853c940f203304a0b49da4e1eca5d088ca6 SIZE (sqlite-autoconf-3420000.tar.gz) = 3148813 diff --git a/databases/py-apsw/files/patch-setup.py b/databases/py-apsw/files/patch-setup.py index dba26bfcd001..a0438d426cc6 100644 --- a/databases/py-apsw/files/patch-setup.py +++ b/databases/py-apsw/files/patch-setup.py @@ -1,44 +1,47 @@ ---- setup.py.orig 2023-03-26 20:08:04 UTC +--- setup.py.orig 2023-07-25 19:42:08 UTC +++ setup.py -@@ -227,40 +227,7 @@ class fetch(Command): +@@ -260,43 +260,7 @@ class fetch(Command): if self.sqlite: write(" Getting the SQLite amalgamation") - AURL = "https://sqlite.org/sqlite-autoconf-%s.tar.gz" % (self.webversion, ) - - AURL = fixup_download_url(AURL) - - data = self.download(AURL, checksum=True) - - # we need to run configure to get various -DHAVE_foo flags on non-windows platforms - # delete existing sqlite3 directory if it exists, but save sqlite3config.h if it exists - sqlite3config_h = None - if os.path.exists("sqlite3/sqlite3config.h"): - sqlite3config_h = read_whole_file("sqlite3/sqlite3config.h", "rt") - if os.path.exists('sqlite3'): - for dirpath, dirnames, filenames in os.walk('sqlite3', topdown=False): - for file in filenames: - os.remove(os.path.join(dirpath, file)) - for dir in dirnames: - os.rmdir(os.path.join(dirpath, dir)) - os.rmdir('sqlite3') - # if you get an exception here it is likely that you don't have the python zlib module - import zlib - tar = tarfile.open("nonexistentname to keep old python happy", 'r', data) - configmember = None +- kwargs = {} +- if sys.version_info >= (3, 11, 4): +- kwargs["filter"] = "tar" - for member in tar.getmembers(): -- tar.extract(member) +- tar.extract(member, **kwargs) - # find first file named configure - if not configmember and member.name.endswith("/configure"): - configmember = member - tar.close() - # the directory name has changed a bit with each release so try to work out what it is - if not configmember: - write("Unable to determine directory it extracted to.", dest=sys.stderr) - sys.exit(19) - dirname = configmember.name.split('/')[0] - os.rename(dirname, 'sqlite3') + dirname = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'sqlite3') if sys.platform != "win32": os.chdir('sqlite3') write(" Running configure to work out SQLite compilation flags")