Nam Nguyen writes:

> 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.

ping

>
> I propose deleting audio/dumb and graphics/allegropng. opensonic now
> uses logg bundled with allegro and is the only consumer of these
> ports.

Keep audio/dumb as requested by Paul Valencia (reivyr) for an upcoming
port of Adventure Game Studio. Remove graphics/allegropng.

Landry Breuil writes:

> and i also support the removal of audio/dumb and graphics/allegropng.

context: https://marc.info/?l=openbsd-ports&m=158657892302530&w=2

>
> 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
>

landry@ tested this allegro with the new opensonic:

> I havent really looked at the details, but fwiw i've tested this update
> along allegro update, and it works fine here.

context: https://marc.info/?l=openbsd-ports&m=158649554008916&w=2

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);
+}
+
 #endif /* ALLEGRO_WITH_SNDIODIGI */
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-CMakeLists_txt        10 Apr 2020 04:41:32 -0000
@@ -0,0 +1,52 @@
+$OpenBSD$
+
+avoid cmake RT_LIBRARY error
+
+cmake bits to find sndio from FreeBSD
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -197,7 +197,6 @@ if(UNIX)
+         "
+         ALLEGRO_USE_CONSTRUCTOR)
+ 
+-    find_library(RT_LIBRARY rt)
+     check_c_source_compiles("
+         #include <time.h>
+         int main(void) {
+@@ -400,6 +399,7 @@ set(PLATFORM_LIBS_MODULES)      # only link with these
+ # -- Unix --
+ 
+ option(WANT_OSS "Build OSS support" on)
++option(WANT_SNDIO "Build SNDIO support" on)
+ option(WANT_ALSA "Build ALSA support" on)
+ option(WANT_JACK "Build JACK support" on)
+ option(WANT_SGIAUDIO "Build SGI audio support" on)
+@@ -410,7 +410,7 @@ if(ALLEGRO_UNIX) # not MACOSX
+         message(FATAL_ERROR "Unix port requires pthreads support.")
+     endif()
+     set(ALLEGRO_HAVE_LIBPTHREAD 1)
+-    list(APPEND PLATFORM_LIBS m ${CMAKE_THREAD_LIBS_INIT})
++    list(APPEND PLATFORM_LIBS m sndio ${CMAKE_THREAD_LIBS_INIT})
+     list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_UNIX_FILES})
+ 
+     find_library(DLOPEN_LIBRARY dl)
+@@ -431,6 +431,17 @@ if(ALLEGRO_UNIX) # not MACOSX
+             include_directories(SYSTEM ${OSS_INCLUDE_DIR})
+         endif(OSS_FOUND)
+     endif(WANT_OSS)
++
++    if(WANT_SNDIO)
++        find_path(SNDIO_INCLUDE_DIR sndio.h)
++        find_library(SNDIO_LIBRARY NAMES sndio)
++      if(SNDIO_INCLUDE_DIR AND SNDIO_LIBRARY)
++            set(ALLEGRO_WITH_SNDIODIGI 1)
++          include_directories(SYSTEM ${SNDIO_INCLUDE_DIR})
++            list(APPEND PLATFORM_LIBS_NON_MODULES ${SNDIO_LIBRARY})
++            add_our_module(alleg-sndiodigi src/unix/sndio.c ${SNDIO_LIBRARY})
++      endif(SNDIO_INCLUDE_DIR AND SNDIO_LIBRARY)
++    endif(WANT_SNDIO)
+ 
+     if(WANT_ALSA)
+         pkg_check_modules(ALSA alsa)
Index: patches/patch-aclocal_m4
===================================================================
RCS file: patches/patch-aclocal_m4
diff -N patches/patch-aclocal_m4
--- patches/patch-aclocal_m4    28 Sep 2017 22:06:15 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,131 +0,0 @@
-$OpenBSD: patch-aclocal_m4,v 1.3 2017/09/28 22:06:15 naddy Exp $
-Index: aclocal.m4
---- aclocal.m4.orig
-+++ aclocal.m4
-@@ -438,19 +438,19 @@ allegro_enable_ossdigi=yes)
- 
- if test -n "$allegro_enable_ossdigi"; then
-   AC_CHECK_HEADER(soundcard.h, [
--    AC_DEFINE(ALLEGRO_HAVE_SOUNDCARD_H, 1)
-+    AC_DEFINE(ALLEGRO_HAVE_SOUNDCARD_H, 1, [soundcard.h])
-     allegro_support_ossdigi=yes
-   ])
-   AC_CHECK_HEADER(sys/soundcard.h, [
--    AC_DEFINE(ALLEGRO_HAVE_SYS_SOUNDCARD_H, 1)
-+    AC_DEFINE(ALLEGRO_HAVE_SYS_SOUNDCARD_H, 1, [sys/soundcard.h])
-     allegro_support_ossdigi=yes
-   ])
-   AC_CHECK_HEADER(machine/soundcard.h, [
--    AC_DEFINE(ALLEGRO_HAVE_MACHINE_SOUNDCARD_H, 1)
-+    AC_DEFINE(ALLEGRO_HAVE_MACHINE_SOUNDCARD_H, 1, [machine/soundcard.h])
-     allegro_support_ossdigi=yes
-   ])
-   AC_CHECK_HEADER(linux/soundcard.h, [
--    AC_DEFINE(ALLEGRO_HAVE_LINUX_SOUNDCARD_H, 1)
-+    AC_DEFINE(ALLEGRO_HAVE_LINUX_SOUNDCARD_H, 1, [linux/soundcard.h])
-     allegro_support_ossdigi=yes
-   ])
- 
-@@ -473,15 +473,15 @@ allegro_enable_ossmidi=yes)
- 
- if test -n "$allegro_enable_ossmidi"; then
-   AC_CHECK_HEADER(soundcard.h,
--    AC_DEFINE(ALLEGRO_HAVE_SOUNDCARD_H, 1))
-+    AC_DEFINE(ALLEGRO_HAVE_SOUNDCARD_H, 1, [soundcard.h]))
-   AC_CHECK_HEADER(sys/soundcard.h,
--    AC_DEFINE(ALLEGRO_HAVE_SYS_SOUNDCARD_H, 1))
-+    AC_DEFINE(ALLEGRO_HAVE_SYS_SOUNDCARD_H, 1, [sys/soundcard.h]))
-   AC_CHECK_HEADER(machine/soundcard.h,
--    AC_DEFINE(ALLEGRO_HAVE_MACHINE_SOUNDCARD_H, 1))
-+    AC_DEFINE(ALLEGRO_HAVE_MACHINE_SOUNDCARD_H, 1, [machine/soundcard.h]))
-   AC_CHECK_HEADER(linux/soundcard.h,
--    AC_DEFINE(ALLEGRO_HAVE_LINUX_SOUNDCARD_H, 1))
-+    AC_DEFINE(ALLEGRO_HAVE_LINUX_SOUNDCARD_H, 1, [linux/soundcard.h]))
-   AC_CHECK_HEADER(linux/awe_voice.h,
--    AC_DEFINE(ALLEGRO_HAVE_LINUX_AWE_VOICE_H, 1))
-+    AC_DEFINE(ALLEGRO_HAVE_LINUX_AWE_VOICE_H, 1, [linux/awe_voice.h]))
- 
-   dnl Link with libossaudio if necessary, used by some BSD systems.
-   AC_CHECK_LIB(ossaudio, _oss_ioctl)
-@@ -683,6 +683,27 @@ if test -n "$allegro_enable_sgialdigi"; then
- fi])
- 
- dnl
-+dnl Test for sndio driver.
-+dnl
-+dnl Variables:
-+dnl  allegro_enable_sndiodigi=(yes|)
-+dnl  allegro_cv_support_sndiodigi=(yes|)
-+dnl
-+AC_DEFUN(ALLEGRO_ACTEST_SNDIODIGI,
-+[AC_ARG_ENABLE(sndiodigi,
-+[  --enable-sndiodigi[=x]  enable building sndio driver [default=yes]],
-+test "X$enableval" != "Xno" && allegro_enable_sndiodigi=yes,
-+allegro_enable_sndiodigi=yes)
-+ 
-+if test "X$allegro_enable_sndiodigi" = "Xyes"; then
-+  AC_CHECK_LIB(sndio, sio_open,
-+  allegro_cv_support_sndiodigi=yes)
-+  if test "X$allegro_cv_support_sndiodigi" = "Xyes" ; then
-+    LIBS="-lsndio $LIBS"
-+  fi
-+fi])
-+
-+dnl
- dnl Test for JACK driver.
- dnl
- dnl Variables:
-@@ -730,7 +751,7 @@ AC_DEFUN(ALLEGRO_ACTEST_MAP_FAILED,
- AC_CACHE_VAL(allegro_cv_have_map_failed,
- [AC_TRY_COMPILE([#include <unistd.h>
- #include <sys/mman.h>],
--[int test_mmap_failed (void *addr) { return (addr == MAP_FAILED); }],
-+[void *addr; return (addr == MAP_FAILED);],
- allegro_cv_have_map_failed=yes,
- allegro_cv_have_map_failed=no)])
- AC_MSG_RESULT($allegro_cv_have_map_failed)])
-@@ -744,10 +765,22 @@ dnl
- dnl LIBS can be modified.
- dnl
- AC_DEFUN(ALLEGRO_ACTEST_PTHREADS,
--[AC_CHECK_HEADER(pthread.h,
--AC_CHECK_LIB(pthread, pthread_create,
--LIBS="-lpthread $LIBS"
--allegro_cv_support_pthreads=yes))])
-+[AC_CHECK_HEADER(pthread.h, have_pthread_h=yes)
-+if test "X$have_pthread_h" = "Xyes" ; then
-+    save_LDFLAGS="$LDFLAGS";
-+    LDFLAGS="$LDFLAGS -pthread"
-+    AC_LINK_IFELSE(
-+      [AC_LANG_PROGRAM(
-+        [[#include <pthread.h>
-+        pthread_t thr;]],
-+        [pthread_create(&thr, NULL, NULL, NULL);])],
-+      [allegro_cv_support_pthreads=yes],
-+      [LDFLAGS="$save_LDFLAGS"])
-+    if test "X$allegro_cv_support_pthreads" != "Xyes" ; then
-+      AC_CHECK_LIB(pthread, pthread_create,
-+        LIBS="-lpthread $LIBS" allegro_cv_support_pthreads=yes)
-+    fi
-+fi])
- 
- dnl
- dnl Test for sched_yield (SunOS).
-@@ -879,7 +912,7 @@ allegro_save_CFLAGS="$CFLAGS"
- CFLAGS="-mtune=i386"
- AC_CACHE_VAL(allegro_cv_support_i386_mtune,
- [if test "$GCC" = yes; then
--   AC_TRY_COMPILE(,int foo(){return 0;}, allegro_cv_support_i386_mtune=yes, 
allegro_cv_support_i386_mtune=no)
-+   AC_TRY_COMPILE(,, allegro_cv_support_i386_mtune=yes, 
allegro_cv_support_i386_mtune=no)
- else
-    allegro_cv_support_i386_mtune=no
- fi
-@@ -899,7 +932,7 @@ allegro_save_CFLAGS="$CFLAGS"
- CFLAGS="-mtune=k8"
- AC_CACHE_VAL(allegro_cv_support_amd64_mtune,
- [if test "$GCC" = yes; then
--   AC_TRY_COMPILE(,int foo(){return 0;}, allegro_cv_support_amd64_mtune=yes, 
allegro_cv_support_amd64_mtune=no)
-+   AC_TRY_COMPILE(,, allegro_cv_support_amd64_mtune=yes, 
allegro_cv_support_amd64_mtune=no)
- else
-    allegro_cv_support_amd64_mtune=no
- fi
Index: patches/patch-cmake_FileList_cmake
===================================================================
RCS file: patches/patch-cmake_FileList_cmake
diff -N patches/patch-cmake_FileList_cmake
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-cmake_FileList_cmake  10 Apr 2020 04:41:32 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+cmake bits to find sndio from FreeBSD
+
+Index: cmake/FileList.cmake
+--- cmake/FileList.cmake.orig
++++ cmake/FileList.cmake
+@@ -261,6 +261,7 @@ set(ALLEGRO_SRC_UNIX_FILES
+         src/unix/arts.c
+         src/unix/sgial.c
+         src/unix/jack.c
++        src/unix/sndio.c
+         src/unix/udjgpp.c
+         src/unix/udrvlist.c
+         src/unix/udummy.c
Index: patches/patch-configure_in
===================================================================
RCS file: patches/patch-configure_in
diff -N patches/patch-configure_in
--- patches/patch-configure_in  25 May 2010 00:46:39 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,180 +0,0 @@
-$OpenBSD: patch-configure_in,v 1.3 2010/05/25 00:46:39 espie Exp $
---- configure.in.orig  Sat Jul 14 21:46:22 2007
-+++ configure.in       Wed Jan 13 01:30:01 2010
-@@ -28,26 +28,26 @@ allegro_enable_asm=yes)
- dnl Enable 8-bpp color depth (default).
- AC_ARG_ENABLE(color8,
- [  --enable-color8[=x]     enable support for 8-bpp modes [default=yes]],
--test "X$enableval" != "Xno" && AC_DEFINE(ALLEGRO_COLOR8),
--AC_DEFINE(ALLEGRO_COLOR8))
-+test "X$enableval" != "Xno" && AC_DEFINE(ALLEGRO_COLOR8, 1, [enable support 
for 8-bpp modes]),
-+AC_DEFINE(ALLEGRO_COLOR8, 1, [enable support for 8-bpp modes]))
- 
- dnl Enable 16-bpp color depth (default).
- AC_ARG_ENABLE(color16,
- [  --enable-color16[=x]    enable support for 16-bpp modes [default=yes]],
--test "X$enableval" != "Xno" && AC_DEFINE(ALLEGRO_COLOR16),
--AC_DEFINE(ALLEGRO_COLOR16))
-+test "X$enableval" != "Xno" && AC_DEFINE(ALLEGRO_COLOR16, 1, [enable support 
for 16-bpp modes]),
-+AC_DEFINE(ALLEGRO_COLOR16, 1, [enable support for 16-bpp modes]))
- 
- dnl Enable 24-bpp color depth (default).
- AC_ARG_ENABLE(color24,
- [  --enable-color24[=x]    enable support for 24-bpp modes [default=yes]],
--test "X$enableval" != "Xno" && AC_DEFINE(ALLEGRO_COLOR24),
--AC_DEFINE(ALLEGRO_COLOR24))
-+test "X$enableval" != "Xno" && AC_DEFINE(ALLEGRO_COLOR24, 1, [enable support 
for 24-bpp modes]),
-+AC_DEFINE(ALLEGRO_COLOR24, 1, [enable support for 24-bpp modes]))
- 
- dnl Enable 32-bpp color depth (default).
- AC_ARG_ENABLE(color32,
- [  --enable-color32[=x]    enable support for 32-bpp modes [default=yes]],
--test "X$enableval" != "Xno" && AC_DEFINE(ALLEGRO_COLOR32),
--AC_DEFINE(ALLEGRO_COLOR32))
-+test "X$enableval" != "Xno" && AC_DEFINE(ALLEGRO_COLOR32, 1, [enable support 
for 32-bpp modes]),
-+AC_DEFINE(ALLEGRO_COLOR32, 1, [enable support for 32-bpp modes]))
- 
- 
#-----------------------------------------------------------------------------#
- 
-@@ -310,8 +310,8 @@ if test "X$allegro_build_static_programs" = "Xyes"; th
-   allegro_static_libraries=yes
-   _programs="statically linked $_programs"
- else
--  LIBALLEG="lib/unix/lib${LIB_TO_LINK}-\$(shared_version).so 
lib/unix/lib${LIB_TO_LINK}_unsharable.a"
--  LINK_LIBALLEG="-Llib/unix -l${LIB_TO_LINK}-\$(shared_version) 
-l${LIB_TO_LINK}_unsharable -lm"
-+  LIBALLEG="lib/unix/lib${LIB_TO_LINK}.so.\$(shared_major_minor) 
lib/unix/lib${LIB_TO_LINK}_unsharable.a"
-+  LINK_LIBALLEG="-Llib/unix -l${LIB_TO_LINK} -l${LIB_TO_LINK}_unsharable -lm"
-   LINK_WITH_STATIC_LIBS=no
-   allegro_shared_libraries=yes
-   _programs="dynamically linked $_programs"
-@@ -350,15 +350,15 @@ if test "X$allegro_shared_libraries" = "Xyes"; then
- 
-   _libraries="$_libraries shared"
-   if test "X$allegro_build_normal_library" = "Xyes"; then
--    ALLEGRO_LIB_TARGETS="$ALLEGRO_LIB_TARGETS 
lib/unix/liballeg-\$(shared_version).so lib/unix/liballeg_unsharable.a"
-+    ALLEGRO_LIB_TARGETS="$ALLEGRO_LIB_TARGETS 
lib/unix/liballeg.so.\$(shared_major_minor) lib/unix/liballeg_unsharable.a"
-     _libraries="$_libraries release"
-   fi
-   if test "X$allegro_build_debugging_library" = "Xyes"; then
--    ALLEGRO_LIB_TARGETS="$ALLEGRO_LIB_TARGETS 
lib/unix/liballd-\$(shared_version).so lib/unix/liballd_unsharable.a"
-+    ALLEGRO_LIB_TARGETS="$ALLEGRO_LIB_TARGETS 
lib/unix/liballd.so.\$(shared_major_minor) lib/unix/liballd_unsharable.a"
-     _libraries="$_libraries debug"
-   fi
-   if test "X$allegro_build_profiling_library" = "Xyes"; then
--    ALLEGRO_LIB_TARGETS="$ALLEGRO_LIB_TARGETS 
lib/unix/liballp-\$(shared_version).so lib/unix/liballp_unsharable.a"
-+    ALLEGRO_LIB_TARGETS="$ALLEGRO_LIB_TARGETS 
lib/unix/liballp.so.\$(shared_major_minor).so lib/unix/liballp_unsarable.a"
-     _libraries="$_libraries profile"
-   fi
- fi
-@@ -479,6 +479,15 @@ else
-   _disabled_modules="sgialdigi $_disabled_modules"
- fi
- 
-+dnl Test for sndio
-+ALLEGRO_ACTEST_SNDIODIGI
-+if test "$allegro_cv_support_sndiodigi" = yes; then
-+   AC_DEFINE(ALLEGRO_WITH_SNDIODIGI,1,[Define if sndio is supported.])
-+  _enabled_modules="sndiodigi $_enabled_modules"
-+else
-+  _disabled_modules="sndiodigi $_disabled_modules"
-+fi
-+
- dnl Test for JACK driver
- ALLEGRO_ACTEST_JACK
- if test "X$allegro_cv_support_jackdigi" = "Xyes"; then
-@@ -591,13 +600,13 @@ case "$allegro_system" in
-     allegro_support_linux=yes
- 
-     AC_CHECK_HEADER(sys/io.h,
--      AC_DEFINE(ALLEGRO_HAVE_SYS_IO_H, 1))
-+      AC_DEFINE(ALLEGRO_HAVE_SYS_IO_H, 1, [sys/io.h]))
- 
-     AC_CHECK_HEADER(linux/joystick.h,
--      AC_DEFINE(ALLEGRO_HAVE_LINUX_JOYSTICK_H, 1))
-+      AC_DEFINE(ALLEGRO_HAVE_LINUX_JOYSTICK_H, 1, [linux/joystick.h]))
- 
-     AC_CHECK_HEADER(linux/input.h,
--      AC_DEFINE(ALLEGRO_HAVE_LINUX_INPUT_H, 1))
-+      AC_DEFINE(ALLEGRO_HAVE_LINUX_INPUT_H, 1, [linux/input.h]))
- 
-     if test "X$allegro_cv_processor_type" = "Xi386" -a "X$allegro_enable_vga" 
= "Xyes"; then
-       allegro_support_vga=yes
-@@ -720,6 +729,11 @@ if test -n "$allegro_support_modules"; then
-     ALLEGRO_MODULE_TARGETS="$ALLEGRO_MODULE_TARGETS 
lib/unix/alleg-sgialdigi.so"
-   fi
- 
-+  dnl SNDIO DIGI.
-+  if test "X$allegro_cv_support_sndiodigi" = "Xyes"; then
-+    ALLEGRO_MODULE_TARGETS="$ALLEGRO_MODULE_TARGETS 
lib/unix/alleg-sndiodigi.so"
-+  fi
-+
-   dnl JACK DIGI.
-   if test "X$allegro_cv_support_jackdigi" = "Xyes"; then
-     ALLEGRO_MODULE_TARGETS="$ALLEGRO_MODULE_TARGETS 
lib/unix/alleg-jackdigi.so"
-@@ -752,13 +766,13 @@ AC_SUBST(AR)
- 
#-----------------------------------------------------------------------------#
- 
- # Headers, features, functions and macros.
--AC_CHECK_HEADER(dirent.h, AC_DEFINE(ALLEGRO_HAVE_DIRENT_H, 1))
--AC_CHECK_HEADER(inttypes.h, AC_DEFINE(ALLEGRO_HAVE_INTTYPES_H, 1))
--AC_CHECK_HEADER(stdint.h, AC_DEFINE(ALLEGRO_HAVE_STDINT_H, 1))
--AC_CHECK_HEADER(sys/stat.h, AC_DEFINE(ALLEGRO_HAVE_SYS_STAT_H, 1))
--AC_CHECK_HEADER(sys/time.h, AC_DEFINE(ALLEGRO_HAVE_SYS_TIME_H, 1))
--AC_CHECK_HEADER(sys/time.h, AC_DEFINE(ALLEGRO_HAVE_SYS_TIME_H, 1))
--AC_CHECK_HEADER(sys/utsname.h, AC_DEFINE(ALLEGRO_HAVE_SYS_UTSNAME_H, 1))
-+AC_CHECK_HEADER(dirent.h, AC_DEFINE(ALLEGRO_HAVE_DIRENT_H, 1, [dirent.h]))
-+AC_CHECK_HEADER(inttypes.h, AC_DEFINE(ALLEGRO_HAVE_INTTYPES_H, 1, 
[inttypes.h]))
-+AC_CHECK_HEADER(stdint.h, AC_DEFINE(ALLEGRO_HAVE_STDINT_H, 1, [stdint.h]))
-+AC_CHECK_HEADER(sys/stat.h, AC_DEFINE(ALLEGRO_HAVE_SYS_STAT_H, 1, 
[sys/stat.h]))
-+AC_CHECK_HEADER(sys/time.h, AC_DEFINE(ALLEGRO_HAVE_SYS_TIME_H, 1, 
[sys/time.h]))
-+AC_CHECK_HEADER(sys/time.h, AC_DEFINE(ALLEGRO_HAVE_SYS_TIME_H, 1, 
[sys/time.h]))
-+AC_CHECK_HEADER(sys/utsname.h, AC_DEFINE(ALLEGRO_HAVE_SYS_UTSNAME_H, 1, 
[sys/utsname.h]))
- 
- # If the C compiler does not fully support the `const' keyword,
- # define `const' to be empty.
-@@ -778,14 +792,14 @@ AC_TYPE_SIZE_T
- # otherwise, define it to be `int'.
- AC_TYPE_SIGNAL
- 
--AC_CHECK_FUNC(mmap, AC_DEFINE(ALLEGRO_HAVE_MMAP, 1))
--AC_CHECK_FUNC(mprotect, AC_DEFINE(ALLEGRO_HAVE_MPROTECT, 1))
--AC_CHECK_FUNC(memcmp, AC_DEFINE(ALLEGRO_HAVE_MEMCMP, 1))
--AC_CHECK_FUNC(mkstemp, AC_DEFINE(ALLEGRO_HAVE_MKSTEMP, 1))
--AC_CHECK_FUNC(stricmp, AC_DEFINE(ALLEGRO_HAVE_STRICMP, 1))
--AC_CHECK_FUNC(strlwr, AC_DEFINE(ALLEGRO_HAVE_STRLWR, 1))
--AC_CHECK_FUNC(strupr, AC_DEFINE(ALLEGRO_HAVE_STRUPR, 1))
--AC_CHECK_FUNC(sysconf, AC_DEFINE(ALLEGRO_HAVE_SYSCONF, 1))
-+AC_CHECK_FUNC(mmap, AC_DEFINE(ALLEGRO_HAVE_MMAP, 1, [mmap]))
-+AC_CHECK_FUNC(mprotect, AC_DEFINE(ALLEGRO_HAVE_MPROTECT, 1, [mprotect]))
-+AC_CHECK_FUNC(memcmp, AC_DEFINE(ALLEGRO_HAVE_MEMCMP, 1, [memcmp]))
-+AC_CHECK_FUNC(mkstemp, AC_DEFINE(ALLEGRO_HAVE_MKSTEMP, 1, [mkstemp]))
-+AC_CHECK_FUNC(stricmp, AC_DEFINE(ALLEGRO_HAVE_STRICMP, 1, [stricmp]))
-+AC_CHECK_FUNC(strlwr, AC_DEFINE(ALLEGRO_HAVE_STRLWR, 1, [strlwr]))
-+AC_CHECK_FUNC(strupr, AC_DEFINE(ALLEGRO_HAVE_STRUPR, 1, [strupr]))
-+AC_CHECK_FUNC(sysconf, AC_DEFINE(ALLEGRO_HAVE_SYSCONF, 1, [sysconf]))
- 
- 
#-----------------------------------------------------------------------------#
- 
-@@ -822,6 +836,7 @@ if test -n "$GCC"; then
-   else
-     TARGET_ARCH=
-   fi
-+  TARGET_ARCH=
-   dnl Allow to specify additional flags.
-   CFLAGS="$CFLAGS $XCFLAGS"
-   WFLAGS="$WFLAGS $WCFLAGS"
-@@ -833,11 +848,11 @@ if test -n "$GCC"; then
-   if test "X$allegro_debug_with_dmalloc" = "Xyes"; then
-      ALLEGRO_DEBUG_CFLAGS="$ALLEGRO_DEBUG_CFLAGS -DDMALLOC"
-   fi
--  ALLEGRO_PROFILE_CFLAGS="$CFLAGS -pg $TARGET_ARCH -O2 -funroll-loops 
-ffast-math $WFLAGS"
-+  ALLEGRO_PROFILE_CFLAGS="$CFLAGS -pg $TARGET_ARCH $WFLAGS"
-   if test "X$allegro_cv_support_fomit_frame_pointer" = "Xyes"; then
--    CFLAGS="$CFLAGS $TARGET_ARCH -O2 -funroll-loops -ffast-math 
-fomit-frame-pointer $WFLAGS"
-+    CFLAGS="$CFLAGS $TARGET_ARCH $WFLAGS -fomit-frame-pointer"
-   else
--    CFLAGS="$CFLAGS $TARGET_ARCH -O2 -funroll-loops -ffast-math $WFLAGS"
-+    CFLAGS="$CFLAGS $TARGET_ARCH $WFLAGS"
-   fi
-   ALLEGRO_SFLAGS="-x assembler-with-cpp"
-   ALLEGRO_SHAREDLIB_CFLAGS="-fPIC -DALLEGRO_SHARED"
Index: patches/patch-docs_CMakeLists_txt
===================================================================
RCS file: patches/patch-docs_CMakeLists_txt
diff -N patches/patch-docs_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-docs_CMakeLists_txt   10 Apr 2020 04:41:32 -0000
@@ -0,0 +1,62 @@
+$OpenBSD$
+
+Do not install text. Install HTML, CSS, man and info.
+
+Index: docs/CMakeLists.txt
+--- docs/CMakeLists.txt.orig
++++ docs/CMakeLists.txt
+@@ -8,8 +8,8 @@ if(NOT WANT_DOCS OR CMAKE_CROSSCOMPILING)
+     return()
+ endif()
+ 
+-set(DOCDIR "doc" CACHE STRING "Install docs into $DOCDIR/allegro-$VERSION")
+-set(ACTUAL_DOC_DIR "${DOCDIR}/allegro-${ALLEGRO_VERSION}")
++set(DOCDIR "share/doc" CACHE STRING "Install docs into $DOCDIR/allegro")
++set(ACTUAL_DOC_DIR "${DOCDIR}/allegro")
+ 
+ add_executable(makedoc
+     src/makedoc/makedoc.c
+@@ -137,17 +137,11 @@ if(UNIX)
+         ${CMAKE_CURRENT_BINARY_DIR}/txt/mistakes.txt
+         ${CMAKE_CURRENT_BINARY_DIR}/txt/packfile.txt
+         )
+-    install(FILES ${TEXT_FILES_TO_INSTALL}
+-            DESTINATION ${ACTUAL_DOC_DIR}
+-            )
+ 
+-    file(GLOB HTML_DOCS
+-            ${CMAKE_CURRENT_BINARY_DIR}/html/*.html
+-            ${CMAKE_CURRENT_BINARY_DIR}/html/*.css
+-            )
+-    install(FILES ${HTML_DOCS}
+-            DESTINATION ${ACTUAL_DOC_DIR}/html
+-            )
++    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
++            DESTINATION ${ACTUAL_DOC_DIR}
++            FILES_MATCHING PATTERN "*"
++    )
+ endif(UNIX)
+ 
+ 
#-----------------------------------------------------------------------------#
+@@ -156,7 +150,7 @@ endif(UNIX)
+ #
+ 
+ option(WANT_DOCS_MAN "Generate man pages" on)
+-set(MANDIR "man" CACHE STRING "Install man pages into this directory")
++set(MANDIR "man/man3" CACHE STRING "Install man pages into this directory")
+ 
+ if(WANT_DOCS_MAN)
+     set(man_out ${CMAKE_CURRENT_BINARY_DIR}/man/allegro_init.3)
+@@ -172,9 +166,9 @@ if(WANT_DOCS_MAN)
+     # I'm assuming only Unix users want man pages installed, but djgpp 
supports
+     # man pages to so this might need to change.
+     if(UNIX)
+-        file(GLOB MAN_PAGES ${CMAKE_CURRENT_BINARY_DIR}/man/*.3)
+-        install(FILES ${MAN_PAGES}
+-                DESTINATION ${MANDIR}/man3
++        install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man/
++                DESTINATION ${MANDIR}
++              FILES_MATCHING PATTERN "*.3"
+                 )
+     endif(UNIX)
+ endif(WANT_DOCS_MAN)
Index: patches/patch-docs_txt_allegro_txt
===================================================================
RCS file: patches/patch-docs_txt_allegro_txt
diff -N patches/patch-docs_txt_allegro_txt
--- patches/patch-docs_txt_allegro_txt  26 Apr 2010 02:56:30 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-docs_txt_allegro_txt,v 1.1 2010/04/26 02:56:30 jakemsr Exp $
---- docs/txt/allegro.txt.orig  Tue Jan 12 01:50:48 2010
-+++ docs/txt/allegro.txt       Tue Jan 12 01:51:56 2010
-@@ -12181,6 +12181,7 @@ Drivers DIGI_*/Unix
-       DIGI_ARTS            - aRts (Analog Real-Time Synthesizer)
-       DIGI_ALSA            - ALSA sound driver
-       DIGI_JACK            - JACK sound driver
-+      DIGI_SNDIO           - sndio sound driver
- 
- Drivers MIDI_*/Unix
-    The Unix sound functions support the following MIDI sound cards:
Index: patches/patch-include_allegro_platform_al386gcc_h
===================================================================
RCS file: patches/patch-include_allegro_platform_al386gcc_h
diff -N patches/patch-include_allegro_platform_al386gcc_h
--- patches/patch-include_allegro_platform_al386gcc_h   7 Aug 2017 14:15:23 
-0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
-$OpenBSD: patch-include_allegro_platform_al386gcc_h,v 1.1 2017/08/07 14:15:23 
sthen Exp $
-
-Index: include/allegro/platform/al386gcc.h
---- include/allegro/platform/al386gcc.h.orig
-+++ include/allegro/platform/al386gcc.h
-@@ -156,7 +156,7 @@ AL_INLINE(fixed, fixadd, (fixed x, fixed y),
-       "i" (ERANGE),
-       "m" (allegro_errno)
- 
--      : "%cc", "memory"                   /* clobbers flags and errno */
-+      : "cc", "memory"                   /* clobbers flags and errno */
-       );
- 
-       return result;
-@@ -194,7 +194,7 @@ AL_INLINE(fixed, fixsub, (fixed x, fixed y),
-       "i" (ERANGE),
-       "m" (allegro_errno)
- 
--      : "%cc", "memory"                   /* clobbers flags and errno */
-+      : "cc", "memory"                   /* clobbers flags and errno */
-       );
- 
-       return result;
-@@ -246,7 +246,7 @@ AL_INLINE(fixed, fixmul, (fixed x, fixed y),
-       "i" (ERANGE),
-       "m" (allegro_errno)
- 
--      : "%cc", "memory"                   /* clobbers flags and errno */
-+      : "cc", "memory"                   /* clobbers flags and errno */
-       );
- 
-       return result;
-@@ -329,7 +329,7 @@ AL_INLINE(fixed, fixdiv, (fixed x, fixed y),
-       "i" (ERANGE),
-       "m" (allegro_errno)
- 
--      : "%cc", "memory"                   /* clobbers flags and memory  */
-+      : "cc", "memory"                   /* clobbers flags and memory  */
-       );
- 
-       return result;
-@@ -388,7 +388,7 @@ AL_INLINE(int, fixceil, (fixed x),
-       "i" (ERANGE),
-       "m" (allegro_errno)
- 
--    : "%cc", "memory"         /* clobbers flags and errno */
-+    : "cc", "memory"          /* clobbers flags and errno */
-    );
- 
-    return result;
Index: patches/patch-include_allegro_platform_alunix_h
===================================================================
RCS file: 
/cvs/ports/games/allegro/patches/patch-include_allegro_platform_alunix_h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-include_allegro_platform_alunix_h
--- patches/patch-include_allegro_platform_alunix_h     26 Apr 2010 02:56:30 
-0000      1.1
+++ patches/patch-include_allegro_platform_alunix_h     10 Apr 2020 04:41:32 
-0000
@@ -1,6 +1,7 @@
 $OpenBSD: patch-include_allegro_platform_alunix_h,v 1.1 2010/04/26 02:56:30 
jakemsr Exp $
---- include/allegro/platform/alunix.h.orig     Fri Jun 15 18:52:28 2007
-+++ include/allegro/platform/alunix.h  Wed Jan 13 02:49:06 2010
+Index: include/allegro/platform/alunix.h
+--- include/allegro/platform/alunix.h.orig
++++ include/allegro/platform/alunix.h
 @@ -69,6 +69,8 @@ AL_VAR(TIMER_DRIVER, timerdrv_unix_sigalrm);
  #define DIGI_ALSA             AL_ID('A','L','S','A')
  #define MIDI_ALSA             AL_ID('A','M','I','D')
Index: patches/patch-include_allegro_platform_alunixac_h_cmake
===================================================================
RCS file: patches/patch-include_allegro_platform_alunixac_h_cmake
diff -N patches/patch-include_allegro_platform_alunixac_h_cmake
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-include_allegro_platform_alunixac_h_cmake     10 Apr 2020 
04:41:32 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+cmake bits to find sndio from FreeBSD
+
+Index: include/allegro/platform/alunixac.h.cmake
+--- include/allegro/platform/alunixac.h.cmake.orig
++++ include/allegro/platform/alunixac.h.cmake
+@@ -146,6 +146,9 @@
+ /* Define if JACK DIGI driver is supported. */
+ #cmakedefine ALLEGRO_WITH_JACKDIGI
+ 
++/* Define if SNDIO DIGI driver is supported. */
++#cmakedefine ALLEGRO_WITH_SNDIODIGI
++
+ /* Define if OSS DIGI driver is supported. */
+ #cmakedefine ALLEGRO_WITH_OSSDIGI
+ 
Index: patches/patch-include_allegro_platform_alunixac_hin
===================================================================
RCS file: patches/patch-include_allegro_platform_alunixac_hin
diff -N patches/patch-include_allegro_platform_alunixac_hin
--- patches/patch-include_allegro_platform_alunixac_hin 26 Apr 2010 02:56:30 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-include_allegro_platform_alunixac_hin,v 1.1 2010/04/26 
02:56:30 jakemsr Exp $
---- include/allegro/platform/alunixac.hin.orig Tue Jan 12 02:01:05 2010
-+++ include/allegro/platform/alunixac.hin      Tue Jan 12 02:01:34 2010
-@@ -153,6 +153,9 @@
- /* Define if JACK DIGI driver is supported. */
- #undef ALLEGRO_WITH_JACKDIGI
- 
-+/* Define if SNDIO DIGI driver is supported. */
-+#undef ALLEGRO_WITH_SNDIODIGI
-+
- /* Define if you need to use a magic main. */
- #undef ALLEGRO_WITH_MAGIC_MAIN
- 
Index: patches/patch-makefile_in
===================================================================
RCS file: patches/patch-makefile_in
diff -N patches/patch-makefile_in
--- patches/patch-makefile_in   15 Apr 2011 19:29:54 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,84 +0,0 @@
-$OpenBSD: patch-makefile_in,v 1.3 2011/04/15 19:29:54 naddy Exp $
---- makefile.in.orig   Wed Sep 19 15:19:25 2007
-+++ makefile.in        Fri Apr 15 01:18:25 2011
-@@ -406,8 +406,6 @@ examples: $(EXAMPLE_FILES)
- 
- # -------- rules for deleting the generated files --------
- 
--clean:
--
-    define RM_OBJ_CLEAN_FILES
-       $(foreach file, $(OBJ_CLEAN_FILES), rm -f $(file)
-       )
-@@ -418,25 +416,24 @@ clean:
-       )
-    endef
- 
-+clean:
-       $(RM_OBJ_CLEAN_FILES)
-       $(RM_OTHER_CLEAN_FILES)
- 
--distclean: clean
--
-    define RM_DISTCLEAN_FILES
-       $(foreach file, $(DISTCLEAN_FILES) $(ALLEGRO_LIB_X_EXES), rm -f $(file)
-       )
-    endef
- 
-+distclean: clean
-       $(RM_DISTCLEAN_FILES)
- 
--veryclean: distclean
--
-    define RM_VERYCLEAN_FILES
-       $(foreach file, $(VERYCLEAN_FILES), rm -f $(file)
-       )
-    endef
- 
-+veryclean: distclean
-       $(RM_VERYCLEAN_FILES)
-       rm -f makefile
- 
-@@ -472,9 +469,9 @@ install-lib: lib modules
-         fi; \
-       done
-       @for l in alleg alld allp; do \
--        if test -f $(LIBDIR)/lib$${l}-$(shared_version).so; then \
--          echo Installing $(LIBDIR)/lib$${l}-$(shared_version).so to 
$(DESTDIR)$(libdir); \
--          $(INSTALL_PROGRAM) $(LIBDIR)/lib$${l}-$(shared_version).so 
$(DESTDIR)$(libdir)/; \
-+        if test -f $(LIBDIR)/lib$${l}.so.$(shared_major_minor); then \
-+          echo Installing $(LIBDIR)/lib$${l}.so.$(shared_major_minor) to 
$(DESTDIR)$(libdir); \
-+          $(INSTALL_PROGRAM) $(LIBDIR)/lib$${l}.so.$(shared_major_minor) 
$(DESTDIR)$(libdir)/; \
-           $(INSTALL_DATA) $(LIBDIR)/lib$${l}_unsharable.a 
$(DESTDIR)$(libdir)/; \
-         fi; \
-       done
-@@ -489,21 +486,6 @@ install-lib: lib modules
-       $(mkinstalldirs) $(DESTDIR)$(bindir)
-       @echo Installing allegro-config to $(DESTDIR)$(bindir)
-       @$(INSTALL_PROGRAM) allegro-config $(DESTDIR)$(bindir)
--      @if test -n "$(LIBDIR)/liball*-$(shared_version).so"; then \
--              (cat /etc/ld.so.conf | grep $(libdir) >/dev/null || \
--               test $(libdir) = /lib || test $(libdir) = /usr/lib) \
--              && ($(LDCONFIG) $(libdir) || true) || (\
--                      echo "" ; \
--                      echo "Warning: shared library destination $(libdir) is 
not in ldd search path." ; \
--                      echo "Unless you add it to /etc/ld.so.conf, you must 
set LD_LIBRARY_PATH to include"; \
--                      echo "$(libdir) each time you want to run an Allegro 
program." ; \
--              ) ; \
--      fi
--      @for l in alleg alld allp; do \
--        if test -f $(DESTDIR)$(libdir)/lib$${l}-$(shared_version).so -a \! -h 
$(DESTDIR)$(libdir)/lib$${l}.so.${shared_major_minor}; then \
--          (cd $(DESTDIR)$(libdir); ln -s lib$${l}-$(shared_version).so 
lib$${l}.so.${shared_major_minor}); \
--        fi; \
--      done
-       $(mkinstalldirs) $(DESTDIR)$(prefix)/share/aclocal
-       @echo Installing allegro.m4 to $(DESTDIR)$(prefix)/share/aclocal
-       @$(INSTALL_DATA) misc/allegro.m4 $(DESTDIR)$(prefix)/share/aclocal
-@@ -687,6 +669,7 @@ depend:
-       $(SHELL) -c 'cd $(srcdir) && misc/depmod.sh esddigi "\`esd-config 
--libs\`" $(ALLEGRO_MODULE_ESD_FILES)' >>makefile.dep
-       $(SHELL) -c 'cd $(srcdir) && misc/depmod.sh artsdigi "\`artsc-config 
--libs\`" $(ALLEGRO_MODULE_ARTS_FILES)' >>makefile.dep
-       $(SHELL) -c 'cd $(srcdir) && misc/depmod.sh sgialdigi -laudio 
$(ALLEGRO_MODULE_SGIAL_FILES)' >>makefile.dep
-+      $(SHELL) -c 'cd $(srcdir) && misc/depmod.sh sndiodigi -lsndio 
$(ALLEGRO_MODULE_SNDIO_FILES)' >>makefile.dep
-       $(SHELL) -c 'cd $(srcdir) && misc/depmod.sh jackdigi "\`pkg-config 
--libs jack\`" $(ALLEGRO_MODULE_JACK_FILES)' >>makefile.dep
-       @echo "Generating dependencies for simple programs"
-       $(SHELL) -c 'cd $(srcdir) && misc/deplexe.sh -- 
$(ALLEGRO_LIB_EXE_SOURCES) $(ALLEGRO_EXAMPLE_FILES)' >>makefile.dep
Index: patches/patch-makefile_lst
===================================================================
RCS file: patches/patch-makefile_lst
diff -N patches/patch-makefile_lst
--- patches/patch-makefile_lst  26 Apr 2010 02:56:30 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-makefile_lst,v 1.1 2010/04/26 02:56:30 jakemsr Exp $
---- makefile.lst.orig  Tue Jan 12 02:03:42 2010
-+++ makefile.lst       Tue Jan 12 02:04:26 2010
-@@ -312,6 +312,7 @@ ALLEGRO_SRC_UNIX_FILES = \
-       src/unix/alsamidi.c \
-       src/unix/arts.c \
-       src/unix/sgial.c \
-+      src/unix/sndio.c \
-       src/unix/jack.c \
-       src/unix/udjgpp.c \
-       src/unix/udrvlist.c \
-@@ -425,6 +426,9 @@ ALLEGRO_MODULE_ARTS_FILES = \
- 
- ALLEGRO_MODULE_SGIAL_FILES = \
-       src/unix/sgial.c
-+
-+ALLEGRO_MODULE_SNDIO_FILES = \
-+      src/unix/sndio.c
- 
- ALLEGRO_MODULE_JACK_FILES = \
-       src/unix/jack.c
Index: patches/patch-makefile_ver
===================================================================
RCS file: patches/patch-makefile_ver
diff -N patches/patch-makefile_ver
--- patches/patch-makefile_ver  15 Oct 2009 14:38:06 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-makefile_ver,v 1.1.1.1 2009/10/15 14:38:06 phessler Exp $
---- makefile.ver.orig  Sun Jul 22 10:32:32 2007
-+++ makefile.ver       Thu Oct 15 13:12:42 2009
-@@ -3,8 +3,8 @@
- LIBRARY_VERSION = 42
- 
- # Shared library versions for Unix
--shared_version = 4.2.3
--shared_major_minor = 4.2
-+shared_version ?= 4.2.3
-+shared_major_minor ?= 4.2
- 
- # Compatibility version for Mac OS X
- compatibility_version = 4.2.0
Index: patches/patch-misc_allegro-config_in
===================================================================
RCS file: patches/patch-misc_allegro-config_in
diff -N patches/patch-misc_allegro-config_in
--- patches/patch-misc_allegro-config_in        15 Oct 2009 14:38:06 -0000      
1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-misc_allegro-config_in,v 1.1.1.1 2009/10/15 14:38:06 phessler 
Exp $
---- misc/allegro-config.in.orig        Sun Jul 22 10:32:32 2007
-+++ misc/allegro-config.in     Thu Oct 15 13:15:51 2009
-@@ -185,7 +185,7 @@ if test "$echo_libs" = "yes"; then
-    if test "$static_libs" = "yes"; then
-       echo $libdirs $allegro_ldflags -l${lib_type} $allegro_libs
-    else
--      echo $libdirs $allegro_ldflags -l${lib_type}-${version} 
-l${lib_type}_unsharable
-+      echo $libdirs $allegro_ldflags -l${lib_type} -l${lib_type}_unsharable
-    fi
- fi
- 
Index: patches/patch-misc_deplib_sh
===================================================================
RCS file: patches/patch-misc_deplib_sh
diff -N patches/patch-misc_deplib_sh
--- patches/patch-misc_deplib_sh        15 Oct 2009 14:38:06 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-misc_deplib_sh,v 1.1.1.1 2009/10/15 14:38:06 phessler Exp $
---- misc/deplib.sh.orig        Sat May 17 14:58:09 2003
-+++ misc/deplib.sh     Thu Oct 15 13:12:43 2009
-@@ -10,7 +10,7 @@ write_code() {
-     staticlib="lib${1}.a"
-     staticobj="\$(${2}_OBJECTS)"
- 
--    sharelib="lib${1}-\$(shared_version).so"
-+    sharelib="lib${1}.so.\$(shared_major_minor)"
-     shareobj="\$(${2}_SHARED_OBJECTS)"
- 
-     unsharelib="lib${1}_unsharable.a"
Index: patches/patch-src_unix_uthreads_c
===================================================================
RCS file: patches/patch-src_unix_uthreads_c
diff -N patches/patch-src_unix_uthreads_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_unix_uthreads_c   10 Apr 2020 04:41:32 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+
+Workaround for stuttering sound and poor performance. The outer while loop runs
+as long as the background thread is alive, with a call to select(2) every
+iteration to sleep. The select(2) call causes poor performance, sleeping for at
+least 10 ms instead of the intended 1 ms due to tick rate. Callbacks for
+handling input and updating sndio are called in the inner while loop. This 
patch
+gives callbacks more time to run.
+
+Index: src/unix/uthreads.c
+--- src/unix/uthreads.c.orig
++++ src/unix/uthreads.c
+@@ -86,7 +86,7 @@ static void *bg_man_pthreads_threadfunc(void *arg)
+       if (interval > 18000)
+          interval = 18000;      
+       while (interval > 10000) {
+-       interval -= 10000;       
++       interval -= 2000;        
+ 
+        pthread_mutex_lock(&cli_mutex);
+ 
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/allegro/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST   26 Apr 2010 02:56:30 -0000      1.2
+++ pkg/PLIST   10 Apr 2020 04:41:32 -0000
@@ -10,13 +10,13 @@ bin/allegro-config
 @bin bin/pat2dat
 @bin bin/rgbmap
 @bin bin/textconv
+include/alleggl.h
 include/allegro/
 include/allegro.h
 include/allegro/3d.h
 include/allegro/3dmaths.h
 include/allegro/alcompat.h
 include/allegro/alinline.h
-include/allegro/alunixac.h
 include/allegro/base.h
 include/allegro/color.h
 include/allegro/compiled.h
@@ -39,7 +39,6 @@ include/allegro/inline/3dmaths.inl
 include/allegro/inline/asm.inl
 include/allegro/inline/color.inl
 include/allegro/inline/draw.inl
-include/allegro/inline/file.inl
 include/allegro/inline/fix.inl
 include/allegro/inline/fmaths.inl
 include/allegro/inline/gfx.inl
@@ -63,6 +62,7 @@ include/allegro/platform/aintdos.h
 include/allegro/platform/aintlnx.h
 include/allegro/platform/aintmac.h
 include/allegro/platform/aintosx.h
+include/allegro/platform/aintpsp.h
 include/allegro/platform/aintqnx.h
 include/allegro/platform/aintunix.h
 include/allegro/platform/aintwin.h
@@ -82,6 +82,8 @@ include/allegro/platform/almsvc.h
 include/allegro/platform/alosx.h
 include/allegro/platform/alosxcfg.h
 include/allegro/platform/alplatf.h
+include/allegro/platform/alpsp.h
+include/allegro/platform/alpspcfg.h
 include/allegro/platform/alqnx.h
 include/allegro/platform/alqnxcfg.h
 include/allegro/platform/alucfg.h
@@ -99,10 +101,43 @@ include/allegro/system.h
 include/allegro/text.h
 include/allegro/timer.h
 include/allegro/unicode.h
-include/linalleg.h
+include/allegrogl/
+include/allegrogl/GLext/
+include/allegrogl/GLext/gl_ext_alias.h
+include/allegrogl/GLext/gl_ext_api.h
+include/allegrogl/GLext/gl_ext_defs.h
+include/allegrogl/GLext/gl_ext_list.h
+include/allegrogl/GLext/glx_ext_alias.h
+include/allegrogl/GLext/glx_ext_api.h
+include/allegrogl/GLext/glx_ext_defs.h
+include/allegrogl/GLext/glx_ext_list.h
+include/allegrogl/GLext/wgl_ext_alias.h
+include/allegrogl/GLext/wgl_ext_api.h
+include/allegrogl/GLext/wgl_ext_defs.h
+include/allegrogl/GLext/wgl_ext_list.h
+include/allegrogl/alleggl_config.h
+include/allegrogl/gl_ext.h
+include/allegrogl/gl_header_detect.h
+include/jpgalleg.h
+include/loadpng.h
+include/logg.h
+include/loggint.h
 include/xalleg.h
+info/allegro.info
+lib/allegro/
+lib/allegro/4.4.3/
+@so lib/allegro/4.4.3/alleg-sndiodigi.so
+lib/allegro/4.4.3/modules.lst
 @lib lib/liballeg.so.${LIBalleg_VERSION}
-lib/liballeg_unsharable.a
+@lib lib/liballeggl.so.${LIBalleggl_VERSION}
+@lib lib/libjpgalleg.so.${LIBjpgalleg_VERSION}
+@lib lib/libloadpng.so.${LIBloadpng_VERSION}
+@lib lib/liblogg.so.${LIBlogg_VERSION}
+lib/pkgconfig/allegro.pc
+lib/pkgconfig/allegrogl.pc
+lib/pkgconfig/jpgalleg.pc
+lib/pkgconfig/loadpng.pc
+lib/pkgconfig/logg.pc
 @man man/man3/ALLEGRO_DATE.3
 @man man/man3/ALLEGRO_DATE_STR.3
 @man man/man3/ALLEGRO_SUB_VERSION.3
@@ -320,6 +355,7 @@ lib/liballeg_unsharable.a
 @man man/man3/draw_lit_sprite.3
 @man man/man3/draw_rle_sprite.3
 @man man/man3/draw_sprite.3
+@man man/man3/draw_sprite_ex.3
 @man man/man3/draw_sprite_h_flip.3
 @man man/man3/draw_sprite_v_flip.3
 @man man/man3/draw_sprite_vh_flip.3
@@ -363,6 +399,7 @@ lib/liballeg_unsharable.a
 @man man/man3/expat.3
 @man man/man3/exquat.3
 @man man/man3/exrgbhsv.3
+@man man/man3/exrotscl.3
 @man man/man3/exsample.3
 @man man/man3/exscale.3
 @man man/man3/exscn3d.3
@@ -377,6 +414,7 @@ lib/liballeg_unsharable.a
 @man man/man3/extimer.3
 @man man/man3/extract_font_range.3
 @man man/man3/extrans.3
+@man man/man3/extrans2.3
 @man man/man3/extruec.3
 @man man/man3/exunicod.3
 @man man/man3/exupdate.3
@@ -468,7 +506,9 @@ lib/liballeg_unsharable.a
 @man man/man3/get_font_range_begin.3
 @man man/man3/get_font_range_end.3
 @man man/man3/get_font_ranges.3
+@man man/man3/get_gfx_mode.3
 @man man/man3/get_gfx_mode_list.3
+@man man/man3/get_gfx_mode_type.3
 @man man/man3/get_hardware_volume.3
 @man man/man3/get_midi_length.3
 @man man/man3/get_mixer_bits.3
@@ -678,6 +718,7 @@ lib/liballeg_unsharable.a
 @man man/man3/mouse_b.3
 @man man/man3/mouse_callback.3
 @man man/man3/mouse_needs_poll.3
+@man man/man3/mouse_on_screen.3
 @man man/man3/mouse_pos.3
 @man man/man3/mouse_sprite.3
 @man man/man3/mouse_w.3
@@ -729,9 +770,17 @@ lib/liballeg_unsharable.a
 @man man/man3/persp_project.3
 @man man/man3/persp_project_f.3
 @man man/man3/pivot_scaled_sprite.3
+@man man/man3/pivot_scaled_sprite_lit.3
+@man man/man3/pivot_scaled_sprite_trans.3
 @man man/man3/pivot_scaled_sprite_v_flip.3
+@man man/man3/pivot_scaled_sprite_v_flip_lit.3
+@man man/man3/pivot_scaled_sprite_v_flip_trans.3
 @man man/man3/pivot_sprite.3
+@man man/man3/pivot_sprite_lit.3
+@man man/man3/pivot_sprite_trans.3
 @man man/man3/pivot_sprite_v_flip.3
+@man man/man3/pivot_sprite_v_flip_lit.3
+@man man/man3/pivot_sprite_v_flip_trans.3
 @man man/man3/play_audio_stream.3
 @man man/man3/play_fli.3
 @man man/man3/play_looped_midi.3
@@ -807,9 +856,17 @@ lib/liballeg_unsharable.a
 @man man/man3/rgb_map.3
 @man man/man3/rgb_to_hsv.3
 @man man/man3/rotate_scaled_sprite.3
+@man man/man3/rotate_scaled_sprite_lit.3
+@man man/man3/rotate_scaled_sprite_trans.3
 @man man/man3/rotate_scaled_sprite_v_flip.3
+@man man/man3/rotate_scaled_sprite_v_flip_lit.3
+@man man/man3/rotate_scaled_sprite_v_flip_trans.3
 @man man/man3/rotate_sprite.3
+@man man/man3/rotate_sprite_lit.3
+@man man/man3/rotate_sprite_trans.3
 @man man/man3/rotate_sprite_v_flip.3
+@man man/man3/rotate_sprite_v_flip_lit.3
+@man man/man3/rotate_sprite_v_flip_trans.3
 @man man/man3/save_bitmap.3
 @man man/man3/save_bmp.3
 @man man/man3/save_bmp_pf.3
@@ -1004,10 +1061,9 @@ lib/liballeg_unsharable.a
 @man man/man3/vsync.3
 @man man/man3/xor_mode.3
 @man man/man3/xwin_set_window_name.3
-share/aclocal/
-share/aclocal/allegro.m4
 share/doc/allegro/
 share/doc/allegro/abi.html
+share/doc/allegro/addons.html
 share/doc/allegro/ahack.html
 share/doc/allegro/alleg000.html
 share/doc/allegro/alleg001.html
@@ -1058,23 +1114,9 @@ share/doc/allegro/alleg045.html
 share/doc/allegro/alleg046.html
 share/doc/allegro/alleg047.html
 share/doc/allegro/alleg048.html
-share/doc/allegro/alleg049.html
 share/doc/allegro/allegro.css
 share/doc/allegro/allegro.html
 share/doc/allegro/api.html
-share/doc/allegro/build/
-share/doc/allegro/build/bcc32.html
-share/doc/allegro/build/beos.html
-share/doc/allegro/build/darwin.html
-share/doc/allegro/build/djgpp.html
-share/doc/allegro/build/dmc.html
-share/doc/allegro/build/linux.html
-share/doc/allegro/build/macosx.html
-share/doc/allegro/build/mingw32.html
-share/doc/allegro/build/msvc.html
-share/doc/allegro/build/qnx.html
-share/doc/allegro/build/unix.html
-share/doc/allegro/build/watcom.html
 share/doc/allegro/changes.html
 share/doc/allegro/const.html
 share/doc/allegro/dat.html

Reply via email to