Skip to contentSkip to conversation

sdl2_gfx: new package

PATCH New Peter Thompson 2 participants 9 messages Jul 12, 2016 – Jul 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 sdl2_gfx: new package

sdl2_gfx created from sdl_gfx with minor changes for sdl2

---
 package/Config.in              |  1 +
 package/sdl2_gfx/Config.in     | 10 ++++++++++
 package/sdl2_gfx/sdl2_gfx.hash |  2 ++
 package/sdl2_gfx/sdl2_gfx.mk   | 28 ++++++++++++++++++++++++++++
 4 files changed, 41 insertions(+)
 create mode 100644 package/sdl2_gfx/Config.in
 create mode 100644 package/sdl2_gfx/sdl2_gfx.hash
 create mode 100644 package/sdl2_gfx/sdl2_gfx.mk
package/Config.in +1 -0
index 1910251..5a75234 100644
@@ -263,6 +263,7 @@ comment "Graphic libraries"
 	source "package/sdl_sound/Config.in"
 	source "package/sdl_ttf/Config.in"
 	source "package/sdl2/Config.in"
+	source "package/sdl2_gfx/Config.in"
 
 comment "Other GUIs"
 	source "package/qt/Config.in"
package/sdl2_gfx/Config.in new file +10 -0
new file mode 100644
index 0000000..09db436
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_SDL2_GFX
+	bool "SDL2_gfx"
+	depends on BR2_PACKAGE_SDL2
+	help
+	  The SDL2_gfx library is an extension to the SDL2 library which
+	  provides basic antialiased drawing routines such as lines,
+	  circles or polygons, an interpolating rotozoomer for SDL
+	  surfaces, framerate control and MMX image filters.
+
+	  http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx
package/sdl2_gfx/sdl2_gfx.hash new file +2 -0
new file mode 100644
index 0000000..4cb07ee
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 d69bcbceb811b4e5712fbad3ede737166327f44b727f1388c32581dbbe8c599a  SDL2_gfx-1.0.1.tar.gz
package/sdl2_gfx/sdl2_gfx.mk new file +28 -0
new file mode 100644
index 0000000..b409845
@@ -0,0 +1,28 @@
+################################################################################
+#
+# sdl2_gfx
+#
+################################################################################
+
+SDL2_GFX_VERSION_MAJOR = 2.0
+SDL2_GFX_VERSION = 1.0.1
+SDL2_GFX_SOURCE = SDL2_gfx-$(SDL2_GFX_VERSION).tar.gz
+SDL2_GFX_SITE = http://www.ferzkopp.net/Software/SDL2_gfx
+SDL2_GFX_LICENSE = zlib
+SDL2_GFX_LICENSE_FILES = COPYING LICENSE
+SDL2_GFX_INSTALL_STAGING = YES
+SDL2_GFX_DEPENDENCIES = sdl2
+SDL2_GFX_CONF_OPTS = \
+	--with-sdl2-prefix=$(STAGING_DIR)/usr \
+	--disable-sdl2test \
+	--enable-static
+
+# Even though x86_64 processors support MMX, the MMX-specific assembly
+# code in sdl2_gfx is IA32 specific, and does not build for x86_64.
+ifeq ($(BR2_i386)$(BR2_X86_CPU_HAS_MMX),yy)
+SDL2_GFX_CONF_OPTS += --enable-mmx
+else
+SDL2_GFX_CONF_OPTS += --disable-mmx
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/3 sdl2_image: new package

sdl2_image created from sdl2_image with minor changes for sdl2

---
 package/Config.in                  |  1 +
 package/sdl2_image/Config.in       | 61 ++++++++++++++++++++++++++++++++++++++
 package/sdl2_image/sdl2_image.hash |  2 ++
 package/sdl2_image/sdl2_image.mk   | 51 +++++++++++++++++++++++++++++++
 4 files changed, 115 insertions(+)
 create mode 100644 package/sdl2_image/Config.in
 create mode 100644 package/sdl2_image/sdl2_image.hash
 create mode 100644 package/sdl2_image/sdl2_image.mk
package/Config.in +1 -0
index 5a75234..b79c237 100644
@@ -264,6 +264,7 @@ comment "Graphic libraries"
 	source "package/sdl_ttf/Config.in"
 	source "package/sdl2/Config.in"
 	source "package/sdl2_gfx/Config.in"
+	source "package/sdl2_image/Config.in"
 
 comment "Other GUIs"
 	source "package/qt/Config.in"
package/sdl2_image/Config.in new file +61 -0

61 lines not on this page · raw message

package/sdl2_image/sdl2_image.hash new file +2 -0
new file mode 100644
index 0000000..26d0a88
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 3a3eafbceea5125c04be585373bfd8b3a18f259bd7eae3efc4e6d8e60e0d7f64  SDL2_image-2.0.1.tar.gz
package/sdl2_image/sdl2_image.mk new file +51 -0

51 lines not on this page · raw message

Signature · 1 line
1.9.1
#4 lore raw

PATCH 3/3 sdl2_ttf: new package

In reply to Peter Thompson

sdl2_ttf created from sdl_ttf with some minor changes

---
 package/Config.in              |  1 +
 package/sdl2_ttf/Config.in     |  9 +++++++++
 package/sdl2_ttf/sdl2_ttf.hash |  2 ++
 package/sdl2_ttf/sdl2_ttf.mk   | 20 ++++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/sdl2_ttf/Config.in
 create mode 100644 package/sdl2_ttf/sdl2_ttf.hash
 create mode 100644 package/sdl2_ttf/sdl2_ttf.mk
package/Config.in +1 -0
index b79c237..10617bc 100644
@@ -265,6 +265,7 @@ comment "Graphic libraries"
 	source "package/sdl2/Config.in"
 	source "package/sdl2_gfx/Config.in"
 	source "package/sdl2_image/Config.in"
+	source "package/sdl2_ttf/Config.in"
 
 comment "Other GUIs"
 	source "package/qt/Config.in"
package/sdl2_ttf/Config.in new file +9 -0
new file mode 100644
index 0000000..cb77059
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_SDL2_TTF
+	bool "SDL2_TTF"
+	depends on BR2_PACKAGE_SDL2
+	select BR2_PACKAGE_FREETYPE
+	help
+	  SDL2_ttf is a sample TrueType font library. It allows you to
+	  use TrueType fonts in your SDL2 applications.
+
+	  http://www.libsdl.org/projects/SDL_ttf/
package/sdl2_ttf/sdl2_ttf.hash new file +2 -0
new file mode 100644
index 0000000..515189a
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 34db5e20bcf64e7071fe9ae25acaa7d72bdc4f11ab3ce59acc768ab62fe39276  SDL2_ttf-2.0.14.tar.gz
package/sdl2_ttf/sdl2_ttf.mk new file +20 -0
new file mode 100644
index 0000000..2428e9b
@@ -0,0 +1,20 @@
+################################################################################
+#
+# sdl2_ttf
+#
+################################################################################
+
+SDL2_TTF_VERSION = 2.0.14
+SDL2_TTF_SOURCE = SDL2_ttf-$(SDL2_TTF_VERSION).tar.gz
+SDL2_TTF_SITE = http://www.libsdl.org/projects/SDL_ttf/release
+SDL2_TTF_LICENSE = zlib
+SDL2_TTF_LICENSE_FILES = COPYING
+
+SDL2_TTF_INSTALL_STAGING = YES
+SDL2_TTF_DEPENDENCIES = sdl2 freetype
+SDL2_TTF_CONF_OPTS = \
+	--without-x \
+	--with-freetype-prefix=$(STAGING_DIR)/usr \
+	--with-sdl2-prefix=$(STAGING_DIR)/usr
+
+$(eval $(autotools-package))
Signature · 1 line
1.9.1
#7 lore raw

PATCH 1/3 sdl2_gfx: new package

In reply to Peter Thompson

Hello,

Quoted 3 lines · Peter Thompson

sdl2_gfx created from sdl_gfx with minor changes for sdl2

Thanks, I've applied, but many, many things had to be changed. It did not even build for me. I think you re-used too much of the sdl_gfx package without checking.

package/sdl2_gfx/Config.in line 8

Quoted 10 lines

+++ b/package/sdl2_gfx/Config.in

package/sdl2_gfx/Config.in new file +8 -0
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_SDL2_GFX
+	bool "SDL2_gfx"
+	depends on BR2_PACKAGE_SDL2
+	help
+	  The SDL2_gfx library is an extension to the SDL2 library which
+	  provides basic antialiased drawing routines such as lines,
+	  circles or polygons, an interpolating rotozoomer for SDL
+	  surfaces, framerate control and MMX image filters.

I have rewrapped the Config.in help text.

package/sdl2_gfx/sdl2_gfx.mk line 7

