Commit bda5a441 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Ben Gamari

Revert "patch-tool: Fix update-patches' treatment of .cabal changes"

This reverts commit 2816dff8.
parent b72ddd83
commit f0e35c783b2d29604a7c5fd8687087dab05d78ca
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Sat Mar 16 08:12:15 2019 -0400
Adapt to base-4.13.0.0
diff --git a/src/Diagrams/Backend/CmdLine.hs b/src/Diagrams/Backend/CmdLine.hs
index 1daead1..b9ae842 100644
index 1b57a26..230785f 100644
--- a/src/Diagrams/Backend/CmdLine.hs
+++ b/src/Diagrams/Backend/CmdLine.hs
@@ -83,6 +83,7 @@ import Options.Applicative
......@@ -10,7 +16,7 @@ index 1daead1..b9ae842 100644
import Data.Active hiding (interval)
import Data.Char (isDigit)
@@ -303,7 +304,7 @@ instance Parseable (AlphaColour Double) where
@@ -304,7 +305,7 @@ instance Parseable (AlphaColour Double) where
-- example, @\"0xfc4\"@ is the same as @\"0xffcc44\"@. When eight or six
-- digits are given each pair of digits is a color or alpha channel with the
-- order being red, green, blue, alpha.
......
diff --git a/Text/Regex/Posix/Wrap.hsc b/Text/Regex/Posix/Wrap.hsc
index a43bcc3..ce7c4ca 100644
--- a/Text/Regex/Posix/Wrap.hsc
+++ b/Text/Regex/Posix/Wrap.hsc
@@ -123,6 +123,7 @@ module Text.Regex.Posix.Wrap(
diff -ru regex-posix-0.95.2.orig/Text/Regex/Posix/Wrap.hsc regex-posix-0.95.2/Text/Regex/Posix/Wrap.hsc
--- regex-posix-0.95.2.orig/Text/Regex/Posix/Wrap.hsc 2012-05-20 12:35:49.000000000 -0400
+++ regex-posix-0.95.2/Text/Regex/Posix/Wrap.hsc 2019-03-15 11:14:06.871373192 -0400
@@ -123,6 +123,7 @@
#endif
import Control.Monad(liftM)
......@@ -10,7 +9,7 @@ index a43bcc3..ce7c4ca 100644
import Data.Array(Array,listArray)
import Data.Bits(Bits(..))
import Data.Int(Int32,Int64) -- need whatever RegeOffset or #regoff_t type will be
@@ -319,7 +320,7 @@ wrapCount :: Regex -> CString
@@ -319,7 +320,7 @@
(=~) :: (RegexMaker Regex CompOption ExecOption source,RegexContext Regex source1 target)
=> source1 -> source -> target
......@@ -19,7 +18,7 @@ index a43bcc3..ce7c4ca 100644
=> source1 -> source -> m target
instance RegexOptions Regex CompOption ExecOption where
@@ -335,7 +336,7 @@ instance RegexOptions Regex CompOption ExecOption where
@@ -335,7 +336,7 @@
make = makeRegex
in match (make r) x
......
......@@ -3,8 +3,8 @@
# patch-tool: A tool for maintaining the head.hackage patchset
set -e
top=$(realpath $(dirname $0)/..)
patches_dir=$top/patches
patches_dir=$(realpath $(dirname $0)/../patches)
split_pkg_version() {
package=$(echo $1 | sed 's/\(.\+\)-\([0-9]\+\(\.[0-9]\+\)*\)/\1/')
......@@ -95,23 +95,9 @@ unpack_pkg() {
update_patches() {
for p in packages/*; do
local patch_path=$patches_dir/$(basename $p)
local has_cabal_changes=
if ! ( cd $p; git diff --quiet *.cabal ); then
has_cabal_changes=1
# There are cabal file changes
cp $p/*.cabal $patch_path.cabal
git -C $top add $patch_path.cabal
fi
# Drop the cabal file changes from the patch
( cd $p; git checkout upstream -- *.cabal )
# Update and stage the patch
git -C $p diff upstream > $patch_path.patch
git -C $top add $patch_path.patch
# Restore the user's changes
if [[ -n "$has_cabal_changes" ]]; then
cp $patch_path.cabal $p/*.cabal
fi
local patch_path=$patches_dir/$(basename $p).patch
git -C $p diff upstream > $patch_path
git -C $patches_dir add $patch_path
done
git -C $patches_dir status .
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment