Permalink
Browse files

bundle libqrencode

  • Loading branch information...
1 parent 02d3d38 commit d8818d701ab159aa9ae23bb6e302e884b9b364f9 @tokuhirom tokuhirom committed Jan 14, 2011
Showing with 55,398 additions and 85 deletions.
  1. +1 −0 .gitignore
  2. +11 −5 META.yml
  3. +4 −80 Makefile.PL
  4. +356 −0 src/QRCode.c
  5. 0 { → src}/QRCode.xs
  6. +235 −0 src/bitstream.c
  7. +38 −0 src/bitstream.h
  8. +9 −0 src/config.h
  9. +296 −0 src/mask.c
  10. +30 −0 src/mask.h
  11. +634 −0 src/qrencode.c
  12. +426 −0 src/qrencode.h
  13. +81 −0 src/qrencode_inner.h
  14. +1,329 −0 src/qrinput.c
  15. +103 −0 src/qrinput.h
  16. +540 −0 src/qrspec.c
  17. +171 −0 src/qrspec.h
  18. +304 −0 src/rscode.c
  19. +42 −0 src/rscode.h
  20. +297 −0 src/split.c
  21. +47 −0 src/split.h
  22. +510 −0 vendor/qrencode-3.1.1/COPYING
  23. +458 −0 vendor/qrencode-3.1.1/ChangeLog
  24. +1,252 −0 vendor/qrencode-3.1.1/Doxyfile
  25. +36 −0 vendor/qrencode-3.1.1/Makefile.am
  26. +1,061 −0 vendor/qrencode-3.1.1/Makefile.in
  27. +160 −0 vendor/qrencode-3.1.1/NEWS
  28. +115 −0 vendor/qrencode-3.1.1/README
  29. +12 −0 vendor/qrencode-3.1.1/TODO
  30. 0 vendor/qrencode-3.1.1/acinclude.m4
  31. +9,292 −0 vendor/qrencode-3.1.1/aclocal.m4
  32. +30 −0 vendor/qrencode-3.1.1/autogen.sh
  33. +235 −0 vendor/qrencode-3.1.1/bitstream.c
  34. +38 −0 vendor/qrencode-3.1.1/bitstream.h
  35. +78 −0 vendor/qrencode-3.1.1/config.h.in
  36. +14,206 −0 vendor/qrencode-3.1.1/configure
  37. +102 −0 vendor/qrencode-3.1.1/configure.ac
  38. +9 −0 vendor/qrencode-3.1.1/libqrencode.pc.in
  39. +296 −0 vendor/qrencode-3.1.1/mask.c
  40. +30 −0 vendor/qrencode-3.1.1/mask.h
  41. +453 −0 vendor/qrencode-3.1.1/qrenc.c
  42. +73 −0 vendor/qrencode-3.1.1/qrencode.1.in
  43. +634 −0 vendor/qrencode-3.1.1/qrencode.c
  44. +426 −0 vendor/qrencode-3.1.1/qrencode.h
  45. +70 −0 vendor/qrencode-3.1.1/qrencode.spec
  46. +70 −0 vendor/qrencode-3.1.1/qrencode.spec.in
  47. +81 −0 vendor/qrencode-3.1.1/qrencode_inner.h
  48. +1,329 −0 vendor/qrencode-3.1.1/qrinput.c
  49. +103 −0 vendor/qrencode-3.1.1/qrinput.h
  50. +540 −0 vendor/qrencode-3.1.1/qrspec.c
  51. +171 −0 vendor/qrencode-3.1.1/qrspec.h
  52. +304 −0 vendor/qrencode-3.1.1/rscode.c
  53. +42 −0 vendor/qrencode-3.1.1/rscode.h
  54. +297 −0 vendor/qrencode-3.1.1/split.c
  55. +47 −0 vendor/qrencode-3.1.1/split.h
  56. +47 −0 vendor/qrencode-3.1.1/tests/Makefile.am
  57. +630 −0 vendor/qrencode-3.1.1/tests/Makefile.in
  58. +199 −0 vendor/qrencode-3.1.1/tests/common.h
  59. +170 −0 vendor/qrencode-3.1.1/tests/create_frame_pattern.c
  60. BIN vendor/qrencode-3.1.1/tests/frame
  61. +77 −0 vendor/qrencode-3.1.1/tests/prof_qrencode.c
  62. +9 −0 vendor/qrencode-3.1.1/tests/test_all.sh
  63. +150 −0 vendor/qrencode-3.1.1/tests/test_bitstream.c
  64. +158 −0 vendor/qrencode-3.1.1/tests/test_estimatebit.c
  65. +326 −0 vendor/qrencode-3.1.1/tests/test_monkey.c
  66. +698 −0 vendor/qrencode-3.1.1/tests/test_qrencode.c
  67. +835 −0 vendor/qrencode-3.1.1/tests/test_qrinput.c
  68. +307 −0 vendor/qrencode-3.1.1/tests/test_qrspec.c
  69. +38 −0 vendor/qrencode-3.1.1/tests/test_rs.c
  70. +414 −0 vendor/qrencode-3.1.1/tests/test_split.c
  71. +497 −0 vendor/qrencode-3.1.1/tests/view_qrcode.c
  72. +143 −0 vendor/qrencode-3.1.1/use/compile
  73. +1,561 −0 vendor/qrencode-3.1.1/use/config.guess
  74. +1,686 −0 vendor/qrencode-3.1.1/use/config.sub
  75. +630 −0 vendor/qrencode-3.1.1/use/depcomp
  76. +520 −0 vendor/qrencode-3.1.1/use/install-sh
  77. +8,413 −0 vendor/qrencode-3.1.1/use/ltmain.sh
  78. +376 −0 vendor/qrencode-3.1.1/use/missing
