Commit db74120c authored by pi's avatar pi
Browse files

New port: devel/agar

Agar is a cross-platform GUI toolkit. Agar provides a base
framework and a collection of GUI widgets from which GUI
applications can be built.

Agar applications function seamlessly under X11 (with OpenGL),
Windows, MacOS X and SDL 1.2. Agar can also attach an existing
OpenGL or SDL context and operate as window manager for the
application. Agar is compact, efficient, and fully thread-safe.

Agar's functionality can be extended using simple C/C++ class
registration interfaces. Separate libraries which also extend
Agar's capabilities include FreeSG (http://FreeSG.org) and
Edacious (http://edacious.org).

WWW: http://libagar.org/

PR:		208383
Submitted by:	Julien Nadeau <vedge@hypertriton.com>
Reported by:	amdmi3, yuri
parent b2ddaa63
......@@ -95,6 +95,7 @@
SUBDIR += adacurses
SUBDIR += adaid
SUBDIR += aegis
SUBDIR += agar
SUBDIR += ahven
SUBDIR += aifad
SUBDIR += ald
......
# $FreeBSD$
PORTNAME= agar
PORTVERSION= 1.5.0
CATEGORIES= devel
MASTER_SITES= http://stable.hypertriton.com/agar/
MAINTAINER= vedge@hypertriton.com
COMMENT= Cross-platform GUI toolkit
LICENSE= BSD2CLAUSE
USES= libtool pathfix perl5 pkgconfig jpeg
USE_PERL5= build
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_DEFINE= DEBUG FONTCONFIG GUI NETWORK PORTAUDIO SDL SNDFILE X11 XINERAMA
OPTIONS_DEFAULT=FONTCONFIG GUI NETWORK PORTAUDIO SDL SNDFILE X11 XINERAMA
OPTIONS_SUB= yes
NETWORK_DESC= Network support in AG_Net(3)
DEBUG_CONFIGURE_ENABLE= debug
NETWORK_CONFIGURE_ENABLE=network
PORTAUDIO_CONFIGURE_ENABLE=au
PORTAUDIO_CONFIGURE_ON= --with-portaudio=${LOCALBASE}
PORTAUDIO_CONFIGURE_OFF=--without-portaudio
PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio
PORTAUDIO_IMPLIES= SNDFILE
SNDFILE_CONFIGURE_ON= --with-sndfile=${LOCALBASE}
SNDFILE_CONFIGURE_OFF= --without-sndfile
SNDFILE_LIB_DEPENDS= libsndfile.so:audio/libsndfile
SNDFILE_IMPLIES= PORTAUDIO
GUI_CONFIGURE_ENABLE= gui
GUI_USE= JPEG=jpeg
GUI_CONFIGURE_ON= --with-jpeg=${LOCALBASE} \
--with-png=${LOCALBASE} \
--with-freetype=${LOCALBASE}
GUI_LIB_DEPENDS= libpng.so:graphics/png \
libfreetype.so:print/freetype2
FONTCONFIG_CONFIGURE_WITH=fontconfig
FONTCONFIG_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig
FONTCONFIG_IMPLIES= GUI
X11_USE= GL=gl XORG=x11,xext
X11_CONFIGURE_ON= --with-x=${LOCALBASE} --with-glx
X11_CONFIGURE_OFF= --without-x --without-glx
X11_IMPLIES= GUI
XINERAMA_USE= XORG=xinerama
XINERAMA_CONFIGURE_WITH=xinerama
XINERAMA_IMPLIES= X11
SDL_USE= SDL=sdl GL=gl
SDL_CONFIGURE_WITH= sdl
SDL_IMPLIES= GUI
.if defined(MACHINE_CPU) && (${MACHINE_CPU:Msse} == "sse" || ${MACHINE_CPU:Mamd64} == "amd64")
CONFIGURE_ARGS+= --with-sse \
--with-sse-inline
.else
CONFIGURE_ARGS+= --without-sse
.endif
.include <bsd.port.pre.mk>
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libag_*.so.*
post-patch-GUI-off:
@${REINPLACE_CMD} -e 's|^LIBS=.*|LIBS=|' ${WRKSRC}/au/Makefile
@${REINPLACE_CMD} -e 's|^LIBS=.*|LIBS=|' ${WRKSRC}/math/Makefile
.include <bsd.port.post.mk>
TIMESTAMP = 1546729888
SHA256 (agar-1.5.0.tar.gz) = 82342ded342c578141984befe9318f3d376176e5f427ae3278f8985f26663c00
SIZE (agar-1.5.0.tar.gz) = 2427644
Index: core/net.c
===================================================================
--- core/net.c.orig 2015-08-24 07:59:45 UTC
+++ core/net.c
@@ -496,7 +496,7 @@ AG_InitNetworkSubsystem(const AG_NetOps *ops)
void
AG_DestroyNetworkSubsystem(void)
{
- if (agNetOps != NULL) {
+ if (agNetOps != NULL && agNetOps->destroy != NULL) {
agNetOps->destroy();
}
agNetOps = NULL;
Index: math/m_math.c
===================================================================
--- math/m_math.c.orig 2015-08-24 07:59:46 UTC
+++ math/m_math.c
@@ -61,7 +61,14 @@ static size_t
PrintTime(AG_FmtString *fs, char *dst, size_t dstSize)
{
M_Time *t = AG_FMTSTRING_ARG(fs);
- return AG_UnitFormat((double)(*t), agTimeUnits, dst, dstSize);
+#ifdef ENABLE_GUI
+ if (agGUI) {
+ return AG_UnitFormat((double)(*t), agTimeUnits, dst, dstSize);
+ } else
+#endif
+ {
+ return Snprintf(dst, dstSize, "%f", (double)(*t));
+ }
}
static size_t
PrintComplex(AG_FmtString *fs, char *dst, size_t dstSize)
Agar is a cross-platform GUI toolkit. Agar provides a base
framework and a collection of GUI widgets from which GUI
applications can be built.
Agar applications function seamlessly under X11 (with OpenGL),
Windows, MacOS X and SDL 1.2. Agar can also attach an existing
OpenGL or SDL context and operate as window manager for the
application. Agar is compact, efficient, and fully thread-safe.
Agar's functionality can be extended using simple C/C++ class
registration interfaces. Separate libraries which also extend
Agar's capabilities include FreeSG (http://FreeSG.org) and
Edacious (http://edacious.org).
WWW: http://libagar.org/
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment