瀏覽代碼

Merge pull request #1307 from oneru/add-qrencode

libqrencode: This reverts some unwelcome changes and then fixes a typo in Makefile
Steven Barth 9 年之前
父節點
當前提交
1fac3a0c3a
共有 2 個檔案被更改,包括 36 行新增126 行删除
  1. 2
    2
      libs/qrencode/Makefile
  2. 34
    124
      libs/qrencode/patches/001-disable-png.patch

+ 2
- 2
libs/qrencode/Makefile 查看文件

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=qrencode
11 11
 PKG_VERSION:=3.4.4
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=http://fukuchi.org/works/qrencode/
@@ -17,7 +17,7 @@ PKG_MD5SUM:=be545f3ce36ea8fbb58612d72c4222de
17 17
 PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
18 18
 PKG_LICENSE:=LGPL-2.1+
19 19
 PKG_INSTALL:=1
20
-PKG:FIXUP:=autoreconf
20
+PKG_FIXUP:=autoreconf
21 21
 
22 22
 include $(INCLUDE_DIR)/package.mk
23 23
 

+ 34
- 124
libs/qrencode/patches/001-disable-png.patch 查看文件

@@ -1,15 +1,3 @@
1
---- a/configure.ac
2
-+++ b/configure.ac
3
-@@ -58,9 +58,6 @@ AC_ARG_WITH([tools], [AS_HELP_STRING([--
4
-  [build_tools=$withval], [build_tools=yes])
5
- 
6
- AM_CONDITIONAL(BUILD_TOOLS, [test "x$build_tools" = "xyes" ])
7
--if test x$build_tools = xyes ; then
8
--	PKG_CHECK_MODULES(png, "libpng")
9
--fi
10
- 
11
- dnl --with-tests
12
- AC_ARG_WITH([tests], [AS_HELP_STRING([--with-tests], [build tests [default=no]])],
13 1
 --- a/qrenc.c
14 2
 +++ b/qrenc.c
15 3
 @@ -25,7 +25,6 @@
@@ -20,7 +8,7 @@
20 8
  #include <getopt.h>
21 9
  
22 10
  #include "qrencode.h"
23
-@@ -49,7 +48,6 @@ static unsigned int bg_color[4] = {255,
11
+@@ -49,7 +48,6 @@
24 12
  static int verbose = 0;
25 13
  
26 14
  enum imageType {
@@ -28,7 +16,7 @@
28 16
  	EPS_TYPE,
29 17
  	SVG_TYPE,
30 18
  	ANSI_TYPE,
31
-@@ -60,7 +58,7 @@ enum imageType {
19
+@@ -60,7 +58,7 @@
32 20
  	ANSIUTF8_TYPE
33 21
  };
34 22
  
@@ -37,7 +25,7 @@
37 25
  
38 26
  static const struct option options[] = {
39 27
  	{"help"         , no_argument      , NULL, 'h'},
40
-@@ -96,13 +94,13 @@ static void usage(int help, int longopt)
28
+@@ -96,13 +94,13 @@
41 29
  		if(longopt) {
42 30
  			fprintf(stderr,
43 31
  "Usage: qrencode [OPTION]... [STRING]\n"
@@ -53,7 +41,7 @@
53 41
  "               (suffix is removed from FILENAME, if specified)\n"
54 42
  "  -s NUMBER, --size=NUMBER\n"
55 43
  "               specify module size in dots (pixels). (default=3)\n\n"
56
-@@ -116,9 +114,9 @@ static void usage(int help, int longopt)
44
+@@ -116,9 +114,9 @@
57 45
  "               specify the width of the margins. (default=4 (2 for Micro QR)))\n\n"
58 46
  "  -d NUMBER, --dpi=NUMBER\n"
59 47
  "               specify the DPI of the generated PNG. (default=72)\n\n"
@@ -65,7 +53,7 @@
65 53
  "  -S, --structured\n"
66 54
  "               make structured symbols. Version must be specified.\n\n"
67 55
  "  -k, --kanji  assume that the input text contains kanji (shift-jis).\n\n"
68
-@@ -133,7 +131,7 @@ static void usage(int help, int longopt)
56
+@@ -133,7 +131,7 @@
69 57
  "      --background=RRGGBB[AA]\n"
70 58
  "               specify foreground/background color in hexadecimal notation.\n"
71 59
  "               6-digit (RGB) or 8-digit (RGBA) form are supported.\n"
@@ -74,7 +62,7 @@
74 62
  "  -V, --version\n"
75 63
  "               display the version number and copyrights of the qrencode.\n\n"
76 64
  "      --verbose\n"
77
-@@ -153,12 +151,12 @@ static void usage(int help, int longopt)
65
+@@ -153,12 +151,12 @@
78 66
  		} else {
79 67
  			fprintf(stderr,
80 68
  "Usage: qrencode [OPTION]... [STRING]\n"
@@ -89,7 +77,7 @@
89 77
  "               (suffix is removed from FILENAME, if specified)\n"
90 78
  "  -s NUMBER    specify module size in dots (pixels). (default=3)\n"
91 79
  "  -l {LMQH}    specify error correction level from L (lowest) to H (highest).\n"
92
-@@ -166,8 +164,8 @@ static void usage(int help, int longopt)
80
+@@ -166,8 +164,8 @@
93 81
  "  -v NUMBER    specify the version of the symbol. (default=auto)\n"
94 82
  "  -m NUMBER    specify the width of the margins. (default=4 (2 for Micro))\n"
95 83
  "  -d NUMBER    specify the DPI of the generated PNG. (default=72)\n"
@@ -100,7 +88,7 @@
100 88
  "  -S           make structured symbols. Version must be specified.\n"
101 89
  "  -k           assume that the input text contains kanji (shift-jis).\n"
102 90
  "  -c           encode lower-case alphabet characters in 8-bit mode. (default)\n"
103
-@@ -178,7 +176,7 @@ static void usage(int help, int longopt)
91
+@@ -178,7 +176,7 @@
104 92
  "  --background=RRGGBB[AA]\n"
105 93
  "               specify foreground/background color in hexadecimal notation.\n"
106 94
  "               6-digit (RGB) or 8-digit (RGBA) form are supported.\n"
@@ -109,7 +97,7 @@
109 97
  "  -V           display the version number and copyrights of the qrencode.\n"
110 98
  "  [STRING]     input data. If it is not specified, data will be taken from\n"
111 99
  "               standard input.\n"
112
-@@ -253,128 +251,6 @@ static FILE *openFile(const char *outfil
100
+@@ -253,128 +251,6 @@
113 101
  	return fp;
114 102
  }
115 103
  
@@ -238,7 +226,7 @@
238 226
  static int writeEPS(QRcode *qrcode, const char *outfile)
239 227
  {
240 228
  	FILE *fp;
241
-@@ -831,9 +707,6 @@ static void qrencode(const unsigned char
229
+@@ -831,9 +707,6 @@
242 230
  	}
243 231
  
244 232
  	switch(image_type) {
@@ -248,7 +236,7 @@
248 236
  		case EPS_TYPE:
249 237
  			writeEPS(qrcode, outfile);
250 238
  			break;
251
-@@ -887,9 +760,6 @@ static void qrencodeStructured(const uns
239
+@@ -887,9 +760,6 @@
252 240
  	size_t suffix_size;
253 241
  
254 242
  	switch(image_type) {
@@ -258,7 +246,7 @@
258 246
  		case EPS_TYPE:
259 247
  			type_suffix = ".eps";
260 248
  			break;
261
-@@ -948,9 +818,6 @@ static void qrencodeStructured(const uns
249
+@@ -948,9 +818,6 @@
262 250
  		}
263 251
  
264 252
  		switch(image_type) {
@@ -268,7 +256,7 @@
268 256
  			case EPS_TYPE: 
269 257
  				writeEPS(p->code, filename);
270 258
  				break;
271
-@@ -1062,9 +929,7 @@ int main(int argc, char **argv)
259
+@@ -1062,9 +929,7 @@
272 260
  				}
273 261
  				break;
274 262
  			case 't':
@@ -279,7 +267,7 @@
279 267
  					image_type = EPS_TYPE;
280 268
  				} else if(strcasecmp(optarg, "svg") == 0) {
281 269
  					image_type = SVG_TYPE;
282
-@@ -1133,11 +998,6 @@ int main(int argc, char **argv)
270
+@@ -1133,11 +998,6 @@
283 271
  		exit(EXIT_SUCCESS);
284 272
  	}
285 273
  
@@ -291,106 +279,28 @@
291 279
  	if(optind < argc) {
292 280
  		intext = (unsigned char *)argv[optind];
293 281
  		length = strlen((char *)intext);
294
---- a/configure
295
-+++ b/configure
296
-@@ -12646,100 +12646,6 @@ else
297
-   BUILD_TOOLS_FALSE=
298
- fi
282
+--- a/configure.ac
283
++++ b/configure.ac
284
+@@ -58,9 +58,6 @@
285
+  [build_tools=$withval], [build_tools=yes])
299 286
  
287
+ AM_CONDITIONAL(BUILD_TOOLS, [test "x$build_tools" = "xyes" ])
300 288
 -if test x$build_tools = xyes ; then
301
--
302
--pkg_failed=no
303
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for png" >&5
304
--$as_echo_n "checking for png... " >&6; }
305
--
306
--if test -n "$png_CFLAGS"; then
307
--    pkg_cv_png_CFLAGS="$png_CFLAGS"
308
-- elif test -n "$PKG_CONFIG"; then
309
--    if test -n "$PKG_CONFIG" && \
310
--    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"libpng\"\""; } >&5
311
--  ($PKG_CONFIG --exists --print-errors ""libpng"") 2>&5
312
--  ac_status=$?
313
--  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
314
--  test $ac_status = 0; }; then
315
--  pkg_cv_png_CFLAGS=`$PKG_CONFIG --cflags ""libpng"" 2>/dev/null`
316
--		      test "x$?" != "x0" && pkg_failed=yes
317
--else
318
--  pkg_failed=yes
319
--fi
320
-- else
321
--    pkg_failed=untried
322
--fi
323
--if test -n "$png_LIBS"; then
324
--    pkg_cv_png_LIBS="$png_LIBS"
325
-- elif test -n "$PKG_CONFIG"; then
326
--    if test -n "$PKG_CONFIG" && \
327
--    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"libpng\"\""; } >&5
328
--  ($PKG_CONFIG --exists --print-errors ""libpng"") 2>&5
329
--  ac_status=$?
330
--  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
331
--  test $ac_status = 0; }; then
332
--  pkg_cv_png_LIBS=`$PKG_CONFIG --libs ""libpng"" 2>/dev/null`
333
--		      test "x$?" != "x0" && pkg_failed=yes
334
--else
335
--  pkg_failed=yes
336
--fi
337
-- else
338
--    pkg_failed=untried
339
--fi
340
--
341
--
342
--
343
--if test $pkg_failed = yes; then
344
--   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
345
--$as_echo "no" >&6; }
346
--
347
--if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
348
--        _pkg_short_errors_supported=yes
349
--else
350
--        _pkg_short_errors_supported=no
351
--fi
352
--        if test $_pkg_short_errors_supported = yes; then
353
--	        png_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs ""libpng"" 2>&1`
354
--        else
355
--	        png_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs ""libpng"" 2>&1`
356
--        fi
357
--	# Put the nasty error message in config.log where it belongs
358
--	echo "$png_PKG_ERRORS" >&5
359
--
360
--	as_fn_error $? "Package requirements (\"libpng\") were not met:
361
--
362
--$png_PKG_ERRORS
363
--
364
--Consider adjusting the PKG_CONFIG_PATH environment variable if you
365
--installed software in a non-standard prefix.
366
--
367
--Alternatively, you may set the environment variables png_CFLAGS
368
--and png_LIBS to avoid the need to call pkg-config.
369
--See the pkg-config man page for more details." "$LINENO" 5
370
--elif test $pkg_failed = untried; then
371
--     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
372
--$as_echo "no" >&6; }
373
--	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
374
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
375
--as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
376
--is in your PATH or set the PKG_CONFIG environment variable to the full
377
--path to pkg-config.
378
--
379
--Alternatively, you may set the environment variables png_CFLAGS
380
--and png_LIBS to avoid the need to call pkg-config.
381
--See the pkg-config man page for more details.
382
--
383
--To get pkg-config, see <http://pkg-config.freedesktop.org/>.
384
--See \`config.log' for more details" "$LINENO" 5; }
385
--else
386
--	png_CFLAGS=$pkg_cv_png_CFLAGS
387
--	png_LIBS=$pkg_cv_png_LIBS
388
--        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
389
--$as_echo "yes" >&6; }
390
--
289
+-	PKG_CHECK_MODULES(png, "libpng")
391 290
 -fi
291
+ 
292
+ dnl --with-tests
293
+ AC_ARG_WITH([tests], [AS_HELP_STRING([--with-tests], [build tests [default=no]])],
294
+@@ -80,12 +77,6 @@
295
+ echo "/* #undef WITH_TESTS */" >>confdefs.h
296
+ fi
297
+ 
298
+-if test x$build_tests = xyes ; then
299
+-	SDL_REQUIRED_VERSION=1.2.0
300
+-	AM_PATH_SDL($SDL_REQUIRED_VERSION,,AC_MSG_WARN([*** SDL $SDL_REQUIRED_VERSION or better is required.]))
301
+-	AC_MSG_NOTICE([SDL check done.])
302
+-	AM_ICONV_LINK
392 303
 -fi
393
--
304
+ AM_CONDITIONAL(HAVE_SDL, [test "x$SDL_CFLAGS" != "x" ])
305
+ 
394 306
  
395
- # Check whether --with-tests was given.
396
- if test "${with_tests+set}" = set; then :