summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-03 12:10:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-03 12:10:01 -0400
commit3a456e16a86b7e8415180eb3cf263a088b753022 (patch)
treedb4f7c59b325443636c51554953814789f796e09
parent14fa5be33c1641e3212c45c7810e460b667f59b6 (diff)
switch to new URI version by default, -DWITH_OLD_URI for old
-rw-r--r--Makefile1
-rw-r--r--Utility/Url.hs6
-rwxr-xr-xdebian/rules4
-rw-r--r--git-annex.cabal1
4 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 701b7ff87..1a385265b 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ BASEFLAGS=-Wall -outputdir $(GIT_ANNEX_TMP_BUILD_DIR) -IUtility
# you can turn off some of these features.
#
# If you're using an old version of yesod, enable -DWITH_OLD_YESOD
+# Or with an old version of the uri library, enable -DWITH_OLD_URI
FEATURES?=$(GIT_ANNEX_LOCAL_FEATURES) -DWITH_ASSISTANT -DWITH_S3 -DWITH_WEBAPP -DWITH_PAIRING -DWITH_XMPP -DWITH_DNS
bins=git-annex
diff --git a/Utility/Url.hs b/Utility/Url.hs
index 2f5cb27c2..4e152159a 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -119,10 +119,10 @@ request url headers requesttype = go 5 url
Nothing -> return rsp
Just newURI -> go n newURI_abs
where
-#ifdef URI_24
- newURI_abs = newURI `relativeTo` u
-#else
+#ifdef WITH_OLD_URI
newURI_abs = fromMaybe newURI (newURI `relativeTo` u)
+#else
+ newURI_abs = newURI `relativeTo` u
#endif
addheaders req = setHeaders req (rqHeaders req ++ userheaders)
userheaders = rights $ map parseHeader headers
diff --git a/debian/rules b/debian/rules
index 4a5532027..090e739c7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,9 +2,9 @@
ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifeq (install ok installed,$(shell dpkg-query -W -f '$${Status}' libghc-yesod-dev 2>/dev/null))
-export FEATURES=-DWITH_ASSISTANT -DWITH_S3 -DWITH_OLD_YESOD -DWITH_WEBAPP -DWITH_PAIRING -DWITH_XMPP
+export FEATURES=-DWITH_ASSISTANT -DWITH_S3 -DWITH_OLD_URI -DWITH_OLD_YESOD -DWITH_WEBAPP -DWITH_PAIRING -DWITH_XMPP
else
-export FEATURES=-DWITH_ASSISTANT -DWITH_S3 -DWITH_PAIRING -DWITH_XMPP
+export FEATURES=-DWITH_ASSISTANT -DWITH_S3 -DWITH_OLD_URI -DWITH_PAIRING -DWITH_XMPP
endif
%:
diff --git a/git-annex.cabal b/git-annex.cabal
index 7f0374a50..ea6a78a04 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -64,7 +64,6 @@ Executable git-annex
C-Sources: Utility/libdiskfree.c Utility/libmounts.c
Extensions: CPP
GHC-Options: -threaded
- CPP-Options: -DURI_24
if flag(S3)
Build-Depends: hS3