View
@@ -0,0 +1 @@
+QRCode.bs
View
@@ -3,21 +3,27 @@ abstract: 'Generate QR Code with Imager using libqrencode'
author:
- 'Yoshiki KURIHARA <kurihara at cpan.org>'
build_requires:
+ ExtUtils::MakeMaker: 6.42
+ ExtUtils::ParseXS: 2.21
Imager: 0.55
Test::More: 0
configure_requires:
+ ExtUtils::MakeMaker: 6.42
Imager: 0.55
distribution_type: module
-generated_by: 'Module::Install version 0.750'
+generated_by: 'Module::Install version 1.00'
license: perl
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
name: Imager-QRCode
no_index:
directory:
+ - examples
- inc
- t
- - examples
- - examples
+requires:
+ XSLoader: 0.1
+resources:
+ license: http://dev.perl.org/licenses/
version: 0.031
View
@@ -7,9 +7,11 @@ name 'Imager-QRCode';
author 'Yoshiki KURIHARA <kurihara at cpan.org>';
all_from 'lib/Imager/QRCode.pm';
-cc_inc_paths '.';
+cc_inc_paths 'vendor/qrencode-3.1.1/';
can_cc or die "This module requires a C compiler";
+cc_src_paths 'src';
+
configure_requires 'Imager' => '0.55';
build_requires 'Imager' => '0.55';
test_requires 'Test::More' => 0;
@@ -18,11 +20,6 @@ auto_install;
WriteAll;
sub MY::post_constants {
- my $define = eval { test_libqrencode() };
- if ( $@ ) {
- warn $@;
- exit 0; # tell cpan testers that this is not a failure
- }
eval { require Imager::ExtUtils };
if ( $@ ) {
warn "*** You must install Imager.";
@@ -33,80 +30,7 @@ sub MY::post_constants {
return <<"POST_CONST";
XSUBPPARGS += -typemap $typemap
INC += $includes
-CCFLAGS += $define
-LDDLFLAGS += -lqrencode
-LDFLAGS += -lqrencode
+CCFLAGS += -DOVER_LIBQRENCODE_2_0_0
POST_CONST
}
-sub test_libqrencode {
- my $compile_cmd
- = 'cc -I/usr/local/include -I/usr/include -L/usr/lib -L/usr/local/lib -lqrencode';
- my $libqrencode_url
- = 'http://megaui.net/fukuchi/works/qrencode/index.en.html';
- my $version;
- my $fh;
- my %define_of = (
- '1.0.2' => '-DUNDER_LIBQRENCODE_1_0_2',
- '2.0.0' => '-DOVER_LIBQRENCODE_2_0_0',
- );
-
- open $fh, '>', 'test_libqrencode.c';
- print $fh <<'EOT';
-#include <stdio.h>
-#include "qrencode.h"
-
-int main(int argc, char **argv)
-{
- QRcode *code;
- return 0;
-}
-EOT
- ;
- close $fh;
-
- system("$compile_cmd -o test_libqrencode test_libqrencode.c >/dev/null 2>&1") == 0
- or do {
- unlink for qw( test_libqrencode test_libqrencode.c );
- die "*** You must install libqrencode.\n*** See $libqrencode_url";
- };
-
- open $fh, '>', 'test_libqrencode1.0.2.c';
- print $fh <<'EOT';
-#include <stdio.h>
-#include "qrencode.h"
-
-int main(int argc, char **argv)
-{
- QRcode *code;
- code = (QRcode *)QRcode_encodeStringCase("foo", 1, QR_ECLEVEL_L);
- return 0;
-}
-EOT
- ;
- system("$compile_cmd -o test_libqrencode1.0.2 test_libqrencode1.0.2.c >/dev/null 2>&1") == 0
- and $version = "1.0.2";
-
- open $fh, '>', 'test_libqrencode2.0.0.c';
- print $fh <<'EOT';
-#include <stdio.h>
-#include "qrencode.h"
-
-int main(int argc, char **argv)
-{
- QRcode *code;
- code = (QRcode *)QRcode_encodeString8bit("foo", 1, QR_ECLEVEL_L);
- return 0;
-}
-EOT
- ;
- system("$compile_cmd -o test_libqrencode2.0.0 test_libqrencode2.0.0.c >/dev/null 2>&1") == 0
- and $version = "2.0.0";
-
- unlink for qw( test_libqrencode test_libqrencode.c
- test_libqrencode1.0.2 test_libqrencode1.0.2.c
- test_libqrencode2.0.0 test_libqrencode2.0.0.c );
-
- die "*** Unknown error occured in libqrencode version check process." unless $version;
- return $define_of{ $version };
-}
Oops, something went wrong. Retry.

0 comments on commit d8818d7

Please sign in to comment.