diff -Nru haskell-bindings-libzip-0.1.0.2/Bindings/LibZip.hsc haskell-bindings-libzip-0.10/Bindings/LibZip.hsc --- haskell-bindings-libzip-0.1.0.2/Bindings/LibZip.hsc 2011-02-16 17:25:21.000000000 +0000 +++ haskell-bindings-libzip-0.10/Bindings/LibZip.hsc 2012-02-11 01:28:46.000000000 +0000 @@ -1,8 +1,8 @@ #include #include --- | This module provides automatic low-level bindings to @libzip@ library. --- See also: +-- | This module provides automatic low-level bindings to @libzip@ +-- library, version 0.10. See also: -- -- * @libzip@ documention: and @zip.h@ -- @@ -14,6 +14,7 @@ -- * -- + module Bindings.LibZip where #strict_import @@ -34,10 +35,16 @@ #num ZIP_FL_COMPRESSED #num ZIP_FL_UNCHANGED #num ZIP_FL_RECOMPRESS +#num ZIP_FL_ENCRYPTED -- archive global flags flags #num ZIP_AFL_TORRENT +#num ZIP_AFL_RDONLY + +-- flags for compression and encryption sources + +#num ZIP_CODEC_ENCODE -- libzip error codes @@ -65,6 +72,10 @@ #num ZIP_ER_INCONS #num ZIP_ER_REMOVE #num ZIP_ER_DELETED +#num ZIP_ER_ENCRNOTSUPP +#num ZIP_ER_RDONLY +#num ZIP_ER_NOPASSWD +#num ZIP_ER_WRONGPASSWD -- type of system error value @@ -106,140 +117,106 @@ #num ZIP_SOURCE_ERROR #num ZIP_SOURCE_FREE --- typedef ssize_t (*zip_source_callback)(void *state, void *data, --- size_t len, enum zip_source_cmd cmd); -#callback zip_source_callback , Ptr () -> Ptr () -> CSize -> -> IO CSize +-- typedef zip_int64_t (*zip_source_callback)(void *, void *, zip_uint64_t, enum zip_source_cmd); +#callback zip_source_callback , Ptr () -> Ptr () -> CULLong -> -> IO CULLong + +#num ZIP_SOURCE_ERR_LOWER + +#num ZIP_STAT_NAME +#num ZIP_STAT_INDEX +#num ZIP_STAT_SIZE +#num ZIP_STAT_COMP_SIZE +#num ZIP_STAT_MTIME +#num ZIP_STAT_CRC +#num ZIP_STAT_COMP_METHOD +#num ZIP_STAT_ENCRYPTION_METHOD +#num ZIP_STAT_FLAGS #opaque_t time_t +-- struct zip_stat { +-- zip_uint64_t valid; /* which fields have valid values */ +-- const char *name; /* name of the file */ +-- zip_uint64_t index; /* index within archive */ +-- zip_uint64_t size; /* size of file (uncompressed) */ +-- zip_uint64_t comp_size; /* size of file (compressed) */ +-- time_t mtime; /* modification time */ +-- zip_uint32_t crc; /* crc of file data */ +-- zip_uint16_t comp_method; /* compression method used */ +-- zip_uint16_t encryption_method; /* encryption method used */ +-- zip_uint32_t flags; /* reserved for future use */ +-- }; #starttype struct zip_stat +#field valid, CULLong #field name, Ptr CChar -#field index, CInt -#field crc, CUInt +#field index, CULLong +#field size, CULLong +#field comp_size, CULLong #field mtime, CTime -#field size, CSize -#field comp_size, CSize +#field crc, CUInt #field comp_method, CUShort #field encryption_method, CUShort +#field flags, CUInt #stoptype --- int zip_add(struct zip *, const char *, struct zip_source *); -#ccall zip_add , Ptr -> CString -> Ptr -> IO CInt - --- int zip_add_dir(struct zip *, const char *); -#ccall zip_add_dir , Ptr -> CString -> IO CInt - --- int zip_close(struct zip *); -#ccall zip_close , Ptr -> IO CInt - --- int zip_delete(struct zip *, int); -#ccall zip_delete , Ptr -> CInt -> IO CInt - --- void zip_error_clear(struct zip *); +-- make every declaration one-line, and replace +-- ZIP_EXTERN -> +-- const char * -> CString +-- char * -> Ptr CChar +-- struct foo * -> Ptr -- with regexps +-- FILE -> CFile +-- int -> CInt +-- zip_int64_t -> CLLong +-- zip_uint64_t -> CULLong +-- void -> () +-- zip_source_callback -> +-- foo * -> Ptr foo -- with regexps +-- regexp-replace "\(.*\)\(zip_[a-z0-9_]+\)(\(.*\));" "#ccall \2 , \3 -> IO (\1)" + +#ccall zip_add , Ptr -> CString -> Ptr -> IO (CLLong) +#ccall zip_add_dir , Ptr -> CString -> IO (CLLong) +#ccall zip_close , Ptr -> IO (CInt) +#ccall zip_delete , Ptr -> CULLong -> IO (CInt) #ccall zip_error_clear , Ptr -> IO () - --- void zip_error_get(struct zip *, int *, int *); #ccall zip_error_get , Ptr -> Ptr CInt -> Ptr CInt -> IO () - --- int zip_error_get_sys_type(int); -#ccall zip_error_get_sys_type , CInt -> IO CInt - --- int zip_error_to_str(char *, size_t, int, int); -#ccall zip_error_to_str , Ptr Char -> CSize -> CInt -> CInt -> IO CInt - --- int zip_fclose(struct zip_file *); -#ccall zip_fclose , Ptr -> IO CInt - --- void zip_file_error_clear(struct zip_file *); +#ccall zip_error_get_sys_type , CInt -> IO (CInt) +#ccall zip_error_to_str , Ptr CChar -> CULLong -> CInt -> CInt -> IO (CInt) +#ccall zip_fclose , Ptr -> IO (CInt) +#ccall zip_fdopen , CInt -> CInt -> Ptr CInt -> IO (Ptr ) #ccall zip_file_error_clear , Ptr -> IO () - --- void zip_file_error_get(struct zip_file *, int *, int *); #ccall zip_file_error_get , Ptr -> Ptr CInt -> Ptr CInt -> IO () - --- const char *zip_file_strerror(struct zip_file *); -#ccall zip_file_strerror , Ptr -> IO CString - --- struct zip_file *zip_fopen(struct zip *, const char *, int); +#ccall zip_file_strerror , Ptr -> IO (CString) #ccall zip_fopen , Ptr -> CString -> CInt -> IO (Ptr ) - --- struct zip_file *zip_fopen_index(struct zip *, int, int); -#ccall zip_fopen_index , Ptr -> CInt -> CInt -> IO (Ptr ) - --- ssize_t zip_fread(struct zip_file *, void *, size_t); -#ccall zip_fread , Ptr -> Ptr () -> CSize -> IO CSize - --- const char *zip_get_archive_comment(struct zip *, int *, int); -#ccall zip_get_archive_comment , Ptr -> Ptr CInt -> CInt -> IO CString - --- int zip_get_archive_flag(struct zip *, int, int); -#ccall zip_get_archive_flag , Ptr -> CInt -> CInt -> IO CInt - --- const char *zip_get_file_comment(struct zip *, int, int *, int); -#ccall zip_get_file_comment , Ptr -> CInt -> Ptr CInt -> CInt -> IO CString - --- const char *zip_get_name(struct zip *, int, int); -#ccall zip_get_name , Ptr -> CInt -> CInt -> IO CString - --- int zip_get_num_files(struct zip *); -#ccall zip_get_num_files , Ptr -> IO CInt - --- int zip_name_locate(struct zip *, const char *, int); -#ccall zip_name_locate , Ptr -> CString -> CInt -> IO CInt - --- struct zip *zip_open(const char *, int, int *); +#ccall zip_fopen_encrypted , Ptr -> CString -> CInt -> CString -> IO (Ptr ) +#ccall zip_fopen_index , Ptr -> CULLong -> CInt -> IO (Ptr ) +#ccall zip_fopen_index_encrypted , Ptr -> CULLong -> CInt -> CString -> IO (Ptr ) +#ccall zip_fread , Ptr -> Ptr () -> CULLong -> IO (CLLong) +#ccall zip_get_archive_comment , Ptr -> Ptr CInt -> CInt -> IO (CString) +#ccall zip_get_archive_flag , Ptr -> CInt -> CInt -> IO (CInt) +#ccall zip_get_file_comment , Ptr -> CULLong -> Ptr CInt -> CInt -> IO (CString) +#ccall zip_get_file_extra , Ptr -> CULLong -> Ptr CInt -> CInt -> IO (CString) +#ccall zip_get_name , Ptr -> CULLong -> CInt -> IO (CString) +#ccall zip_get_num_entries , Ptr -> CInt -> IO (CULLong) +#ccall zip_get_num_files , Ptr -> IO (CInt) +#ccall zip_name_locate , Ptr -> CString -> CInt -> IO (CInt) #ccall zip_open , CString -> CInt -> Ptr CInt -> IO (Ptr ) - --- int zip_rename(struct zip *, int, const char *); -#ccall zip_rename , Ptr -> CInt -> CString -> IO CInt - --- int zip_replace(struct zip *, int, struct zip_source *); -#ccall zip_replace , Ptr -> CInt -> Ptr -> IO CInt - --- int zip_set_archive_comment(struct zip *, const char *, int); -#ccall zip_set_archive_comment , Ptr -> CString -> CInt -> IO CInt - --- int zip_set_archive_flag(struct zip *, int, int); -#ccall zip_set_archive_flag , Ptr -> CInt -> CInt -> IO CInt - --- int zip_set_file_comment(struct zip *, int, const char *, int); -#ccall zip_set_file_comment , Ptr -> CInt -> CString -> CInt -> IO CInt - --- struct zip_source *zip_source_buffer(struct zip *, const void *, off_t, int); -#ccall zip_source_buffer , Ptr -> Ptr () -> CSize -> CInt -> IO (Ptr ) - --- struct zip_source *zip_source_file(struct zip *, const char *, off_t, off_t); -#ccall zip_source_file , Ptr -> CString -> CSize -> CSize -> IO (Ptr ) - --- struct zip_source *zip_source_filep(struct zip *, FILE *, off_t, off_t); -#ccall zip_source_filep , Ptr -> Ptr CFile -> CSize -> CSize -> IO (Ptr ) - --- void zip_source_free(struct zip_source *); +#ccall zip_rename , Ptr -> CULLong -> CString -> IO (CInt) +#ccall zip_replace , Ptr -> CULLong -> Ptr -> IO (CInt) +#ccall zip_set_archive_comment , Ptr -> CString -> CInt -> IO (CInt) +#ccall zip_set_archive_flag , Ptr -> CInt -> CInt -> IO (CInt) +#ccall zip_set_default_password , Ptr -> CString -> IO (CInt) +#ccall zip_set_file_comment , Ptr -> CULLong -> CString -> CInt -> IO (CInt) +#ccall zip_set_file_extra , Ptr -> CULLong -> CString -> CInt -> IO (CInt) +#ccall zip_source_buffer , Ptr -> Ptr () -> CULLong -> CInt -> IO (Ptr ) +#ccall zip_source_file , Ptr -> CString -> CULLong -> CLLong -> IO (Ptr ) +#ccall zip_source_filep , Ptr -> Ptr CFile -> CULLong -> CLLong -> IO (Ptr ) #ccall zip_source_free , Ptr -> IO () - --- struct zip_source *zip_source_function(struct zip *, zip_source_callback, void *); #ccall zip_source_function , Ptr -> -> Ptr () -> IO (Ptr ) - --- struct zip_source *zip_source_zip(struct zip *, struct zip *, int, int, off_t, off_t); -#ccall zip_source_zip , Ptr -> Ptr -> CInt -> CInt -> CSize -> CSize -> IO (Ptr ) - --- int zip_stat(struct zip *, const char *, int, struct zip_stat *); -#ccall zip_stat , Ptr -> CString -> CInt -> Ptr -> IO CInt - --- int zip_stat_index(struct zip *, int, int, struct zip_stat *); -#ccall zip_stat_index , Ptr -> CInt -> CInt -> Ptr -> IO CInt - --- void zip_stat_init(struct zip_stat *); +#ccall zip_source_zip , Ptr -> Ptr -> CULLong -> CInt -> CULLong -> CLLong -> IO (Ptr ) +#ccall zip_stat , Ptr -> CString -> CInt -> Ptr -> IO (CInt) +#ccall zip_stat_index , Ptr -> CULLong -> CInt -> Ptr -> IO (CInt) #ccall zip_stat_init , Ptr -> IO () - --- const char *zip_strerror(struct zip *); -#ccall zip_strerror , Ptr -> IO CString - --- int zip_unchange(struct zip *, int); -#ccall zip_unchange , Ptr -> CInt -> IO CInt - --- int zip_unchange_all(struct zip *); -#ccall zip_unchange_all , Ptr -> IO CInt - --- int zip_unchange_archive(struct zip *); -#ccall zip_unchange_archive , Ptr -> IO CInt - +#ccall zip_strerror , Ptr -> IO (CString) +#ccall zip_unchange , Ptr -> CULLong -> IO (CInt) +#ccall zip_unchange_all , Ptr -> IO (CInt) +#ccall zip_unchange_archive , Ptr -> IO (CInt) diff -Nru haskell-bindings-libzip-0.1.0.2/bindings-libzip.cabal haskell-bindings-libzip-0.10/bindings-libzip.cabal --- haskell-bindings-libzip-0.1.0.2/bindings-libzip.cabal 2011-02-16 17:25:21.000000000 +0000 +++ haskell-bindings-libzip-0.10/bindings-libzip.cabal 2012-02-11 01:28:46.000000000 +0000 @@ -1,8 +1,8 @@ Name: bindings-libzip -Version: 0.1.0.2 +Version: 0.10 Synopsis: Low level bindings to libzip. Description: - This package provides low-level bindings to libzip library. + This package provides low-level bindings to libzip (v0.10) library. For higher-level interface please use LibZip package: @@ -16,7 +16,7 @@ Build-type: Simple Cabal-version: >=1.2.3 -Tested-with: GHC == 6.12.1, GHC == 7.0.1 +Tested-with: GHC == 7.0.3, GHC == 7.2.2, GHC == 7.4.1 Flag NoPkgConfig Description: Do not use pkg-config to check for library dependencies. @@ -30,15 +30,15 @@ Bindings.LibZip Build-Depends: - base >= 4.0 && < 4.4 + base >= 4.0 && < 4.6 , bindings-DSL >= 1.0 && < 1.1 if flag(NoPkgConfig) Includes: zip.h Extra-Libraries: zip z else - PkgConfig-Depends: libzip >= 0.9 + PkgConfig-Depends: libzip == 0.10 GHC-Options: - -Wall + -Wall -fno-warn-unused-imports diff -Nru haskell-bindings-libzip-0.1.0.2/debian/changelog haskell-bindings-libzip-0.10/debian/changelog --- haskell-bindings-libzip-0.1.0.2/debian/changelog 2012-03-16 18:41:20.000000000 +0000 +++ haskell-bindings-libzip-0.10/debian/changelog 2012-02-23 18:03:05.000000000 +0000 @@ -1,16 +1,8 @@ -haskell-bindings-libzip (0.1.0.2-2ubuntu1) precise; urgency=low +haskell-bindings-libzip (0.10-1) unstable; urgency=low - * Extend compatible versions of 'base' library in cabal file to work with - GHC 7.4. Should be fixed in the new upstream which we cannot yet sync due - to the requirement for libzip 0.10. + * New upstream version. - -- Iain Lane Fri, 16 Mar 2012 18:39:27 +0000 - -haskell-bindings-libzip (0.1.0.2-2build1) precise; urgency=low - - * Rebuild for new GHC ABIs. - - -- Colin Watson Fri, 04 Nov 2011 09:38:06 -0400 + -- Clint Adams Thu, 23 Feb 2012 13:02:52 -0500 haskell-bindings-libzip (0.1.0.2-2) unstable; urgency=low diff -Nru haskell-bindings-libzip-0.1.0.2/debian/control haskell-bindings-libzip-0.10/debian/control --- haskell-bindings-libzip-0.1.0.2/debian/control 2011-10-17 06:37:09.000000000 +0000 +++ haskell-bindings-libzip-0.10/debian/control 2012-02-23 18:03:33.000000000 +0000 @@ -9,7 +9,6 @@ , ghc , ghc-prof , libghc-bindings-dsl-dev (>= 1.0) - , libghc-bindings-dsl-dev (<< 1.1) , libzip-dev , pkg-config Build-Depends-Indep: ghc-doc diff -Nru haskell-bindings-libzip-0.1.0.2/debian/patches/extend-base-range haskell-bindings-libzip-0.10/debian/patches/extend-base-range --- haskell-bindings-libzip-0.1.0.2/debian/patches/extend-base-range 2012-03-16 18:39:08.000000000 +0000 +++ haskell-bindings-libzip-0.10/debian/patches/extend-base-range 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -Description: Extend support base version range to work with GHC 7.4 -Forwarded: not-needed -Author: Iain Lane - ---- haskell-bindings-libzip-0.1.0.2.orig/bindings-libzip.cabal -+++ haskell-bindings-libzip-0.1.0.2/bindings-libzip.cabal -@@ -30,7 +30,7 @@ Library - Bindings.LibZip - - Build-Depends: -- base >= 4.0 && < 4.4 -+ base >= 4.0 && < 4.6 - , bindings-DSL >= 1.0 && < 1.1 - - if flag(NoPkgConfig) diff -Nru haskell-bindings-libzip-0.1.0.2/debian/patches/series haskell-bindings-libzip-0.10/debian/patches/series --- haskell-bindings-libzip-0.1.0.2/debian/patches/series 2012-03-16 18:38:20.000000000 +0000 +++ haskell-bindings-libzip-0.10/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -extend-base-range