make use of new ghc-package eclass
authorAndres Loeh <kosmikus@gentoo.org>
Thu, 4 Nov 2004 14:57:15 +0000 (14:57 +0000)
committerAndres Loeh <kosmikus@gentoo.org>
Thu, 4 Nov 2004 14:57:15 +0000 (14:57 +0000)
dev-haskell/gtk2hs/ChangeLog
dev-haskell/gtk2hs/Manifest
dev-haskell/gtk2hs/files/digest-gtk2hs-0.9.6-r1 [new file with mode: 0644]
dev-haskell/gtk2hs/gtk2hs-0.9.6-r1.ebuild [new file with mode: 0644]

index 2fae1bfb45079ca5bb2b90e3d81dc889e4c595ca..cf34f88d8ea91d524da5d003eee11d46882d9889 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for dev-haskell/gtk2hs
 # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/gtk2hs/ChangeLog,v 1.3 2004/10/26 14:36:42 kosmikus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/gtk2hs/ChangeLog,v 1.4 2004/11/04 14:57:15 kosmikus Exp $
+
+*gtk2hs-0.9.6-r1 (04 Nov 2004)
+
+  04 Nov 2004; Andres Loeh <kosmikus@gentoo.org> +gtk2hs-0.9.6-r1.ebuild:
+  Make use of new ghc-package eclass.
 
 *gtk2hs-0.9.6 (26 Oct 2004)
 
index 6d62d675fb7a6968e92a31e136598d692343ca58..ba70f4e278072bc5bf97825262484649c33a4dc8 100644 (file)
@@ -1,6 +1,8 @@
 MD5 f630df0130ccd8086ffd95bdb353346d gtk2hs-0.9.6.ebuild 3932
 MD5 8e023ae1e205ac205cc17807eb74bbd5 gtk2hs-0.9.5.ebuild 2586
-MD5 c29b739f12e8879a3d6242f5f1c3592a ChangeLog 474
+MD5 a53182a956eb78c0b6601dfc36271656 ChangeLog 619
 MD5 a769ecfcd1cdd2d40986627df7dfb249 metadata.xml 224
+MD5 4b65a3153c348c4d8dd4b65ba3495bbb gtk2hs-0.9.6-r1.ebuild 2590
 MD5 2785816eabb8f055db732986a48f65fd files/digest-gtk2hs-0.9.5 64
 MD5 96674cbaf4f6bddf1517166b6e6f13a5 files/digest-gtk2hs-0.9.6 64
+MD5 96674cbaf4f6bddf1517166b6e6f13a5 files/digest-gtk2hs-0.9.6-r1 64
diff --git a/dev-haskell/gtk2hs/files/digest-gtk2hs-0.9.6-r1 b/dev-haskell/gtk2hs/files/digest-gtk2hs-0.9.6-r1
new file mode 100644 (file)
index 0000000..8016e09
--- /dev/null
@@ -0,0 +1 @@
+MD5 fdd2d08d9789d1011b44a1df048c95b9 gtk2hs-0.9.6.tar.gz 457131
diff --git a/dev-haskell/gtk2hs/gtk2hs-0.9.6-r1.ebuild b/dev-haskell/gtk2hs/gtk2hs-0.9.6-r1.ebuild
new file mode 100644 (file)
index 0000000..743253c
--- /dev/null
@@ -0,0 +1,86 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/gtk2hs/gtk2hs-0.9.6-r1.ebuild,v 1.1 2004/11/04 14:57:15 kosmikus Exp $
+
+inherit base ghc-package
+
+DESCRIPTION="GTK+-2.x bindings for Haskell"
+HOMEPAGE="http://gtk2hs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gtk2hs/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~x86"
+
+IUSE="doc gnome"
+
+RDEPEND=">=virtual/ghc-5.04
+               >=x11-libs/gtk+-2
+               gnome? ( >=gnome-base/libglade-2
+                                >=x11-libs/gtksourceview-0.6
+                                >=gnome-base/gconf-2)"
+
+DEPEND="${RDEPEND}"
+
+src_compile() {
+       econf \
+               --libdir=$(ghc-libdir) \
+               --with-hcflags="-H180m" \
+               `use_enable gnome gnome` \
+               `use_enable gnome libglade` \
+               || die "Configure failed"
+
+       #fix for bug in 0.9.6 tarball, directory missing so don't compile that demo
+       sed -i 's/MAKE_APPS += demo\/filechooser//' ${S}/Makefile
+       #or work out how to build without demos
+
+       # parallel build doesn't work, so specify -j1
+       emake -j1 || die "Make failed"
+
+       if use doc; then
+               make html || die "Make docs failed"
+       fi
+}
+
+src_install() {
+
+       make DESTDIR=${D} install-without-pkg || die "Make install failed"
+       if use doc; then
+               make DESTDIR=${D} install-html || die "Make docs failed"
+       fi
+
+       # fix dynamic linking with pthread bug for glade & sourview
+       if use gnome; then
+               sed -i 's:"pthread",::' ${D}/$(ghc-libdir)/gtk2hs/sourceview/sourceview.conf
+               sed -i 's:"pthread",::' ${D}/$(ghc-libdir)/gtk2hs/glade/glade.conf
+       fi
+
+       # arrange for the packages to be registered
+       ghc-setup-pkg \
+               "${D}/$(ghc-libdir)/gtk2hs/gtk2/gtk2.conf" \
+               "${D}/$(ghc-libdir)/gtk2hs/mogul/mogul.conf" \
+               $(useq gnome && echo \
+                       "${D}/$(ghc-libdir)/gtk2hs/glade/glade.conf" \
+                       "${D}/$(ghc-libdir)/gtk2hs/gconf/gconf.conf" \
+                       "${D}/$(ghc-libdir)/gtk2hs/sourceview/sourceview.conf")
+       ghc-install-pkg
+
+       # build ghci .o files from .a files
+       ghc-makeghcilib ${D}/$(ghc-libdir)/gtk2hs/gtk2/libgtk2hs.a
+       ghc-makeghcilib ${D}/$(ghc-libdir)/gtk2hs/mogul/libmogul.a
+       if use gnome; then
+               ghc-makeghcilib ${D}/$(ghc-libdir)/gtk2hs/sourceview/libsourceview.a
+               ghc-makeghcilib ${D}/$(ghc-libdir)/gtk2hs/glade/libglade2hs.a
+               ghc-makeghcilib ${D}/$(ghc-libdir)/gtk2hs/gconf/libgconf.a
+       fi
+
+       # fix gconf hi file location install bug
+       if use gnome; then
+               mkdir -p "${D}/$(ghc-libdir)/gtk2hs/gconf/hi/System/Gnome/GConf"
+               mv ${D}/$(ghc-libdir)/gtk2hs/gconf/hi/GConf.hi \
+                       ${D}/$(ghc-libdir)/gtk2hs/gconf/hi/System/Gnome/
+               mv ${D}/$(ghc-libdir)/gtk2hs/gconf/hi/*.hi \
+                       ${D}/$(ghc-libdir)/gtk2hs/gconf/hi/System/Gnome/GConf/
+       fi
+}
+