Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 42775 Details for
Bug 69270
eclass for Haskell GHC packages
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
haskell.eclass
haskell.eclass (text/plain), 2.70 KB, created by
Andres Loeh (RETIRED)
on 2004-10-28 07:38:54 UTC
(
hide
)
Description:
haskell.eclass
Filename:
MIME Type:
Creator:
Andres Loeh (RETIRED)
Created:
2004-10-28 07:38:54 UTC
Size:
2.70 KB
patch
obsolete
># Copyright 1999-2003 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License v2 ># $Header$ ># ># Author: Andres Loeh <kosmikus@gentoo.org> ># ># This eclass helps with the Glasgow Haskell Compiler's package ># configuration utility. > >ECLASS=haskell >INHERITED="$INHERITED $ECLASS" > >PATH="${PATH}:/opt/ghc/bin" > ># for later configuration using environment variables >ghc-getghc() { > echo "ghc" >} > >ghc-getghcpkg() { > echo "ghc-pkg" >} > >ghc-getghcpkgbin() { > echo $(ghc-libdir)/"ghc-pkg.bin" >} > ># returns the version >ghc-version() { > $(ghc-getghc) --version | sed 's:^.*version ::' >} > ># returns the library directory >ghc-libdir() { > $(ghc-getghc) --print-libdir >} > ># returns the (Gentoo) library configuration directory >ghc-confdir() { > echo $(ghc-libdir)/gentoo >} > ># returns the name of the local (package-specific) ># package configuration file >ghc-localpkgconf() { > echo "${PF}.conf" >} > ># creates an empty local (package-specific) package ># configuration file >ghc-setup-pkg() { > echo '[]' > ${S}/$(ghc-localpkgconf) >} > ># moves the local (package-specific) package configuration ># file to its final destination >ghc-install-pkg() { > mkdir -p ${D}/$(ghc-confdir) > cat ${S}/$(ghc-localpkgconf) | sed "s:${D}::" \ > > ${D}/$(ghc-confdir)/$(ghc-localpkgconf) >} > ># registers all packages in the local (package-specific) ># package configuration file >ghc-register-pkg() { > local localpkgconf > localpkgconf=$(ghc-confdir)/$1 > for pkg in $(ghc-listpkg ${localpkgconf}); do > einfo "Registering ${pkg} ..." > $(ghc-getghcpkgbin) -f ${localpkgconf} -s ${pkg} \ > | $(ghc-getghcpkg) -u --auto-ghci-libs --force > done >} > ># re-adds all available .conf files to the global ># package conf file >ghc-reregister() { > einfo "Re-adding packages ..." > ewarn "This may cause several warnings, but they should be harmless." > pushd $(ghc-confdir) > for conf in *.conf; do > einfo "Processing ${conf} ..." > ghc-register-pkg ${conf} > done > popd >} > ># unregisters ... >ghc-unregister-pkg() { > local localpkgconf > localpkgconf=$(ghc-confdir)/$1 > for pkg in $(ghc-reverse "$(ghc-listpkg ${localpkgconf})"); do > einfo "Unregistering ${pkg} ..." > $(ghc-getghcpkg) -r ${pkg} --force > done >} > ># help-function: reverse a list >ghc-reverse() { > local result > for i in $1; do > result="${i} ${result}" > done > echo ${result} >} > >ghc-listpkg() { > echo $($(ghc-getghcpkgbin) -l -f $1) \ > | cut -f2 -d':' \ > | cut -f1 -d'/' \ > | sed 's:,: :g' >} > >haskell_pkg_postinst() { > ghc-register-pkg $(ghc-localpkgconf) >} > >haskell_pkg_prerm() { > # only remove if this is the only instance of the package on the > # system ... > has_version "<${CATEGORY}/${PF}" || has_version ">${CATEGORY}/${PF}" \ > || ghc-unregister-pkg $(ghc-localpkgconf) >} > >EXPORT_FUNCTIONS pkg_postinst pkg_prerm
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 69270
: 42775 |
42777
|
42778
|
42779
|
43232
|
43234
|
43257
|
44121
|
44122
|
44443