aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/hs-gtk2hs
diff options
context:
space:
mode:
authorVolker Stolz <vs@FreeBSD.org>2005-11-09 10:03:54 +0000
committerVolker Stolz <vs@FreeBSD.org>2005-11-09 10:03:54 +0000
commitfad60d3655779a6e973cea1a7868d7a5806be179 (patch)
treec3f70b649d65b2618280b1f75af2570626c39728 /x11-toolkits/hs-gtk2hs
parent22220066a808bbd9b9e09b545d7e5435988ad725 (diff)
downloadports-fad60d3655779a6e973cea1a7868d7a5806be179.tar.gz
ports-fad60d3655779a6e973cea1a7868d7a5806be179.zip
Notes
Diffstat (limited to 'x11-toolkits/hs-gtk2hs')
-rw-r--r--x11-toolkits/hs-gtk2hs/Makefile8
-rw-r--r--x11-toolkits/hs-gtk2hs/files/pkg-install.in19
-rw-r--r--x11-toolkits/hs-gtk2hs/pkg-plist18
3 files changed, 27 insertions, 18 deletions
diff --git a/x11-toolkits/hs-gtk2hs/Makefile b/x11-toolkits/hs-gtk2hs/Makefile
index 99353ea7fa7b..a82ff0380989 100644
--- a/x11-toolkits/hs-gtk2hs/Makefile
+++ b/x11-toolkits/hs-gtk2hs/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gtk2hs
PORTVERSION= 0.9.10
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= x11-toolkits haskell
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@@ -23,8 +24,15 @@ RUN_DEPENDS= ${BUILD_DEPENDS}
USE_GNOME= gtk20 libglade2 gtksourceview gconf2
GNU_CONFIGURE= yes
USE_GMAKE= yes
+SUB_FILES= pkg-install
+PKGDEINSTALL= ${PKGINSTALL}
GHC_VERSION= `${LOCALBASE}/bin/ghc --numeric-version`
PLIST_SUB+= GHC_VERSION="${GHC_VERSION}"
+SUB_LIST+= GHC_VERSION="${GHC_VERSION}" \
+ PORTVERSION=${PORTVERSION} \
+ PKGS="${PKGS}"
+
+PKGS= cairo glib gtk mogul glade gconf sourceview mozembed
.include <bsd.port.mk>
diff --git a/x11-toolkits/hs-gtk2hs/files/pkg-install.in b/x11-toolkits/hs-gtk2hs/files/pkg-install.in
new file mode 100644
index 000000000000..05bb2cf14e0a
--- /dev/null
+++ b/x11-toolkits/hs-gtk2hs/files/pkg-install.in
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+pkglibdir=$PKG_PREFIX/lib/gtk2hs
+ghcpkg=%%LOCALBASE%%/bin/ghc-pkg
+
+case "$2" in
+POST-INSTALL)
+ for p in %%PKGS%%; do
+ $ghcpkg --auto-ghci-libs update $pkglibdir/$p.package.conf ;
+ done
+ /bin/rm -f %%LOCALBASE%%/lib/ghc-%%GHC_VERSION%%/package.conf.old
+ ;;
+DEINSTALL)
+ for p in %%PKGS%%; do
+ $ghcpkg unregister $p-%%PORTVERSION%% ;
+ done
+ /bin/rm -f %%LOCALBASE%%/lib/ghc-%%GHC_VERSION%%/package.conf.old
+ ;;
+esac
diff --git a/x11-toolkits/hs-gtk2hs/pkg-plist b/x11-toolkits/hs-gtk2hs/pkg-plist
index 3a6d8c016d17..491ce5764221 100644
--- a/x11-toolkits/hs-gtk2hs/pkg-plist
+++ b/x11-toolkits/hs-gtk2hs/pkg-plist
@@ -295,21 +295,3 @@ lib/gtk2hs/libHSsourceview.a
@dirrm lib/gtk2hs/imports
@dirrm lib/gtk2hs/include
@dirrm lib/gtk2hs
-@exec env pkglibdir=%D/lib/gtk2hs %D/bin/ghc-pkg -i %D/lib/gtk2hs/glib.package.conf -a -g
-@exec env pkglibdir=%D/lib/gtk2hs %D/bin/ghc-pkg -i %D/lib/gtk2hs/cairo.package.conf -a -g
-@exec env pkglibdir=%D/lib/gtk2hs %D/bin/ghc-pkg -i %D/lib/gtk2hs/gtk.package.conf -a -g
-@exec env pkglibdir=%D/lib/gtk2hs %D/bin/ghc-pkg -i %D/lib/gtk2hs/mogul.package.conf -a -g
-@exec env pkglibdir=%D/lib/gtk2hs %D/bin/ghc-pkg -i %D/lib/gtk2hs/glade.package.conf -a -g
-@exec env pkglibdir=%D/lib/gtk2hs %D/bin/ghc-pkg -i %D/lib/gtk2hs/gconf.package.conf -a -g
-@exec env pkglibdir=%D/lib/gtk2hs %D/bin/ghc-pkg -i %D/lib/gtk2hs/sourceview.package.conf -a -g
-@exec env pkglibdir=%D/lib/gtk2hs %D/bin/ghc-pkg -i %D/lib/gtk2hs/mozembed.package.conf -a -g
-@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
-@unexec %D/bin/ghc-pkg -r mozembed
-@unexec %D/bin/ghc-pkg -r sourceview
-@unexec %D/bin/ghc-pkg -r gconf
-@unexec %D/bin/ghc-pkg -r glade
-@unexec %D/bin/ghc-pkg -r mogul
-@unexec %D/bin/ghc-pkg -r gtk
-@unexec %D/bin/ghc-pkg -r glib
-@unexec %D/bin/ghc-pkg -r cairo
-@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old