sdl-image-1.2.0 import

This is a simple library to load images of various formats as SDL
surfaces.  This library supports BMP, PPM, PCX, GIF, JPEG, PNG, TGA,
and TIFF formats.

API:
#include "SDL_image.h"

        SDL_Surface *IMG_Load(const char *file);
or
        SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc);
or
        SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc, char
*type);

where type is a string specifying the format (i.e. "PNG" or "pcx").
Note that IMG_Load_RW cannot load TGA images.

An example program 'showimage' is included, with source in showimage.c
This commit is contained in:
obecian 2001-05-07 04:08:40 +00:00
parent f1a090a62b
commit ba288d1d99
9 changed files with 190 additions and 0 deletions

34
devel/sdl-image/Makefile Normal file
View File

@ -0,0 +1,34 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/05/07 04:08:40 obecian Exp $
COMMENT= "SDL image library"
VER= 1.2.0
PROJ= SDL_image
DISTNAME= ${PROJ}-${VER}
PKGNAME= sdl-image-${VER}
CATEGORIES= devel graphics
NEED_VERSION= 1.364
MASTER_SITES= http://www.libsdl.org/projects/${PROJ}/release/
HOMEPAGE= http://www.libsdl.org/
MAINTAINER= Mark Grimes <obecian@openbsd.org>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
LIB_DEPENDS= SDL.:sdl-*-!no_x11:devel/sdl \
png.1::graphics/png \
tiff.35::graphics/tiff \
jpeg.62.::graphics/jpeg
USE_X11= Yes
SEPARATE_BUILD= concurrent
CONFIGURE_STYLE= gnu
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS} -L${X11BASE}/lib"
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (SDL_image-1.2.0.tar.gz) = 4da2392d748dc86ddc52a72b50d77f4a
RMD160 (SDL_image-1.2.0.tar.gz) = fce50527cda14ecebbe109e283597eda55ff7580
SHA1 (SDL_image-1.2.0.tar.gz) = b3dbd2b80a5386d4688809aa08e6610bbd1c6b98

View File

@ -0,0 +1,10 @@
--- Makefile.am.orig Sun May 6 15:23:32 2001
+++ Makefile.am Sun May 6 15:27:39 2001
@@ -27,7 +27,6 @@ EXTRA_DIST = \
autogen.sh
libSDL_image_la_LDFLAGS = \
- -release $(LT_RELEASE) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libSDL_image_la_LIBADD = @IMG_LIBS@

View File

@ -0,0 +1,11 @@
--- Makefile.in.orig Sun May 6 15:23:37 2001
+++ Makefile.in Sun May 6 15:28:08 2001
@@ -98,7 +98,7 @@ libSDL_image_la_SOURCES = IMG.c IMG
EXTRA_DIST = CHANGES VisualC.zip MPWmake.sea.bin IMG_xxx.c autogen.sh
-libSDL_image_la_LDFLAGS = -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+libSDL_image_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libSDL_image_la_LIBADD = @IMG_LIBS@

View File

@ -0,0 +1,51 @@
--- ltconfig.orig Sun May 6 15:23:46 2001
+++ ltconfig Sun May 6 15:30:32 2001
@@ -1105,6 +1105,9 @@ cygwin* | mingw*)
with_gnu_ld=no
fi
;;
+openbsd*)
+ with_gnu_ld=no
+ ;;
esac
@@ -1403,10 +1406,21 @@ else
;;
openbsd*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
- hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then
+ export_dynamic_flag_spec='${wl}-E'
+ fi
+ ;;
+ esac
;;
os2*)
@@ -2029,13 +2043,10 @@ netbsd*)
openbsd*)
version_type=sunos
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- need_version=no
- fi
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method='pass_all'
;;
os2*)

View File

@ -0,0 +1,53 @@
--- ltmain.sh.orig Sun May 6 15:23:53 2001
+++ ltmain.sh Sun May 6 15:31:58 2001
@@ -1799,6 +1799,9 @@ compiler."
# rhapsody is a little odd...
deplibs="$deplibs -framework System"
;;
+ *-*-openbsd*)
+ # do not include libc due to us having libc/libc_r.
+ ;;
*)
# Add libc to deplibs on all other systems.
deplibs="$deplibs -lc"
@@ -3567,40 +3570,6 @@ libdir='$install_libdir'\
# Exit here if they wanted silent mode.
test "$show" = : && exit 0
- echo "----------------------------------------------------------------------"
- echo "Libraries have been installed in:"
- for libdir in $libdirs; do
- echo " $libdir"
- done
- echo
- echo "If you ever happen to want to link against installed libraries"
- echo "in a given directory, LIBDIR, you must either use libtool, and"
- echo "specify the full pathname of the library, or use \`-LLIBDIR'"
- echo "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- echo " during execution"
- fi
- if test -n "$runpath_var"; then
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
- echo " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- echo " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- echo " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- echo
- echo "See any operating system documentation about shared libraries for"
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "----------------------------------------------------------------------"
exit 0
;;

18
devel/sdl-image/pkg/DESCR Normal file
View File

@ -0,0 +1,18 @@
This is a simple library to load images of various formats as SDL surfaces.
This library supports BMP, PPM, PCX, GIF, JPEG, PNG, TGA, and TIFF formats.
API:
#include "SDL_image.h"
SDL_Surface *IMG_Load(const char *file);
or
SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc);
or
SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc, char *type);
where type is a string specifying the format (i.e. "PNG" or "pcx").
Note that IMG_Load_RW cannot load TGA images.
An example program 'showimage' is included, with source in showimage.c
WWW: ${HOMEPAGE}

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2001/05/07 04:08:40 obecian Exp $
lib/libSDL_image.so.0.0
DYNLIBDIR(%B)

View File

@ -0,0 +1,7 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/05/07 04:08:40 obecian Exp $
bin/showimage
include/SDL/SDL_image.h
lib/libSDL_image.a
lib/libSDL_image.la
%%SHARED%%
@dirrm include/SDL