aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authorbsam <bsam@FreeBSD.org>2010-05-15 21:02:49 +0800
committerbsam <bsam@FreeBSD.org>2010-05-15 21:02:49 +0800
commit7dcc0cf0b273b6b592e32c6f8051da03b7bad88c (patch)
treee0d6aee9fc106e2c1f0555dfbd0d4d699c3779e8 /comms
parentb225d1839be05f54abac50bbf1a7c3a704488180 (diff)
downloadfreebsd-ports-gnome-7dcc0cf0b273b6b592e32c6f8051da03b7bad88c.tar.gz
freebsd-ports-gnome-7dcc0cf0b273b6b592e32c6f8051da03b7bad88c.tar.zst
freebsd-ports-gnome-7dcc0cf0b273b6b592e32c6f8051da03b7bad88c.zip
. move *.pyc and *.pyo file creation to comms/gammu Makefile
(so those who use comms/gammu with WITH_PYTHON_GAMMU option get the same files and pkg-plists as users of comms/gammu-python); . compile all python files after installing (not just __init__.py); . remove PORTREVISION from comms/gammu-python (should be fine to reflect the one from the master port, and it's bumped indirectly from 1 to 2); . do not bump PORTREVISION for comms/gammu since it's default package s not touched by those changes).
Diffstat (limited to 'comms')
-rw-r--r--comms/gammu-python/Makefile5
-rw-r--r--comms/gammu/Makefile7
-rw-r--r--comms/gammu/pkg-plist5
3 files changed, 12 insertions, 5 deletions
diff --git a/comms/gammu-python/Makefile b/comms/gammu-python/Makefile
index 03fb243ca0c5..9061fa3c47b8 100644
--- a/comms/gammu-python/Makefile
+++ b/comms/gammu-python/Makefile
@@ -5,7 +5,6 @@
# $FreeBSD$
#
-PORTREVISION= 1
PKGNAMESUFFIX= -python
CONFLICTS= gammu-[1-9]* gammu-devel-[1-9]*
@@ -14,8 +13,4 @@ WITH_PYTHON_GAMMU= yes
MASTERDIR= ${.CURDIR}/../gammu
-post-install:
- @${PYTHON_CMD} ${PYTHON_SITELIBDIR}/${PORTNAME}/__init__.py
-
-
.include "${MASTERDIR}/Makefile"
diff --git a/comms/gammu/Makefile b/comms/gammu/Makefile
index 710dd11fd47c..ed62589e0372 100644
--- a/comms/gammu/Makefile
+++ b/comms/gammu/Makefile
@@ -44,6 +44,13 @@ MAN7= gammu-smsd-files.7 gammu-smsd-mysql.7 gammu-smsd-pgsql.7 \
gammu-smsd-dbi.7 gammu-smsd-tables.7
.endif
+.if defined(WITH_PYTHON_GAMMU)
+post-install:
+.for opt in -Qold -O
+ ${PYTHON_CMD} ${opt} -m compileall -l ${PYTHONPREFIX_SITELIBDIR}/gammu
+.endfor
+.endif
+
.include <bsd.port.pre.mk>
post-patch:
diff --git a/comms/gammu/pkg-plist b/comms/gammu/pkg-plist
index 76bfa4849071..6cb650c88a2c 100644
--- a/comms/gammu/pkg-plist
+++ b/comms/gammu/pkg-plist
@@ -38,8 +38,13 @@ libdata/pkgconfig/gammu.pc
libdata/pkgconfig/gammu-smsd.pc
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/__init__.py
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/__init__.pyc
+%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/__init__.pyo
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/_gammu.so
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Data.py
+%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Data.pyc
+%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Data.pyo
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Worker.py
+%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Worker.pyc
+%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Worker.pyo
@dirrm include/gammu
%%WITH_PYTHON_GAMMU%%@dirrm %%PYTHON_SITELIBDIR%%/gammu