Skip to content

Commit

Permalink
Patch to make hugs build with Apple's gcc-3.3.
Browse files Browse the repository at this point in the history
Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@3912 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Gregory Wright committed Nov 7, 2003
1 parent ce807b8 commit f28e058
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lang/hugs/Portfile
@@ -1,4 +1,4 @@
# $Id: Portfile,v 1.3 2003/08/05 09:29:15 jkh Exp $
# $Id: Portfile,v 1.4 2003/11/07 16:18:52 gwright Exp $

PortSystem 1.0
name hugs98
Expand All @@ -18,7 +18,7 @@ master_sites http://cvs.haskell.org/Hugs/downloads/Nov2002/

checksums md5 8d3951d991661045713b612bf539c8c9

patchfiles patch-MkInstal.in
patchfiles patch-MkInstal.in patch-convert_libraries

depends_lib lib:libreadline.4:readline

Expand Down
38 changes: 38 additions & 0 deletions lang/hugs/files/patch-convert_libraries
@@ -0,0 +1,38 @@
--- src/unix/convert_libraries.sav Fri Nov 7 11:01:47 2003
+++ src/unix/convert_libraries Fri Nov 7 11:11:23 2003
@@ -59,7 +59,7 @@

case "$2" in
*.lhs|*.hs)
- $cpp $includes $src/$1/$2 | cat -s >$dst/$2
+ $cpp $includes $src/$1/$2 | sed -n '/^#pragma/!p' | cat -s >$dst/$2
;;
*.hsc)
# with a hack to extract the -#include directives
@@ -95,7 +95,7 @@
hs_file="`dirname $src/$1/$2`/$outname"
if [ -f "$hs_file" ]
then
- $cpp "$hs_file" | cat -s >$target
+ $cpp "$hs_file" | sed -n '/^#pragma/!p' | cat -s >$target
else
tmpdir=/tmp/cvt.$$
mkdir $tmpdir
@@ -104,7 +104,7 @@
cd $tmpdir
happy $inname
)
- $cpp $tmpdir/$outname | cat -s >$target
+ $cpp $tmpdir/$outname | sed -n '/^#pragma/!p' | cat -s >$target
rm -r $tmpdir
fi
;;
@@ -216,7 +216,7 @@
esac

echo "Converting $2"
- $cpp $hs_src/$1/$2 >$compat/$2
+ $cpp $hs_src/$1/$2 | sed -n '/^#pragma/!p' >$compat/$2
}

# Modules to convert

0 comments on commit f28e058

Please sign in to comment.