aboutsummaryrefslogtreecommitdiff
path: root/databases/py-gdbm
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-07-09 10:28:19 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-07-09 10:28:19 +0000
commitaf2d42e1748eff3bd8627faa4f21fccd4998bb63 (patch)
tree3709000d6275c03ce173304ecd5275a264a77a99 /databases/py-gdbm
parent38f8abeb240f5035cadecc0bd06397ab9d8cd875 (diff)
downloadports-af2d42e1748eff3bd8627faa4f21fccd4998bb63.tar.gz
ports-af2d42e1748eff3bd8627faa4f21fccd4998bb63.zip
databases/py-gdbm: Strip shared library
- Clean up - Bump PORTREVISION for package change
Diffstat (limited to 'databases/py-gdbm')
-rw-r--r--databases/py-gdbm/Makefile18
-rw-r--r--databases/py-gdbm/files/setup.py7
-rw-r--r--databases/py-gdbm/files/setup3.py28
3 files changed, 13 insertions, 40 deletions
diff --git a/databases/py-gdbm/Makefile b/databases/py-gdbm/Makefile
index cc7bf5a7148c..17034fe06914 100644
--- a/databases/py-gdbm/Makefile
+++ b/databases/py-gdbm/Makefile
@@ -1,10 +1,11 @@
PORTNAME= gdbm
DISTVERSION= ${PYTHON_DISTVERSION}
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= databases python
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= Python-${DISTVERSION}
+DIST_SUBDIR= python
MAINTAINER= python@FreeBSD.org
COMMENT= Python bindings to the GNU dbm library (Python ${PYTHON_VER})
@@ -13,18 +14,19 @@ LICENSE= PSFL
LIB_DEPENDS= libgdbm.so:databases/gdbm
-PORTSCOUT= ignore:1
-
USES= compiler:c11 python tar:xz
-USE_PYTHON= distutils autoplist allflavors
+USE_PYTHON= allflavors autoplist distutils
+DISTINFO_FILE= ${.CURDIR}/../../lang/python${PYTHON_SUFFIX}/distinfo
PYDISTUTILS_INSTALLARGS+= --install-lib ${PYTHONPREFIX_LIBDIR}/lib-dynload
-
-DIST_SUBDIR= python
-DISTINFO_FILE= ${PORTSDIR}/lang/python${PYTHON_SUFFIX}/distinfo
WRKSRC_SUBDIR= Modules
+PORTSCOUT= ignore:1
+
post-extract:
- @${CP} ${FILESDIR}/setup3.py ${WRKSRC}/setup.py
+ @${CP} ${FILESDIR}/setup.py ${WRKSRC}/setup.py
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/lib-dynload/_gdbm.cpython-${PYTHON_SUFFIX}.so
.include <bsd.port.mk>
diff --git a/databases/py-gdbm/files/setup.py b/databases/py-gdbm/files/setup.py
index 9acb68c35da1..0a947466d03e 100644
--- a/databases/py-gdbm/files/setup.py
+++ b/databases/py-gdbm/files/setup.py
@@ -9,10 +9,9 @@ try:
from distutils.command.install import install
from distutils.core import setup, Extension
except:
- raise SystemExit, "Distutils problem"
+ raise SystemExit("Distutils problem")
-install.sub_commands = filter(lambda (cmd, avl): 'egg' not in cmd,
- install.sub_commands)
+install.sub_commands = [x for x in install.sub_commands if 'egg' not in x[0]]
prefix = sysconfig.PREFIX
inc_dirs = [prefix + "/include"]
@@ -22,7 +21,7 @@ libs = ["gdbm"]
setup(name = "gdbm",
description = "GDBM Extension to Python",
- ext_modules = [Extension('gdbm', ['gdbmmodule.c'],
+ ext_modules = [Extension('_gdbm', ['_gdbmmodule.c'],
include_dirs = inc_dirs,
libraries = libs,
library_dirs = lib_dirs)]
diff --git a/databases/py-gdbm/files/setup3.py b/databases/py-gdbm/files/setup3.py
deleted file mode 100644
index 0a947466d03e..000000000000
--- a/databases/py-gdbm/files/setup3.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-# To use:
-# python setup.py install
-#
-
-try:
- import distutils
- from distutils import sysconfig
- from distutils.command.install import install
- from distutils.core import setup, Extension
-except:
- raise SystemExit("Distutils problem")
-
-install.sub_commands = [x for x in install.sub_commands if 'egg' not in x[0]]
-
-prefix = sysconfig.PREFIX
-inc_dirs = [prefix + "/include"]
-lib_dirs = [prefix + "/lib"]
-libs = ["gdbm"]
-
-setup(name = "gdbm",
- description = "GDBM Extension to Python",
-
- ext_modules = [Extension('_gdbm', ['_gdbmmodule.c'],
- include_dirs = inc_dirs,
- libraries = libs,
- library_dirs = lib_dirs)]
- )