aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mk/bsd.sdl.mk90
-rw-r--r--audio/Makefile1
-rw-r--r--audio/sdl2_mixer/Makefile60
-rw-r--r--audio/sdl2_mixer/distinfo2
-rw-r--r--audio/sdl2_mixer/pkg-descr6
-rw-r--r--audio/sdl2_mixer/pkg-plist7
-rw-r--r--graphics/Makefile2
-rw-r--r--graphics/sdl2_image/Makefile27
-rw-r--r--graphics/sdl2_image/distinfo2
-rw-r--r--graphics/sdl2_image/pkg-descr18
-rw-r--r--graphics/sdl2_image/pkg-plist7
-rw-r--r--graphics/sdl2_ttf/Makefile36
-rw-r--r--graphics/sdl2_ttf/distinfo2
-rw-r--r--graphics/sdl2_ttf/pkg-descr15
-rw-r--r--graphics/sdl2_ttf/pkg-plist9
-rw-r--r--net/Makefile1
-rw-r--r--net/sdl2_net/Makefile21
-rw-r--r--net/sdl2_net/distinfo2
-rw-r--r--net/sdl2_net/pkg-descr5
-rw-r--r--net/sdl2_net/pkg-plist7
20 files changed, 284 insertions, 36 deletions
diff --git a/Mk/bsd.sdl.mk b/Mk/bsd.sdl.mk
index ba1077a65b80..7a714f63914b 100644
--- a/Mk/bsd.sdl.mk
+++ b/Mk/bsd.sdl.mk
@@ -32,89 +32,99 @@
# $FreeBSD$
#
-SDL_Include_MAINTAINER= edwin@FreeBSD.org
+SDL_Include_MAINTAINER= mva@FreeBSD.org
#
-# These are the current supported SDL modules
+# These are the current supported SDL1.2 modules
#
-_USE_SDL_ALL= console gfx gui image mixer mm net pango sdl sound ttf
+_USE_SDL_ALL= console gfx image mixer mm net pango sdl sound ttf
+#
+# These are the current supported SDL2 modules
+#
+_USE_SDL_ALL+= image2 mixer2 net2 sdl2 ttf2
#
# Variables used to determine what is needed:
-# _VERSION_xxx version of the shared library (required)
# _SUBDIR_xxx subdirectory below ${PORTSDIR} (required)
# _PORTDIR_xxx subdirectory below ${PORTSDIR}/${_SUBDIR_xxx}, default sdl_xxx
# _LIB_xxx name of the shared lib, default SDL_xxx
# _REQUIRES_xxx also needs these SDL libraries
#
-_VERSION_console= 0
_SUBDIR_console= devel
+_PORTDIR_console= sdl_console
_LIB_console= SDL_console-2.1
_REQUIRES_console= sdl
-_VERSION_gfx= 22
_SUBDIR_gfx= graphics
+_PORTDIR_gfx= sdl_gfx
+_LIB_gfx= SDL_gfx
_REQUIRES_gfx= sdl
-_VERSION_gui= 0
-_SUBDIR_gui= x11-toolkits
-_REQUIRES_gui= sdl image ttf
-
-_VERSION_image= 8
_SUBDIR_image= graphics
+_PORTDIR_image= sdl_image
_LIB_image= SDL_image-1.2
_REQUIRES_image=sdl
-_VERSION_mixer= 12
_SUBDIR_mixer= audio
+_PORTDIR_mixer= sdl_mixer
_LIB_mixer= SDL_mixer-1.2
_REQUIRES_mixer=sdl
-_VERSION_mm= 8
_SUBDIR_mm= devel
-_LIB_mm= SDLmm
_PORTDIR_mm= sdlmm
+_LIB_mm= SDLmm
_REQUIRES_mm= sdl
-_VERSION_net= 8
_SUBDIR_net= net
+_PORTDIR_net= sdl_net
_LIB_net= SDL_net-1.2
_REQUIRES_net= sdl
-_VERSION_pango= 2
_SUBDIR_pango= x11-toolkits
+_PORTDIR_pango= sdl_pango
_LIB_pango= SDL_Pango
_REQUIRES_pango=sdl
-_VERSION_sdl= 11
_SUBDIR_sdl= devel
-_LIB_sdl= SDL-1.2
_PORTDIR_sdl= sdl12
+_LIB_sdl= SDL-1.2
+_REQUIRES_sdl=
-_VERSION_sound= 1
_SUBDIR_sound= audio
+_PORTDIR_sound= sdl_sound
+_LIB_sound= SDL_sound
_REQUIRES_sound=sdl
-_VERSION_ttf= 10
_SUBDIR_ttf= graphics
+_PORTDIR_ttf= sdl_ttf
_LIB_ttf= SDL_ttf-2.0
_REQUIRES_ttf= sdl
-#
-# Update the variables if they need the default values.
-#
-.for component in ${_USE_SDL_ALL}
-. if !defined(_LIB_${component})
-_LIB_${component}=SDL_${component}
-. endif
-. if !defined(_PORTDIR_${component})
-_PORTDIR_${component}=sdl_${component}
-. endif
-. if !defined(_REQUIRES_${component})
-_REQUIRES_${component}=
-. endif
-.endfor
+_SUBDIR_image2= graphics
+_PORTDIR_image2= sdl2_image
+_LIB_image2= SDL2_image
+_REQUIRES_image2= sdl2
+
+_SUBDIR_mixer2= audio
+_PORTDIR_mixer2= sdl2_mixer
+_LIB_mixer2= SDL2_mixer
+_REQUIRES_mixer2= sdl2
+
+_SUBDIR_net2= net
+_PORTDIR_net2= sdl2_net
+_LIB_net2= SDL2_net
+_REQUIRES_net2= sdl2
+
+_SUBDIR_sdl2= devel
+_PORTDIR_sdl2= sdl20
+_LIB_sdl2= SDL2
+_REQUIRES_sdl2=
+
+_SUBDIR_ttf2= graphics
+_PORTDIR_ttf2= sdl2_ttf
+_LIB_ttf2= SDL2_ttf
+_REQUIRES_ttf2= sdl2
#
# If WANT_SDL is defined, check for the available libraries
@@ -127,7 +137,7 @@ SDL_Include_pre= bsd.sdl.mk
HAVE_SDL?=
.if defined(WANT_SDL)
.for component in ${_USE_SDL_ALL}
-.if exists(${LOCALBASE}/lib/lib${_LIB_${component}}.so.${_VERSION_${component}})
+.if exists(${LOCALBASE}/lib/lib${_LIB_${component}}.so)
HAVE_SDL+= ${component}
.endif
.endfor
@@ -177,16 +187,24 @@ __USE_SDL+= ${component}
# Finally make the list of libs required
#
.for component in ${__USE_SDL}
-LIB_DEPENDS+= ${_LIB_${component}}.${_VERSION_${component}}:${PORTSDIR}/${_SUBDIR_${component}}/${_PORTDIR_${component}}
+LIB_DEPENDS+= ${_LIB_${component}}:${PORTSDIR}/${_SUBDIR_${component}}/${_PORTDIR_${component}}
.endfor
#
# "Normal" dependencies and variables
#
+.if ${__USE_SDL:Msdl} != ""
BUILD_DEPENDS+= ${SDL_CONFIG}:${PORTSDIR}/${_SUBDIR_sdl}/${_PORTDIR_sdl}
SDL_CONFIG?= ${LOCALBASE}/bin/sdl-config
CONFIGURE_ENV+= SDL_CONFIG=${SDL_CONFIG}
MAKE_ENV+= SDL_CONFIG=${SDL_CONFIG}
+.endif
+.if ${__USE_SDL:Msdl2} != ""
+BUILD_DEPENDS+= ${SDL2_CONFIG}:${PORTSDIR}/${_SUBDIR_sdl2}/${_PORTDIR_sdl2}
+SDL2_CONFIG?= ${LOCALBASE}/bin/sdl2-config
+CONFIGURE_ENV+= SDL2_CONFIG=${SDL2_CONFIG}
+MAKE_ENV+= SDL2_CONFIG=${SDL2_CONFIG}
+.endif
.endif
.endif
diff --git a/audio/Makefile b/audio/Makefile
index cb48b6ffae8a..c12ba52d51d7 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -703,6 +703,7 @@
SUBDIR += schism
SUBDIR += scmpc
SUBDIR += scrobbler
+ SUBDIR += sdl2_mixer
SUBDIR += sdl_mixer
SUBDIR += sdl_sound
SUBDIR += sfront
diff --git a/audio/sdl2_mixer/Makefile b/audio/sdl2_mixer/Makefile
new file mode 100644
index 000000000000..f184fecc080c
--- /dev/null
+++ b/audio/sdl2_mixer/Makefile
@@ -0,0 +1,60 @@
+# $FreeBSD$
+
+PORTNAME= sdl2_mixer
+PORTVERSION= 2.0.p1
+CATEGORIES= audio
+MASTER_SITES= http://www.libsdl.org/tmp/SDL_mixer/release/
+DISTNAME= SDL2_mixer-2.0.0
+
+MAINTAINER= mva@FreeBSD.org
+COMMENT= A sample multi-channel audio mixer library
+
+LICENSE= ZLIB
+
+USES= pathfix pkgconfig:build
+USE_GMAKE= yes
+USE_SDL= sdl2
+GNU_CONFIGURE= yes
+LDFLAGS+= -L${LOCALBASE}/lib
+CPPFLAGS+= -I${LOCALBASE}/include
+USE_LDCONFIG= yes
+
+OPTIONS_DEFINE= FLUIDSYNTH MODPLUG FLAC VORBIS
+OPTIONS_DEFAULT= FLUIDSYNTH MODPLUG FLAC VORBIS
+
+FLUIDSYNTH_DESC= Enable SoundFont2 Midi support via fluidsynth
+MODPLUG_DESC= Enable MOD music via libModPlug
+FLAC_DESC= Enable FLAC encoding support via flac
+VORBIS_DESC= Enable Ogg Vorbis music
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MMODPLUG}
+LIB_DEPENDS+= modplug:${PORTSDIR}/audio/libmodplug
+CONFIGURE_ARGS+= --enable-music-mod --enable-music-mod-modplug
+.else
+CONFIGURE_ARGS+= --disable-music-mod --disable-music-mod-modplug
+.endif
+
+.if ${PORT_OPTIONS:MFLAC}
+LIB_DEPENDS+= FLAC:${PORTSDIR}/audio/flac
+CONFIGURE_ARGS+= --enable-music-flac
+.else
+CONFIGURE_ARGS+= --disable-music-flac
+.endif
+
+.if ${PORT_OPTIONS:MFLUIDSYNTH}
+LIB_DEPENDS+= fluidsynth:${PORTSDIR}/audio/fluidsynth
+CONFIGURE_ARGS+= --enable-music-midi --enable-music-midi-fluidsynth
+.else
+CONFIGURE_ARGS+= --disable-music-midi --disable-music-midi-fluidsynth
+.endif
+
+.if ${PORT_OPTIONS:MVORBIS}
+LIB_DEPENDS+= vorbis:${PORTSDIR}/audio/libvorbis
+CONFIGURE_ARGS+= --enable-music-ogg
+.else
+CONFIGURE_ARGS+= --disable-music-ogg
+.endif
+
+.include <bsd.port.mk>
diff --git a/audio/sdl2_mixer/distinfo b/audio/sdl2_mixer/distinfo
new file mode 100644
index 000000000000..8d8fb422c147
--- /dev/null
+++ b/audio/sdl2_mixer/distinfo
@@ -0,0 +1,2 @@
+SHA256 (SDL2_mixer-2.0.0.tar.gz) = a3d72b0a02d27defc58665ffeef09247d874ea3e652a0326ef9b9f339581f836
+SIZE (SDL2_mixer-2.0.0.tar.gz) = 10109109
diff --git a/audio/sdl2_mixer/pkg-descr b/audio/sdl2_mixer/pkg-descr
new file mode 100644
index 000000000000..4ba39805f1c8
--- /dev/null
+++ b/audio/sdl2_mixer/pkg-descr
@@ -0,0 +1,6 @@
+SDL_mixer is a sample multi-channel audio mixer library. It supports any number
+of simultaneously playing channels of 16 bit stereo audio, plus a single
+channel of music, mixed by the popular MikMod MOD, Timidity MIDI and SMPEG MP3
+libraries.
+
+WWW: http://www.libsdl.org/projects/SDL_mixer/index.html
diff --git a/audio/sdl2_mixer/pkg-plist b/audio/sdl2_mixer/pkg-plist
new file mode 100644
index 000000000000..a7552a9553af
--- /dev/null
+++ b/audio/sdl2_mixer/pkg-plist
@@ -0,0 +1,7 @@
+include/SDL2/SDL_mixer.h
+lib/libSDL2_mixer-2.0.so
+lib/libSDL2_mixer-2.0.so.0
+lib/libSDL2_mixer.a
+lib/libSDL2_mixer.la
+lib/libSDL2_mixer.so
+libdata/pkgconfig/SDL2_mixer.pc
diff --git a/graphics/Makefile b/graphics/Makefile
index ac8623854215..b8734cdca6f3 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -985,6 +985,8 @@
SUBDIR += scr2png
SUBDIR += scrot
SUBDIR += scwm-icons
+ SUBDIR += sdl2_image
+ SUBDIR += sdl2_ttf
SUBDIR += sdl_gfx
SUBDIR += sdl_image
SUBDIR += sdl_ttf
diff --git a/graphics/sdl2_image/Makefile b/graphics/sdl2_image/Makefile
new file mode 100644
index 000000000000..dcf2540238dc
--- /dev/null
+++ b/graphics/sdl2_image/Makefile
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PORTNAME= sdl2_image
+PORTVERSION= 2.0.p1
+CATEGORIES= graphics
+MASTER_SITES= http://www.libsdl.org/tmp/SDL_image/release/
+DISTNAME= SDL2_image-2.0.0
+
+MAINTAINER= mva@FreeBSD.org
+COMMENT= A simple library to load images of various formats as SDL surfaces
+
+LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \
+ png15:${PORTSDIR}/graphics/png \
+ tiff:${PORTSDIR}/graphics/tiff \
+ webp:${PORTSDIR}/graphics/webp
+
+USES= pkgconfig:build pathfix
+USE_AUTOTOOLS= libtool
+USE_SDL= sdl2
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -lm
+USE_LDCONFIG= yes
+MAKE_JOBS_SAFE= yes
+
+.include <bsd.port.mk>
diff --git a/graphics/sdl2_image/distinfo b/graphics/sdl2_image/distinfo
new file mode 100644
index 000000000000..f0fa1a91ac37
--- /dev/null
+++ b/graphics/sdl2_image/distinfo
@@ -0,0 +1,2 @@
+SHA256 (SDL2_image-2.0.0.tar.gz) = 9c14ab164ac4a9d9afad6f76ca65da0021cfc0108b0152771ca19926b426ab33
+SIZE (SDL2_image-2.0.0.tar.gz) = 8397556
diff --git a/graphics/sdl2_image/pkg-descr b/graphics/sdl2_image/pkg-descr
new file mode 100644
index 000000000000..83855f2811c5
--- /dev/null
+++ b/graphics/sdl2_image/pkg-descr
@@ -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: http://www.libsdl.org/projects/SDL_image/
diff --git a/graphics/sdl2_image/pkg-plist b/graphics/sdl2_image/pkg-plist
new file mode 100644
index 000000000000..6365ab58aaf3
--- /dev/null
+++ b/graphics/sdl2_image/pkg-plist
@@ -0,0 +1,7 @@
+include/SDL2/SDL_image.h
+lib/libSDL2_image-2.0.so
+lib/libSDL2_image-2.0.so.0
+lib/libSDL2_image.a
+lib/libSDL2_image.la
+lib/libSDL2_image.so
+libdata/pkgconfig/SDL2_image.pc
diff --git a/graphics/sdl2_ttf/Makefile b/graphics/sdl2_ttf/Makefile
new file mode 100644
index 000000000000..7ba9eb470fc4
--- /dev/null
+++ b/graphics/sdl2_ttf/Makefile
@@ -0,0 +1,36 @@
+# $FreeBSD$
+
+PORTNAME= sdl2_ttf
+PORTVERSION= 2.0.p1
+CATEGORIES= graphics
+MASTER_SITES= http://www.libsdl.org/tmp/SDL_ttf/release/
+DISTNAME= SDL2_ttf-2.0.12
+
+MAINTAINER= mva@FreeBSD.org
+COMMENT= A library to use TrueType fonts to render text in SDL applications
+
+LIB_DEPENDS= freetype:${PORTSDIR}/print/freetype2
+
+USES= pkgconfig:build pathfix
+USE_SDL= sdl2
+USE_AUTOTOOLS= libtool
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+USE_LDCONFIG= yes
+MAKE_JOBS_SAFE= yes
+
+OPTIONS_DEFINE= OPENGL
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MOPENGL}
+USE_GL= yes
+.endif
+
+post-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/.libs/glfont ${PREFIX}/bin/sdl2-glfont
+ ${INSTALL_PROGRAM} ${WRKSRC}/.libs/showfont ${PREFIX}/bin/sdl2-showfont
+
+.include <bsd.port.mk>
diff --git a/graphics/sdl2_ttf/distinfo b/graphics/sdl2_ttf/distinfo
new file mode 100644
index 000000000000..fca96d85902e
--- /dev/null
+++ b/graphics/sdl2_ttf/distinfo
@@ -0,0 +1,2 @@
+SHA256 (SDL2_ttf-2.0.12.tar.gz) = ecb535c9735068cdef18a0f1f49faae4310273c0704d6cff85a1c0e0d3d5dcfb
+SIZE (SDL2_ttf-2.0.12.tar.gz) = 5515661
diff --git a/graphics/sdl2_ttf/pkg-descr b/graphics/sdl2_ttf/pkg-descr
new file mode 100644
index 000000000000..f105e2225e7b
--- /dev/null
+++ b/graphics/sdl2_ttf/pkg-descr
@@ -0,0 +1,15 @@
+This library is a wrapper around the excellent FreeType library.
+
+WARNING: There may be patent issues with using the FreeType library. Check the
+FreeType website for up-to-date details.
+
+This library allows you to use TrueType fonts to render text in SDL
+applications.
+
+Be careful when including fonts with your application, as many of them are
+copyrighted. The Microsoft fonts, for example, are not freely redistributable
+and even the free "web" fonts they provide are only redistributable in their
+special executable installer form (May 1998). There are plenty of freeware and
+shareware fonts available on the Internet though, and may suit your purposes.
+
+WWW: http://www.libsdl.org/projects/SDL_ttf/
diff --git a/graphics/sdl2_ttf/pkg-plist b/graphics/sdl2_ttf/pkg-plist
new file mode 100644
index 000000000000..29d739f88fe3
--- /dev/null
+++ b/graphics/sdl2_ttf/pkg-plist
@@ -0,0 +1,9 @@
+bin/sdl2-glfont
+bin/sdl2-showfont
+include/SDL2/SDL_ttf.h
+lib/libSDL2_ttf-2.0.so
+lib/libSDL2_ttf-2.0.so.10
+lib/libSDL2_ttf.a
+lib/libSDL2_ttf.la
+lib/libSDL2_ttf.so
+libdata/pkgconfig/SDL2_ttf.pc
diff --git a/net/Makefile b/net/Makefile
index a2bbfc499b9b..ec04fed0904d 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1074,6 +1074,7 @@
SUBDIR += scnc
SUBDIR += scr_ipfm
SUBDIR += scribe
+ SUBDIR += sdl2_net
SUBDIR += sdl_net
SUBDIR += seda
SUBDIR += sendemail
diff --git a/net/sdl2_net/Makefile b/net/sdl2_net/Makefile
new file mode 100644
index 000000000000..3152f4b4e747
--- /dev/null
+++ b/net/sdl2_net/Makefile
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+PORTNAME= sdl2_net
+PORTVERSION= 2.0.p1
+CATEGORIES= net
+MASTER_SITES= http://www.libsdl.org/tmp/SDL_net/release/
+DISTNAME= SDL2_net-2.0.0
+
+MAINTAINER= mva@FreeBSD.org
+COMMENT= A small sample cross-platform networking library
+
+USE_AUTOTOOLS= libtool
+USE_SDL= sdl2
+USES= pathfix pkgconfig:build
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+USE_LDCONFIG= yes
+
+CONFIGURE_ARGS+=--disable-gui
+
+.include <bsd.port.mk>
diff --git a/net/sdl2_net/distinfo b/net/sdl2_net/distinfo
new file mode 100644
index 000000000000..42c83e9033b3
--- /dev/null
+++ b/net/sdl2_net/distinfo
@@ -0,0 +1,2 @@
+SHA256 (SDL2_net-2.0.0.tar.gz) = 28dac7dac4c91f432b025b86a2425047d42ee943be671c4e3c23e81f702f4547
+SIZE (SDL2_net-2.0.0.tar.gz) = 345094
diff --git a/net/sdl2_net/pkg-descr b/net/sdl2_net/pkg-descr
new file mode 100644
index 000000000000..23b662c64f0f
--- /dev/null
+++ b/net/sdl2_net/pkg-descr
@@ -0,0 +1,5 @@
+This is a small sample cross-platform networking library, with a sample chat
+client and server application. The chat client uses the GUIlib GUI framework
+library.
+
+WWW: http://www.libsdl.org/projects/SDL_net/
diff --git a/net/sdl2_net/pkg-plist b/net/sdl2_net/pkg-plist
new file mode 100644
index 000000000000..da8521386901
--- /dev/null
+++ b/net/sdl2_net/pkg-plist
@@ -0,0 +1,7 @@
+include/SDL2/SDL_net.h
+lib/libSDL2_net-2.0.so
+lib/libSDL2_net-2.0.so.0
+lib/libSDL2_net.a
+lib/libSDL2_net.la
+lib/libSDL2_net.so
+libdata/pkgconfig/SDL2_net.pc