aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorJason E. Hale <jhale@FreeBSD.org>2014-08-13 14:09:42 +0000
committerJason E. Hale <jhale@FreeBSD.org>2014-08-13 14:09:42 +0000
commit23ead34a2c5cc4d44bd27f82865c5f9d3e90dfa6 (patch)
tree9e05fa19891f43fc77948f271922ec8056399528 /misc
parent9d38b423d3fe446236348d9c5da89c501239556f (diff)
downloadports-23ead34a2c5cc4d44bd27f82865c5f9d3e90dfa6.tar.gz
ports-23ead34a2c5cc4d44bd27f82865c5f9d3e90dfa6.zip
Notes
Diffstat (limited to 'misc')
-rw-r--r--misc/cuecat/Makefile62
-rw-r--r--misc/cuecat/pkg-plist6
2 files changed, 32 insertions, 36 deletions
diff --git a/misc/cuecat/Makefile b/misc/cuecat/Makefile
index a7dafccbea67..3cbacbc613a8 100644
--- a/misc/cuecat/Makefile
+++ b/misc/cuecat/Makefile
@@ -3,52 +3,44 @@
PORTNAME= cuecat
PORTVERSION= 1.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= misc python
MASTER_SITES= http://www.mired.org/downloads/
MAINTAINER= ports@FreeBSD.org
COMMENT= Tools for decoding and using the output of a :Cue:Cat(TM) wand scanner
-.if !defined(WITHOUT_X11)
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter \
- ${PYTHON_SITELIBDIR}/Pmw/__init__.py:${PORTSDIR}/x11-toolkits/py-Pmw
-.endif
+USES= python shebangfix
+
+SHEBANG_FILES= *.py
+python_OLD_CMD= /usr/opt/bin/python
-NO_BUILD= yes
-MAN1= cuecat.1
-.if !defined(WITHOUT_X11)
-MAN1+= xcuecat.1
-.endif
-USE_PYTHON= yes
WRKSRC= ${WRKDIR}/cuecat
-NO_STAGE= yes
-pre-install:
- @${MV} ${WRKSRC}/cuecat.py ${WRKSRC}/cuecat.py-orig
- @${SED} 's;/usr/opt/bin/python;${PYTHON_CMD};' ${WRKSRC}/cuecat.py-orig >${WRKSRC}/cuecat.py
- @${MV} ${WRKSRC}/barcode.py ${WRKSRC}/barcode.py-orig
- @${SED} 's;/usr/opt/bin/python;${PYTHON_CMD};' ${WRKSRC}/barcode.py-orig >${WRKSRC}/barcode.py
-.if !defined(WITHOUT_X11)
- @${MV} ${WRKSRC}/xcuecat.py ${WRKSRC}/xcuecat.py-orig
- @${SED} 's;/usr/opt/bin/python;${PYTHON_CMD};' ${WRKSRC}/xcuecat.py-orig >${WRKSRC}/xcuecat.py
-.endif
+OPTIONS_DEFINE= X11
+OPTIONS_DEFAULT=X11
+OPTIONS_SUB= yes
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/cuecat.py ${PYTHON_SITELIBDIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/barcode.py ${PYTHON_SITELIBDIR}
- ${PYTHON_CMD} -O -c "import barcode, cuecat"
- ${LN} -sf ${PYTHON_SITELIBDIR}/cuecat.py ${PREFIX}/bin/cuecat
- ${INSTALL_MAN} ${WRKSRC}/cuecat.1 ${PREFIX}/man/man1
-.if !defined(WITHOUT_X11)
- ${INSTALL_SCRIPT} ${WRKSRC}/xcuecat.py ${PREFIX}/bin/xcuecat
- ${INSTALL_MAN} ${WRKSRC}/xcuecat.1 ${PREFIX}/man/man1
-.endif
+X11_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter \
+ ${PYTHON_PKGNAMEPREFIX}Pmw>0:${PORTSDIR}/x11-toolkits/py-Pmw
+
+.include <bsd.port.options.mk>
-.if defined(WITHOUT_X11)
-post-install:
- $(MV) ${TMPPLIST} ${TMPPLIST}.orig
- ${GREP} -v xcuecat ${TMPPLIST}.orig > ${TMPPLIST}
+do-build:
+ ${PYTHON_CMD} -m compileall ${WRKSRC}
+ ${PYTHON_CMD} -O -m compileall ${WRKSRC}
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
+.for i in barcode cuecat
+ ${INSTALL_SCRIPT} ${WRKSRC}/${i}.py ${STAGEDIR}${PYTHON_SITELIBDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${i}.py[co] ${STAGEDIR}${PYTHON_SITELIBDIR}
+.endfor
+ ${LN} -sf ${PYTHON_SITELIBDIR}/cuecat.py ${STAGEDIR}${PREFIX}/bin/cuecat
+ ${INSTALL_MAN} ${WRKSRC}/cuecat.1 ${STAGEDIR}${PREFIX}/man/man1
+.if ${PORT_OPTIONS:MX11}
+ ${INSTALL_SCRIPT} ${WRKSRC}/xcuecat.py ${STAGEDIR}${PREFIX}/bin/xcuecat
+ ${INSTALL_MAN} ${WRKSRC}/xcuecat.1 ${STAGEDIR}${PREFIX}/man/man1
.endif
.include <bsd.port.mk>
diff --git a/misc/cuecat/pkg-plist b/misc/cuecat/pkg-plist
index e1ae1e07719f..9b9587693ff0 100644
--- a/misc/cuecat/pkg-plist
+++ b/misc/cuecat/pkg-plist
@@ -1,6 +1,10 @@
bin/cuecat
-bin/xcuecat
+%%X11%%bin/xcuecat
+man/man1/cuecat.1.gz
+%%X11%%man/man1/xcuecat.1.gz
%%PYTHON_SITELIBDIR%%/barcode.py
+%%PYTHON_SITELIBDIR%%/barcode.pyc
%%PYTHON_SITELIBDIR%%/barcode.pyo
%%PYTHON_SITELIBDIR%%/cuecat.py
+%%PYTHON_SITELIBDIR%%/cuecat.pyc
%%PYTHON_SITELIBDIR%%/cuecat.pyo