- Use new ghc-pkg infrastructure

- Bump PORTREVISION since installing from package wouldn't work
This commit is contained in:
Volker Stolz 2005-11-09 10:03:54 +00:00
parent 22220066a8
commit fad60d3655
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=147683
3 changed files with 27 additions and 18 deletions

View file

@ -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>

View file

@ -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

View file

@ -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