Quoted 1 line
package/sdl2_gfx/sdl2_gfx.mk new file +1 -0
+SDL2_GFX_VERSION_MAJOR = 2.0

This variable is not used anywhere.

package/sdl2_gfx/sdl2_gfx.mk line 12

Quoted 5 lines
package/sdl2_gfx/sdl2_gfx.mk new file +5 -0
+SDL2_GFX_VERSION = 1.0.1
+SDL2_GFX_SOURCE = SDL2_gfx-$(SDL2_GFX_VERSION).tar.gz
+SDL2_GFX_SITE = http://www.ferzkopp.net/Software/SDL2_gfx
+SDL2_GFX_LICENSE = zlib
+SDL2_GFX_LICENSE_FILES = COPYING LICENSE

There is no file named "LICENSE" in the source tree, so I've replaced that with a source file that contains the license text.

package/sdl2_gfx/sdl2_gfx.mk line 14

Quoted 2 lines
package/sdl2_gfx/sdl2_gfx.mk new file +2 -0
+SDL2_GFX_INSTALL_STAGING = YES
+SDL2_GFX_DEPENDENCIES = sdl2

I've added host-pkgconf in the dependencies since sdl2_gfx configure script tries to use pkg-config.

package/sdl2_gfx/sdl2_gfx.mk line 16

Quoted 2 lines
package/sdl2_gfx/sdl2_gfx.mk new file +2 -0
+SDL2_GFX_CONF_OPTS = \
+	--with-sdl2-prefix=$(STAGING_DIR)/usr \

This option doesn't exist, it is called --with-sdl-prefix. But once pkg-config is available, passing --with-sdl-prefix is useless.

package/sdl2_gfx/sdl2_gfx.mk line 17

Quoted 1 line
package/sdl2_gfx/sdl2_gfx.mk new file +1 -0
+	--disable-sdl2test \

This option doesn't exist, it is called --disable-sdltest.

package/sdl2_gfx/sdl2_gfx.mk line 18

Quoted 1 line
package/sdl2_gfx/sdl2_gfx.mk new file +1 -0
+	--enable-static

This option shouldn't be passed by packages, the autotools package infrastructure takes care of passing --{enable,disable}-{static,shared} as needed.

Also, the configure/Makefile.in files need to be regenerated, otherwise it tries to use aclocal at build time. So I've added SDL2_AUTORECONF = YES.

Summary of the changes:

[Thomas:
- Rewrap Config.in help text.
- Remove unused SDL2_GFX_VERSION_MAJOR variable
- Add host-pkgconf to the dependencies, since pkg-config is used to find sdl2. This fixes the build, otherwise -I/usr/include/sdl2 was added to the CFLAGS when sdl2-config was found on the host machine.
- Remove --with-sdl2-prefix, since this option doesn't exist, and using pkg-config is a better solution (--with-sdl-prefix exists, but is not useful when pkg-config is available).
- Remove --enable-static, packages are not supposed to pass such an option, it's not automatically by the autotools package infrastructure.
- Pass --disable-sdltest instead of --disable-sdl2test since the latter doesn't exist, while the former does.
- Pass SDL2_GFX_AUTORECONF = YES since the configure/Makefile.in are not up-to-date and therefore it tries to use aclocal at build time.
- Adjust _LICENSE_FILES, since there is no file named 'LICENSE', use the smallest source file instead, since it contains the license text.]

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#8 lore raw

PATCH 1/3 sdl2_gfx: new package

Thomas,

Thanks very very much! Sorry that it took you so much effort to get it
working. Your added work is appreciated. It had seemed to work for me -
not sure where I went wrong. Hopefully my future contributions improve as my knowledge improves.

Peter

Quoted 86 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · Peter Thompson

sdl2_gfx created from sdl_gfx with minor changes for sdl2

Thanks, I've applied, but many, many things had to be changed. It did not even build for me. I think you re-used too much of the sdl_gfx package without checking.

package/sdl2_gfx/Config.in line 8

Quoted 10 lines

+++ b/package/sdl2_gfx/Config.in

package/sdl2_gfx/Config.in new file +8 -0
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_SDL2_GFX
+     bool "SDL2_gfx"
+     depends on BR2_PACKAGE_SDL2
+     help
+       The SDL2_gfx library is an extension to the SDL2 library which
+       provides basic antialiased drawing routines such as lines,
+       circles or polygons, an interpolating rotozoomer for SDL
+       surfaces, framerate control and MMX image filters.

I have rewrapped the Config.in help text.

package/sdl2_gfx/sdl2_gfx.mk line 7

Quoted 1 line
package/sdl2_gfx/sdl2_gfx.mk new file +1 -0
+SDL2_GFX_VERSION_MAJOR = 2.0

This variable is not used anywhere.

package/sdl2_gfx/sdl2_gfx.mk line 12

Quoted 5 lines
package/sdl2_gfx/sdl2_gfx.mk new file +5 -0
+SDL2_GFX_VERSION = 1.0.1
+SDL2_GFX_SOURCE = SDL2_gfx-$(SDL2_GFX_VERSION).tar.gz
+SDL2_GFX_SITE = http://www.ferzkopp.net/Software/SDL2_gfx
+SDL2_GFX_LICENSE = zlib
+SDL2_GFX_LICENSE_FILES = COPYING LICENSE

There is no file named "LICENSE" in the source tree, so I've replaced that with a source file that contains the license text.

package/sdl2_gfx/sdl2_gfx.mk line 14

Quoted 2 lines
package/sdl2_gfx/sdl2_gfx.mk new file +2 -0
+SDL2_GFX_INSTALL_STAGING = YES
+SDL2_GFX_DEPENDENCIES = sdl2

I've added host-pkgconf in the dependencies since sdl2_gfx configure script tries to use pkg-config.

package/sdl2_gfx/sdl2_gfx.mk line 16

Quoted 2 lines
package/sdl2_gfx/sdl2_gfx.mk new file +2 -0
+SDL2_GFX_CONF_OPTS = \
+     --with-sdl2-prefix=$(STAGING_DIR)/usr \

This option doesn't exist, it is called --with-sdl-prefix. But once pkg-config is available, passing --with-sdl-prefix is useless.

Quoted 1 line

+ --disable-sdl2test \

This option doesn't exist, it is called --disable-sdltest.

Quoted 1 line

+ --enable-static

This option shouldn't be passed by packages, the autotools package infrastructure takes care of passing --{enable,disable}-{static,shared} as needed.

Also, the configure/Makefile.in files need to be regenerated, otherwise it tries to use aclocal at build time. So I've added SDL2_AUTORECONF = YES.

Summary of the changes:

[Thomas:
- Rewrap Config.in help text.
- Remove unused SDL2_GFX_VERSION_MAJOR variable
- Add host-pkgconf to the dependencies, since pkg-config is used to find sdl2. This fixes the build, otherwise -I/usr/include/sdl2 was added to the CFLAGS when sdl2-config was found on the host machine.
- Remove --with-sdl2-prefix, since this option doesn't exist, and using pkg-config is a better solution (--with-sdl-prefix exists, but is not useful when pkg-config is available).
- Remove --enable-static, packages are not supposed to pass such an option, it's not automatically by the autotools package infrastructure.
- Pass --disable-sdltest instead of --disable-sdl2test since the latter doesn't exist, while the former does.
- Pass SDL2_GFX_AUTORECONF = YES since the configure/Makefile.in are not up-to-date and therefore it tries to use aclocal at build time.
- Adjust _LICENSE_FILES, since there is no file named 'LICENSE', use the smallest source file instead, since it contains the license text.]

Quoted 8 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160715/2bb39757/attachment.html>

#2 lore raw

PATCH 2/3 sdl2_image: new package

In reply to Peter Thompson

Hello,

Quoted 12 lines · Peter Thompson

sdl2_image created from sdl2_image with minor changes for sdl2

---
 package/Config.in                  |  1 +
 package/sdl2_image/Config.in       | 61 ++++++++++++++++++++++++++++++++++++++
 package/sdl2_image/sdl2_image.hash |  2 ++
 package/sdl2_image/sdl2_image.mk   | 51 +++++++++++++++++++++++++++++++
 4 files changed, 115 insertions(+)
 create mode 100644 package/sdl2_image/Config.in
 create mode 100644 package/sdl2_image/sdl2_image.hash
 create mode 100644 package/sdl2_image/sdl2_image.mk

Applied, after doing the following changes:

[Thomas:
- remove all sub-options to select the various image formats. Between no formats enabled and all formats enabled, the size difference of the library is ~30 KB, so it really isn't worth having all those sub-options:
-rwxr-xr-x 1 thomas thomas 22444 juil. 15 15:51 libSDL2_image-2.0.so.0.0.1 -rwxr-xr-x 1 thomas thomas 59216 juil. 15 15:52 libSDL2_image-2.0.so.0.0.1 consequently, we simply enable unconditionally all image formats that don't have any dependency, and use "automatic" dependencies for the 4 formats that require an external library
- remove the host package variant, as it isn't used anywhere.
- remove --with-sdl2-prefix and --with-sdl2-exec-prefix, and instead add a dependency on host-pkgconf so that pkg-config is used
- remove --disable-static, this is handled by the autotools-package infrastructure already
- point <pkg>_LICENSE_FILES to an existing file.]

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 3/3 sdl2_ttf: new package

In reply to Peter Thompson

Hello,

Quoted 12 lines · Peter Thompson

sdl2_ttf created from sdl_ttf with some minor changes

---
 package/Config.in              |  1 +
 package/sdl2_ttf/Config.in     |  9 +++++++++
 package/sdl2_ttf/sdl2_ttf.hash |  2 ++
 package/sdl2_ttf/sdl2_ttf.mk   | 20 ++++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/sdl2_ttf/Config.in
 create mode 100644 package/sdl2_ttf/sdl2_ttf.hash
 create mode 100644 package/sdl2_ttf/sdl2_ttf.mk

Applied after doing the following changes:

[Thomas:
- point <pkg>_LICENSE_FILES to a file that actually exists
- add host-pkgconf to the dependencies
- remove unneeded CONF_OPTS options
- pass FREETYPE_CONFIG in the environment to point to freetype-config]

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/3 sdl2_image: new package

In reply to Thomas Petazzoni

Thanks Thomas for doing all these changes. Your work on this is
appreciated!!

Peter

Quoted 38 lines · Thomas Petazzoni

Hello,

Quoted 6 lines · Peter Thompson

sdl2_image created from sdl2_image with minor changes for sdl2

---
 package/Config.in                  |  1 +
 package/sdl2_image/Config.in       | 61

++++++++++++++++++++++++++++++++++++++

Quoted 6 lines
 package/sdl2_image/sdl2_image.hash |  2 ++
 package/sdl2_image/sdl2_image.mk   | 51 +++++++++++++++++++++++++++++++
 4 files changed, 115 insertions(+)
 create mode 100644 package/sdl2_image/Config.in
 create mode 100644 package/sdl2_image/sdl2_image.hash
 create mode 100644 package/sdl2_image/sdl2_image.mk

Applied, after doing the following changes:

[Thomas:
- remove all sub-options to select the various image formats. Between no formats enabled and all formats enabled, the size difference of the library is ~30 KB, so it really isn't worth having all those sub-options:
-rwxr-xr-x 1 thomas thomas 22444 juil. 15 15:51
libSDL2_image-2.0.so.0.0.1

       -rwxr-xr-x 1 thomas thomas  59216 juil. 15 15:52

libSDL2_image-2.0.so.0.0.1
consequently, we simply enable unconditionally all image formats that don't have any dependency, and use "automatic" dependencies for the 4 formats that require an external library
- remove the host package variant, as it isn't used anywhere.
- remove --with-sdl2-prefix and --with-sdl2-exec-prefix, and instead add a dependency on host-pkgconf so that pkg-config is used
- remove --disable-static, this is handled by the autotools-package infrastructure already
- point <pkg>_LICENSE_FILES to an existing file.]

Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160715/a590c5bd/attachment.html>

#6 lore raw

PATCH 3/3 sdl2_ttf: new package

In reply to Thomas Petazzoni

On behalf of all us SDL2 users, thanks for taking the time to look at, and repair, my 3 submitted patches. Your work is appreciated by many!!!

Peter

Quoted 24 lines · Thomas Petazzoni

Hello,

Quoted 12 lines · Peter Thompson

sdl2_ttf created from sdl_ttf with some minor changes

---
 package/Config.in              |  1 +
 package/sdl2_ttf/Config.in     |  9 +++++++++
 package/sdl2_ttf/sdl2_ttf.hash |  2 ++
 package/sdl2_ttf/sdl2_ttf.mk   | 20 ++++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/sdl2_ttf/Config.in
 create mode 100644 package/sdl2_ttf/sdl2_ttf.hash
 create mode 100644 package/sdl2_ttf/sdl2_ttf.mk

Applied after doing the following changes:

[Thomas:
- point <pkg>_LICENSE_FILES to a file that actually exists
- add host-pkgconf to the dependencies
- remove unneeded CONF_OPTS options
- pass FREETYPE_CONFIG in the environment to point to freetype-config]

Quoted 8 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160715/dbd95a69/attachment.html>