diff --git a/x11-wm/compton/Makefile b/x11-wm/compton/Makefile index 399d0c34e811..44abcce8f0b5 100644 --- a/x11-wm/compton/Makefile +++ b/x11-wm/compton/Makefile @@ -1,68 +1,67 @@ PORTNAME= compton -PORTVERSION= 20160907 -PORTREVISION= 6 +DISTVERSION= 20160907 +PORTREVISION= 7 CATEGORIES= x11-wm MAINTAINER= femc7488@gmail.com COMMENT= Feature-rich compositing window manager for X11 WWW= https://github.com/chjj/compton LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= xprop:x11/xprop \ xwininfo:x11/xwininfo +USES= gmake pkgconfig xorg USE_GITHUB= yes GH_ACCOUNT= chjj GH_TAGNAME= b7f43ee - -USES= gmake pkgconfig xorg USE_XORG= x11 xcomposite xdamage xext xfixes xrandr xrender MAKE_ARGS= COMPTON_VERSION=git-${PORTVERSION}-${GH_TAGNAME} \ XDGDIR=${LOCALBASE}/etc/xdg ALL_TARGET= ${PORTNAME} OPTIONS_DEFINE= CONFIG PCRE DRM OPENGL DBUS XINERAMA DOCS OPTIONS_DEFAULT= CONFIG PCRE DRM OPENGL DBUS XINERAMA CONFIG_DESC= Configuration file parsing support PCRE_DESC= Blacklist support (via libpcre) DRM_DESC= DRM VSync method support OPENGL_DESC= GLX backend, OpenGL VSync method, etc. DOCS_DESC= Build manpages (requires AsciiDoc/DocBook) CONFIG_LIB_DEPENDS= libconfig.so:devel/libconfig CONFIG_MAKE_ARGS_OFF= NO_LIBCONFIG=yes PCRE_LIB_DEPENDS= libpcre.so:devel/pcre PCRE_MAKE_ARGS_OFF= NO_REGEX_PCRE=yes DRM_LIB_DEPENDS= libdrm.so:graphics/libdrm DRM_MAKE_ARGS_OFF= NO_VSYNC_DRM=yes OPENGL_USES= gl OPENGL_USE= GL=gl OPENGL_MAKE_ARGS_OFF= NO_VSYNC_OPENGL=yes DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DBUS_MAKE_ARGS_OFF= NO_DBUS=yes XINERAMA_USE= XORG=xinerama XINERAMA_MAKE_ARGS_OFF= NO_XINERAMA=yes DOCS_BUILD_DEPENDS= a2x:textproc/asciidoc \ xsltproc:textproc/libxslt \ docbook-xml>0:textproc/docbook-xml \ ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl DOCS_MAKE_ARGS= DOCDIR=${DOCSDIR} MANDIR=${MANPREFIX}/man/man1 DOCS_ALL_TARGET= docs DOCS_PLIST_FILES= man/man1/compton.1.gz man/man1/compton-trans.1.gz DOCS_PORTDOCS= README.md cdbus-driver.sh post-patch: @${REINPLACE_CMD} -e '/config_system_dir/s|/etc|${LOCALBASE}&|' \ ${WRKSRC}/src/compton.c .include diff --git a/x11-wm/compton/files/patch-bin_compton-trans b/x11-wm/compton/files/patch-bin_compton-trans new file mode 100644 index 000000000000..db6b7d7eee0d --- /dev/null +++ b/x11-wm/compton/files/patch-bin_compton-trans @@ -0,0 +1,60 @@ +--- bin/compton-trans.orig 2016-09-07 08:23:44 UTC ++++ bin/compton-trans +@@ -2,7 +2,7 @@ + + # + # compton-trans +-# transset in a bash script ++# transset in a sh script + # Copyright (c) 2011-2012, Christopher Jeffrey + # + +@@ -46,7 +46,7 @@ v= + + # Workaround: replace '-5' with '~5' so as not to confuse getopts. + for v in "$@"; do +- shift && set -- "$@" "$(echo "$v" | sed 's/^-\([0-9]\+%\?\)$/~\1/')" ++ shift && set -- "$@" "$(echo "$v" | sed 's/^-\([0-9]\{1,\}%\{0,1\}\)$/~\1/')" + done + + # This takes into account the fact that getopts stops on +@@ -69,7 +69,7 @@ while test $# -gt 0; do + OPTIND=$((OPTIND + 1)) + ;; + name=* | window=* | opacity=*) +- v=$(echo "$OPTARG" | sed 's/^[^=]\+=//') ++ v=$(echo "$OPTARG" | sed 's/^[^=]\{1,\}=//') + ;; + *) + echo "$0: illegal option $OPTARG" >& 2 +@@ -92,7 +92,7 @@ while test $# -gt 0; do + n) wprefix='-name'; window=$OPTARG ;; + w) wprefix='-id'; window=$OPTARG ;; + o) opacity=$OPTARG ;; +- \?) exit 1 ;; ++ \{0,1\}) exit 1 ;; + esac + done + +@@ -102,10 +102,10 @@ while test $# -gt 0; do + done + + # clean up opacity. xargs == a poor man's trim. +-opacity=$(echo "$opacity" | xargs | sed 's/%//g' | sed 's/^~\([0-9]\+\)$/-\1/') ++opacity=$(echo "$opacity" | xargs | sed 's/%//g' | sed 's/^~\([0-9]\{1,\}\)$/-\1/') + + # Validate opacity value +-if test -z "$action" && ! echo "$opacity" | grep -q '^[+-]\?[0-9]\+$'; then ++if test -z "$action" && ! echo "$opacity" | grep -q '^[+-]\{0,1\}[0-9]\{1,\}$'; then + echo "Invalid opacity specified: $opacity." + exit 1 + fi +@@ -184,7 +184,7 @@ fi + + # Get current opacity. + cur=$(xprop -id "$topmost" -notype _NET_WM_WINDOW_OPACITY \ +- | sed 's/^.*\b\([0-9]\+\).*$\|^.*$/\1/') ++ | sed -n 's/^\(.*^[_[:alnum:]]\)\{0,1\}\([0-9]\{1,\}\).*$/\2/p') + test -z "$cur" && cur=0xffffffff + cur=$((cur * 100 / 0xffffffff)) +