[DHG_packages] 05/09: argon2: add joey's patches
Sean Whitton
spw-guest at moszumanska.debian.org
Mon Sep 26 03:50:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
spw-guest pushed a commit to branch master
in repository DHG_packages.
commit ee3725d844c15e3b1fdee37679561df96cfb312a
Author: Sean Whitton <spwhitton at spwhitton.name>
Date: Sun Sep 25 20:31:34 2016 -0700
argon2: add joey's patches
---
...d-additional-C-source-files-to-cabal-file.patch | 50 ++++++++++++++++++
.../add-use-system-library-build-flag.patch | 59 ++++++++++++++++++++++
p/haskell-argon2/debian/patches/series | 2 +
3 files changed, 111 insertions(+)
diff --git a/p/haskell-argon2/debian/patches/add-additional-C-source-files-to-cabal-file.patch b/p/haskell-argon2/debian/patches/add-additional-C-source-files-to-cabal-file.patch
new file mode 100644
index 0000000..a72fd45
--- /dev/null
+++ b/p/haskell-argon2/debian/patches/add-additional-C-source-files-to-cabal-file.patch
@@ -0,0 +1,50 @@
+Description: add additional C source files to cabal file
+ Fixes https://github.com/ocharles/argon2/issues/2
+ .
+ Note that three header files were added via extra-source-files, not via
+ c-sources. This was necessary to get the build to work, otherwise cabal
+ tries to compile those three files and fails.
+Author: Joey Hess <joeyh at joeyh.name>
+Date: Mon, 15 Aug 2016 15:14:38 -0400
+Forwarded: https://github.com/ocharles/argon2/pull/4
+
+---
+ argon2.cabal | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/argon2.cabal b/argon2.cabal
+index 2878589..38f1bfc 100644
+--- a/argon2.cabal
++++ b/argon2.cabal
+@@ -12,6 +12,9 @@ maintainer: ollie at ocharles.org.uk
+ build-type: Simple
+ extra-source-files: Changelog.md
+ cabal-version: >=1.10
++extra-source-files: phc-winner-argon2/src/blake2/blake2.h
++ phc-winner-argon2/src/blake2/blake2-impl.h
++ phc-winner-argon2/src/blake2/blamka-round-ref.h
+
+ library
+ exposed-modules: Crypto.Argon2.FFI
+@@ -20,14 +23,19 @@ library
+ hs-source-dirs: src
+ default-language: Haskell2010
+ c-sources: phc-winner-argon2/src/argon2.c
++ phc-winner-argon2/src/argon2.h
+ phc-winner-argon2/src/core.c
+ phc-winner-argon2/src/blake2/blake2b.c
+ phc-winner-argon2/src/thread.c
+ phc-winner-argon2/src/ref.c
+ phc-winner-argon2/src/encoding.c
++ phc-winner-argon2/src/encoding.h
++ phc-winner-argon2/src/core.h
++ phc-winner-argon2/src/thread.h
++ phc-winner-argon2/src/ref.h
+ include-dirs: phc-winner-argon2/src
+
+ test-suite tests
+ type: exitcode-stdio-1.0
+ main-is: Tests.hs
+- build-depends: argon2, base >= 4.8 && <4.9, QuickCheck >= 2.0, tasty-quickcheck, tasty, bytestring, text
+\ No newline at end of file
++ build-depends: argon2, base >= 4.8 && <4.9, QuickCheck >= 2.0, tasty-quickcheck, tasty, bytestring, text
diff --git a/p/haskell-argon2/debian/patches/add-use-system-library-build-flag.patch b/p/haskell-argon2/debian/patches/add-use-system-library-build-flag.patch
new file mode 100644
index 0000000..b04bd43
--- /dev/null
+++ b/p/haskell-argon2/debian/patches/add-use-system-library-build-flag.patch
@@ -0,0 +1,59 @@
+Description: add use-system-library build flag
+ Useful for things like linux distributions that want to avoid duplication
+ of libraries to ease security maintenance.
+Author: Joey Hess <joeyh at joeyh.name>
+Date: Mon, 15 Aug 2016 15:22:07 -0400
+Forwarded: https://github.com/ocharles/argon2/pull/4
+
+---
+ argon2.cabal | 31 +++++++++++++++++++------------
+ 1 file changed, 19 insertions(+), 12 deletions(-)
+
+diff --git a/argon2.cabal b/argon2.cabal
+index 38f1bfc..31cbf72 100644
+--- a/argon2.cabal
++++ b/argon2.cabal
+@@ -16,24 +16,31 @@ extra-source-files: phc-winner-argon2/src/blake2/blake2.h
+ phc-winner-argon2/src/blake2/blake2-impl.h
+ phc-winner-argon2/src/blake2/blamka-round-ref.h
+
++flag use-system-library
++ description: Link against system libargon2 library rather than embedded copy
++ default: False
++
+ library
+ exposed-modules: Crypto.Argon2.FFI
+ Crypto.Argon2
+ build-depends: base >=4.8 && <4.9, bytestring, text, transformers
+ hs-source-dirs: src
+ default-language: Haskell2010
+- c-sources: phc-winner-argon2/src/argon2.c
+- phc-winner-argon2/src/argon2.h
+- phc-winner-argon2/src/core.c
+- phc-winner-argon2/src/blake2/blake2b.c
+- phc-winner-argon2/src/thread.c
+- phc-winner-argon2/src/ref.c
+- phc-winner-argon2/src/encoding.c
+- phc-winner-argon2/src/encoding.h
+- phc-winner-argon2/src/core.h
+- phc-winner-argon2/src/thread.h
+- phc-winner-argon2/src/ref.h
+- include-dirs: phc-winner-argon2/src
++ if flag(use-system-library)
++ extra-libraries: argon2
++ else
++ c-sources: phc-winner-argon2/src/argon2.c
++ phc-winner-argon2/src/argon2.h
++ phc-winner-argon2/src/core.c
++ phc-winner-argon2/src/blake2/blake2b.c
++ phc-winner-argon2/src/thread.c
++ phc-winner-argon2/src/ref.c
++ phc-winner-argon2/src/encoding.c
++ phc-winner-argon2/src/encoding.h
++ phc-winner-argon2/src/core.h
++ phc-winner-argon2/src/thread.h
++ phc-winner-argon2/src/ref.h
++ include-dirs: phc-winner-argon2/src
+
+ test-suite tests
+ type: exitcode-stdio-1.0
diff --git a/p/haskell-argon2/debian/patches/series b/p/haskell-argon2/debian/patches/series
new file mode 100644
index 0000000..dbed01d
--- /dev/null
+++ b/p/haskell-argon2/debian/patches/series
@@ -0,0 +1,2 @@
+add-additional-C-source-files-to-cabal-file.patch
+add-use-system-library-build-flag.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git
More information about the Pkg-haskell-commits
mailing list