Patchwork qjson: new package

login
register
mail settings
Submitter Zoltan Gyarmati
Date April 6, 2013, 3:20 p.m.
Message ID <1365261630-17445-1-git-send-email-mr.zoltan.gyarmati@gmail.com>
Download mbox | patch
Permalink /patch/234435/
State Changes Requested
Headers show

Comments

Zoltan Gyarmati - April 6, 2013, 3:20 p.m.
Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
 package/Config.in                                  |    1 +
 package/qjson/Config.in                            |    8 ++++++
 ...0.8.1-fix-Qt4-package-error-in-CMakeLists.patch |   27 ++++++++++++++++++++
 package/qjson/qjson.mk                             |   13 ++++++++++
 4 files changed, 49 insertions(+)
 create mode 100644 package/qjson/Config.in
 create mode 100644 package/qjson/qjson-0.8.1-fix-Qt4-package-error-in-CMakeLists.patch
 create mode 100644 package/qjson/qjson.mk
Thomas Petazzoni - April 7, 2013, 8:16 p.m.
Dear Zoltan Gyarmati,

Thanks for your contribution! A few comments below.

On Sat,  6 Apr 2013 17:20:30 +0200, Zoltan Gyarmati wrote:

> diff --git a/package/qjson/Config.in b/package/qjson/Config.in
> new file mode 100644
> index 0000000..e21a336
> --- /dev/null
> +++ b/package/qjson/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_QJSON
> +	bool "qjson"
> +    depends on BR2_PACKAGE_QT

This dependency is not needed: your qjson/Config.in file is already
included inside a if BR2_PACKAGE_QT...endif condition (in
package/Config.in). And also, the indentation of this line was wrong.

> +	help
> +      QJson is a Qt-based library that maps JSON data to 
> +      QVariant objects and vice versa.
> +	  
> +      http://qjson.sourceforge.net

The indentation for the help text is one tab + two spaces. Here you
have only spaces.

> diff --git a/package/qjson/qjson-0.8.1-fix-Qt4-package-error-in-CMakeLists.patch b/package/qjson/qjson-0.8.1-fix-Qt4-package-error-in-CMakeLists.patch

The package version should be in the file name of patches. And also, I
believe we don't like too much mixed-case in filenames. So your patch
should probably be named:

	qjson-fix-qt4-package-error-in-cmakelists.patch

> new file mode 100644
> index 0000000..736438b
> --- /dev/null
> +++ b/package/qjson/qjson-0.8.1-fix-Qt4-package-error-in-CMakeLists.patch
> @@ -0,0 +1,27 @@
> +From 529e50939316abc3c4190f89a482b17a4d4b3355 Mon Sep 17 00:00:00 2001
> +From: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
> +Date: Sat, 6 Apr 2013 16:54:25 +0200
> +Subject: [PATCH 1/1] fix Qt4 package error in CMakeLists.txt
> +
> +
> +Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>

Good to have a description, but I wish you added a bit more details
about what you're fixing.

> diff --git a/package/qjson/qjson.mk b/package/qjson/qjson.mk
> new file mode 100644
> index 0000000..ea4b875
> --- /dev/null
> +++ b/package/qjson/qjson.mk
> @@ -0,0 +1,13 @@
> +#############################################################
> +#
> +# qjson
> +#
> +#############################################################
> +
> +QJSON_VERSION = 0.8.1
> +QJSON_SITE = git://github.com/flavio/qjson.git 

See
http://buildroot.org/downloads/manual/manual.html#github-download-url.
We prefer to use tarballs when possible.

> +QJSON_INSTALL_STAGING = YES
> +QJSON_DEPENDENCIES =  qt
> +
> +$(eval $(cmake-package))

It would be great if you could add the licensing informations. It seems
to be:

QJSON_LICENSE = LGPLv2.1
QJSON_LICENSE_FILES = COPYING.lib

Best regards,

Thomas

Patch

diff --git a/package/Config.in b/package/Config.in
index 69d87f0..f84d8d0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -143,6 +143,7 @@  if BR2_PACKAGE_QT
 comment "QT libraries and helper libraries"
 source "package/grantlee/Config.in"
 source "package/qextserialport/Config.in"
+source "package/qjson/Config.in"
 source "package/qtuio/Config.in"
 source "package/qwt/Config.in"
 endif
diff --git a/package/qjson/Config.in b/package/qjson/Config.in
new file mode 100644
index 0000000..e21a336
--- /dev/null
+++ b/package/qjson/Config.in
@@ -0,0 +1,8 @@ 
+config BR2_PACKAGE_QJSON
+	bool "qjson"
+    depends on BR2_PACKAGE_QT
+	help
+      QJson is a Qt-based library that maps JSON data to 
+      QVariant objects and vice versa.
+	  
+      http://qjson.sourceforge.net
diff --git a/package/qjson/qjson-0.8.1-fix-Qt4-package-error-in-CMakeLists.patch b/package/qjson/qjson-0.8.1-fix-Qt4-package-error-in-CMakeLists.patch
new file mode 100644
index 0000000..736438b
--- /dev/null
+++ b/package/qjson/qjson-0.8.1-fix-Qt4-package-error-in-CMakeLists.patch
@@ -0,0 +1,27 @@ 
+From 529e50939316abc3c4190f89a482b17a4d4b3355 Mon Sep 17 00:00:00 2001
+From: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
+Date: Sat, 6 Apr 2013 16:54:25 +0200
+Subject: [PATCH 1/1] fix Qt4 package error in CMakeLists.txt
+
+
+Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
+---
+ CMakeLists.txt |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 13e65f1..447f209 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -32,7 +32,7 @@ SET(FRAMEWORK_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/Library/Frameworks"
+ SET(QT_USE_IMPORTED_TARGETS TRUE)
+ 
+ # Find Qt4
+-FIND_PACKAGE( Qt4 REQUIRED )
++find_package(Qt4 COMPONENTS QtCore REQUIRED )
+ 
+ IF (NOT WIN32)
+   SET( QT_DONT_USE_QTGUI TRUE )
+-- 
+1.7.10.4
+
diff --git a/package/qjson/qjson.mk b/package/qjson/qjson.mk
new file mode 100644
index 0000000..ea4b875
--- /dev/null
+++ b/package/qjson/qjson.mk
@@ -0,0 +1,13 @@ 
+#############################################################
+#
+# qjson
+#
+#############################################################
+
+QJSON_VERSION = 0.8.1
+QJSON_SITE = git://github.com/flavio/qjson.git 
+QJSON_INSTALL_STAGING = YES
+QJSON_DEPENDENCIES =  qt
+
+$(eval $(cmake-package))
+