diff mbox

[PATCH/RFC,01/27] package/libsquish: New package

Message ID 1427913380-14808-2-git-send-email-bernd.kuhls@t-online.de
State Changes Requested
Headers show

Commit Message

Bernd Kuhls April 1, 2015, 6:35 p.m. UTC
Needed for Kodi 15.0

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/Config.in              |    1 +
 package/libsquish/Config.in    |   11 +++++++++++
 package/libsquish/libsquish.mk |   24 ++++++++++++++++++++++++
 3 files changed, 36 insertions(+)
 create mode 100644 package/libsquish/Config.in
 create mode 100644 package/libsquish/libsquish.mk

Comments

Yann E. MORIN April 5, 2015, 9:31 p.m. UTC | #1
Bernd, All,

On 2015-04-01 20:35 +0200, Bernd Kuhls spake thusly:
> Needed for Kodi 15.0
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[--SNIP--]
> diff --git a/package/libsquish/Config.in b/package/libsquish/Config.in
> new file mode 100644
> index 0000000..10af979
> --- /dev/null
> +++ b/package/libsquish/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_LIBSQUISH
> +	bool "libsquish"
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	help
> +	  The squish library (abbreviated to libsquish) is an open source DXT
> +	  compression library written in C++
> +
> +	  https://code.google.com/p/libsquish

Don;t we have a better homepage for libsquish? Google code is slated for
retirement later this year (or early next year). It would be a pity to
have a dangling URL especially as we already know about that.

> +comment "libsquish needs a toolchain w/ C++"
> +	depends on !BR2_INSTALL_LIBSTDCPP
> diff --git a/package/libsquish/libsquish.mk b/package/libsquish/libsquish.mk
> new file mode 100644
> index 0000000..d381370
> --- /dev/null
> +++ b/package/libsquish/libsquish.mk
> @@ -0,0 +1,24 @@
> +################################################################################
> +#
> +# libsquish
> +#
> +################################################################################
> +
> +LIBSQUISH_VERSION = 1.10-openelec
> +LIBSQUISH_SOURCE = libsquish-$(LIBSQUISH_VERSION).tar.gz
> +LIBSQUISH_SITE = http://sources.openelec.tv/devel

I'm a bit uneasy at pointing to Google code as the homepage, and at the
same time using a third-party to get the archive from, especially since
it looks like this version has been modified by OpenELEC.

> +LIBSQUISH_INSTALL_STAGING = YES
> +LIBSQUISH_LICENSE = MIT
> +LIBSQUISH_LICENSE_FILES = README

You do not provide build commands. Is that on purpose, or did you
forget? ;-)

> +define LIBSQUISH_INSTALL_STAGING_CMDS
> +	CXX=$(TARGET_CXX) CXXFLAGS="$(TARGET_CXXFLAGS)" \

Please use $(TARGET_CONFIGURE_OPTS) as it already contains all those
defines, plus many others.

> +	$(MAKE) -C $(@D) install PREFIX=/usr INSTALL_DIR=$(STAGING_DIR)/usr
> +endef
> +
> +define LIBSQUISH_INSTALL_TARGET_CMDS
> +	CXX=$(TARGET_CXX) CXXFLAGS="$(TARGET_CXXFLAGS)" \

Ditto $(TARGET_CONFIGURE_OPTS).

> +	$(MAKE) -C $(@D) install PREFIX=/usr INSTALL_DIR=$(TARGET_DIR)/usr
> +endef
> +
> +$(eval $(generic-package))

Regards,
Yann E. MORIN.
Yann E. MORIN April 5, 2015, 9:36 p.m. UTC | #2
Bernd, All,

On 2015-04-01 20:35 +0200, Bernd Kuhls spake thusly:
> Needed for Kodi 15.0
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[--SNIP--]

I forgot in my previous review: the Makefile for libsqusih does not know
how to build both a shared and a static lib at the same time.

