Skip to content

Instantly share code, notes, and snippets.

@y2kbadbug
Created October 30, 2018 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y2kbadbug/bac5688de7b0821babe3b6dc81628b7c to your computer and use it in GitHub Desktop.
Save y2kbadbug/bac5688de7b0821babe3b6dc81628b7c to your computer and use it in GitHub Desktop.
FreeBSD port: autokey
# Created by: Daniel Shafer <daniel@shafer.cc>
# $FreeBSD$
PORTNAME= autokey
PORTVERSION= 0.95.4
DISTVERSIONPREFIX= v
CATEGORIES= deskutils python
# Using GitHub until they update the version in pypi.
# MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= daniel@shafer.cc
COMMENT= Desktop automation utility for Linux and X11
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dbus>0:devel/py-dbus@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyinotify>0:devel/py-pyinotify@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xlib>0:x11-toolkits/py-xlib@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dbus>0:devel/py-dbus@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyinotify>0:devel/py-pyinotify@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xlib>0:x11-toolkits/py-xlib@${PY_FLAVOR}
USES= desktop-file-utils python:3.5+
USE_GITHUB= yes
USE_PYTHON= distutils shebangfix
GH_ACCOUNT= autokey
INSTALLS_ICONS= yes
NO_ARCH= yes
OPTIONS_DEFINE= GTK QT
OPTIONS_SUB= yes
OPTIONS_MULTI= GTK QT
OPTIONS_DEFAULT= GTK
GTK_DESC= Enable support for GTK
QT_DESC= Enable support for QT5
GTK_RUN_DEPENDS= libappindicator>0:devel/libappindicator
GTK_USES= gnome
GTK_USE= GNOME=gtk30 pygobject3 gtksourceview3
GTK_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}qt5-xml>0:textproc/py-qt5-xml@${PY_FLAVOR}
QT_USES= qt:5 pyqt:5
QT_USE= PYQT=qscintilla2 svg xml sip
post-patch:
${REINPLACE_CMD} 's|share/man|man|g' ${WRKSRC}/setup.py
# setup.py installs both gtk and qt files no matter what, need to clean that up.
post-install-GTK-off:
${RM} ${STAGEDIR}${PREFIX}/share/applications/autokey-gtk.desktop
${RM} ${STAGEDIR}${PREFIX}/bin/autokey-gtk
${RM} ${STAGEDIR}${PREFIX}/man/man1/autokey-gtk.1
post-install-QT-off:
${RM} ${STAGEDIR}${PREFIX}/share/applications/autokey-qt.desktop
${RM} ${STAGEDIR}${PREFIX}/bin/autokey-qt
${RM} ${STAGEDIR}${PREFIX}/man/man1/autokey-qt.1
.include <bsd.port.mk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment