qlibc : new package
PATCH 1/1 qlibc : new package
From: Sagaert Johan <[email protected]>
[Thomas:
- add dependency on threads, wchar and dynamic librayr
- add dependency on libiconv when locale support is not enabled
- replace patch hacking includedir by a patch that lets the Makefile obey to $(DESTDIR)
- remove optional OpenSSL and MySQL support which simply cannot work due to the usage of AC_CHECK_FILE() in configure.ac, this required an additional patch to fix the bogus AC_ARG_WITH() calls.
- move from 'Miscellaneous' to 'Libraries' -> 'Other'.
- fixup the licensing information.]
--- package/Config.in | 1 + package/qlibc/Config.in | 17 ++++ .../qlibc/qlibc-0001-remove-absolute-paths.patch | 19 +++++ package/qlibc/qlibc-0002-obey-destdir.patch | 90 ++++++++++++++++++++++ .../qlibc-0003-fix-openssl-mysql-checks.patch | 36 +++++++++ package/qlibc/qlibc.mk | 23 ++++++ 6 files changed, 186 insertions(+) create mode 100644 package/qlibc/Config.in create mode 100644 package/qlibc/qlibc-0001-remove-absolute-paths.patch create mode 100644 package/qlibc/qlibc-0002-obey-destdir.patch create mode 100644 package/qlibc/qlibc-0003-fix-openssl-mysql-checks.patch create mode 100644 package/qlibc/qlibc.mk
package/Config.in +1 -0
@@ -885,6 +885,7 @@ menu "Other" source "package/protobuf/Config.in" source "package/protobuf-c/Config.in" source "package/qhull/Config.in" + source "package/qlibc/Config.in" source "package/schifra/Config.in" source "package/startup-notification/Config.in" source "package/tz/Config.in"
package/qlibc/Config.in new file +17 -0
@@ -0,0 +1,17 @@ +config BR2_PACKAGE_QLIBC + bool "qlibc" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + depends on !BR2_PREFER_STATIC_LIB + help + qLibc is currently one of the most functionally complete + public licensed C/C++ libraries. The C/C++ library which + includes all kinds of containers and general library + routines. It provides ready-made set of common container + APIs with consistant API look. + + https://github.com/wolkykim/qlibc + +comment "qlibc needs a toolchain w/ threads, wchar, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
package/qlibc/qlibc-0001-remove-absolute-paths.patch new file +19 -0
@@ -0,0 +1,19 @@ +Remove absolute paths to host locations + +Signed-off-by: Sagaert Johan <[email protected]> + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -85,10 +85,8 @@ + + ## Set path + PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" +-CPPFLAGS="$CPPFLAGS -I/usr/include -I/usr/local/include" + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +-LDFLAGS="$LDFLAGS -L/usr/lib -L/usr/local/lib" + + ## Set autoconf setting + #AC_CANONICAL_TARGET
package/qlibc/qlibc-0002-obey-destdir.patch new file +90 -0
90 lines not on this page · raw message
package/qlibc/qlibc-0003-fix-openssl-mysql-checks.patch new file +36 -0
@@ -0,0 +1,36 @@ +Allow to explicitly disable openssl and mysql + +AC_ARG_WITH() is being incorrectly used: the third argument indicates +the action that needs to be taken when a value was passed, when not +the option is enabled. Therefore, the result of the existing code was +that when you passed --without-mysql or --without-openssl, the +$withval variable would get the value 'yes', which is obviously wrong. + +Instead, we simply empty this third argument, because $withval is +already properly filled with 'yes' or 'no' by the AC_ARG_WITH() +function. + +Signed-off-by: Thomas Petazzoni <[email protected]> + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -170,7 +170,7 @@ + ## --with section + ## + +-AC_ARG_WITH([openssl],[AS_HELP_STRING([--with-openssl], [This will enable HTTPS support in qhttpclient extension API. When it's enabled, user applications will need to link openssl library with -lssl option.])],[withval=yes],[withval=no]) ++AC_ARG_WITH([openssl],[AS_HELP_STRING([--with-openssl], [This will enable HTTPS support in qhttpclient extension API. When it's enabled, user applications will need to link openssl library with -lssl option.])],[],[withval=no]) + if test "$withval" = yes; then + if test "$with_openssl" = yes; then + with_openssl="/usr/include" +@@ -185,7 +185,7 @@ + fi + fi + +-AC_ARG_WITH([mysql],[AS_HELP_STRING([--with-mysql], [This will enable MySQL database support in qdatabase extension API. When it's enabled, user applications need to link mysql client library. (ex: -lmysqlclient)])],[withval=yes],[withval=no]) ++AC_ARG_WITH([mysql],[AS_HELP_STRING([--with-mysql], [This will enable MySQL database support in qdatabase extension API. When it's enabled, user applications need to link mysql client library. (ex: -lmysqlclient)])],[],[withval=no]) + if test "$withval" = yes; then + if test "$with_mysql" = yes; then + with_mysql="/usr/include/mysql"
package/qlibc/qlibc.mk new file +23 -0
@@ -0,0 +1,23 @@ +################################################################################ +# +# qlibc +# +################################################################################ + +QLIBC_VERSION = v2.1.6 +QLIBC_SITE = $(call github,wolkykim,qlibc,$(QLIBC_VERSION)) +QLIBC_LICENSE = BSD-2c +QLIBC_LICENSE_FILES = COPYING + +# We're patching configure.ac +QLIBC_AUTORECONF = YES +QLIBC_INSTALL_STAGING = YES +QLIBC_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +# The configure.ac checks for these use AC_CHECK_FILE() which doesn't +# work for cross-compilation. If someone wants to enable the support +# for OpenSSL or MySQL, some changes to the configure.ac will be +# needed. +QLIBC_CONF_OPTS = --without-mysql --without-openssl + +$(eval $(autotools-package))
Signature · 1 line
2.0.0
PATCH 1/1 qlibc : new package
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
From: Sagaert Johan <[email protected]>
[Thomas:
- add dependency on threads, wchar and dynamic librayr
- add dependency on libiconv when locale support is not enabled
- replace patch hacking includedir by a patch that lets theMakefileobey to $(DESTDIR)
- remove optional OpenSSL and MySQL support which simply cannot work due to the usage ofAC_CHECK_FILE()in configure.ac, this required an additional patch to fix the bogusAC_ARG_WITH()calls.
- move from 'Miscellaneous' to 'Libraries' -> 'Other'.
- fixup the licensing information.]
Quoted 2 lines
Signed-off-by Sagaert Johan <[email protected]>Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard