OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 09-Aug-2006 22:08:32
Branch: HEAD Handle: 2006080921083200
Added files:
openpkg-src/hugs hugs.patch hugs.spec
Log:
new package: hugs 98.200605 (Haskell User's Gofer System (HUGS))
Summary:
Revision Changes Path
1.1 +31 -0 openpkg-src/hugs/hugs.patch
1.1 +164 -0 openpkg-src/hugs/hugs.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/hugs/hugs.patch
============================================================================
$ cvs diff -u -r0 -r1.1 hugs.patch
--- /dev/null 2006-08-09 22:06:29 +0200
+++ hugs.patch 2006-08-09 22:08:32 +0200
@@ -0,0 +1,31 @@
+Index: src/interns.c
+--- src/interns.c.orig 2003-11-19 22:49:48 +0100
++++ src/interns.c 2006-08-09 20:44:10 +0200
+@@ -21,8 +21,8 @@
+
+ static Void linkInternals Args((Void));
+
+-static Name nameLeft; /* standard data constructors
*/
+-static Name nameRight;
++Name nameLeft; /* standard data constructors */
++Name nameRight;
+
+ static Void local internalControl Args((Int));
+ static Void local internalControl(what)
+Index: libraries/Makefile.in
+--- libraries/Makefile.in.orig 2006-05-15 15:55:11 +0200
++++ libraries/Makefile.in 2006-08-09 21:29:42 +0200
+@@ -158,10 +158,10 @@
+ (echo '#! /bin/sh'; \
+ echo 'runhugs $(hugsdir)/programs/cpphs/Main.hs "$$@"')
>$(DESTDIR)$(bindir)/cpphs-hugs
+ chmod 755 $(DESTDIR)$(bindir)/cpphs-hugs
+- $(INSTALL) -d $(DESTDIR)$(datadir)/hsc2hs-0.66
+- $(INSTALL) -c -m 0644 ../hsc2hs/template-hsc.h
$(DESTDIR)$(datadir)/hsc2hs-0.66/template-hsc.h
++ $(INSTALL) -d $(DESTDIR)$(hugsdir)/programs/hsc2hs
++ $(INSTALL) -c -m 0644 ../hsc2hs/template-hsc.h
$(DESTDIR)$(hugsdir)/hsc2hs/template-hsc.h
+ (echo '#! /bin/sh'; \
+- echo 'runhugs -98 $(hugsdir)/programs/hsc2hs/Main.hs
-I$(hugsdir)/include "$$@"') >$(DESTDIR)$(bindir)/hsc2hs-hugs
++ echo 'runhugs -98 $(hugsdir)/programs/hsc2hs/Main.hs
-I$(hugsdir)/include -t$(hugsdir)/hsc2hs/template-hsc.h "$$@"')
>$(DESTDIR)$(bindir)/hsc2hs-hugs
+ chmod 755 $(DESTDIR)$(bindir)/hsc2hs-hugs
+
+ LibStatus: $(BUILD_DIR)/.stamp
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/hugs/hugs.spec
============================================================================
$ cvs diff -u -r0 -r1.1 hugs.spec
--- /dev/null 2006-08-09 22:06:29 +0200
+++ hugs.spec 2006-08-09 22:08:32 +0200
@@ -0,0 +1,164 @@
+##
+## hugs.spec -- OpenPKG RPM Package Specification
+## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
+## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package version
+%define V_base 98
+%define V_rel_year 2006
+%define V_rel_month_num 05
+%define V_rel_month_name May
+%define V_pkg_unix 1.0.20060515
+%define V_pkg_network 1.0.20060515
+%define V_pkg_parsec 2.0.20060515
+%define V_pkg_mtl 1.0.20060515
+%define V_pkg_haxml 1.15.20060515
+
+# package information
+Name: hugs
+Summary: Haskell User's Gofer System (HUGS)
+URL: http://www.haskell.org/hugs/
+Vendor: Mark P. Jones et al.
+Packager: OpenPKG
+Distribution: OpenPKG
+Class: EVAL
+Group: Language
+License: BSD-style
+Version: %{V_base}.%{V_rel_year}%{V_rel_month_num}
+Release: 20060809
+
+# list of sources
+Source0:
http://cvs.haskell.org/Hugs/downloads/%{V_rel_year}-%{V_rel_month_num}/hugs%{V_base}-%{V_rel_month_name}%{V_rel_year}.tar.gz
+Source1:
http://cvs.haskell.org/Hugs/downloads/%{V_rel_year}-%{V_rel_month_num}/packages/unix-%{V_pkg_unix}.tar.gz
+Source2:
http://cvs.haskell.org/Hugs/downloads/%{V_rel_year}-%{V_rel_month_num}/packages/network-%{V_pkg_network}.tar.gz
+Source3:
http://cvs.haskell.org/Hugs/downloads/%{V_rel_year}-%{V_rel_month_num}/packages/parsec-%{V_pkg_parsec}.tar.gz
+Source4:
http://cvs.haskell.org/Hugs/downloads/%{V_rel_year}-%{V_rel_month_num}/packages/mtl-%{V_pkg_mtl}.tar.gz
+Source5:
http://cvs.haskell.org/Hugs/downloads/%{V_rel_year}-%{V_rel_month_num}/packages/HaXml-%{V_pkg_haxml}.tar.gz
+Patch0: hugs.patch
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20040130
+PreReq: OpenPKG, openpkg >= 20040130
+AutoReq: no
+AutoReqProv: no
+
+%description
+ Hugs 98 is a functional programming system based on Haskell 98, the
+ de facto standard for non-strict functional programming languages.
+ Hugs 98 provides an almost complete implementation of Haskell 98,
+ including lazy evaluation, higher order functions, and pattern
+ matching; a wide range of built-in types, from characters to
+ bignums, and lists to functions, with comprehensive facilities for
+ defining new datatypes and type synonyms; an advanced polymorphic
+ type system with type and constructor class overloading; all of the
+ features of the Haskell 98 expression and pattern syntax including
+ lambda, case, conditional and let expressions, list comprehensions,
+ do-notation, operator sections, and wildcard, irrefutable and
+ `as' patterns; an implementation of the Haskell 98 primitives for
+ monadic I/O, with support for simple interactive programs, access
+ to text files, handle-based I/O, and exception handling; an almost
+ complete implementation of the Haskell module system. Hugs 98 also
+ supports a number of advanced and experimental extensions including
+ multi-parameter classes, extensible records, rank-2 polymorphism,
+ existentials, scoped type variables, and restricted type synonyms.
+ Hugs is the successor to Gofer.
+
+%track
+ prog hugs = {
+ version = %{V_base}-%{V_rel_month_name}%{V_rel_year}
+ url = http://cvs.haskell.org/Hugs/pages/downloading.htm
+ regex = hugs(\d+-[^-]+\d+)\.tar\.gz
+ }
+
+%prep
+ %setup -q -c
+ %setup -q -T -D -a 1
+ %setup -q -T -D -a 2
+ %setup -q -T -D -a 3
+ %setup -q -T -D -a 4
+ %setup -q -T -D -a 5
+ %patch -p0 -d hugs%{V_base}-%{V_rel_month_name}%{V_rel_year}
+
+%build
+ # build HUGS
+ ( cd hugs%{V_base}-%{V_rel_month_name}%{V_rel_year}
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --enable-internal-prims \
+ --enable-timer \
+ --enable-ffi
+ %{l_make} %{l_mflags -O}
+ ) || exit $?
+
+%install
+ # install HUGS
+ rm -rf $RPM_BUILD_ROOT
+ ( cd hugs%{V_base}-%{V_rel_month_name}%{V_rel_year}
+ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+ ) || exit $?
+
+ # provide reasonably Cabal build environment
+ for tool in hsc2hs cpphs; do
+ %{l_shtool} install -c -m 755 \
+ -e "s;%{l_prefix};$RPM_BUILD_ROOT%{l_prefix};g" \
+ $RPM_BUILD_ROOT%{l_prefix}/bin/$tool-hugs \
+ $RPM_BUILD_ROOT%{l_prefix}/bin/$tool
+ done
+ export PATH=$RPM_BUILD_ROOT%{l_prefix}/bin:$PATH
+ export HUGSDIR=$RPM_BUILD_ROOT%{l_prefix}/lib/hugs
+
+ # install common Cabal extensions
+ for extension in \
+ unix-%{V_pkg_unix} \
+ network-%{V_pkg_network} \
+ parsec-%{V_pkg_parsec} \
+ mtl-%{V_pkg_mtl} \
+ HaXml-%{V_pkg_haxml}; do
+ ( cd $extension
+ runhugs -98 Setup.hs configure --hugs --prefix=%{l_prefix}
+ runhugs -98 Setup.hs build
+ runhugs -98 Setup.hs copy --destdir=$RPM_BUILD_ROOT
+ ) || exit $?
+ done
+
+ # cleanup after Cabal extension installations
+ for tool in hsc2hs cpphs; do
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$tool
+ done
+
+ # strip down installation
+ strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+
+ # determine installation files
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]