Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Apr 2021 20:14:20 GMT
From:      Rainer Hurling <rhurlin@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2f3ebf0769a8 - main - x11/keybinder-gtk3: Add DOCS/EXAMPLES options
Message-ID:  <202104202014.13KKEKrW091246@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by rhurlin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2f3ebf0769a80a4492f800b3df9f3e2516bbe68f

commit 2f3ebf0769a80a4492f800b3df9f3e2516bbe68f
Author:     Rainer Hurling <rhurlin@FreeBSD.org>
AuthorDate: 2021-04-20 20:10:47 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2021-04-20 20:10:47 +0000

    x11/keybinder-gtk3: Add DOCS/EXAMPLES options
    
    - 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>
---
 x11/keybinder-gtk3/Makefile  | 26 ++++++++++++++++++++------
 x11/keybinder-gtk3/pkg-plist | 42 ++++++++++++++++++++++++++----------------
 2 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/x11/keybinder-gtk3/Makefile b/x11/keybinder-gtk3/Makefile
index d4f43d672bf8..91c7f6b27421 100644
--- a/x11/keybinder-gtk3/Makefile
+++ b/x11/keybinder-gtk3/Makefile
@@ -1,10 +1,10 @@
 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
@@ -12,13 +12,27 @@ 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>
diff --git a/x11/keybinder-gtk3/pkg-plist b/x11/keybinder-gtk3/pkg-plist
index 7b9c7455946b..6425418441b1 100644
--- a/x11/keybinder-gtk3/pkg-plist
+++ b/x11/keybinder-gtk3/pkg-plist
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104202014.13KKEKrW091246>