--- pugs-6.2.10.orig/debian/pugs-modules.install +++ pugs-6.2.10/debian/pugs-modules.install @@ -0,0 +1,3 @@ +usr/share/perl5/* +usr/share/perl6/* +usr/share/man/man3/Inline::Pugs.3pm --- pugs-6.2.10.orig/debian/pugs-modules.lintian-overrides +++ pugs-6.2.10/debian/pugs-modules.lintian-overrides @@ -0,0 +1,15 @@ +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/FA/t/DFA.t #!/usr/bin/pugs +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/HTTP/Status.pm #!/usr/bin/pugs +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/HTTP/Date.pm #!/usr/bin/pugs +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/HTTP/Request.pm #!/usr/bin/pugs +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/HTTP/Cookies.pm #!/usr/bin/pugs +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/HTTP/Query.pm #!/usr/bin/pugs +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/HTTP/Response.pm #!/usr/bin/pugs +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/HTTP/Request/CGI.pm #!/usr/bin/pugs +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/Locale/KeyedText.pm #!/usr/bin/pugs +pugs-modules: unusual-interpreter ./usr/share/perl6/5.8/URI/Escape.pm #!/usr/bin/pugs +pugs-modules: script-not-executable ./usr/share/perl6/5.8/auto/pugs/perl5/lib/jspugs.pl +pugs-modules: script-not-executable ./usr/share/perl6/5.8/auto/pugs/perl5/lib/pil2js.pl +pugs-modules: script-not-executable ./usr/share/perl6/5.8/auto/pugs/perl5/lib/pugs-smokejs.pl +pugs-modules: script-not-executable ./usr/share/perl6/5.8/auto/pugs/perl5/lib/runjs.pl +pugs-modules: script-not-executable ./usr/share/perl6/5.8/auto/pugs/perl5/lib/PIL/pugs-p5.pl --- pugs-6.2.10.orig/debian/pugs.docs +++ pugs-6.2.10/debian/pugs.docs @@ -0,0 +1,4 @@ +AUTHORS +README +READTHEM +VICTUALS --- pugs-6.2.10.orig/debian/pugs-modules.dirs +++ pugs-6.2.10/debian/pugs-modules.dirs @@ -0,0 +1 @@ +usr/share/lintian/overrides/ --- pugs-6.2.10.orig/debian/smoker.yml +++ pugs-6.2.10/debian/smoker.yml @@ -0,0 +1,7 @@ +--- +# These fields will be used to identify you as a tester in +# the smoke server. They are all optional, so if you want +# anonymity, just omit them. +name: Florian Ragwitz (Debian builds) +email: florian.ragwitz@s2004.tu-chemnitz.de +smoke_upload: 1 --- pugs-6.2.10.orig/debian/patches/30cabal.dpatch +++ pugs-6.2.10/debian/patches/30cabal.dpatch @@ -0,0 +1,608 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 30cabal.dpatch by Florian Ragwitz +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix generated cabal file to make installation of the haskell interface +## DP: work + +@DPATCH@ + +diff -Nur -x debian pugs-6.2.10.orig/Makefile.PL pugs-6.2.10/Makefile.PL +--- pugs-6.2.10.orig/Makefile.PL 2005-10-10 03:09:12.000000000 +0200 ++++ pugs-6.2.10/Makefile.PL 2005-10-25 15:35:13.000000000 +0200 +@@ -365,7 +365,7 @@ + .SUFFIXES: .hsc .hs + + .hsc.hs : +- $hsc2hs $hsc2hs_flags \$< ++ \$(PERL) -MFile::Spec -e "sub p () { File::Spec->splitpath(ARGV->[0]) }; chdir((p)[1]); system(q($hsc2hs), qw($hsc2hs_flags), (p)[2]);" \$< + + .SUFFIXES: .hs-drift .hs + +diff -Nur -x debian pugs-6.2.10.orig/Pugs.cabal.in pugs-6.2.10/Pugs.cabal.in +--- pugs-6.2.10.orig/Pugs.cabal.in 2005-10-10 03:09:12.000000000 +0200 ++++ pugs-6.2.10/Pugs.cabal.in 2005-10-25 15:35:13.000000000 +0200 +@@ -20,8 +20,7 @@ + extra-libraries: __LIBS__ + extra-lib-dirs: __LIB_DIRS__ + extensions: ForeignFunctionInterface +-includes: syck.h pcre.h +-include-dirs: . src/pcre src/cbits src/perl5 src/syck src/cbits src __INCLUDE_DIRS__ ++include-dirs: __INCLUDE_DIRS__ + hs-source-dir: src + other-modules: Data.Yaml.Syck DrIFT.Binary DrIFT.JSON DrIFT.Perl5 RRegex RRegex.PCRE RRegex.Syntax System.FilePath UTF8 Unicode + ghc-options: __OPTIONS__ +diff -Nur -x debian pugs-6.2.10.orig/inc/Module/Install/Pugs.pm pugs-6.2.10/inc/Module/Install/Pugs.pm +--- pugs-6.2.10.orig/inc/Module/Install/Pugs.pm 2005-10-10 03:09:37.000000000 +0200 ++++ pugs-6.2.10/inc/Module/Install/Pugs.pm 2005-10-25 15:35:37.000000000 +0200 +@@ -162,7 +162,8 @@ + *** Please install a newer version from http://haskell.org/ghc/. + . + } +- my $ghc_flags = "-H0 -L. -Lsrc -Lsrc/syck -Lsrc/pcre -I. -Isrc -Isrc/pcre -Isrc/syck "; ++# my $ghc_flags = "-H0 -L. -Lsrc -Lsrc/syck -Lsrc/pcre -I. -Isrc -Isrc/pcre -Isrc/syck "; ++ my $ghc_flags = "-H0 "; + $ghc_flags .= " -i. -isrc -isrc/pcre -isrc/syck -static "; + $ghc_flags .= " -Wall " # -package-name Pugs -odir dist/build/src -hidir dist/build/src " + unless $self->is_extension_build; +@@ -170,7 +171,8 @@ + $ghc_flags .= " -I../../src -i../../src " + if $self->is_extension_build; + if ($ENV{PUGS_EMBED} and $ENV{PUGS_EMBED} =~ /perl5/i) { +- $ghc_flags .= " -isrc/perl5 -Isrc/perl5 "; ++# $ghc_flags .= " -isrc/perl5 -Isrc/perl5 "; ++ $ghc_flags .= " -isrc/perl5 "; + $ghc_flags .= join(' ', grep { m{^/} or m{^-[DILl]} or m{^-Wl,-R} } + split (' ', `$^X -MExtUtils::Embed -e ccopts,ldopts`)); + } +diff -Nur -x debian pugs-6.2.10.orig/src/Data/Yaml/Syck.hsc pugs-6.2.10/src/Data/Yaml/Syck.hsc +--- pugs-6.2.10.orig/src/Data/Yaml/Syck.hsc 2005-10-10 03:09:19.000000000 +0200 ++++ pugs-6.2.10/src/Data/Yaml/Syck.hsc 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fvia-C #-} +-#include ++#include "../../syck/syck.h" + + module Data.Yaml.Syck ( + parseYaml, +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/AST/Internals.hs pugs-6.2.10/src/Pugs/AST/Internals.hs +--- pugs-6.2.10.orig/src/Pugs/AST/Internals.hs 2005-10-10 03:09:20.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/AST/Internals.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -cpp -fglasgow-exts -fno-warn-orphans -funbox-strict-fields #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.AST.Internals ( + Eval, -- uses Val, Env, SIO +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/AST.hs pugs-6.2.10/src/Pugs/AST.hs +--- pugs-6.2.10.orig/src/Pugs/AST.hs 2005-10-10 03:09:20.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/AST.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -cpp -fglasgow-exts -fno-warn-orphans -funbox-strict-fields #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../UnicodeC.h" #-} + + {-| + Abstract syntax tree. +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/CodeGen/Binary.hs pugs-6.2.10/src/Pugs/CodeGen/Binary.hs +--- pugs-6.2.10.orig/src/Pugs/CodeGen/Binary.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/CodeGen/Binary.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.CodeGen.Binary (genBinary) where + import Pugs.Internals +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/CodeGen/JSON.hs pugs-6.2.10/src/Pugs/CodeGen/JSON.hs +--- pugs-6.2.10.orig/src/Pugs/CodeGen/JSON.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/CodeGen/JSON.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances -fno-warn-orphans -funbox-strict-fields -cpp #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.CodeGen.JSON (genJSON) where + import Pugs.Internals +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/CodeGen/PIL.hs pugs-6.2.10/src/Pugs/CodeGen/PIL.hs +--- pugs-6.2.10.orig/src/Pugs/CodeGen/PIL.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/CodeGen/PIL.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances -fno-warn-orphans -funbox-strict-fields -cpp #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.CodeGen.PIL (genPIL) where + import Pugs.Internals +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/CodeGen/PIR.hs pugs-6.2.10/src/Pugs/CodeGen/PIR.hs +--- pugs-6.2.10.orig/src/Pugs/CodeGen/PIR.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/CodeGen/PIR.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances -fno-warn-orphans -funbox-strict-fields -cpp #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + {-| + This module provides 'genPIR', a function which compiles the current +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/CodeGen/Perl5.hs pugs-6.2.10/src/Pugs/CodeGen/Perl5.hs +--- pugs-6.2.10.orig/src/Pugs/CodeGen/Perl5.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/CodeGen/Perl5.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances -fno-warn-orphans -funbox-strict-fields -cpp #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.CodeGen.Perl5 (genPerl5) where + import Pugs.Internals +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Compile.hs pugs-6.2.10/src/Pugs/Compile.hs +--- pugs-6.2.10.orig/src/Pugs/Compile.hs 2005-10-10 03:09:20.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Compile.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances -fno-warn-orphans -funbox-strict-fields -cpp #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../UnicodeC.h" #-} + + {-| + Compiler interface. +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Embed/Perl5.hs pugs-6.2.10/src/Pugs/Embed/Perl5.hs +--- pugs-6.2.10.orig/src/Pugs/Embed/Perl5.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Embed/Perl5.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -64,8 +64,8 @@ + + #else + +-{-# INCLUDE #-} +-{-# INCLUDE #-} ++{-# INCLUDE "../../perl5/p5embed.h" #-} ++{-# INCLUDE "../../perl5/pugsembed.h" #-} + + module Pugs.Embed.Perl5 where + import Pugs.Internals +@@ -89,41 +89,41 @@ + perl_free :: PerlInterpreter -> IO () + foreign import ccall "perl.h boot_DynaLoader" + boot_DynaLoader :: Ptr () -> IO () +-foreign import ccall "p5embed.h perl5_finalize" ++foreign import ccall "../../perl5/p5embed.h perl5_finalize" + perl5_finalize :: PerlSV -> IO () +-foreign import ccall "p5embed.h perl5_SvPV" ++foreign import ccall "../../perl5/p5embed.h perl5_SvPV" + perl5_SvPV :: PerlSV -> IO CString +-foreign import ccall "p5embed.h perl5_SvIV" ++foreign import ccall "../../perl5/p5embed.h perl5_SvIV" + perl5_SvIV :: PerlSV -> IO CInt +-foreign import ccall "p5embed.h perl5_SvNV" ++foreign import ccall "../../perl5/p5embed.h perl5_SvNV" + perl5_SvNV :: PerlSV -> IO CDouble +-foreign import ccall "p5embed.h perl5_SvTRUE" ++foreign import ccall "../../perl5/p5embed.h perl5_SvTRUE" + perl5_SvTRUE :: PerlSV -> IO Bool +-foreign import ccall "p5embed.h perl5_newSVpv" ++foreign import ccall "../../perl5/p5embed.h perl5_newSVpv" + perl5_newSVpv :: CString -> IO PerlSV +-foreign import ccall "p5embed.h perl5_newSViv" ++foreign import ccall "../../perl5/p5embed.h perl5_newSViv" + perl5_newSViv :: CInt -> IO PerlSV +-foreign import ccall "p5embed.h perl5_newSVnv" ++foreign import ccall "../../perl5/p5embed.h perl5_newSVnv" + perl5_newSVnv :: CDouble -> IO PerlSV +-foreign import ccall "p5embed.h perl5_get_sv" ++foreign import ccall "../../perl5/p5embed.h perl5_get_sv" + perl5_get_sv :: CString -> IO PerlSV +-foreign import ccall "p5embed.h perl5_apply" ++foreign import ccall "../../perl5/p5embed.h perl5_apply" + perl5_apply :: PerlSV -> PerlSV -> Ptr PerlSV -> PugsVal -> CInt -> IO (Ptr PerlSV) +-foreign import ccall "p5embed.h perl5_can" ++foreign import ccall "../../perl5/p5embed.h perl5_can" + perl5_can :: PerlSV -> CString -> IO Bool +-foreign import ccall "p5embed.h perl5_eval" ++foreign import ccall "../../perl5/p5embed.h perl5_eval" + perl5_eval :: CString -> PugsVal -> CInt -> IO PerlSV +-foreign import ccall "p5embed.h perl5_init" ++foreign import ccall "../../perl5/p5embed.h perl5_init" + perl5_init :: CInt -> Ptr CString -> IO PerlInterpreter + +-foreign import ccall "pugsembed.h pugs_getenv" ++foreign import ccall "../../perl5/pugsembed.h pugs_getenv" + pugs_getenv :: IO PugsVal +-foreign import ccall "pugsembed.h pugs_setenv" ++foreign import ccall "../../perl5/pugsembed.h pugs_setenv" + pugs_setenv :: PugsVal -> IO () + +-foreign import ccall "pugsembed.h pugs_SvToVal" ++foreign import ccall "../../perl5/pugsembed.h pugs_SvToVal" + pugs_SvToVal :: PerlSV -> IO PugsVal +-foreign import ccall "pugsembed.h pugs_MkValRef" ++foreign import ccall "../../perl5/pugsembed.h pugs_MkValRef" + pugs_MkValRef :: PugsVal -> IO PerlSV + + initPerl5 :: (Show a) => String -> Maybe a -> IO PerlInterpreter +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Embed/Perl5.hs.orig pugs-6.2.10/src/Pugs/Embed/Perl5.hs.orig +--- pugs-6.2.10.orig/src/Pugs/Embed/Perl5.hs.orig 1970-01-01 01:00:00.000000000 +0100 ++++ pugs-6.2.10/src/Pugs/Embed/Perl5.hs.orig 2005-10-25 15:35:13.000000000 +0200 +@@ -0,0 +1,203 @@ ++{-# OPTIONS_GHC -fglasgow-exts -cpp #-} ++ ++#ifndef PUGS_HAVE_PERL5 ++module Pugs.Embed.Perl5 where ++import Foreign.C.Types ++ ++type PerlInterpreter = () ++type PerlSV = () ++type PugsVal = () ++ ++constFail :: a -> IO b ++constFail = const $ fail "perl5 not embedded" ++ ++initPerl5 :: String -> Maybe a -> IO PerlInterpreter ++initPerl5 _ _ = return () ++ ++freePerl5 :: PerlInterpreter -> IO () ++freePerl5 _ = return () ++ ++evalPerl5 :: String -> PerlSV -> CInt -> IO PerlSV ++evalPerl5 _ _ = constFail ++ ++svToVStr :: PerlSV -> IO String ++svToVStr = constFail ++ ++svToVInt :: (Num a) => PerlSV -> IO a ++svToVInt = constFail ++ ++svToVNum :: (Fractional a) => PerlSV -> IO a ++svToVNum = constFail ++ ++svToVBool :: PerlSV -> IO Bool ++svToVBool = constFail ++ ++svToVal :: PerlSV -> IO a ++svToVal = constFail ++ ++mkVal :: (Show a) => a -> IO PugsVal ++mkVal = const $ return () ++ ++mkValRef :: a -> IO PerlSV ++mkValRef = const $ return () ++ ++vstrToSV :: String -> IO PerlSV ++vstrToSV = constFail ++ ++vintToSV :: (Integral a) => a -> IO PerlSV ++vintToSV = constFail ++ ++vnumToSV :: (Real a) => a -> IO PerlSV ++vnumToSV = constFail ++ ++invokePerl5 :: PerlSV -> PerlSV -> [PerlSV] -> PerlSV -> CInt -> IO [PerlSV] ++invokePerl5 _ _ _ _ = constFail ++ ++canPerl5 :: PerlSV -> String -> IO Bool ++canPerl5 _ = constFail ++ ++nullSV :: PerlSV ++nullSV = error "perl5 not embedded" ++ ++mkSV :: IO PerlSV -> IO PerlSV ++mkSV = id ++ ++#else ++ ++{-# INCLUDE #-} ++{-# INCLUDE #-} ++ ++module Pugs.Embed.Perl5 where ++import Pugs.Internals ++import Foreign ++import Foreign.C.Types ++import Foreign.C.String ++ ++type PerlInterpreter = Ptr () ++type PerlSV = Ptr () ++type PugsVal = Ptr () ++ ++foreign import ccall "perl.h perl_alloc" ++ perl_alloc :: IO PerlInterpreter ++foreign import ccall "perl.h perl_construct" ++ perl_construct :: PerlInterpreter -> IO () ++foreign import ccall "perl.h perl_run" ++ perl_run :: PerlInterpreter -> IO CInt ++foreign import ccall "perl.h perl_destruct" ++ perl_destruct :: PerlInterpreter -> IO CInt ++foreign import ccall "perl.h perl_free" ++ perl_free :: PerlInterpreter -> IO () ++foreign import ccall "perl.h boot_DynaLoader" ++ boot_DynaLoader :: Ptr () -> IO () ++foreign import ccall "p5embed.h perl5_finalize" ++ perl5_finalize :: PerlSV -> IO () ++foreign import ccall "p5embed.h perl5_SvPV" ++ perl5_SvPV :: PerlSV -> IO CString ++foreign import ccall "p5embed.h perl5_SvIV" ++ perl5_SvIV :: PerlSV -> IO CInt ++foreign import ccall "p5embed.h perl5_SvNV" ++ perl5_SvNV :: PerlSV -> IO CDouble ++foreign import ccall "p5embed.h perl5_SvTRUE" ++ perl5_SvTRUE :: PerlSV -> IO Bool ++foreign import ccall "p5embed.h perl5_newSVpv" ++ perl5_newSVpv :: CString -> IO PerlSV ++foreign import ccall "p5embed.h perl5_newSViv" ++ perl5_newSViv :: CInt -> IO PerlSV ++foreign import ccall "p5embed.h perl5_newSVnv" ++ perl5_newSVnv :: CDouble -> IO PerlSV ++foreign import ccall "p5embed.h perl5_get_sv" ++ perl5_get_sv :: CString -> IO PerlSV ++foreign import ccall "p5embed.h perl5_apply" ++ perl5_apply :: PerlSV -> PerlSV -> Ptr PerlSV -> PugsVal -> CInt -> IO (Ptr PerlSV) ++foreign import ccall "p5embed.h perl5_can" ++ perl5_can :: PerlSV -> CString -> IO Bool ++foreign import ccall "p5embed.h perl5_eval" ++ perl5_eval :: CString -> PugsVal -> CInt -> IO PerlSV ++foreign import ccall "p5embed.h perl5_init" ++ perl5_init :: CInt -> Ptr CString -> IO PerlInterpreter ++ ++foreign import ccall "pugsembed.h pugs_getenv" ++ pugs_getenv :: IO PugsVal ++foreign import ccall "pugsembed.h pugs_setenv" ++ pugs_setenv :: PugsVal -> IO () ++ ++foreign import ccall "pugsembed.h pugs_SvToVal" ++ pugs_SvToVal :: PerlSV -> IO PugsVal ++foreign import ccall "pugsembed.h pugs_MkValRef" ++ pugs_MkValRef :: PugsVal -> IO PerlSV ++ ++initPerl5 :: (Show a) => String -> Maybe a -> IO PerlInterpreter ++initPerl5 str env = do ++ withCString "-e" $ \prog -> withCString str $ \cstr -> do ++ withArray [prog, prog, cstr] $ \argv -> do ++ interp <- perl5_init 3 argv ++ case env of ++ Just val -> pugs_setenv =<< mkVal val ++ Nothing -> return () ++ return interp ++ ++mkVal :: (Show a) => a -> IO PugsVal ++mkVal val = fmap castStablePtrToPtr $ newStablePtr val ++ ++svToVStr :: PerlSV -> IO String ++svToVStr sv = peekCString =<< perl5_SvPV sv ++ ++svToVInt :: (Num a) => PerlSV -> IO a ++svToVInt sv = fmap fromIntegral $ perl5_SvIV sv ++ ++svToVNum :: (Fractional a) => PerlSV -> IO a ++svToVNum sv = fmap realToFrac $ perl5_SvNV sv ++ ++svToVBool :: PerlSV -> IO Bool ++svToVBool = perl5_SvTRUE ++ ++svToVal :: (Show a) => PerlSV -> IO a ++svToVal sv = do ++ ptr <- pugs_SvToVal sv ++ deRefStablePtr (castPtrToStablePtr ptr) ++ ++mkValRef :: a -> IO PerlSV ++mkValRef x = do ++ ptr <- fmap castStablePtrToPtr $ newStablePtr x ++ pugs_MkValRef ptr ++ ++vstrToSV :: String -> IO PerlSV ++vstrToSV str = withCString str perl5_newSVpv ++ ++vintToSV :: (Integral a) => a -> IO PerlSV ++vintToSV int = perl5_newSViv (fromIntegral int) ++ ++vnumToSV :: (Real a) => a -> IO PerlSV ++vnumToSV int = perl5_newSVnv (realToFrac int) ++ ++invokePerl5 :: PerlSV -> PerlSV -> [PerlSV] -> PugsVal -> CInt -> IO [PerlSV] ++invokePerl5 sub inv args env cxt = do ++ withArray0 nullPtr args $ \argv -> do ++ rv <- perl5_apply sub inv argv env cxt ++ peekArray0 nullPtr rv ++ ++canPerl5 :: PerlSV -> String -> IO Bool ++canPerl5 sv meth = withCString meth $ \cstr -> perl5_can sv cstr ++ ++mkSV :: IO PerlSV -> IO PerlSV ++mkSV = id ++{- ++action = do ++ sv <- action ++ addFinalizer sv (perl5_finalize sv) ++ return sv ++-} ++ ++evalPerl5 :: String -> PugsVal -> CInt -> IO PerlSV ++evalPerl5 str env cxt = mkSV $ withCString str $ \cstr -> perl5_eval cstr env cxt ++ ++freePerl5 :: PerlInterpreter -> IO () ++freePerl5 my_perl = do ++ perl_destruct my_perl ++ return () ++ ++nullSV :: PerlSV ++nullSV = nullPtr ++ ++#endif ++ +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Eval/Var.hs pugs-6.2.10/src/Pugs/Eval/Var.hs +--- pugs-6.2.10.orig/src/Pugs/Eval/Var.hs 2005-10-10 03:09:20.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Eval/Var.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -cpp #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.Eval.Var ( + findVar, findVarRef, +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Eval.hs pugs-6.2.10/src/Pugs/Eval.hs +--- pugs-6.2.10.orig/src/Pugs/Eval.hs 2005-10-10 03:09:20.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Eval.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -cpp #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../UnicodeC.h" #-} + + {-| + Evaluation and reduction engine. +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Lexer.hs pugs-6.2.10/src/Pugs/Lexer.hs +--- pugs-6.2.10.orig/src/Pugs/Lexer.hs 2005-10-10 03:09:20.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Lexer.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../UnicodeC.h" #-} + + {-| + Lexical analyzer. +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Parser/Number.hs pugs-6.2.10/src/Pugs/Parser/Number.hs +--- pugs-6.2.10.orig/src/Pugs/Parser/Number.hs 2005-10-10 03:09:20.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Parser/Number.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,4 +1,4 @@ +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.Parser.Number ( + parseNatOrRat, +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Parser.hs pugs-6.2.10/src/Pugs/Parser.hs +--- pugs-6.2.10.orig/src/Pugs/Parser.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Parser.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -cpp -fglasgow-exts -funbox-strict-fields -fno-full-laziness -fno-cse #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../UnicodeC.h" #-} + + {-| + Higher-level parser for building ASTs. +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Pretty.hs pugs-6.2.10/src/Pugs/Pretty.hs +--- pugs-6.2.10.orig/src/Pugs/Pretty.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Pretty.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../UnicodeC.h" #-} + + {-| + Pretty printing for various data structures. +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Prim/Match.hs pugs-6.2.10/src/Pugs/Prim/Match.hs +--- pugs-6.2.10.orig/src/Pugs/Prim/Match.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Prim/Match.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.Prim.Match ( + op2Match, rxSplit, rxSplit_n, matchFromMR, pkgParents +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Prim/Numeric.hs pugs-6.2.10/src/Pugs/Prim/Numeric.hs +--- pugs-6.2.10.orig/src/Pugs/Prim/Numeric.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Prim/Numeric.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.Prim.Numeric ( + op2Numeric, op1Floating, op1Round, op1Numeric, +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Prim/Yaml.hs pugs-6.2.10/src/Pugs/Prim/Yaml.hs +--- pugs-6.2.10.orig/src/Pugs/Prim/Yaml.hs 2005-10-10 03:09:21.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Prim/Yaml.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + module Pugs.Prim.Yaml ( + evalYaml +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Prim.hs pugs-6.2.10/src/Pugs/Prim.hs +--- pugs-6.2.10.orig/src/Pugs/Prim.hs 2005-10-10 03:09:19.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Prim.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans -fno-full-laziness -fno-cse #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../UnicodeC.h" #-} + + {-| + Primitive operators. +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Rule/Char.hs pugs-6.2.10/src/Pugs/Rule/Char.hs +--- pugs-6.2.10.orig/src/Pugs/Rule/Char.hs 2005-10-10 03:09:20.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Rule/Char.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + ----------------------------------------------------------------------------- + -- | +diff -Nur -x debian pugs-6.2.10.orig/src/Pugs/Rule/Token.hs pugs-6.2.10/src/Pugs/Rule/Token.hs +--- pugs-6.2.10.orig/src/Pugs/Rule/Token.hs 2005-10-10 03:09:20.000000000 +0200 ++++ pugs-6.2.10/src/Pugs/Rule/Token.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,5 +1,5 @@ + {-# OPTIONS_GHC -fglasgow-exts #-} +-{-# OPTIONS_GHC -#include "UnicodeC.h" #-} ++{-# OPTIONS_GHC -#include "../../UnicodeC.h" #-} + + ----------------------------------------------------------------------------- + -- | +diff -Nur -x debian pugs-6.2.10.orig/src/RRegex/PCRE.hs pugs-6.2.10/src/RRegex/PCRE.hs +--- pugs-6.2.10.orig/src/RRegex/PCRE.hs 2005-10-10 03:09:18.000000000 +0200 ++++ pugs-6.2.10/src/RRegex/PCRE.hs 2005-10-25 15:35:13.000000000 +0200 +@@ -1,6 +1,6 @@ + {-# OPTIONS_GHC -fglasgow-exts -fvia-C #-} ++{-# INCLUDE "../pcre/pcre.h" #-} + +-{-# INCLUDE #-} + -- \#include + -- arch-tag: 0852a460-683f-4abb-9108-8205777e2033 + +@@ -119,15 +119,15 @@ + return $ Just hs + + +-foreign import ccall unsafe "pcre.h pcre_compile" ++foreign import ccall unsafe "pcre_compile" + c_pcre_compile :: Ptr CChar -> CInt -> Ptr (Ptr CChar) -> Ptr CInt -> Ptr CChar -> IO (Ptr PCRE) +-foreign import ccall unsafe "pcre.h pcre_exec" ++foreign import ccall unsafe "pcre_exec" + c_pcre_exec :: Ptr PCRE -> Ptr () -> Ptr CChar -> CInt -> CInt -> CInt -> Ptr CInt -> CInt -> IO CInt +-foreign import ccall unsafe "pcre.h pcre_fullinfo" ++foreign import ccall unsafe "pcre_fullinfo" + c_pcre_fullinfo :: Ptr PCRE -> Ptr () -> CInt -> Ptr a -> IO CInt +-foreign import ccall unsafe "pcre.h pcre_version" ++foreign import ccall unsafe "pcre_version" + c_pcre_version :: IO (Ptr CChar) +--- foreign import ccall unsafe "pcre.h &pcre_free" ++-- foreign import ccall unsafe "&pcre_free" + -- c_ptr_free :: FunPtr (Ptr a -> IO ()) + + +diff -Nur -x debian pugs-6.2.10.orig/src/perl5/p5embed.c pugs-6.2.10/src/perl5/p5embed.c +--- pugs-6.2.10.orig/src/perl5/p5embed.c 2005-10-10 03:09:18.000000000 +0200 ++++ pugs-6.2.10/src/perl5/p5embed.c 2005-10-25 15:35:13.000000000 +0200 +@@ -1,4 +1,4 @@ +-#include ++#include "p5embed.h" + #include + #include "perlxsi.c" + #include "pugsembed.c" +diff -Nur -x debian pugs-6.2.10.orig/src/perl5/pugsembed.c pugs-6.2.10/src/perl5/pugsembed.c +--- pugs-6.2.10.orig/src/perl5/pugsembed.c 2005-10-10 03:09:18.000000000 +0200 ++++ pugs-6.2.10/src/perl5/pugsembed.c 2005-10-25 15:35:13.000000000 +0200 +@@ -1,4 +1,4 @@ +-#include ++#include "pugsembed.h" + extern int __init; + + Val * +diff -Nur -x debian pugs-6.2.10.orig/src/syck/yaml2byte.c pugs-6.2.10/src/syck/yaml2byte.c +--- pugs-6.2.10.orig/src/syck/yaml2byte.c 2005-10-10 03:09:19.000000000 +0200 ++++ pugs-6.2.10/src/syck/yaml2byte.c 2005-10-25 15:35:13.000000000 +0200 +@@ -9,7 +9,7 @@ + * WARNING WARNING WARNING --- THIS IS *NOT JUST* PLAYING + * ANYMORE! -- WHY HAS EMBRACED THIS AS THE REAL THING! + */ +-#include ++#include "syck.h" + #include + #define YAMLBYTE_UTF8 + #include "yamlbyte.h" --- pugs-6.2.10.orig/debian/patches/10smoker.dpatch +++ pugs-6.2.10/debian/patches/10smoker.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10smoker.dpatch by Florian Ragwitz +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Adjust smoker file for build + +@DPATCH@ + +dirr -Nur pugs-6.2.9.orig pugs-6.2.9 +--- pugs/util/yaml_harness.pl (revision 6794) ++++ pugs/util/yaml_harness.pl (local) +@@ -22,7 +22,7 @@ + use Test::TAP::Model; + use File::Spec; + our @ISA = qw(Test::TAP::Model); +-our $SMOKERFILE = ".smoker.yml"; ++our $SMOKERFILE = "debian/smoker.yml"; + + $| = 1; + --- pugs-6.2.10.orig/debian/patches/00list +++ pugs-6.2.10/debian/patches/00list @@ -0,0 +1,2 @@ +10smoker +30cabal --- pugs-6.2.10.orig/debian/pugs.install +++ pugs-6.2.10/debian/pugs.install @@ -0,0 +1,6 @@ +usr/share/vim/* +usr/share/man/man3/pugs::hack.3pm +usr/share/man/man3/pugs::run.3pm +usr/share/man/man3/Perl6::Pugs.3pm +usr/lib/perl6/* +usr/bin/* --- pugs-6.2.10.orig/debian/libghc6-pugs-dev.postinst +++ pugs-6.2.10/debian/libghc6-pugs-dev.postinst @@ -0,0 +1,20 @@ +#!/bin/sh + +GHC_LIBDIR=`/usr/bin/ghc6 --print-libdir` +VERSION=6.2.10 + +case "$1" in + configure) + ${GHC_LIBDIR}/bin/ghc-pkg -g --add-package < /usr/lib/haskell-packages/ghc6/lib/Pugs-${VERSION}/installed-pkg-config + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1; + ;; +esac + +#DEBHELPER# --- pugs-6.2.10.orig/debian/pugs.links +++ pugs-6.2.10/debian/pugs.links @@ -0,0 +1 @@ +usr/share/man/man3/pugs::run.3pm /usr/share/man/man1/pugs.1 --- pugs-6.2.10.orig/debian/copyright +++ pugs-6.2.10/debian/copyright @@ -0,0 +1,260 @@ +This package was debianized by Shu-Chun Weng on +Sat, 26 Mar 2005 21:57:52 +0800. + +It was downloaded from http://pugscode.org/ + +Copyright Holder: Copyright 2005, Autrijus Tang. + +License: + +This code is free software; you can redistribute it and/or modify it under +the terms of either: + + a) the GNU General Public License, version 2, or + b) the Artistic License, version 2.0beta5. + +Please see the /usr/share/common-licenses/GPL-2 and +/usr/share/common-licenses/Artistic files for the full license text. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either +the GNU General Public License or the Artistic License for more +details. + + +The code in src/Pugs/Rule (installed to usr/lib/perl6/5.8/CORE/pugs/Pugs/Rule) +is Copyright 1999-2000, Daan Leijen. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +This software is provided by the copyright holders "as is" and any express 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 copyright holders 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. + + +The code in src/RRegex (installed to usr/lib/perl6/5.8/CORE/pugs/RRegex) is +Copyright (c) 2004 John Meacham (john at repetae dot net) + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +The code in src/pcre (installed to usr/lib/perl6/5.8/CORE/pugs/pcre) is written +by Philip Hazel + +Copyright (c) 1997-2004 University of Cambridge +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS 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 COPYRIGHT OWNER OR 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. + + +The code in src/syck (installed to usr/lib/perl6/5.8/CORE/pugs/syck) is +Copyright (c) 2003 why the lucky stiff + +This software is subject to either of two licenses (BSD or D&R), which you can +choose from in your use of the code. + +BSD License +=========== + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +D&R (Death and Repudiation) License +=================================== + +This software may not be used directly by any living being. ANY use of this +software (even perfectly legitimate and non-commercial uses) until after death +is explicitly restricted. Any living being using (or attempting to use) this software +will be punished to the fullest extent of the law. + +For your protection, corpses will not be punished. We respectfully request +that you submit your uses (revisions, uses, distributions, uses, etc.) to +your children, who may vicariously perform these uses on your behalf. If +you use this software and you are found to be not dead, you will be punished +to the fullest extent of the law. + +If you are found to be a ghost or angel, you will be punished to the fullest +extent of the law. + +After your following the terms of this license, the author has vowed to repudiate +your claim, meaning that the validity of this contract will no longer be recognized. +This license will be unexpectedly revoked (at a time which is designated to be +most inconvenient) and involved heirs will be punished to the fullest extent +of the law. + +Furthermore, if any parties (related or non-related) escape the punishments +outlined herein, they will be severely punished to the fullest extent of a new +revised law that (1) expands the statement "fullest extent of the law" to encompass +an infinite duration of infinite punishments and (2) exacts said punishments +upon all parties (related or non-related). + + +The code in examples/hop6/ (installed to usr/share/doc/pugs-doc/hop6) is +Copyright 2005 Elsevier Inc. + +The full license test follows. + +About the Software + +All Software (code listings) presented in the book can be found on the +companion website for the book (http://perl.plover.com/hop/) and is +subject to the License agreements below. + + +ELSEVIER SOFTWARE LICENSE AGREEMENT + +Please read the following agreement carefully before using this +Software. This Software is licensed under the terms contained in this +Software license agreement ("agreement"). By using this Software +product, you, an individual, or entity including employees, agents and +representatives ("you" or "your"), acknowledge that you have read this +agreement, that you understand it, and that you agree to be bound by +the terms and conditions of this agreement. Elsevier inc. ("Elsevier") +expressly does not agree to license this Software product to you +unless you assent to this agreement. If you do not agree with any of +the following terms, do not use the Software. + +LIMITED WARRANTY AND LIMITATION OF LIABILITY + +YOUR USE OF THIS SOFTWARE IS AT YOUR OWN RISK. NEITHER ELSEVIER NOR +ITS LICENSORS REPRESENT OR WARRANT THAT THE SOFTWARE PRODUCT WILL MEET +YOUR REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR +ERROR-FREE. WE EXCLUDE AND EXPRESSLY DISCLAIM ALL EXPRESS AND IMPLIED +WARRANTIES NOT STATED HEREIN, INCLUDING THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN ADDITION, +NEITHER ELSEVIER NOR ITS LICENSORS MAKE ANY REPRESENTATIONS OR +WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE PERFORMANCE OF +YOUR NETWORK OR COMPUTER SYSTEM WHEN USED IN CONJUNCTION WITH THE +SOFTWARE PRODUCT. WE SHALL NOT BE LIABLE FOR ANY DAMAGE OR LOSS OF ANY +KIND ARISING OUT OF OR RESULTING FROM YOUR POSSESSION OR USE OF THE +SOFTWARE PRODUCT CAUSED BY ERRORS OR OMISSIONS, DATA LOSS OR +CORRUPTION, ERRORS OR OMISSIONS IN THE PROPRIETARY MATERIAL, +REGARDLESS OF WHETHER SUCH LIABILITY IS BASED IN TORT, CONTRACT OR +OTHERWISE AND INCLUDING, BUT NOT LIMITED TO, ACTUAL, SPECIAL, +INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES. IF THE FOREGOING +LIMITATION IS HELD TO BE UNENFORCEABLE, OUR MAXIMUM LIABILITY TO YOU +SHALL NOT EXCEED THE AMOUNT OF THE PURCHASE PRICE PAID BY YOU FOR THE +SOFTWARE PRODUCT. THE REMEDIES AVAILABLE TO YOU AGAINST US AND THE +LICENSORS OF MATERIALS INCLUDED IN THE SOFTWARE PRODUCT ARE EXCLUSIVE. + +YOU UNDERSTAND THAT ELSEVIER, ITS AFFILIATES, LICENSORS, SUPPLIERS AND +AGENTS, MAKE NO WARRANTIES, EXPRESSED OR IMPLIED, WITH RESPECT TO THE +SOFTWARE PRODUCT, INCLUDING, WITHOUT LIMITATION THE PROPRIETARY +MATERIAL, AND SPECIFICALLY DISCLAIM ANY WARRANTY OF MERCHANTABILITY OR +FITNESS FOR A PARTICULAR PURPOSE. + +IN NO EVENT WILL ELSEVIER, ITS AFFILIATES, LICENSORS, SUPPLIERS OR +AGENTS, BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, WITHOUT +LIMITATION, ANY LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR +CONSEQUENTIAL DAMAGES, ARISING OUT OF YOUR USE OR INABILITY TO USE THE +SOFTWARE PRODUCT REGARDLESS OF WHETHER SUCH DAMAGES ARE FORESEEABLE OR +WHETHER SUCH DAMAGES ARE DEEMED TO RESULT FROM THE FAILURE OR +INADEQUACY OF ANY EXCLUSIVE OR OTHER REMEDY. + +Software License Agreement + +This Software License Agreement is a legal agreement between the +Author and any person or legal entity using or accepting any Software +governed by this Agreement. The Software is available on the companion +website (http://perl.plover.com/hop/) for the Book, Higher-Order Perl, +which is published by Morgan Kaufmann Publishers. "The Software" is +comprised of all code (fragments and pseudocode) presented in the +book. + +By installing, copying, or otherwise using the Software, you agree to +be bound by the terms of this Agreement. + +The parties agree as follows: + +1. Grant of License. We grant you a nonexclusive license to use the + Software for any purpose, commercial or non-commercial, as long as + the following credit is included identifying the original source of + the Software: "from Higher-Order Perl by Mark Dominus, published by + Morgan Kaufmann Publishers, Copyright 2005 by Elsevier Inc". + +2. Disclaimer of Warranty. We make no warranties at all. The Software + is transferred to you on an "as is" basis. You use the Software at + your own peril. You assume all risk of loss for all claims or + controversies, now existing or hereafter, arising out of use of the + Software. We shall have no liability based on a claim that your use + or combination of the Software with products or data not supplied + by us infringes any patent, copyright, or proprietary right. All + other warranties, expressed or implied, including, without + limitation, any warranty of merchantability or fitness for a + particular purpose are hereby excluded. + +3. Limitation of Liability. We will have no liability for special, + incidental, or consequential damages even if advised of the + possibility of such damages. We will not be liable for any other + damages or loss in any way connected with the Software. --- pugs-6.2.10.orig/debian/libghc6-pugs-dev.install +++ pugs-6.2.10/debian/libghc6-pugs-dev.install @@ -0,0 +1 @@ +lib/Pugs-6.2.10 usr/lib/haskell-packages/ghc6/lib --- pugs-6.2.10.orig/debian/rules +++ pugs-6.2.10/debian/rules @@ -0,0 +1,115 @@ +#!/usr/bin/make -f + +include /usr/share/dpatch/dpatch.make + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS = unoptimized +else + CFLAGS = optimized +endif + +PUGS_BUILD_OPTS = $(DEB_BUILD_OPTIONS) + +TESTS='smoke-pugs' + +configure: configure-stamp +configure-stamp: patch-stamp + dh_testdir + PUGS_EMBED=perl5 perl Makefile.PL INSTALLDIRS=vendor DESTDIR=/usr/lib/haskell-packages/ghc6/ + touch configure-stamp + +build: build-arch build-indep + +build-arch: build-arch-stamp +build-arch-stamp: configure-stamp + $(MAKE) $(CFLAGS) + -test $$SKIP_TESTS || $(MAKE) $(TESTS) + # use DEB_BUILD_OPTIONS="smoke_upload=0" to avoid uploading the smoke file automatically. Doesn't work: Upload manyally + -for html in $(CURDIR)/smoke*.html; do \ + ./util/smokeserv/smokeserv-client.pl $$html; \ + done + pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" $(CURDIR)/script/pugscc $(CURDIR)/debian/pugscc.1 + touch build-arch-stamp + +build-indep: build-indep-stamp +build-indep-stamp: configure-stamp + touch build-indep-stamp + +clean: clean1 unpatch +clean1: + dh_testdir + dh_testroot + rm -f build-arch-stamp build-indep-stamp configure-stamp install-stamp + -$(MAKE) realclean + rm -f debian/pugscc.1 src/Pugs/CodeGen/PIR/Prelude.hi src/Pugs/CodeGen/PIR/Prelude.o ext/Test-Builder/destroy_test.p6 smoke*.html config.yml tests.yml src/gen_prelude.hi src/gen_prelude.o src/Main.hi src/Main.o + find -name Makefile.old -exec rm -f {} \; + dh_clean + +install: install-indep install-arch +install-stamp: + dh_testdir + dh_testroot + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + -rm -rf $(CURDIR)/debian/tmp/usr/share/perl6/5.8/FA/t/ + find $(CURDIR) -exec chmod u+rw {} \; + dh_installdirs + dh_install --sourcedir=$(CURDIR)/debian/tmp --list-missing + touch install-stamp + +install-indep: install-stamp + dh_testdir + dh_testroot + cp $(CURDIR)/debian/pugs-modules.lintian-overrides $(CURDIR)/debian/pugs-modules/usr/share/lintian/overrides/pugs-modules + cp -r $(CURDIR)/docs/* $(CURDIR)/debian/pugs-doc/usr/share/doc/pugs-doc/ + cp util/perl6.vim $(CURDIR)/debian/pugs/usr/share/vim/vim63/syntax/ + rm -f $(CURDIR)/debian/pugs-doc/usr/share/doc/pugs-doc/SEEALSO + +install-arch: install-stamp + dh_testdir + dh_testroot + cp .installed-pkg-config $(CURDIR)/debian/libghc6-pugs-dev/usr/lib/haskell-packages/ghc6/lib/Pugs-6.2.10/installed-pkg-config + rm -f $(CURDIR)/debian/pugs/usr/lib/perl6/5.8/CORE/pugs/gen_prelude \ + $(CURDIR)/debian/pugs/usr/lib/perl6/5.8/CORE/pugs/Pugs/Rule/LICENSE \ + $(CURDIR)/debian/pugs/usr/lib/perl6/5.8/CORE/pugs/RRegex/LICENSE \ + $(CURDIR)/debian/pugs/usr/lib/perl6/5.8/CORE/pugs/pcre/LICENCE \ + $(CURDIR)/debian/pugs/usr/lib/perl6/5.8/CORE/pugs/syck/COPYING + rmdir --ignore-fail-on-non-empty $(CURDIR)/debian/pugs/usr/lib/perl6/5.8/ + +# Build architecture independant packages using the common target. +binary-indep: build-indep install-indep + dh_testdir -i + dh_testroot -i + dh_installchangelogs -i ChangeLog + dh_installdocs -i + dh_installexamples -i examples/* + rm -f $(CURDIR)/debian/pugs-doc/usr/share/doc/pugs-doc/examples/hop6/LICENSE.txt + find $(CURDIR)/debian/pugs-doc/ -type f -size 0 -exec rm -f {} \; + dh_installman -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture dependant packages using the common target. +binary-arch: build-arch install-arch + dh_testdir -a + dh_testroot -a + dh_installchangelogs -a ChangeLog + dh_installdocs -a + dh_installman -a debian/pugscc.1 + dh_link -a + dh_compress -a + dh_fixperms -a + dh_strip -a + dh_makeshlibs -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-arch binary-indep +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure patch unpatch clean1 --- pugs-6.2.10.orig/debian/changelog +++ pugs-6.2.10/debian/changelog @@ -0,0 +1,52 @@ +pugs (6.2.10-4.1) unstable; urgency=medium + + * Non-maintainer upload. + * Replace the Depends on pugs with a Recommends on pugs to break the + circular dependency between pugs and pugs-modules. (Closes: #340022) + * Make libghc6-pugs-dev installable again (Closes: #381816): + - Update debian/libghc6-pugs-dev.{postinst,prerm} to not depend on a + specific ghc6 version. + - Update the Build-Depends and Depends for ghc6 6.4.2. + + -- Arjan Oosting Tue, 15 Aug 2006 08:52:19 +0200 + +pugs (6.2.10-4) unstable; urgency=low + + * Renamed 30includedirs.dpatch to 30cabal.dpatch and added some more changes + that should make installing libghc6-pugs-dev finally work. + * Removed libghc6-plugins-dev build-dep. It isn't in sid yet anyway. + + -- Florian Ragwitz Tue, 25 Oct 2005 15:38:48 +0200 + +pugs (6.2.10-3) unstable; urgency=low + + * Adjusted ghc version in libghc6-pugs-dev postinst/prerm. + + -- Florian Ragwitz Sun, 23 Oct 2005 12:12:22 +0200 + +pugs (6.2.10-2) unstable; urgency=low + + * Recompile against ghc 6.4.1. + * Added build-dep to libghc6-plugins-dev to enable haskell eval support. + + -- Florian Ragwitz Sun, 16 Oct 2005 16:59:24 +0200 + +pugs (6.2.10-1) unstable; urgency=low + + * New upstream release. + * Build-Depend on libyaml-perl, libtest-tap-model-perl, + libtest-tap-htmlmatrix-perl, libcompress-bzip2-perl. They are needed for + smoking. + * Use smoke-pugs instead of a simple Harness test. + * Removed environment hook for not sending smoke results from debian/rules. + PUGS_BUILD_OPTS can handle that now. + * Suggest perl and spidermonkey-bin needed by -BJS and -BPerl5. + + -- Florian Ragwitz Sat, 8 Oct 2005 15:33:45 +0200 + +pugs (6.2.9-1) unstable; urgency=low + + * Initial release (Closes: #297871). + + -- Florian Ragwitz Wed, 3 Aug 2005 14:34:17 +0200 + --- pugs-6.2.10.orig/debian/pugs-doc.dirs +++ pugs-6.2.10/debian/pugs-doc.dirs @@ -0,0 +1 @@ +usr/share/doc/pugs-doc/ --- pugs-6.2.10.orig/debian/control +++ pugs-6.2.10/debian/control @@ -0,0 +1,53 @@ +Source: pugs +Section: interpreters +Priority: optional +Maintainer: Florian Ragwitz +Build-Depends: debhelper (>= 4.0.0), dpatch, ghc6 (>= 6.4.2) | ghc-cvs (>= 20050331-1), perl, libperl-dev, libwww-perl, libyaml-perl, libtest-tap-model-perl, libtest-tap-htmlmatrix-perl, libcompress-bzip2-perl +Standards-Version: 3.6.2 + +Package: pugs +Architecture: any +Depends: ${shlibs:Depends}, pugs-modules (>= ${Source-Version}) +Suggests: pugs-doc, perl, spidermonkey-bin +Description: Perl 6 Implementation + Pugs is an implementation of Perl 6, written in Haskell. It aims to implement + the full Perl 6 specification, as detailed in the Synopses at + http://dev.perl.org/perl6/synopsis/ + . + Homepage: http://pugscode.org/ + +Package: pugs-doc +Architecture: all +Description: Pugs documentation + Pugs is an implementation of Perl 6, written in Haskell. It aims to implement + the full Perl 6 specification, as detailed in the Synopses at + http://dev.perl.org/perl6/synopsis/ + . + Homepage: http://pugscode.org/ + . + This package contains various documentation for pugs. + +Package: pugs-modules +Architecture: all +Recommends: pugs (>= ${Source-Version}) +Description: Pugs core modules + Pugs is an implementation of Perl 6, written in Haskell. It aims to implement + the full Perl 6 specification, as detailed in the Synopses at + http://dev.perl.org/perl6/synopsis/ + . + Homepage: http://pugscode.org/ + . + This package contains architecture independent pugs modules. + +Package: libghc6-pugs-dev +Architecture: any +Depends: ghc6 (>= 6.4.2), ghc6 (<< 6.4.2-999), perl +Description: Pugs haskell interface + Pugs is an implementation of Perl 6, written in Haskell. It aims to implement + the full Perl 6 specification, as detailed in the Synopses at + http://dev.perl.org/perl6/synopsis/ + . + Homepage: http://pugscode.org/ + . + This package contains everything necessary to use pugs directly from haskell + code. --- pugs-6.2.10.orig/debian/pugs.dirs +++ pugs-6.2.10/debian/pugs.dirs @@ -0,0 +1 @@ +usr/share/vim/vim63/syntax/ --- pugs-6.2.10.orig/debian/compat +++ pugs-6.2.10/debian/compat @@ -0,0 +1 @@ +4 --- pugs-6.2.10.orig/debian/libghc6-pugs-dev.prerm +++ pugs-6.2.10/debian/libghc6-pugs-dev.prerm @@ -0,0 +1,21 @@ +#!/bin/sh + +GHC_LIBDIR=`/usr/bin/ghc6 --print-libdir` +VERSION=6.2.10 + +case "$1" in + remove|upgrade|deconfigure) + ${GHC_LIBDIR}/bin/ghc-pkg -r Pugs + rm -vf /usr/lib/haskell-packages/ghc6/lib/Pugs-${VERSION}/HSPugs-${VERSION}.o + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER#