This is a simple library to load images of various formats as SDL surfaces.

This library supports BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG,
TGA, and TIFF formats.
This commit is contained in:
adam 2014-03-31 10:10:14 +00:00
parent 265fed0e07
commit 4fc6fb57f0
7 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,3 @@
This is a simple library to load images of various formats as SDL surfaces.
This library supports BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG,
TGA, and TIFF formats.

View file

@ -0,0 +1,31 @@
# $NetBSD: Makefile,v 1.1 2014/03/31 10:10:14 adam Exp $
DISTNAME= SDL2_image-2.0.0
CATEGORIES= graphics devel
MASTER_SITES= http://www.libsdl.org/projects/SDL_image/release/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.libsdl.org/projects/SDL_image/
COMMENT= Load images as SDL surfaces
LICENSE= zlib
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_LANGUAGES= c
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
INSTALLATION_DIRS= bin
PKGCONFIG_OVERRIDE= SDL_image.pc.in
CHECK_PORTABILITY_SKIP= external/tiff-4.0.3/configure
post-install:
${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/showimage \
${DESTDIR}${PREFIX}/bin/showimage2
.include "../../devel/SDL2/buildlink3.mk"
.include "../../graphics/libwebp/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,5 @@
@comment $NetBSD: PLIST,v 1.1 2014/03/31 10:10:14 adam Exp $
bin/showimage2
include/SDL2/SDL_image.h
lib/libSDL2_image.la
lib/pkgconfig/SDL2_image.pc

View file

@ -0,0 +1,16 @@
# $NetBSD: buildlink3.mk,v 1.1 2014/03/31 10:10:14 adam Exp $
BUILDLINK_TREE+= SDL2_image
.if !defined(SDL2_IMAGE_BUILDLINK3_MK)
SDL2_IMAGE_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.SDL2_image+= SDL2_image>=2.0.0
BUILDLINK_ABI_DEPENDS.SDL2_image+= SDL2_image>=2.0.0
BUILDLINK_PKGSRCDIR.SDL2_image?= ../../graphics/SDL2_image
BUILDLINK_INCDIRS.SDL2_image?= include/SDL2
.include "../../devel/SDL2/buildlink3.mk"
.endif # SDL2_IMAGE_BUILDLINK3_MK
BUILDLINK_TREE+= -SDL2_image

View file

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1 2014/03/31 10:10:14 adam Exp $
SHA1 (SDL2_image-2.0.0.tar.gz) = 20b1b0db9dd540d6d5e40c7da8a39c6a81248865
RMD160 (SDL2_image-2.0.0.tar.gz) = 1bd3e383bada30852fe1bcc4ac1f5d144a9158ca
Size (SDL2_image-2.0.0.tar.gz) = 8398016 bytes
SHA1 (patch-Makefile.in) = dbe3c8578e6b2be2ab1ed82c170817417f30e021
SHA1 (patch-configure) = 78123313737fe09eed0d80e5c30eef63e16e908b

View file

@ -0,0 +1,15 @@
$NetBSD: patch-Makefile.in,v 1.1 2014/03/31 10:10:14 adam Exp $
Explicitly tell libtool the compiler type.
--- Makefile.in.orig 2014-03-21 08:02:25.000000000 +0000
+++ Makefile.in
@@ -124,7 +124,7 @@ AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-libSDL2_image_la_LINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+libSDL2_image_la_LINK = $(LIBTOOL) --tag CC $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \
$(OBJCFLAGS) $(libSDL2_image_la_LDFLAGS) $(LDFLAGS) -o $@
PROGRAMS = $(noinst_PROGRAMS)

View file

@ -0,0 +1,14 @@
$NetBSD: patch-configure,v 1.1 2014/03/31 10:10:14 adam Exp $
Add frameworks required to link under OS X.
--- configure.orig 2014-03-19 15:55:16.000000000 +0000
+++ configure
@@ -12024,6 +12024,7 @@ fi
if test x$enable_imageio = xyes; then
IMG_LIBS="-Wl,-framework,ApplicationServices $IMG_LIBS"
+ IMG_LIBS="-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,ForceFeedback $IMG_LIBS"
else
CFLAGS="$CFLAGS -DSDL_IMAGE_USE_COMMON_BACKEND"
fi