pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/gtk2 Defeat very evil shell script code which trie...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bdb06c14cf76
branches:  trunk
changeset: 536618:bdb06c14cf76
user:      tron <tron%pkgsrc.org@localhost>
date:      Tue Dec 18 10:15:15 2007 +0000

description:
Defeat very evil shell script code which tries to use "which" to find
"gtkdoc-rebase" (which depending on what flavour of "which" your operating
system provides will go horribly wrong).

This fixes the build under Mac OS X.

diffstat:

 x11/gtk2/Makefile |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r d95fa2331c7f -r bdb06c14cf76 x11/gtk2/Makefile
--- a/x11/gtk2/Makefile Tue Dec 18 08:58:49 2007 +0000
+++ b/x11/gtk2/Makefile Tue Dec 18 10:15:15 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.151 2007/12/17 20:24:13 drochner Exp $
+# $NetBSD: Makefile,v 1.152 2007/12/18 10:15:15 tron Exp $
 
 DISTNAME=              gtk+-2.12.3
 PKGNAME=               ${DISTNAME:S/gtk/gtk2/}
@@ -42,7 +42,7 @@
 
 REQD_DIRS+=            ${PREFIX}/libdata/gtk-2.0
 
-BUILD_DIRS=            ${WRKSRC} ${WRKSRC}/demos/gtk-demo
+BUILD_DIRS=            . demos/gtk-demo
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -85,6 +85,16 @@
 _BUILDING_GTK2=        yes
 .include "modules.mk"
 
+# Defeat evil shell script code which tries to find "gtkdoc-rebase"
+# via the "which" command. This goes horribly wrong if "gtkdoc-rebase"
+# is not installed at the "which" command prints an error message
+# to standard output.
+pre-install:
+       ${RM} -f ${BUILDLINK_DIR}/bin/which
+       ${ECHO} >${BUILDLINK_DIR}/bin/which "#!${SH}"
+       ${ECHO} >>${BUILDLINK_DIR}/bin/which "exit 0"
+       ${CHMOD} +x ${BUILDLINK_DIR}/bin/which
+
 .include "../../devel/atk/buildlink3.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/glib2/buildlink3.mk"



Home | Main Index | Thread Index | Old Index