diff mbox series

[v2,1/1] package/oatpp:: new package

Message ID 20230129225000.336472-1-a.partesotti@gmail.com
State Accepted
Headers show
Series [v2,1/1] package/oatpp:: new package | expand

Commit Message

Alessandro Partesotti Jan. 29, 2023, 10:50 p.m. UTC
This package introduce oatpp in BR buildsystem.
Oatpp must be used as static library as upstreaam suggest.

Signed-off-by: Alessandro Partesotti <a.partesotti@gmail.com>
---
Changes v1 -> v2
- indentation and spaces (suggested by Yann E. MORIN)
- generic macro changes (suggested by Yann E. MORIN)

Signed-off-by: Alessandro Partesotti <a.partesotti@gmail.com>
---
 DEVELOPERS               |  3 +++
 package/Config.in        |  1 +
 package/oatpp/Config.in  | 13 +++++++++++++
 package/oatpp/oatpp.hash |  2 ++
 package/oatpp/oatpp.mk   | 16 ++++++++++++++++
 5 files changed, 35 insertions(+)
 create mode 100644 package/oatpp/Config.in
 create mode 100644 package/oatpp/oatpp.hash
 create mode 100644 package/oatpp/oatpp.mk

Comments

Arnout Vandecappelle Nov. 5, 2023, 8:53 p.m. UTC | #1
Hi Alessandro,

  I (finally) applied your patch to master, with a whole lot of changes, see below.

On 29/01/2023 23:50, Alessandro Partesotti wrote:
> This package introduce oatpp in BR buildsystem.

  This sentence is redundant.

> Oatpp must be used as static library as upstreaam suggest.
> 
> Signed-off-by: Alessandro Partesotti <a.partesotti@gmail.com>
> ---
> Changes v1 -> v2
> - indentation and spaces (suggested by Yann E. MORIN)
> - generic macro changes (suggested by Yann E. MORIN)
> 
> Signed-off-by: Alessandro Partesotti <a.partesotti@gmail.com>
> ---
>   DEVELOPERS               |  3 +++
>   package/Config.in        |  1 +
>   package/oatpp/Config.in  | 13 +++++++++++++
>   package/oatpp/oatpp.hash |  2 ++
>   package/oatpp/oatpp.mk   | 16 ++++++++++++++++
>   5 files changed, 35 insertions(+)
>   create mode 100644 package/oatpp/Config.in
>   create mode 100644 package/oatpp/oatpp.hash
>   create mode 100644 package/oatpp/oatpp.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index e8e0dffcd3..b2d173dc2e 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -3149,3 +3149,6 @@ F:	package/quazip/
>   F:	package/shapelib/
>   F:	package/simple-mail/
>   F:	package/tinc/
> +
> +N:      Alessandro Partesotti <a.partesotti@gmail.com>

  DEVELOPERS should be alphabetic by name, so I moved this up.

> +F:      package/oatpp/
> diff --git a/package/Config.in b/package/Config.in
> index 995dae2c57..c7394ae53d 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1941,6 +1941,7 @@ menu "Networking"
>   	source "package/nss-mdns/Config.in"
>   	source "package/nss-myhostname/Config.in"
>   	source "package/nss-pam-ldapd/Config.in"
> +	source "package/oatpp/Config.in"
>   	source "package/omniorb/Config.in"
>   	source "package/open-isns/Config.in"
>   	source "package/open62541/Config.in"
> diff --git a/package/oatpp/Config.in b/package/oatpp/Config.in
> new file mode 100644
> index 0000000000..44f0fabed8
> --- /dev/null
> +++ b/package/oatpp/Config.in
> @@ -0,0 +1,13 @@
> +comment "Oat++ needs a toolchain w/ C++"

  This was missing threads.

> +	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
> +
> +config BR2_PACKAGE_OATPP
> +	bool "Oat++"

  We always use lowercase for the prompts. We also use the package name, unless 
there is a _very_ good reason to not use it. In this case, upstream seems to use 
both oat++ and oatpp, so I changed this to oatpp.

> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	help
> +	  Oat++ is an open-source C++ web framework for highly

  Now it was wrapped to short :-)

> +	  scalable and resource-efficient web applications.
> +	  It provides all the necessary components for
> +	  production-grade development.
> +	  See https://oatpp.io/docs/start

  The upstream URL should be on a separate line.

> diff --git a/package/oatpp/oatpp.hash b/package/oatpp/oatpp.hash
> new file mode 100644
> index 0000000000..fadea2a05f
> --- /dev/null
> +++ b/package/oatpp/oatpp.hash
> @@ -0,0 +1,2 @@
> +# Hash from: https://github.com/oatpp/oatpp/archive/1.3.0/oatpp-1.3.0.tar.gz

  That's not a hash, that's the tarball itself. There's no upstream hash AFAICS. 
So I changed this to Locally calculated.

> +sha512  4fe8587efe1b4ecae14554ec8edb209e5558a3e4a4e6ff49bbfaaf06d2cc12f2cc306c5edc43b8dafc465aff53098ad4bebb9971694761b91a553730d5acb59a  oatpp-1.3.0.tar.gz

  We use sha256 for locally calculated.

  There should also be a hash for the license file.

> diff --git a/package/oatpp/oatpp.mk b/package/oatpp/oatpp.mk
> new file mode 100644
> index 0000000000..f949a5cbc9
> --- /dev/null
> +++ b/package/oatpp/oatpp.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# oatpp
> +#
> +################################################################################
> +
> +OATPP_VERSION = 1.3.0
> +OATPP_LICENSE = Apache-2.0
> +OATPP_LICENSE_FILES = LICENSE
> +OATPP_SITE = $(call github,oatpp,oatpp,$(OATPP_VERSION))
> +OATPP_CMAKE_OPTS = -DBUILD_SHARED_LIBS=OFF

  This should be OATPP_CONF_OPTS, otherwise it isn't used and it does install 
shared libs...

  Regards,
  Arnout

> +OATPP_INSTALL_STAGING = YES
> +# Only builds a static lib and copy headers:
> +OATPP_INSTALL_TARGET = NO
> +
> +$(eval $(cmake-package))
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index e8e0dffcd3..b2d173dc2e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3149,3 +3149,6 @@  F:	package/quazip/
 F:	package/shapelib/
 F:	package/simple-mail/
 F:	package/tinc/
+
+N:      Alessandro Partesotti <a.partesotti@gmail.com>
+F:      package/oatpp/
diff --git a/package/Config.in b/package/Config.in
index 995dae2c57..c7394ae53d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1941,6 +1941,7 @@  menu "Networking"
 	source "package/nss-mdns/Config.in"
 	source "package/nss-myhostname/Config.in"
 	source "package/nss-pam-ldapd/Config.in"
+	source "package/oatpp/Config.in"
 	source "package/omniorb/Config.in"
 	source "package/open-isns/Config.in"
 	source "package/open62541/Config.in"
diff --git a/package/oatpp/Config.in b/package/oatpp/Config.in
new file mode 100644
index 0000000000..44f0fabed8
--- /dev/null
+++ b/package/oatpp/Config.in
@@ -0,0 +1,13 @@ 
+comment "Oat++ needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_OATPP
+	bool "Oat++"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  Oat++ is an open-source C++ web framework for highly
+	  scalable and resource-efficient web applications.
+	  It provides all the necessary components for
+	  production-grade development.
+	  See https://oatpp.io/docs/start
diff --git a/package/oatpp/oatpp.hash b/package/oatpp/oatpp.hash
new file mode 100644
index 0000000000..fadea2a05f
--- /dev/null
+++ b/package/oatpp/oatpp.hash
@@ -0,0 +1,2 @@ 
+# Hash from: https://github.com/oatpp/oatpp/archive/1.3.0/oatpp-1.3.0.tar.gz
+sha512  4fe8587efe1b4ecae14554ec8edb209e5558a3e4a4e6ff49bbfaaf06d2cc12f2cc306c5edc43b8dafc465aff53098ad4bebb9971694761b91a553730d5acb59a  oatpp-1.3.0.tar.gz
diff --git a/package/oatpp/oatpp.mk b/package/oatpp/oatpp.mk
new file mode 100644
index 0000000000..f949a5cbc9
--- /dev/null
+++ b/package/oatpp/oatpp.mk
@@ -0,0 +1,16 @@ 
+################################################################################
+#
+# oatpp
+#
+################################################################################
+
+OATPP_VERSION = 1.3.0
+OATPP_LICENSE = Apache-2.0
+OATPP_LICENSE_FILES = LICENSE
+OATPP_SITE = $(call github,oatpp,oatpp,$(OATPP_VERSION))
+OATPP_CMAKE_OPTS = -DBUILD_SHARED_LIBS=OFF
+OATPP_INSTALL_STAGING = YES
+# Only builds a static lib and copy headers:
+OATPP_INSTALL_TARGET = NO
+
+$(eval $(cmake-package))