So, you have two options:
  - fix the Makefile to be able to build either or both at the same time
  - you hide libsquish behind a depends on !BR2_SHARED_STATIC_LIBS

Needless to say, the first is highly preferrable.

Regards,
Yann E. MORIN.
Bernd Kuhls June 14, 2015, 2:19 p.m. UTC | #3
Hi Yann,

"Yann E. MORIN" <yann.morin.1998@free.fr> wrote in 
news:20150405213109.GJ4134@free.fr:

>> +       https://code.google.com/p/libsquish
> 
> Don;t we have a better homepage for libsquish? Google code is slated for
> retirement later this year (or early next year). It would be a pity to
> have a dangling URL especially as we already know about that.

the project moved to sourceforge and released version 1.13 while Kodi still 
contains a fork of 1.10. I updated my patch kodi beta2 series to use upstream 
1.10 with a kodi-specific patch. The next release of my patch series 
following kodi beta2 will contain libsquish 1.13 as it includes cmake support 
now.

>> +LIBSQUISH_SITE = http://sources.openelec.tv/devel
> 
> I'm a bit uneasy at pointing to Google code as the homepage, and at the
> same time using a third-party to get the archive from, especially since
> it looks like this version has been modified by OpenELEC.

Partly done, kodi beta2 gets the source from code.google.com.

>> +LIBSQUISH_INSTALL_STAGING = YES
>> +LIBSQUISH_LICENSE = MIT
>> +LIBSQUISH_LICENSE_FILES = README
> 
> You do not provide build commands. Is that on purpose, or did you
> forget? ;-)

I forgot them but the package got build anyway ;) I will change libsquish to 
cmake when bumping to 1.13.

Thanks for the review!

Regards, Bernd
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 8cd0cb1..ce67c8a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -645,6 +645,7 @@  endmenu
 menu "Compression and decompression"
 	source "package/libarchive/Config.in"
 	source "package/libzip/Config.in"
+	source "package/libsquish/Config.in"
 	source "package/lzo/Config.in"
 	source "package/snappy/Config.in"
 	source "package/szip/Config.in"
diff --git a/package/libsquish/Config.in b/package/libsquish/Config.in
new file mode 100644
index 0000000..10af979
--- /dev/null
+++ b/package/libsquish/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_LIBSQUISH
+	bool "libsquish"
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  The squish library (abbreviated to libsquish) is an open source DXT
+	  compression library written in C++
+
+	  https://code.google.com/p/libsquish
+
+comment "libsquish needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/libsquish/libsquish.mk b/package/libsquish/libsquish.mk
new file mode 100644
index 0000000..d381370
--- /dev/null
+++ b/package/libsquish/libsquish.mk
@@ -0,0 +1,24 @@ 
+################################################################################
+#
+# libsquish
+#
+################################################################################
+
+LIBSQUISH_VERSION = 1.10-openelec
+LIBSQUISH_SOURCE = libsquish-$(LIBSQUISH_VERSION).tar.gz
+LIBSQUISH_SITE = http://sources.openelec.tv/devel
+LIBSQUISH_INSTALL_STAGING = YES
+LIBSQUISH_LICENSE = MIT
+LIBSQUISH_LICENSE_FILES = README
+
+define LIBSQUISH_INSTALL_STAGING_CMDS
+	CXX=$(TARGET_CXX) CXXFLAGS="$(TARGET_CXXFLAGS)" \
+	$(MAKE) -C $(@D) install PREFIX=/usr INSTALL_DIR=$(STAGING_DIR)/usr
+endef
+
+define LIBSQUISH_INSTALL_TARGET_CMDS
+	CXX=$(TARGET_CXX) CXXFLAGS="$(TARGET_CXXFLAGS)" \
+	$(MAKE) -C $(@D) install PREFIX=/usr INSTALL_DIR=$(TARGET_DIR)/usr
+endef
+
+$(eval $(generic-package))