Author: glen                         Date: Thu Mar 19 10:32:34 2009 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- some progress with bootstrap, but pkg check failures now
- added extralibs bcond

---- Files affected:
SPECS:
   ghc.spec (1.82 -> 1.83) 

---- Diffs:

================================================================
Index: SPECS/ghc.spec
diff -u SPECS/ghc.spec:1.82 SPECS/ghc.spec:1.83
--- SPECS/ghc.spec:1.82 Tue Mar  3 16:38:01 2009
+++ SPECS/ghc.spec      Thu Mar 19 11:32:28 2009
@@ -1,5 +1,14 @@
 # $Revision$, $Date$
 # TODO
+# - system gmp/gmp-4.2.1.tar.gz
+# - system libffi/libffi-3.0.4.tar.gz
+# - ghc-pkg is called with invalid args for 6.10 (-l, --show-package), and the 
.m4 are not distributed (present only in aclocal.m4 (mv to acinclude.m4?)
+# - related old gcc bug for __DISCARD__: 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20359
+# - 
http://www.archivum.info/[email protected]/2008-07/msg00060.html
+# - http://bugs.gentoo.org/212307
+# - http://bugs.gentoo.org/show_bug.cgi?id=145466
+# - $* is no longer supported at /usr/lib64/ghc-6.6.1/ghc-asm line 515., 
that's why with pld ghc building fails (the __DISCARD__ filtering)
+#   - Use of $* is deprecated in modern Perl, supplanted by the "/s" and "/m" 
modifiers on pattern matching.
 # - fails (gcc-4.2.3-1.x86_64)
 #../../compat/libghccompat.a(InstalledPackageInfo.o): In function `s7A4_6_alt':
 #ghc29245_0.hc:(.text+0x1b84d): undefined reference to `__DISCARD__'
@@ -8,12 +17,23 @@
 #ghc29245_0.hc:(.text+0x1b896): undefined reference to `__DISCARD__'
 
#../../compat/libghccompat.a(InstalledPackageInfo.o):ghc29245_0.hc:(.text+0x1b8c5):
 more undefined references to `__DISCARD__' follow
 #collect2: ld returned 1 exit status
+# - after using official binary tarballs, some dep errors occour:
+#Configuring ghc-6.10.1...
+#cabal-bin: At least the following dependencies are missing:
+#Cabal -any,
+#base <3,
+#filepath >=1 && <1.2,
+#haskell98 -any,
+#hpc -any,
+#template-haskell -any,
+#unix -any
+#make[2]: *** [boot.stage.2] Error 1
 #
 # Conditional build:
-%bcond_with    bootstrap       # use foreign (non-rpm) ghc to bootstrap
-# due to http://hackage.haskell.org/trac/ghc/ticket/1427 (fixed by gcc42 patch)
-%bcond_with    unregistered    # non-registerised interpreter
+%bcond_with    bootstrap       # use foreign (non-rpm) ghc to bootstrap (extra 
140MB to download)
+%bcond_with    unregistered    # non-registerised interpreter (use for build 
problems/new arches)
 %bcond_without doc             # don't build documentation (requires haddock)
+%bcond_without extralibs               # don't build extra libs
 #
 Summary:       Glasgow Haskell Compilation system
 Summary(pl.UTF-8):     System kompilacji Glasgow Haskell
@@ -26,6 +46,14 @@
 # Source0-md5: 54c676a632b3d73cf526b06347522c32
 Source1:       
http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src-extralibs.tar.bz2
 # Source1-md5: 4ff4590f1002ae1ff608874da8643c67
+%if %{with bootstrap}
+Source3:       
http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-i386-unknown-linux.tar.bz2
+# NoSource3-md5:       1895a81c7788604579b5bbd01a566303
+NoSource:      3
+Source4:       
http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-x86_64-unknown-linux.tar.bz2
+# NoSource4-md5:       efe7ce579a482b6bd87ed80ddf6e1f5c
+NoSource:      4
+%endif
 URL:           http://haskell.org/ghc/
 BuildRequires: OpenAL-devel
 BuildRequires: OpenGL-GLU-devel
@@ -43,20 +71,25 @@
 BuildRequires: docbook-dtd42-xml
 BuildRequires: docbook-style-xsl
 BuildRequires: haddock
+BuildRequires: libxml2-progs
 BuildRequires: libxslt-progs
 BuildRequires: tetex
 BuildRequires: tetex-dvips
 BuildRequires: tetex-latex-bibtex
 #For generating documentation in PDF: fop or xmltex
 %endif
-Provides:      haskell
 # there is no more ghc ports in PLD
+Provides:      haskell
 # th-ppc removed:
 #error: ghc: no such package
 #error: haddock: no such package
 ExclusiveArch: %{ix86} %{x8664}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%if %{with bootstrap}
+#%%define              specflags       -O2 -pipe
+%endif
+
 %description
 Haskell is the standard lazy purely functional programming language.
 The current language version is Haskell 98, agreed in December 1998,
@@ -73,30 +106,7 @@
 A wide variety of Haskell related resources (tutorials, libraries,
 specifications, documentation, compilers, interpreters, references,
 contact information, links to research groups) are available from the
-Haskell home page at http://haskell.org/.
-
-Authors:
---------
-    Krasimir Angelov <[email protected]>
-    Manuel Chakravarty <[email protected]>
-    Koen Claessen <[email protected]>
-    Robert Ennals <[email protected]>
-    Sigbjorn Finne <[email protected]>
-    Gabrielle Keller <[email protected]>
-    Marcin Kowalczyk <[email protected]>
-    Jeff Lewis <[email protected]>
-    Ian Lynagh <[email protected]>
-    Simon Marlow <[email protected]>
-    Sven Panne <[email protected]>
-    Ross Paterson <[email protected]>
-    Simon Peyton Jones <[email protected]>
-    Don Stewart <[email protected]>
-    Volker Stolz <[email protected]>
-    Wolfgang Thaller <[email protected]>
-    Andrew Tolmach <[email protected]>
-    Keith Wansbrough <[email protected]>
-    Michael Weber <[email protected]>
-    plus a dozen helping hands...
+Haskell home page at <http://haskell.org/>.
 
 %description -l pl.UTF-8
 Haskell to standardowy leniwy i czysto funkcyjny język programowania.
@@ -105,39 +115,16 @@
 
 GHC to dojrzałe i nowoczesne środowisko do programowania w Haskellu.
 Zawiera optymalizujący kompilator generujący dobry kod dla różnych
-platform, wraz z interakcyjnym systemem do wygodnego eksperymentowania.
-Dystrybucja zawiera narzędzia do profilowania zużycia pamięci i czasu,
-sporą kolekcję bibliotek i wsparcie dla różnych rozszerzeń języka,
-w tym współbieżności, wyjątków i łączenia z innymi językami (np. C
-albo C++).
+platform, wraz z interakcyjnym systemem do wygodnego
+eksperymentowania. Dystrybucja zawiera narzędzia do profilowania
+zużycia pamięci i czasu, sporą kolekcję bibliotek i wsparcie dla
+różnych rozszerzeń języka, w tym współbieżności, wyjątków i łączenia z
+innymi językami (np. C albo C++).
 
 Różnorodne zasoby związane z Haskellem (podręczniki, biblioteki,
 specyfikacje, dokumentacja, kompilatory, interpretery, literatura,
-informacje kontaktowe, odsyłacze do grup naukowo-badawczych)
-są dostępne ze strony domowej Haskella pod http://haskell.org/.
-
-Autorzy:
---------
-    Krasimir Angelov <[email protected]>
-    Manuel Chakravarty <[email protected]>
-    Koen Claessen <[email protected]>
-    Robert Ennals <[email protected]>
-    Sigbjorn Finne <[email protected]>
-    Gabrielle Keller <[email protected]>
-    Marcin Kowalczyk <[email protected]>
-    Jeff Lewis <[email protected]>
-    Ian Lynagh <[email protected]>
-    Simon Marlow <[email protected]>
-    Sven Panne <[email protected]>
-    Ross Paterson <[email protected]>
-    Simon Peyton Jones <[email protected]>
-    Don Stewart <[email protected]>
-    Volker Stolz <[email protected]>
-    Wolfgang Thaller <[email protected]>
-    Andrew Tolmach <[email protected]>
-    Keith Wansbrough <[email protected]>
-    Michael Weber <[email protected]>
-    oraz wiele pomocnych dłoni...
+informacje kontaktowe, odsyłacze do grup naukowo-badawczych) są
+dostępne ze strony domowej Haskella pod <http://haskell.org/>.
 
 %package prof
 Summary:       Profiling libraries for GHC
@@ -155,24 +142,82 @@
 potrzebujemy systemu profilującego z GHC.
 
 %prep
-%setup -q -b1
+%setup -q %{?with_extralibs:-b1}
+%if %{with bootstrap}
+%ifarch %{ix86}
+%{__tar} -xjf %{SOURCE3}
+%endif
+%ifarch %{x8664}
+%{__tar} -xjf %{SOURCE4}
+%endif
+mv %{name}-%{version} binsrc
+%endif
+
+# 0.10.1 ghc-pkg -l is not supported
+sed -i -e 's,fp_ghc_pkg_guess" -l,fp_ghc_pkg_guess" list,' configure
+
+%build
+cat <<'EOF' > mk/build.mk
+# http://darcs.haskell.org/ghc/mk/build.mk.sample
+#SRC_HC_OPTS    = -O2 -H64m -fasm
+#GhcStage1HcOpts = -O0 -fasm -Wall
+#GhcStage2HcOpts = -O0 -fasm -Wall
+#GhcHcOpts        = -Rghc-timing
+#GhcLibHcOpts  = -O2 -XGenerics
+#GhcLibWays      = p
+#SplitObjs        = YES
+#SplitObjs        = No
+#GhcBootLibs    = %{!?with_extralibs:NO}%{?with_extralibs:YES}
+#%{?without_doc:HADDOCK_DOCS = NO}
+EOF
 
 %if %{with unregistered}
 cat << 'EOF' >> mk/build.mk
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Unregisterised
 GhcUnregisterised=YES
 GhcWithNativeCodeGen=NO
+GhcWithInterpreter=NO
 SplitObjs=NO
 EOF
 %endif
 
-%build
-%{?with_bootstrap:PATH=$PATH:/usr/local/bin}
+top=$(pwd)
+%if %{with bootstrap}
+# we need to first install the tarball somewhere, as seems the programs don't
+# work out of the path otherwise
+if [ ! -f .bindist.install.mark ]; then
+       top=$(pwd)
+       cd binsrc
+       ./configure \
+               --prefix=$top/bindist
+       %{__make} install \
+               LATEX_DOCS=NO \
+               HADDOCK_DOCS=NO
+       cd ..
+
+       touch .bindist.install.mark
+fi
+%endif
+
+%{?with_bootstrap:PATH=$top/bindist/bin:$PATH:%{_prefix}/local/bin}
 
 %configure \
        --prefix=%{_prefix} \
-       --with-gcc="%{__cc}"
+       --with-gcc="%{__cc}" \
+%if %{with bootstrap}
+       GhcPkgCmd=$top/bindist/bin/ghc-pkg \
+%endif
+%if %{with bootstrap2}
+       --with-ghc=$top/bindist/bin/ghc \
+%endif
+%if %{with bootstrap1}
+       --with-hc=$PWD/bindist/bin/ghc \
+       --with-ghc=$PWD/bindist/ghc/dist-stage2/build/ghc/ghc \
+       --with-hc=$PWD/bindist/ghc/dist-stage2/build/ghc/ghc \
+%endif
 
 %{__make}
+
 %if %{with doc}
 %{__make} html
 # broken
@@ -248,6 +293,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.83  2009/03/19 10:32:28  glen
+- some progress with bootstrap, but pkg check failures now
+- added extralibs bcond
+
 Revision 1.82  2009/03/03 15:38:01  baggins
 - removed outdated patch (archs not supported)
 - removed automagic (no longer needed)
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/ghc.spec?r1=1.82&r2=1.83&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to