debian/0000755000000000000000000000000012060444517007171 5ustar debian/libmodpbase64-0.install0000644000000000000000000000002212060437611013340 0ustar usr/lib/*/*.so.0* debian/libmodpbase64-dev.install0000644000000000000000000000006112060437611013762 0ustar usr/include/* usr/lib/*/pkgconfig usr/lib/*/*.so debian/rules0000755000000000000000000000026312060437611010247 0ustar #!/usr/bin/make -f %: dh $@ --with autoreconf override_dh_installdocs: dh_installdocs --link-doc=libmodpbase64-0 override_dh_strip: dh_strip --dbg-package=libmodpbase64-dbg debian/patches/0000755000000000000000000000000012060437611010615 5ustar debian/patches/02-pkgconfig.patch0000644000000000000000000000246712060437611014035 0ustar Title: pkgconfig support DEP: 3 Last-Update: 2012-10-25 Author: Lennart Weller Forwarded: not-needed Abstract: Allow for easier development with stringencoder libraries by supplying a pkg-config file diff --git a/Makefile.am b/Makefile.am index 215cca3..00e865c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,6 +13,9 @@ SOURCES = \ lib_LTLIBRARIES = libmodpbase64.la libmodpbase64_la_SOURCES = ${SOURCES} +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = stringencoders.pc + libmodpbase64_la_DEPENDENCIES = \ modp_b2_data.h modp_b2_gen \ modp_b16_data.h modp_b16_gen \ diff --git a/configure.ac b/configure.ac index 769470c..d475a1c 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,6 @@ fi CFLAGS="$EXTRACFLAGS $CFLAGS" CXXFLAGS="$CFLAGS" AC_SUBST(B64WCHARS) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile stringencoders.pc]) AC_PROG_MAKE_SET AC_OUTPUT diff --git a/stringencoders.pc.in b/stringencoders.pc.in new file mode 100644 index 0000000..1572bc2 --- /dev/null +++ b/stringencoders.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: stringencoders +Description: collection of high performance c-string transformations +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lmodpbase64 +Cflags: -I${includedir} debian/patches/01-ignore-warnings.patch0000644000000000000000000000117712060437611015173 0ustar Title: Avoid compiler stop for warning DEP: 3 Last-Update: 2012-10-25 Author: Lennart Weller Forwarded: not-needed Abstract: The current release fails to compile with a single warning of an unused variable in a test. diff --git a/configure.ac b/configure.ac index 769470c..4455c70 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ B64WCHARS="-_." AC_ARG_WITH([b64wchars], AC_HELP_STRING([--with-b64wchars=3CHARS],[change b64 web extra chars, default is '-_.']), [B64WCHARS=$withval], []) -EXTRACFLAGS="-Isrc -Wall -Werror" +EXTRACFLAGS="-Isrc -Wall" if test "x$enable_gcov" = "xyes"; then debian/patches/03-endianness.patch0000644000000000000000000001126712060437611014214 0ustar Title: Fix compile error on some platforms DEP: 3 Last-Update: 2012-12-06 Forwarded: http://code.google.com/p/stringencoders/issues/detail?id=32 Abstract: stringencoders fails to build from source on some platforms, including armel, powerpc and s390 because of bad casting from -1 to 255 in the testsuite. This patch fixes this, testing 255 instead of -1 on values that were originally initialized as 255. Author: Roland Stigge --- test/modp_b64_test.c | 18 +++++++++--------- test/modp_b85_test.c | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) --- stringencoders-3.10.3.orig/test/modp_b64_test.c +++ stringencoders-3.10.3/test/modp_b64_test.c @@ -16,7 +16,7 @@ static char* testEndian() { // this test that "1" is "AAAB" char buf[100]; - char result[10]; + unsigned char result[10]; char endian[] = {(char)0, (char)0, (char)1}; int d = modp_b64_encode(buf, endian, 3); mu_assert_int_equals(4, d); @@ -31,7 +31,7 @@ static char* testEndian() mu_assert_int_equals(0, result[0]); mu_assert_int_equals(0, result[1]); mu_assert_int_equals(1, result[2]); - mu_assert_int_equals(-1, result[3]); + mu_assert_int_equals(255, result[3]); return 0; } @@ -70,7 +70,7 @@ static char* testPadding() char msg[100]; const char ibuf[6] = {1,1,1,1,1,1}; char obuf[10]; - char rbuf[10]; + unsigned char rbuf[10]; int d = 0; // 1 in, 4 out @@ -83,7 +83,7 @@ static char* testPadding() d = modp_b64_decode(rbuf, obuf, d); mu_assert_int_equals_msg(msg, 1, d); mu_assert_int_equals(1, rbuf[0]); - mu_assert_int_equals(-1, rbuf[1]); + mu_assert_int_equals(255, rbuf[1]); // 2 in, 4 out memset(obuf, 255, sizeof(obuf)); @@ -96,7 +96,7 @@ static char* testPadding() mu_assert_int_equals_msg(msg, 2, d); mu_assert_int_equals_msg(msg, 1, rbuf[0]); mu_assert_int_equals_msg(msg, 1, rbuf[1]); - mu_assert_int_equals_msg(msg, -1, rbuf[2]); + mu_assert_int_equals_msg(msg, 255, rbuf[2]); // 3 in, 4 out memset(obuf, 255, sizeof(obuf)); @@ -110,7 +110,7 @@ static char* testPadding() mu_assert_int_equals_msg(msg, 1, rbuf[0]); mu_assert_int_equals_msg(msg, 1, rbuf[1]); mu_assert_int_equals_msg(msg, 1, rbuf[2]); - mu_assert_int_equals_msg(msg, -1, rbuf[3]); + mu_assert_int_equals_msg(msg, 255, rbuf[3]); // 4 in, 8 out memset(obuf, 255, sizeof(obuf)); @@ -125,7 +125,7 @@ static char* testPadding() mu_assert_int_equals(1, rbuf[1]); mu_assert_int_equals(1, rbuf[2]); mu_assert_int_equals(1, rbuf[3]); - mu_assert_int_equals(-1, rbuf[4]); + mu_assert_int_equals(255, rbuf[4]); // 5 in, 8 out memset(obuf, 255, sizeof(obuf)); @@ -141,7 +141,7 @@ static char* testPadding() mu_assert_int_equals(1, rbuf[2]); mu_assert_int_equals(1, rbuf[3]); mu_assert_int_equals(1, rbuf[4]); - mu_assert_int_equals(-1, rbuf[5]); + mu_assert_int_equals(255, rbuf[5]); // 6 in, 8 out memset(obuf, 255, sizeof(obuf)); @@ -158,7 +158,7 @@ static char* testPadding() mu_assert_int_equals(1, rbuf[3]); mu_assert_int_equals(1, rbuf[4]); mu_assert_int_equals(1, rbuf[5]); - mu_assert_int_equals(-1, rbuf[6]); + mu_assert_int_equals(255, rbuf[6]); return 0; } --- stringencoders-3.10.3.orig/test/modp_b85_test.c +++ stringencoders-3.10.3/test/modp_b85_test.c @@ -16,7 +16,7 @@ static char* testEndian() { // this test that "1" is "!!!!#" char buf[100]; - char result[10]; + unsigned char result[10]; char endian[] = {(char)0, (char)0, (char)0, (char)1}; int d = modp_b85_encode(buf, endian, 4); mu_assert_int_equals(5, d); @@ -33,7 +33,7 @@ static char* testEndian() mu_assert_int_equals(0, result[1]); mu_assert_int_equals(0, result[2]); mu_assert_int_equals(1, result[3]); - mu_assert_int_equals(-1, result[4]); + mu_assert_int_equals(255, result[4]); return 0; } @@ -83,9 +83,9 @@ static char* testBadCharDecode() static char* testEncodeDecode() { - char ibuf[10]; /* input */ - char obuf[10]; /* output */ - char rbuf[10]; /* final result */ + unsigned char ibuf[10]; /* input */ + unsigned char obuf[10]; /* output */ + unsigned char rbuf[10]; /* final result */ int d; int i,j,k,l; for (i = 0; i < 256; ++i) { @@ -107,7 +107,7 @@ static char* testEncodeDecode() mu_assert_int_equals(ibuf[1], rbuf[1]); mu_assert_int_equals(ibuf[2], rbuf[2]); mu_assert_int_equals(ibuf[3], rbuf[3]); - mu_assert_int_equals(-1, rbuf[4]); + mu_assert_int_equals(255, rbuf[4]); } } } debian/patches/series0000644000000000000000000000010012060437611012021 0ustar 01-ignore-warnings.patch 02-pkgconfig.patch 03-endianness.patch debian/control0000644000000000000000000000341512060437611010574 0ustar Source: stringencoders Section: libs Priority: extra Maintainer: Lennart Weller Uploaders: Sebastian Reichel Standards-Version: 3.9.4 Vcs-git: git://anonscm.debian.org/collab-maint/stringencoders.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/stringencoders.git Homepage: http://code.google.com/p/stringencoders/ Build-Depends: debhelper (>= 9), dh-autoreconf (>= 4) Package: libmodpbase64-0 Architecture: any Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same Depends: ${misc:Depends}, ${shlibs:Depends} Description: collection of high performance c-string transformations This implementation is frequently 2x faster than standard implementations. The transformations include base64, base16, base85, base2, url and javascript escaping, as well as fast number to string and upper/lower case conversions. Package: libmodpbase64-dev Section: libdevel Architecture: any Depends: libmodpbase64-0 (= ${binary:Version}), ${misc:Depends} Description: collection of high performance c-string transformations (development files) This implementation is frequently 2x faster than standard implementations. The transformations include base64, base16, base85, base2, url and javascript escaping, as well as fast number to string and upper/lower case conversions. . Development files Package: libmodpbase64-dbg Section: debug Architecture: any Depends: libmodpbase64-0 (= ${binary:Version}), ${misc:Depends} Description: debugging symbols for stringencoders This implementation is frequently 2x faster than standard implementations. The transformations include base64, base16, base85, base2, url and javascript escaping, as well as fast number to string and upper/lower case conversions. . Debugging symbols debian/libmodpbase64-0.symbols0000644000000000000000000000161512060437611013373 0ustar libmodpbase64.so.0 libmodpbase64-0 #MINVER# modp_b16_decode@Base 3.10.3 modp_b16_encode@Base 3.10.3 modp_b2_decode@Base 3.10.3 modp_b2_encode@Base 3.10.3 modp_b64_decode@Base 3.10.3 modp_b64_encode@Base 3.10.3 modp_b64w_decode@Base 3.10.3 modp_b64w_encode@Base 3.10.3 modp_b85_decode@Base 3.10.3 modp_b85_encode@Base 3.10.3 modp_bjavascript_encode@Base 3.10.3 modp_bjavascript_encode_strlen@Base 3.10.3 modp_burl_decode@Base 3.10.3 modp_burl_encode@Base 3.10.3 modp_burl_encode_strlen@Base 3.10.3 modp_burl_min_encode@Base 3.10.3 modp_burl_min_encode_strlen@Base 3.10.3 modp_dtoa2@Base 3.10.3 modp_dtoa@Base 3.10.3 modp_itoa10@Base 3.10.3 modp_litoa10@Base 3.10.3 modp_tolower@Base 3.10.3 modp_tolower_copy@Base 3.10.3 modp_toprint@Base 3.10.3 modp_toprint_copy@Base 3.10.3 modp_toupper@Base 3.10.3 modp_toupper_copy@Base 3.10.3 modp_uitoa10@Base 3.10.3 modp_ulitoa10@Base 3.10.3 debian/changelog0000644000000000000000000000054012060437611011037 0ustar stringencoders (3.10.3-2) unstable; urgency=low * Fix for build from source errors on some architectures. (Closes: #695024) -- Lennart Weller Thu, 06 Dec 2012 21:38:27 +0100 stringencoders (3.10.3-1) unstable; urgency=low * Initial release. (Closes: #593462) -- Lennart Weller Thu, 25 Oct 2012 16:53:44 +0200 debian/watch0000644000000000000000000000022312060437611010214 0ustar version=3 http://code.google.com/p/stringencoders/downloads/list?can=1 .*/stringencoders-v(\d[-\d\.]*)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))|zip) debian/copyright0000644000000000000000000000345312060437611011126 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: stringencoders Source: http://code.google.com/p/stringencoders/ Files: src/* Copyright: Copyright 2007-2010 Nick Galbreath License: BSD-3-clause Files: debian/* Copyright: Copyright 2012 Lennart Weller License: BSD-3-clause License: BSD-3-clause All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . Neither the name of the modp.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/compat0000644000000000000000000000000212060437611010364 0ustar 9 debian/source/0000755000000000000000000000000012060437611010466 5ustar debian/source/format0000644000000000000000000000001412060437611011674 0ustar 3.0 (quilt)