summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubham Goyal <22shubh22@gmail.com>2019-05-28 12:49:07 +0530
committerMichael Stahl <Michael.Stahl@cib.de>2019-07-02 12:09:30 +0200
commitb4141cade04dac0c9d47293313a4521282975f12 (patch)
tree123d0d5e053cf9209d74f7458b2b4e07f2b13a01
parent5d22b9a022f8c98b6b215860ce45b52aea41633e (diff)
bundle external: qrcodegen
The bundle helps to generate QR code in LO. Change-Id: Iaa9225a72d15806c929d30951cefd3f3fee8960e Reviewed-on: https://gerrit.libreoffice.org/73302 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--Makefile.fetch1
-rw-r--r--RepositoryExternal.mk34
-rw-r--r--config_host.mk.in3
-rw-r--r--configure.ac31
-rw-r--r--download.lst2
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/qrcodegen/Makefile7
-rw-r--r--external/qrcodegen/Module_qrcodegen.mk20
-rw-r--r--external/qrcodegen/README3
-rw-r--r--external/qrcodegen/StaticLibrary_qrcodegen.mk26
-rw-r--r--external/qrcodegen/UnpackedTarball_qrcodegen.mk19
-rw-r--r--readlicense_oo/license/license.xml26
12 files changed, 173 insertions, 0 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index 522a4e22bc72..d8d63cbb9523 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -167,6 +167,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
$(call fetch_Optional,LXML,LXML_TARBALL) \
$(call fetch_Optional,MARIADB_CONNECTOR_C,MARIADB_CONNECTOR_C_TARBALL) \
$(call fetch_Optional,MDDS,MDDS_TARBALL) \
+ $(call fetch_Optional,QRCODEGEN,QRCODEGEN_TARBALL) \
$(call fetch_Optional,MDNSRESPONDER,MDNSRESPONDER_TARBALL) \
$(call fetch_Optional,MORE_FONTS,FONT_CALADEA_TARBALL) \
$(call fetch_Optional,MORE_FONTS,FONT_CARLITO_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 922347228b81..730a3408a240 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4156,6 +4156,40 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
))
endif
+ifneq ($(SYSTEM_QRCODEGEN),)
+
+define gb_LinkTarget__use_qrcodegen
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(QRCODEGEN_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(QRCODEGEN_LIBS))
+
+endef
+
+gb_ExternalProject__use_qrcodegen :=
+
+else # !SYSTEM_QRCODEGEN
+
+define gb_LinkTarget__use_qrcodegen
+l$(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
+$(call gb_LinkTarget_set_include,$(1),\
+ -I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
+ $$(INCLUDE) \
+)
+$(call gb_LinkTarget_use_static_libraries,$(1),\
+ qrcodegen \
+)
+
+endef
+
+define gb_ExternalProject__use_qrcodegen
+$(call gb_ExternalProject_use_static_libraries,$(1),qrcodegen)
+
+endef
+
+endif # SYSTEM_QRCODEGEN
+
$(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
$(if $(UCRT_REDISTDIR),ucrt) \
))
diff --git a/config_host.mk.in b/config_host.mk.in
index 8eb33deb4645..695371057a57 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -464,6 +464,8 @@ export PYTHON_LIBS=$(gb_SPACE)@PYTHON_LIBS@
export PYTHON_VERSION=@PYTHON_VERSION@
export PYTHON_VERSION_MAJOR=@PYTHON_VERSION_MAJOR@
export PYTHON_VERSION_MINOR=@PYTHON_VERSION_MINOR@
+export QRCODEGEN_CFLAGS=$(gb_SPACE)@QRCODEGEN_CFLAGS@
+export QRCODEGEN_LIBS=$(gb_SPACE)@QRCODEGEN_LIBS@
export QT5_CFLAGS=$(gb_SPACE)@QT5_CFLAGS@
export QT5_LIBS=$(gb_SPACE)@QT5_LIBS@
export QT5_GOBJECT_CFLAGS=$(gb_SPACE)@QT5_GOBJECT_CFLAGS@
@@ -569,6 +571,7 @@ export SYSTEM_PAGEMAKER=@SYSTEM_PAGEMAKER@
export SYSTEM_POPPLER=@SYSTEM_POPPLER@
export SYSTEM_POSTGRESQL=@SYSTEM_POSTGRESQL@
export SYSTEM_PYTHON=@SYSTEM_PYTHON@
+export STSTEM_QRCODEGEN=@SYSTEM_QRCODEGEN@
export SYSTEM_QXP=@SYSTEM_QXP@
export SYSTEM_REDLAND=@SYSTEM_REDLAND@
export SYSTEM_REVENGE=@SYSTEM_REVENGE@
diff --git a/configure.ac b/configure.ac
index 22f6bf110b8c..a517de7c9290 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1909,6 +1909,11 @@ AC_ARG_WITH(system-hunspell,
[Use libhunspell already on system.]),,
[with_system_hunspell="$with_system_libs"])
+AC_ARG_WITH(system-qrcodegen,
+ AS_HELP_STRING([--with-system-qrcodegen],
+ [Use libqrcodegen already on system.]),,
+ [with_system_qrcodegen="$with_system_libs"])
+
AC_ARG_WITH(system-mythes,
AS_HELP_STRING([--with-system-mythes],
[Use mythes already on system.]),,
@@ -9822,6 +9827,32 @@ AC_SUBST(HUNSPELL_CFLAGS)
AC_SUBST(HUNSPELL_LIBS)
dnl ===================================================================
+dnl Check for system qrcodegen
+dnl ===================================================================
+AC_MSG_CHECKING([which libqrcodegen to use])
+if test "$with_system_qrcodegen" = "yes"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_QRCODEGEN=TRUE
+ AC_LANG_PUSH([C++])
+ AC_CHECK_HEADER(qrcodegen/QrCode.hpp, [],
+ [AC_MSG_ERROR(qrcodegen headers not found.)], [#include <stdexcept>])
+ AC_CHECK_LIB([qrcodegencpp], [main], [:],
+ [ AC_MSG_ERROR(qrcodegen C++ library not found.) ], [])
+ QRCODEGEN_LIBS=-lqrcodegencpp
+ AC_LANG_POP([C++])
+ QRCODEGEN_CFLAGS=$(printf '%s' "$QRCODEGEN_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+ FilterLibs "${QRCODEGEN_LIBS}"
+ QRCODEGEN_LIBS="${filteredlibs}"
+else
+ AC_MSG_RESULT([internal])
+ SYSTEM_QRCODEGEN=
+ BUILD_TYPE="$BUILD_TYPE QRCODEGEN"
+fi
+AC_SUBST(SYSTEM_QRCODEGEN)
+AC_SUBST(QRCODEGEN_CFLAGS)
+AC_SUBST(QRCODEGEN_LIBS)
+
+dnl ===================================================================
dnl Checking for altlinuxhyph
dnl ===================================================================
AC_MSG_CHECKING([which altlinuxhyph to use])
diff --git a/download.lst b/download.lst
index 8fbc74661141..0855f47a90c5 100644
--- a/download.lst
+++ b/download.lst
@@ -212,6 +212,8 @@ export POSTGRESQL_SHA256SUM := a754c02f7051c2f21e52f8669a421b50485afcde9a581674d
export POSTGRESQL_TARBALL := postgresql-9.2.24.tar.bz2
export PYTHON_SHA256SUM := 285892899bf4d5737fd08482aa6171c6b2564a45b9102dfacfb72826aebdc7dc
export PYTHON_TARBALL := Python-3.5.7.tar.xz
+export QRCODEGEN_SHA256SUM := fcdf9fd69fde07ae4dca2351d84271a9de8093002f733b77c70f52f1630f6e4a
+export QRCODEGEN_TARBALL := QR-Code-generator-1.4.0.tar.gz
export QXP_SHA256SUM := e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
export QXP_TARBALL := libqxp-0.0.2.tar.xz
export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
diff --git a/external/Module_external.mk b/external/Module_external.mk
index e9d53ee5ab7c..10ed2a6e54db 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -87,6 +87,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,POSTGRESQL,postgresql) \
$(call gb_Helper_optional,PYTHON,python3) \
$(call gb_Helper_optional,QXP,libqxp) \
+ $(call gb_Helper_optional,QRCODEGEN,qrcodegen) \
$(call gb_Helper_optional,REDLAND,redland) \
$(call gb_Helper_optional,REVENGE,librevenge) \
$(call gb_Helper_optional,RHINO,rhino) \
diff --git a/external/qrcodegen/Makefile b/external/qrcodegen/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/qrcodegen/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/qrcodegen/Module_qrcodegen.mk b/external/qrcodegen/Module_qrcodegen.mk
new file mode 100644
index 000000000000..34be04cc52d9
--- /dev/null
+++ b/external/qrcodegen/Module_qrcodegen.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,qrcodegen))
+
+$(eval $(call gb_Module_add_targets,qrcodegen,\
+ UnpackedTarball_qrcodegen \
+))
+
+$(eval $(call gb_Module_add_targets,qrcodegen,\
+ StaticLibrary_qrcodegen \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/qrcodegen/README b/external/qrcodegen/README
new file mode 100644
index 000000000000..d6f19abdc833
--- /dev/null
+++ b/external/qrcodegen/README
@@ -0,0 +1,3 @@
+QR code generating library, available from [https://github.com/nayuki/QR-Code-generator/tree/master/cpp].
+
+qrcodegenerator to make the QR code out of a link or text in libreoffice.
diff --git a/external/qrcodegen/StaticLibrary_qrcodegen.mk b/external/qrcodegen/StaticLibrary_qrcodegen.mk
new file mode 100644
index 000000000000..d4b21673bd79
--- /dev/null
+++ b/external/qrcodegen/StaticLibrary_qrcodegen.mk
@@ -0,0 +1,26 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,qrcodegen))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,qrcodegen,qrcodegen))
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,qrcodegen,cpp))
+
+$(eval $(call gb_StaticLibrary_use_external,qrcodegen,icu_headers))
+
+$(eval $(call gb_StaticLibrary_set_warnings_disabled,qrcodegen))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,qrcodegen,\
+ UnpackedTarball/qrcodegen/cpp/BitBuffer \
+ UnpackedTarball/qrcodegen/cpp/QrCode \
+ UnpackedTarball/qrcodegen/cpp/QrSegment \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/qrcodegen/UnpackedTarball_qrcodegen.mk b/external/qrcodegen/UnpackedTarball_qrcodegen.mk
new file mode 100644
index 000000000000..1ddbc5bc5686
--- /dev/null
+++ b/external/qrcodegen/UnpackedTarball_qrcodegen.mk
@@ -0,0 +1,19 @@
+#-*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,qrcodegen))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,qrcodegen,$(QRCODEGEN_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,qrcodegen,1))
+
+$(eval $(call gb_UnpackedTarball_add_patches,qrcodegen, \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/readlicense_oo/license/license.xml b/readlicense_oo/license/license.xml
index d211b18b1692..b63980458303 100644
--- a/readlicense_oo/license/license.xml
+++ b/readlicense_oo/license/license.xml
@@ -1800,6 +1800,32 @@
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</p>
</div>
+ <div class ="QRCODEGEN">
+ <h2>QR-Code-Generator</h2>
+ <p>The following software may be included in this product: QR Code Generator.</p>
+ <p>The libqrcodegen project code is covered by the MIT license:</p>
+ <blockquote>
+ <p> Copyright © 2019 Project Nayuki. (MIT License) [<a href="https://www.nayuki.io/page/qr-code-generator-library">https://www.nayuki.io/page/qr-code-generator-library</a>]</p>
+
+ <p>Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ the Software, and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:</p>
+
+ <p>*The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.</p>
+
+ <p>*The Software is provided "as is", without warranty of any kind, express or
+ implied, including but not limited to the warranties of merchantability,
+ fitness for a particular purpose and noninfringement. In no event shall the
+ authors or copyright holders be liable for any claim, damages or other
+ liability, whether in an action of contract, tort or otherwise, arising from,
+ out of or in connection with the Software or the use or other dealings in the
+ Software.</p>
+ </blockquote>
+ </div>
<h2>Random123: a Library of Counter-Based Random Number Generators</h2>
<p>The following software may be included in this product: Random123: a Library of Counter-Based Random Number
Generators. Use of any of this software is governed by the terms of the license below:</p>