diff options
author | Andres Loeh <kosmikus@gentoo.org> | 2004-05-17 11:55:46 +0000 |
---|---|---|
committer | Andres Loeh <kosmikus@gentoo.org> | 2004-05-17 11:55:46 +0000 |
commit | 5dcb8951bc5141b454354118c232ffb006164d49 (patch) | |
tree | 4ef46d375b5782c07317d89fb1579bd4ef02684a /dev-haskell/gtk2hs | |
parent | Initial import, see bug #45938 (Manifest recommit) (diff) | |
download | gentoo-2-5dcb8951bc5141b454354118c232ffb006164d49.tar.gz gentoo-2-5dcb8951bc5141b454354118c232ffb006164d49.tar.bz2 gentoo-2-5dcb8951bc5141b454354118c232ffb006164d49.zip |
initial import (#50998)
Diffstat (limited to 'dev-haskell/gtk2hs')
-rw-r--r-- | dev-haskell/gtk2hs/ChangeLog | 10 | ||||
-rw-r--r-- | dev-haskell/gtk2hs/Manifest | 2 | ||||
-rw-r--r-- | dev-haskell/gtk2hs/files/digest-gtk2hs-0.9.5 | 1 | ||||
-rw-r--r-- | dev-haskell/gtk2hs/gtk2hs-0.9.5.ebuild | 92 | ||||
-rw-r--r-- | dev-haskell/gtk2hs/metadata.xml | 8 |
5 files changed, 113 insertions, 0 deletions
diff --git a/dev-haskell/gtk2hs/ChangeLog b/dev-haskell/gtk2hs/ChangeLog new file mode 100644 index 000000000000..f5e3d94eee80 --- /dev/null +++ b/dev-haskell/gtk2hs/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for dev-haskell/gtk2hs +# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/gtk2hs/ChangeLog,v 1.1 2004/05/17 11:55:46 kosmikus Exp $ + +*gtk2hs-0.9.5 (17 May 2004) + + 17 May 2004; Andres Loeh <kosmikus@gentoo.org> gtk2hs-0.9.5.ebuild, + metadata.xml: + Initial import (bug #50998). + diff --git a/dev-haskell/gtk2hs/Manifest b/dev-haskell/gtk2hs/Manifest new file mode 100644 index 000000000000..e12245e99ae5 --- /dev/null +++ b/dev-haskell/gtk2hs/Manifest @@ -0,0 +1,2 @@ +MD5 2f91ea9ee78a63b2b24c1adf1adee7d9 gtk2hs-0.9.5.ebuild 2311 +MD5 2785816eabb8f055db732986a48f65fd files/digest-gtk2hs-0.9.5 64 diff --git a/dev-haskell/gtk2hs/files/digest-gtk2hs-0.9.5 b/dev-haskell/gtk2hs/files/digest-gtk2hs-0.9.5 new file mode 100644 index 000000000000..1c1d5389c8e9 --- /dev/null +++ b/dev-haskell/gtk2hs/files/digest-gtk2hs-0.9.5 @@ -0,0 +1 @@ +MD5 cfbf29ce7ea5621e82856081aa246ef8 gtk2hs-0.9.5.tar.gz 436231 diff --git a/dev-haskell/gtk2hs/gtk2hs-0.9.5.ebuild b/dev-haskell/gtk2hs/gtk2hs-0.9.5.ebuild new file mode 100644 index 000000000000..305e65ef02f7 --- /dev/null +++ b/dev-haskell/gtk2hs/gtk2hs-0.9.5.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/gtk2hs/gtk2hs-0.9.5.ebuild,v 1.1 2004/05/17 11:55:46 kosmikus Exp $ + +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="gnome" + +RDEPEND=">=virtual/ghc-6.2 + >=x11-libs/gtk+-2 + gnome? ( >=gnome-base/libglade-2 + >=x11-libs/gtksourceview-0.6 )" + +DEPEND="${RDEPEND}" + +# the variable ghc_version is used to store the ghc version +# we are building against + +src_compile() { + # determine ghc library directory + # (so that it's possible to install the library for + # multiple versions of ghc) + local myopts + ghc_version=`best_version virtual/ghc | sed "s:.*/::"` + test -n ${ghc_version} && ghclibdir="/usr/lib/${ghc_version}" + test -n ${ghclibdir} || ghclibdir="/usr/lib" + test -n ${ghclibdir} && myopts="${myopts} --libdir=${D}${ghclibdir}" + + # configure, override hc flags to not specify heap size + econf --with-hcflags="-O" \ + `use_enable gnome sourceview` \ + `use_enable gnome libglade` \ + --disable-glext \ + ${myopts} \ + || die "Configure failed" + + # parallel build doesn't work, so specify -j1 + emake -j1 || die "Make failed" +} + +src_install() { + + make install-without-pkg || die "Make install failed" + + # correct the package config files + sed -i "s:${D}::g" ${D}/${ghclibdir}/*.conf + + # build ghci .o files from .a files + ld -r -x -o ${D}/${ghclibdir}/gtk2hs.o \ + --whole-archive ${D}/${ghclibdir}/libgtk2hs.a + ld -r -x -o ${D}/${ghclibdir}/mogul.o \ + --whole-archive ${D}/${ghclibdir}/libmogul.a + use gnome && ld -r -x -o ${D}/${ghclibdir}/sourceview.o \ + --whole-archive ${D}/${ghclibdir}/libsourceview.a + use gnome && ld -r -x -o ${D}/${ghclibdir}/glade2hs.o \ + --whole-archive ${D}/${ghclibdir}/libglade2hs.a +} + +pkg_postinst() { + register_ghc_packages +} + +register_ghc_packages() { + einfo "Registering gtk2hs packages" + ghc-pkg -u -i ${ghclibdir}/gtk2.conf + ghc-pkg -u -i ${ghclibdir}/mogul.conf +# sourceview package not usable from ghci due to linking problems +# use gnome && ghc-pkg -u -i ${ghclibdir}/sourceview.conf + use gnome && ghc-pkg -u -i ${ghclibdir}/glade.conf +} + +pkg_prerm() { + # check if another version is still there + has_version "<${CATEGORY}/${PF}" \ + || has_version ">${CATEGORY}/${PF}" \ + || unregister_ghc_packages +} + +unregister_ghc_packages() { + einfo "Unregistering gtk2hs packages" + ghc-pkg -r gtk2 + ghc-pkg -r mogul + ghc-pkg -r glade + ghc-pkg -r sourceview +} + diff --git a/dev-haskell/gtk2hs/metadata.xml b/dev-haskell/gtk2hs/metadata.xml new file mode 100644 index 000000000000..a53a18c06081 --- /dev/null +++ b/dev-haskell/gtk2hs/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>haskell</herd> +<maintainer> + <email>kosmikus@gentoo.org</email> +</maintainer> +</pkgmetadata> |