Skip to content

Commit

Permalink
x11/keybinder-gtk3: Add DOCS/EXAMPLES options
Browse files Browse the repository at this point in the history
- Make installation of docs and examples optional
- Correct DISTVERSIONPREFIX
- Needs USES=autoreconf to suppress docs install
- Reorder some Makefile vars

PR:		254734
Submitted by:	John Hein <jcfyecrayz@liamekaens.com>
  • Loading branch information
rhurlin committed Apr 20, 2021
1 parent 9e06cd0 commit 2f3ebf0
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 22 deletions.
26 changes: 20 additions & 6 deletions x11/keybinder-gtk3/Makefile
@@ -1,24 +1,38 @@
PORTNAME= keybinder
PORTVERSION= 0.3.2
DISTVERSIONPREFIX= keybinder-3.0-v
DISTVERSIONPREFIX= 3.0-
PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= https://github.com/kupferlauncher/${PORTNAME}/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/
MASTER_SITES= https://github.com/kupferlauncher/${PORTNAME}/releases/download/${PORTNAME}-${DISTVERSIONPREFIX}v${DISTVERSION}/
PKGNAMESUFFIX= -gtk3
DISTNAME= ${DISTVERSIONPREFIX:S/-v//}-${DISTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT= Library for registering keyboard shortcuts

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING

USES= gettext-runtime gmake gnome libtool pathfix pkgconfig xorg
USES= autoreconf gettext-runtime gmake gnome libtool pathfix \
pkgconfig xorg
USE_GNOME= gtk30 introspection:build cairo gdkpixbuf2
USE_LDCONFIG= yes
USE_XORG= x11 xext xrender

GNU_CONFIGURE= yes

INSTALL_TARGET= install-strip
USE_LDCONFIG= yes

PLIST_SUB= VERSION="3.0"
VERSION= "3.0"
PLIST_SUB= VERSION=${VERSION}

OPTIONS_DEFINE= EXAMPLES DOCS

post-patch-DOCS-off:
@${REINPLACE_CMD} -E '/GTK_DOC_CHECK|docs/d' ${WRKSRC}/configure.ac
@${REINPLACE_CMD} -e '/^SUBDIRS/s, docs,,' ${WRKSRC}/Makefile.am

post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}-${VERSION}
cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}-${VERSION}

.include <bsd.port.mk>
42 changes: 26 additions & 16 deletions x11/keybinder-gtk3/pkg-plist
Expand Up @@ -4,20 +4,30 @@ lib/libkeybinder-%%VERSION%%.so
lib/libkeybinder-%%VERSION%%.so.0
lib/libkeybinder-%%VERSION%%.so.0.0.0
libdata/pkgconfig/keybinder-%%VERSION%%.pc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/example.lua
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/example.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/example_gi.lua
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/keybinder.vapi
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/lkeybinder.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/lminigtk.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/main.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%-%%VERSION%%/vexample.vala
share/gir-1.0/Keybinder-%%VERSION%%.gir
share/gtk-doc/html/keybinder-%%VERSION%%/annotation-glossary.html
share/gtk-doc/html/keybinder-%%VERSION%%/api-index-full.html
share/gtk-doc/html/keybinder-%%VERSION%%/ch01.html
share/gtk-doc/html/keybinder-%%VERSION%%/deprecated-api-index.html
share/gtk-doc/html/keybinder-%%VERSION%%/home.png
share/gtk-doc/html/keybinder-%%VERSION%%/index.html
share/gtk-doc/html/keybinder-%%VERSION%%/keybinder-%%VERSION%%.devhelp2
share/gtk-doc/html/keybinder-%%VERSION%%/keybinder-keybinder.html
share/gtk-doc/html/keybinder-%%VERSION%%/left-insensitive.png
share/gtk-doc/html/keybinder-%%VERSION%%/left.png
share/gtk-doc/html/keybinder-%%VERSION%%/object-tree.html
share/gtk-doc/html/keybinder-%%VERSION%%/right-insensitive.png
share/gtk-doc/html/keybinder-%%VERSION%%/right.png
share/gtk-doc/html/keybinder-%%VERSION%%/style.css
share/gtk-doc/html/keybinder-%%VERSION%%/up-insensitive.png
share/gtk-doc/html/keybinder-%%VERSION%%/up.png
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/annotation-glossary.html
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/api-index-full.html
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/ch01.html
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/deprecated-api-index.html
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/home.png
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/index.html
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/keybinder-%%VERSION%%.devhelp2
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/keybinder-keybinder.html
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/left-insensitive.png
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/left.png
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/object-tree.html
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/right-insensitive.png
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/right.png
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/style.css
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/up-insensitive.png
%%PORTDOCS%%share/gtk-doc/html/keybinder-%%VERSION%%/up.png

0 comments on commit 2f3ebf0

Please sign in to comment.