Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 2015 04:08:56 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r402343 - in head: graphics/gtk-update-icon-cache x11-toolkits/gtk20 x11-toolkits/gtk30
Message-ID:  <201511240408.tAO48ua7042503@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Nov 24 04:08:55 2015
New Revision: 402343
URL: https://svnweb.freebsd.org/changeset/ports/402343

Log:
  graphics/gtk-update-icon-cache: restore r297047 after r313633
  
  - Invoke pkg-config(1) instead of checking manually [1]
  - Convert to ECHO_MSG which can be silenced
  
  PR:		166279
  Reported by:	mi (via mail on gnome@ list)
  Approved by:	gnome (kwm)
  Submitted by:	John Hein <jh-fbml@snkmail.com> [1]
  Differential Revision:	https://reviews.freebsd.org/D4260

Modified:
  head/graphics/gtk-update-icon-cache/Makefile   (contents, props changed)
  head/x11-toolkits/gtk20/Makefile   (contents, props changed)
  head/x11-toolkits/gtk30/Makefile   (contents, props changed)

Modified: head/graphics/gtk-update-icon-cache/Makefile
==============================================================================
--- head/graphics/gtk-update-icon-cache/Makefile	Tue Nov 24 04:04:41 2015	(r402342)
+++ head/graphics/gtk-update-icon-cache/Makefile	Tue Nov 24 04:08:55 2015	(r402343)
@@ -36,17 +36,16 @@ ALL_TARGET=	${PORTNAME}
 PLIST_FILES=	bin/gtk-update-icon-cache
 #		man/man1/gtk-update-icon-cache.1.gz
 
-.include <bsd.port.pre.mk>
-
 post-patch:
 	@${REINPLACE_CMD} -e 's|-DGDK_PIXBUF_DISABLE_DEPRECATED||g' \
 		${WRKSRC}/configure
 
 pre-configure:
-.if !exists(${LOCALBASE}/libdata/pkgconfig/cairo-xlib.pc)
-	@${ECHO_CMD} "${PKGNAME}: Needs cairo with X11 support enabled."
-	@${FALSE}
-.endif
+# .if !exists() evaluates too early before cairo has a chance to be installed
+	@if ! pkg-config --exists cairo-xlib; then \
+		${ECHO_MSG} "${PKGNAME}: Needs cairo with X11 support enabled."; \
+		${FALSE}; \
+	fi
 
 do-install:
 	@${INSTALL_PROGRAM} ${WRKSRC}/gtk/gtk-update-icon-cache \
@@ -54,4 +53,4 @@ do-install:
 #	@${INSTALL_MAN} ${WRKSRC}/docs/reference/gtk/gtk-update-icon-cache.1 \
 #		${STAGEDIR}${PREFIX}/man/man1/
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/x11-toolkits/gtk20/Makefile
==============================================================================
--- head/x11-toolkits/gtk20/Makefile	Tue Nov 24 04:04:41 2015	(r402342)
+++ head/x11-toolkits/gtk20/Makefile	Tue Nov 24 04:08:55 2015	(r402343)
@@ -47,8 +47,6 @@ CUPS_CONFIGURE_ON=	--enable-cups=auto
 CUPS_CONFIGURE_OFF=	--disable-cups
 DEBUG_CONFIGURE_ON=	--enable-debug=yes
 
-.include <bsd.port.options.mk>
-
 PLIST_SUB+=	LIBGAILVER=18.0.1 LIBGVER=0.2400.28
 
 post-patch:
@@ -58,10 +56,11 @@ post-patch:
 		${WRKSRC}/gtk/Makefile.in
 
 pre-configure:
-.if !exists(${LOCALBASE}/libdata/pkgconfig/cairo-xlib.pc)
-	@${ECHO_CMD} "${PKGNAME}: Needs cairo with X11 support enabled."
-	@${FALSE}
-.endif
+# .if !exists() evaluates too early before cairo has a chance to be installed
+	@if ! pkg-config --exists cairo-xlib; then \
+		${ECHO_MSG} "${PKGNAME}: Needs cairo with X11 support enabled."; \
+		${FALSE}; \
+	fi
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/gtk-2.0/modules

Modified: head/x11-toolkits/gtk30/Makefile
==============================================================================
--- head/x11-toolkits/gtk30/Makefile	Tue Nov 24 04:04:41 2015	(r402342)
+++ head/x11-toolkits/gtk30/Makefile	Tue Nov 24 04:08:55 2015	(r402343)
@@ -79,7 +79,6 @@ DEBUG_CONFIGURE_ENABLE=debug
 # GTK+ 3.17 has a beter way
 TYPEAHEAD_DESC=		Re-enable type-a-head functionality in file chooser
 
-# needed for the exists() check, booo
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MTYPEAHEAD}
@@ -94,10 +93,11 @@ post-patch:
 		${WRKSRC}/gtk/Makefile.in
 
 pre-configure:
-.if !exists(${LOCALBASE}/libdata/pkgconfig/cairo-xlib.pc)
-	@${ECHO_CMD} "${PKGNAME}: Needs cairo with X11 support enabled."
-	@${FALSE}
-.endif
+# .if !exists() evaluates too early before cairo has a chance to be installed
+	@if ! pkg-config --exists cairo-xlib; then \
+		${ECHO_MSG} "${PKGNAME}: Needs cairo with X11 support enabled."; \
+		${FALSE}; \
+	fi
 
 pre-build:
 	@${RM} -rf ${WRKSRC}/docs/gtk.info*



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