Thomas Frohwein writes:
> Otherwise looks good to me. The sound stuttering is already present with
> 4.2.3p7. Not sure if that is assumed to be related to tickrate?
>
> Happy to commit if someone else ok's this.
I propose deleting audio/dumb and graphics/allegropng. opensonic now
uses logg bundled with allegro and is the only consumer of these ports.
I redid the sound fix a little to the same effect of giving the
callbacks more time to run to handle keyboard input and sndio. Might as
well have it in there if it works for reivyr and me but not for thfr@
until a better solution comes along.
This diff:
- update to allegro 4.4.3.1
- bumps alleg's major version
- adds new SHARED_LIBS (alleggl, jpgalleg, loadpng and logg)
- move HOMEPAGE to https
- moves to cmake
- removes i386 LDFLAGS="-Wl,-znotext". built fine on i386 when testing
intial draft of this diff so this is not needed.
- update WANTLIB
- updated MASTER_SITES to github
- took cmake bits to detect sndio from FreeBSD
- _module_init() was added to jakemsr@'s files/sndio.c. I cribbed this
from the other audio backends (e.g., src/unix/alsa5.c).
- workaround for stuttering audio in patch-src_unix_uthreads_c
I would like to credit the following people for help with this update.
solene@: initial report for poor opensonic performance.
thfr@: testing and feedback on diff.
reivyr from #openbsd-gaming: testing with Adventure Game Studio, a WIP
port, confirming that sound works
FreeBSD: cmake bits for detecting sndio
https://svnweb.freebsd.org/ports/head/devel/allegro/files/patch-CMakeLists.txt?revision=495105&view=markup
https://svnweb.freebsd.org/ports/head/devel/allegro/files/patch-include_allegro_platform_alunixac.h.cmake?view=markup
https://svnweb.freebsd.org/ports/head/devel/allegro/files/patch-include_allegro_platform_alunix.h?revision=442981&view=markup
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/allegro/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile 12 Jul 2019 20:46:14 -0000 1.20
+++ Makefile 10 Apr 2020 04:41:32 -0000
@@ -4,58 +4,50 @@ BROKEN-hppa = ./src/x/xdga2s.s:25: Error
COMMENT = game programming library for C/C++ developers
-V = 4.2.3
-DISTNAME = allegro-$V
-REVISION = 7
+V = 4.4.3.1
+DISTNAME = allegro-${V}
CATEGORIES = games devel multimedia
-SHARED_LIBS = alleg 1.0 # 4.2
+SHARED_LIBS = alleg 2.0 # 4.4
+SHARED_LIBS += alleggl 0.0 # 4.4
+SHARED_LIBS += jpgalleg 0.0 # 4.4
+SHARED_LIBS += loadpng 0.0 # 4.4
+SHARED_LIBS += logg 0.0 # 4.4
-HOMEPAGE = http://liballeg.org/
-MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=alleg/}
+HOMEPAGE = https://liballeg.org/
# readme.txt: "You may use, modify, redistribute, and generally hack it about
# in any way you like, and you do not have to give us anything in return."
+# alleggl GPLv2/zlib, jpgalleg zlib/libpng, loadpng Public Domain, logg MIT
PERMIT_PACKAGE = Yes
-USE_GMAKE = Yes
-
-MAKE_FILE = makefile
-ALL_TARGET = default
-
-CONFIGURE_STYLE = autoconf
-AUTOCONF_VERSION = 2.63
+MODULES = devel/cmake
SUBST_VARS = V
-WANTLIB = X11 Xcursor Xext Xpm Xxf86dga Xxf86vm c m \
- sndio pthread
-
-CONFIGURE_ARGS = --enable-artsdigi=no \
- --enable-esddigi=no \
- --enable-jackdigi=no \
- --enable-ossdigi=no \
- --enable-ossmidi=no \
- --enable-modules=no \
- --with-x
-# XXX work around bogus configure entry with clang
-CONFIGURE_ENV = allegro_cv_support_include_prefix=yes
-
-.if ${MACHINE_ARCH} == "i386"
-CONFIGURE_ENV += LDFLAGS="-Wl,-znotext"
-.endif
-
-MAKE_ENV += shared_major_minor=${LIBalleg_VERSION}
+WANTLIB += X11 Xcursor Xext Xpm Xxf86vm c m
+WANTLIB += sndio pthread GL GLU ICE SM z
+WANTLIB += ogg vorbis vorbisfile png
+
+MASTER_SITES = https://github.com/liballeg/allegro5/releases/download/${V}/
+
+LIB_DEPENDS = audio/libvorbis \
+ graphics/png
+
+CONFIGURE_ARGS = -DWANT_OSS=OFF \
+ -DWANT_ALSA=OFF \
+ -DWANT_JACK=OFF \
+ -DWANT_SNDIO=ON \
+ -DWANT_EXAMPLES=OFF
NO_TEST = Yes
CFLAGS += -fgnu89-inline
+WRKDIST = ${WRKDIR}/allegro-${V}
post-extract:
cp ${FILESDIR}/sndio.c ${WRKSRC}/src/unix
post-install:
- cd ${WRKSRC} && ${MAKE_PROGRAM} install-man
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/allegro
- rm -f ${WRKSRC}/docs/html/build/tmpfile.txt
- cd ${WRKSRC}/docs/html && pax -rw . ${PREFIX}/share/doc/allegro
+ ${INSTALL_DATA} ${WRKSRC}/addons/logg/loggint.h \
+ ${PREFIX}/include/loggint.h
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/allegro/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo 18 Jan 2015 03:13:55 -0000 1.2
+++ distinfo 10 Apr 2020 04:41:32 -0000
@@ -1,2 +1,2 @@
-SHA256 (allegro-4.2.3.tar.gz) = gA7LvMmd6v2tt5wc52Yz88+uQ1iVHGsr3kwJ9zdOfJs=
-SIZE (allegro-4.2.3.tar.gz) = 3179352
+SHA256 (allegro-4.4.3.1.tar.gz) = 7BnbyaAhJEWCtIGbNYPuWUtQFB+fz2lEpO2Aacv41NQ=
+SIZE (allegro-4.4.3.1.tar.gz) = 4663634
Index: files/sndio.c
===================================================================
RCS file: /cvs/ports/games/allegro/files/sndio.c,v
retrieving revision 1.2
diff -u -p -r1.2 sndio.c
--- files/sndio.c 22 Apr 2013 21:14:34 -0000 1.2
+++ files/sndio.c 10 Apr 2020 04:41:32 -0000
@@ -506,4 +506,12 @@ sndio_rec_read(void *buf)
return 1;
}
+/* _module_init:
+ * Called when loaded as a dynamically linked module.
+ */
+void _module_init(int system_driver)
+{
+ _unix_register_digi_driver(DIGI_SNDIO, &digi_sndio, TRUE, TRUE);
+}
+
No comments:
Post a Comment