Skip to content

Commit

Permalink
qrencode: add 4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hrxi committed Nov 10, 2023
1 parent e3f96a5 commit c332a2d
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 0 deletions.
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -2527,6 +2527,14 @@
"2.0.2-1"
]
},
"qrencode": {
"dependency_names": [
"libqrencode"
],
"versions": [
"4.1.1-1"
]
},
"quazip": {
"dependency_names": [
"quazip"
Expand Down
52 changes: 52 additions & 0 deletions subprojects/packagefiles/qrencode/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
project(
'qrencode',
'c',
license: 'mit',
version: '4.1.1',
)
cc = meson.get_compiler('c')

sources = files(
'bitstream.c',
'mask.c',
'mmask.c',
'mqrspec.c',
'qrencode.c',
'qrinput.c',
'qrspec.c',
'rsecc.c',
'split.c',
)
c_args = [
'-DSTATIC_IN_RELEASE=static',
'-DMAJOR_VERSION=' + meson.project_version().split('.')[0],
'-DMINOR_VERSION=' + meson.project_version().split('.')[1],
'-DMICRO_VERSION=' + meson.project_version().split('.')[2],
'-DVERSION="' + meson.project_version() + '"',
]
if cc.check_header('pthread.h')
c_args += ['-DHAVE_LIBPTHREAD']
endif
if cc.has_function('strdup', prefix: '#include <string.h>')
c_args += ['-DHAVE_STRDUP']
endif

libqrencode = library(
'qrencode',
sources,
c_args: c_args,
dependencies: [dependency('threads')],
vs_module_defs: 'qrencode.def',
install: true,
version: meson.project_version(),
)
import('pkgconfig').generate(
libqrencode,
name: 'libqrencode',
description: 'A QR Code encoding library',
version: meson.project_version(),
)
libqrencode_dep = declare_dependency(
link_with: libqrencode,
)
meson.override_dependency('libqrencode', libqrencode_dep)
38 changes: 38 additions & 0 deletions subprojects/packagefiles/qrencode/qrencode.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
EXPORTS
QRinput_new
QRinput_new2
QRinput_newMQR
QRinput_append
QRinput_appendECIheader
QRinput_getVersion
QRinput_setVersion
QRinput_getErrorCorrectionLevel
QRinput_setErrorCorrectionLevel
QRinput_setVersionAndErrorCorrectionLevel
QRinput_free
QRinput_check
QRinput_Struct_new
QRinput_Struct_setParity
QRinput_Struct_appendInput
QRinput_Struct_free
QRinput_splitQRinputToStruct
QRinput_Struct_insertStructuredAppendHeaders
QRinput_setFNC1First
QRinput_setFNC1Second
QRcode_encodeInput
QRcode_encodeString
QRcode_encodeString8bit
QRcode_encodeStringMQR
QRcode_encodeString8bitMQR
QRcode_encodeData
QRcode_encodeDataMQR
QRcode_free
QRcode_encodeInputStructured
QRcode_encodeStringStructured
QRcode_encodeString8bitStructured
QRcode_encodeDataStructured
QRcode_List_size
QRcode_List_free
QRcode_APIVersion
QRcode_APIVersionString
QRcode_clearCache
9 changes: 9 additions & 0 deletions subprojects/qrencode.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[wrap-file]
directory = qrencode-4.1.1
source_url = https://fukuchi.org/works/qrencode/qrencode-4.1.1.tar.gz
source_filename = qrencode-4.1.1.tar.gz
source_hash = da448ed4f52aba6bcb0cd48cac0dd51b8692bccc4cd127431402fca6f8171e8e
patch_directory = qrencode

[provide]
dependency_names = libqrencode

0 comments on commit c332a2d

Please sign in to comment.