Hi,
Based on an idea from dcoppa@ for databases/hs-redis, I'd like to
move almost all Haskell distfiles fetched from hackage.haskell.org
into a common subdirectory `ghc', and also move the ghc distfiles
there (from ghc-${MODGHC_VER}).
The reason is that especially on hackage a lot of Haskell packages
have very generic names; often, they're far too generich (like
redis, gio, cairo, pango, ...) and sooner or later they will conflict
with distfiles from other ports.
The diff below touches lang/ghc, databases/hs-redis (it can use the
ghc DIST_SUBDIR, too) and devel/cpphs, which is an exception from
the DIST_SUBDIR rule, because it's also build on non-ghc platforms.
I'm not showing the remaining 122 ports needing a distinfo update
together with this diff, because those are just boring ;-)
To save some bandwidth (and diskspace), you may run something like the
shell script below this mail to move distfiles into the proper location
instead of having to refetch them all.
Comments? Objections?
Ciao,
Kili
#!/bin/sh
set -e
cd $(cd /usr/ports/lang/ghc && make show=DISTDIR)
mv ghc-7.0.3 ghc
exec <<- EOF
ConfigFile-1.0.6 Crypto-4.2.1 FindBin-0.0.5 GLUT-2.1.2.1
HDBC-2.2.6.1 HDBC-mysql-0.6.3 HDBC-postgresql-2.2.3.2
HDBC-sqlite3-2.3.1.0 HTTP-4000.1.1 HUnit-1.2.2.3 HaXml-1.13.3
HsParrot-0.0.2 HsSyck-0.50 List-0.4.0 ListLike-1.0.1
MetaObject-0.0.6 MissingH-1.1.0.3 MonadCatchIO-mtl-0.3.0.2
MonadCatchIO-transformers-0.2.2.0 Monadius-0.93 OpenGL-2.2.3.0
PSQueue-1.1 Pugs-6.2.13.15 QuickCheck-2.4.0.1 SDL-0.6.2
SDL-image-0.6.1 SDL-mixer-0.6.1 Shu-thing-1.1.2 X11-1.5.0.0
X11-xft-0.3 Yampa-0.9.2.3 alex-2.3.5 asn1-data-0.4.6
atom-1.0.8 attoparsec-0.8.1.0 attoparsec-enumerator-0.2.0.3
attoparsec-iteratee-0.1.1 base64-bytestring-0.1.0.1
binary-0.5.0.2 blaze-builder-0.2.1.4
blaze-builder-enumerator-0.2.0.2 bluetile-0.5.3
bytestring-nums-0.3.2 bytestring-show-0.3.4 c2hs-0.16.3
cabal-install-0.10.2 cairo-0.12.0 cereal-0.3.0.0 certificate-0.7.0
cgi-3001.1.7.4 cmdargs-0.6.9 control-timeout-0.1.2
convertible-1.0.9.1 crypto-api-0.6.1 cryptocipher-0.2.8
cryptohash-0.7.0 cuboid-0.12 darcs-2.5.2 data-default-0.2
dataenc-0.13.0.4 deepseq-1.1.0.2 directory-tree-0.2.0
dlist-0.5 enumerator-0.4.9.1 failure-0.1.0.1 fgl-5.4.2.3
ghc-paths-0.1.0.8 gio-0.12.0 glade-0.12.0 glib-0.12.0
gtk-0.12.0 gtk2hs-buildtools-0.12.0 haddock-2.9.2 happy-1.18.6
hashed-storage-0.5.4 haskell-src-1.0.1.4 haskell-src-exts-1.9.6
hasktags-0.68.1 heist-0.2.4 hexpat-0.19.5 hlint-1.8.3
hood-0.2 hoogle-4.2.1 hothasktags-0.2.0 hpodder-1.1.5
hs-redis/redis-0.10.1 hscolour-1.17 hslogger-1.1.0 html-1.0.1.2
iteratee-0.3.5 language-c-0.3.2.1 largeword-1.0.0 libmpd-0.6.0
mmap-0.5.6 monads-fd-0.1.0.1 monads-tf-0.1.0.0 mtl-2.0.1.0
murmur-hash-0.1.0.2 network-2.3.0.2 network-enumerator-0.1.2
pango-0.12.0 parallel-3.1.0.1 parsec-3.1.1 pb-0.1.0
primitive-0.3.1 pugs-DrIFT-2.2.3.1 pugs-compat-0.0.6.1
readline-1.0.1.0 redis-0.10.1 regex-base-0.93.2 regex-compat-0.93.1
regex-pcre-builtin-0.94.2.1.7.7 regex-posix-0.94.4 safe-0.3
sendfile-0.7.2 snap-core-0.2.16 snap-server-0.2.16.2
stm-2.2.0.1 stringtable-atom-0.0.6.1 syb-0.3 tagged-0.1.1
tagsoup-0.12 tar-0.3.1.0 text-0.11.0.6 tls-0.6.0
transformers-0.2.2.0 uniplate-1.6 unix-compat-0.2 vector-0.7.0.1
vector-algorithms-0.3.4 wai-0.3.0 warp-0.3.0
xhtml-combinators-0.2.2 xml-1.3.7 xmobar-0.11.1 xmonad-0.9.2
xmonad-contrib-0.9.2 zlib-0.5.3.1 zlib-bindings-0.0.0
EOF
while read l; do
set -- $l
for p; do
if [ -f $p.tar.gz ]; then
mv $p.tar.gz ghc/.
fi
done
done
Index: lang/ghc/Makefile
===================================================================
RCS file: /cvs/ports/lang/ghc/Makefile,v
retrieving revision 1.53
diff -u -p -r1.53 Makefile
--- lang/ghc/Makefile 23 Apr 2011 12:52:36 -0000 1.53
+++ lang/ghc/Makefile 23 Apr 2011 15:43:19 -0000
@@ -44,7 +44,7 @@ MASTER_SITES = ${HOMEPAGE}dist/${MODGHC
${HOMEPAGE}dist/stable/dist/
MASTER_SITES0 = http://openbsd.dead-parrot.de/distfiles/
-DIST_SUBDIR = ghc-${MODGHC_VER}
+DIST_SUBDIR = ghc
VMEM_WARNING = Yes
Index: lang/ghc/ghc.port.mk
===================================================================
RCS file: /cvs/ports/lang/ghc/ghc.port.mk,v
retrieving revision 1.21
diff -u -p -r1.21 ghc.port.mk
--- lang/ghc/ghc.port.mk 20 Apr 2011 18:17:27 -0000 1.21
+++ lang/ghc/ghc.port.mk 23 Apr 2011 15:43:19 -0000
@@ -42,6 +42,7 @@ MODGHC_HACKAGE_VERSION = ${DISTNAME:C,.*
HOMEPAGE ?=
http://hackage.haskell.org/package/${MODGHC_HACKAGE_NAME}
MASTER_SITES =
http://hackage.haskell.org/packages/archive/${MODGHC_HACKAGE_NAME}/${MODGHC_HACKAGE_VERSION}/
SUBST_VARS += DISTNAME MODGHC_HACKAGE_VERSION
+DIST_SUBDIR ?= ghc
. endif
. if ${MODGHC_BUILD:L:Mcabal}
Index: databases/hs-redis/Makefile
===================================================================
RCS file: /cvs/ports/databases/hs-redis/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- databases/hs-redis/Makefile 23 Apr 2011 14:32:50 -0000 1.3
+++ databases/hs-redis/Makefile 23 Apr 2011 15:43:19 -0000
@@ -23,7 +23,4 @@ RUN_DEPENDS += devel/hs-MonadCatchIO-mt
devel/hs-network
BUILD_DEPENDS += ${RUN_DEPENDS}
-# avoid possible conflict with the databases/redis distfile
-DIST_SUBDIR = hs-redis
-
.include <bsd.port.mk>
Index: databases/hs-redis/distinfo
===================================================================
RCS file: /cvs/ports/databases/hs-redis/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- databases/hs-redis/distinfo 25 Mar 2011 10:05:12 -0000 1.1.1.1
+++ databases/hs-redis/distinfo 23 Apr 2011 15:43:19 -0000
@@ -1,5 +1,5 @@
-MD5 (hs-redis/redis-0.10.1.tar.gz) = OS1pRWalncCancagt62McQ==
-RMD160 (hs-redis/redis-0.10.1.tar.gz) = B/egLYCfkM6DiYwyXF0f/Vy9njc=
-SHA1 (hs-redis/redis-0.10.1.tar.gz) = q65rp3F49UTTP6wOKNpSYFuevmU=
-SHA256 (hs-redis/redis-0.10.1.tar.gz) =
DGokQsxfPVRNOhT3R4phI5Vi1uu9dq4Vhc+ginukAyQ=
-SIZE (hs-redis/redis-0.10.1.tar.gz) = 32032
+MD5 (ghc/redis-0.10.1.tar.gz) = OS1pRWalncCancagt62McQ==
+RMD160 (ghc/redis-0.10.1.tar.gz) = B/egLYCfkM6DiYwyXF0f/Vy9njc=
+SHA1 (ghc/redis-0.10.1.tar.gz) = q65rp3F49UTTP6wOKNpSYFuevmU=
+SHA256 (ghc/redis-0.10.1.tar.gz) = DGokQsxfPVRNOhT3R4phI5Vi1uu9dq4Vhc+ginukAyQ=
+SIZE (ghc/redis-0.10.1.tar.gz) = 32032
Index: devel/cpphs/Makefile
===================================================================
RCS file: /cvs/ports/devel/cpphs/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- devel/cpphs/Makefile 11 Apr 2011 14:47:55 -0000 1.25
+++ devel/cpphs/Makefile 23 Apr 2011 15:43:19 -0000
@@ -34,6 +34,7 @@ LIB_DEPENDS-main = ${LIB_DEPENDS} devel/
RUN_DEPENDS-main =
LIB_DEPENDS-lib =
WANTLIB-lib =
+DIST_SUBDIR =
.else
MASTER_SITES =
http://hackage.haskell.org/packages/archive/cpphs/${DISTNAME:S/cpphs-//}/
# NHC: use the good old makefile for now (though it *should* be possible