Browse Source

Merge pull request #13372 from neheb/qren

qrencode: update to 4.1.0
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by GitHub
parent
commit
bc3b346e49
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 85 deletions
  1. +3
    -3
      libs/qrencode/Makefile
  2. +0
    -67
      libs/qrencode/patches/001-add-inline-svg.patch
  3. +0
    -15
      libs/qrencode/patches/010-cmake.patch

+ 3
- 3
libs/qrencode/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=qrencode
PKG_VERSION:=4.0.2
PKG_RELEASE:=2
PKG_VERSION:=4.1.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://fukuchi.org/works/qrencode
PKG_HASH:=c9cb278d3b28dcc36b8d09e8cad51c0eca754eb004cb0247d4703cb4472b58b4
PKG_HASH:=ac7eff020d94be016d5b93bc6567f10a4a4692dcced901a384300f589a6cad0a
PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
PKG_LICENSE:=LGPL-2.1-or-later


+ 0
- 67
libs/qrencode/patches/001-add-inline-svg.patch View File

@ -1,67 +0,0 @@
From 7dd8a1b6f4efab84025c735195ad9d84f6477359 Mon Sep 17 00:00:00 2001
From: Jonathan Bennett <JBennett@incomsystems.biz>
Date: Mon, 16 Oct 2017 11:59:23 -0500
Subject: [PATCH] Adds the --inline option, which omits the xml tag for SVG
output.
---
qrenc.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/qrenc.c b/qrenc.c
index ed83d8a..373352e 100644
--- a/qrenc.c
+++ b/qrenc.c
@@ -45,6 +45,7 @@ static int structured = 0;
static int rle = 0;
static int svg_path = 0;
static int micro = 0;
+static int inline_svg = 0;
static QRecLevel level = QR_ECLEVEL_L;
static QRencodeMode hint = QR_MODE_8;
static unsigned char fg_color[4] = {0, 0, 0, 255};
@@ -80,6 +81,7 @@ static const struct option options[] = {
{"margin" , required_argument, NULL, 'm'},
{"dpi" , required_argument, NULL, 'd'},
{"type" , required_argument, NULL, 't'},
+ {"inline" , no_argument , NULL, 'I'},
{"structured" , no_argument , NULL, 'S'},
{"kanji" , no_argument , NULL, 'k'},
{"casesensitive", no_argument , NULL, 'c'},
@@ -95,7 +97,7 @@ static const struct option options[] = {
{NULL, 0, NULL, 0}
};
-static char *optstring = "ho:r:l:s:v:m:d:t:Skci8MV";
+static char *optstring = "ho:r:l:s:v:m:d:t:ISkci8MV";
static void usage(int help, int longopt, int status)
{
@@ -132,6 +134,7 @@ static void usage(int help, int longopt, int status)
" -t {PNG,PNG32,EPS,SVG,XPM,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8},\n"
" --type={PNG,PNG32,EPS,SVG,XPM,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}\n"
" specify the type of the generated image. (default=PNG)\n\n"
+" -I, --inline Only useful for SVG output, generates an svg without the XML tag\n"
" -S, --structured\n"
" make structured symbols. Version must be specified.\n\n"
" -k, --kanji assume that the input text contains kanji (shift-jis).\n\n"
@@ -551,7 +554,8 @@ static int writeSVG(const QRcode *qrcode, const char *outfile)
bg_opacity = (float)bg_color[3] / 255;
/* XML declaration */
- fputs( "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n", fp );
+ if (!inline_svg)
+ fputs( "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n", fp );
/* DTD
No document type specified because "while a DTD is provided in [the SVG]
@@ -1324,6 +1328,9 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
break;
+ case 'I':
+ inline_svg = 1;
+ break;
case 'S':
structured = 1;
break;

+ 0
- 15
libs/qrencode/patches/010-cmake.patch View File

@ -1,15 +0,0 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,7 +131,11 @@ if(WITH_TOOLS)
add_executable(qrenc qrenc.c)
set_target_properties(qrenc PROPERTIES OUTPUT_NAME qrencode)
- target_link_libraries(qrenc qrencode PNG::PNG)
+ if(NOT WITHOUT_PNG)
+ target_link_libraries(qrenc qrencode PNG::PNG)
+ else()
+ target_link_libraries(qrenc qrencode)
+ endif()
if(MSVC)
target_link_libraries(qrenc ${GETOPT_LIBRARIES})

Loading…
Cancel
Save