Commit 678e89f6 authored by amdmi3's avatar amdmi3
Browse files

devel/allegro-devel: unbreak, update to 5.2.4 and rename to allegro5

Rename the port to allegro5 to match upstream project name,
cleanup and simplify the port

PR:		227222
Submitted by:	rainbow@sanitylinux.org
parent 2bbe7b75
......@@ -16174,3 +16174,4 @@ audio/herrie||2021-02-17|Removed
sysutils/uefi-edk2-bhyve-devel|sysutils/uefi-edk2-bhyve|2021-02-17|Development version no longer necessary
graphics/py-graph-core|graphics/py-pygraph|2021-02-19|Is outdated and broken with python3, use graphics/py-pygraph instead
devel/llvm60||2021-02-19|Has expired: Uses Python 2.7 which is EOLed upstream, no more consumers left
devel/allegro-devel|devel/allegro5|2021-02-20|Rename to better match upstream name
......@@ -130,7 +130,7 @@
SUBDIR += aixlog
SUBDIR += ald
SUBDIR += allegro
SUBDIR += allegro-devel
SUBDIR += allegro5
SUBDIR += alog
SUBDIR += amd64-gcc
SUBDIR += amd64-xtoolchain-gcc
......
# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
# $FreeBSD$
PORTNAME= allegro
DISTVERSION= 5.0.9
PORTREVISION= 7
CATEGORIES= devel
MASTER_SITES= SF/alleg/allegro/${PORTVERSION}
PKGNAMESUFFIX= -devel
DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Cross-platform library for games and multimedia programming
LICENSE= ZLIB BSD3CLAUSE
LICENSE_COMB= dual
BROKEN= fails to build
LIB_DEPENDS= libjack.so:audio/jack \
libpng.so:graphics/png \
libvorbis.so:audio/libvorbis \
libFLAC.so:audio/flac \
libphysfs.so:devel/physfs
USES= cmake:insource compiler:c++11-lang gl gnome jpeg \
openal:soft pkgconfig xorg
USE_XORG= x11 xpm xext xcursor xxf86vm xxf86dga
USE_GL= glu
USE_GNOME= gtk20
USE_LDCONFIG= yes
CFLAGS+= -isystem${LOCALBASE}/include -L${LOCALBASE}/lib
PLIST_SUB= SHLIB_VER="${PORTVERSION}" SHLIB_VER1="${PORTVERSION:R}"
# Wrong versioning upstream
PORTSCOUT= limitw:1,even skipv:5.0.10
PORTDOCS= *
PORTEXAMPLES= *
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}${PKGNAMESUFFIX}
OPTIONS_DEFINE= ALSA DOCS EXAMPLES PULSEAUDIO DEMOS
OPTIONS_DEFAULT= DEMOS
OPTIONS_SUB= yes
DOCS_BUILD_DEPENDS= ${LOCALBASE}/bin/pandoc:textproc/hs-pandoc
ALSA_LIB_DEPENDS= libasound.so.2:audio/alsa-lib
ALSA_CMAKE_BOOL= WANT_ALSA
ALSA_BROKEN= ALSA support is broken # confirmed by running demos, leads to assertion at startup
DEMOS_IMPLIES= EXAMPLES
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_CMAKE_BOOL= WANT_PULSEAUDIO
DEMOS_DESC= Install demo programs
DEMOS_CMAKE_BOOL= WANT_DEMO
DEMOS_SUB_FILES= cosmic_protector speed pkg-message
DEMOS_MASTER_SITES= SF/nemysisfreebsdp/${CATEGORIES}/${PORTNAME}/:icons
DEMOS_DISTFILES= cosmic_protector.png:icons speed.png:icons
DEMOS_DESKTOP_ENTRIES= "Cosmic Protector" \
"Protect the earth from a deadly meteor shower" \
"cosmic_protector" \
"cosmic_protector" \
"Game;ArcadeGame;" \
"" \
"SPEED" \
"Simultaneous Projections Employing an Ensemble of Displays" \
"speed" \
"speed" \
"Game;ArcadeGame;" \
""
post-patch:
@${REINPLACE_CMD} -e 's|lib$${LIB_SUFFIX}/pkgconfig|libdata/pkgconfig|' \
${WRKSRC}/CMakeLists.txt
@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' \
${WRKSRC}/addons/audio/pulseaudio.c
post-install:
${INSTALL_MAN} ${WRKSRC}/docs/man/* ${STAGEDIR}${MAN3PREFIX}/man/man3/
post-install-DOCS-on:
@cd ${WRKSRC} && ${COPYTREE_SHARE} "README.txt docs/src docs/html" ${STAGEDIR}${DOCSDIR}
post-install-EXAMPLES-on:
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
.for l in ex_acodec ex_acodec_multi ex_audio_chain ex_audio_props ex_audio_simple \
ex_bitmap ex_bitmap_flip ex_bitmap_target ex_blend ex_blend2 \
ex_blend_bench ex_blend_test ex_blit ex_clip ex_color ex_config ex_convert \
ex_dir ex_disable_screensaver ex_display_events ex_display_options \
ex_draw ex_draw_bitmap ex_drawpixels ex_dualies ex_expose ex_file_slice \
ex_filter ex_font ex_font_justify ex_fs_resize ex_fs_window ex_get_path \
ex_gldepth ex_glext ex_haiku ex_icon ex_icon2 ex_joystick_events \
ex_joystick_hotplugging ex_kcm_direct ex_keyboard_events ex_keyboard_focus \
ex_lines ex_lockbitmap ex_logo ex_membmp ex_memfile ex_mixer_chain \
ex_mixer_pp ex_monitorinfo ex_mouse ex_mouse_cursor ex_mouse_events \
ex_mouse_focus ex_multisample ex_multiwin ex_native_filechooser ex_nodisplay \
ex_noframe ex_opengl ex_opengl_pixel_shader ex_path ex_path_test ex_physfs \
ex_pixelformat ex_premulalpha ex_prim ex_resample_test ex_resize ex_resize2 \
ex_rotate ex_saw ex_scale ex_stream_file ex_stream_seek ex_subbitmap \
ex_synth ex_threads ex_threads2 ex_timedwait ex_timer ex_transform ex_ttf \
ex_user_events ex_utf8 ex_vsync ex_warp_mouse ex_windows ex_winfull
${STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/${l}
.endfor
post-install-DEMOS-on:
@(cd ${WRKSRC} && ${COPYTREE_SHARE} demos ${STAGEDIR}${EXAMPLESDIR})
${INSTALL_SCRIPT} ${WRKDIR}/cosmic_protector ${STAGEDIR}${PREFIX}/bin/
${INSTALL_DATA} ${_DISTDIR}/cosmic_protector.png ${STAGEDIR}${PREFIX}/share/pixmaps/
@(cd ${STAGEDIR}${EXAMPLESDIR}/demos/cosmic_protector && ${CHMOD} 755 cosmic_protector)
${INSTALL_SCRIPT} ${WRKDIR}/speed ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${_DISTDIR}/speed.png ${STAGEDIR}${PREFIX}/share/pixmaps/
@(cd ${STAGEDIR}${EXAMPLESDIR}/demos/speed && ${CHMOD} 755 speed)
${STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/demos/cosmic_protector/cosmic_protector
${STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/demos/speed/speed
.include <bsd.port.mk>
SHA256 (allegro/allegro-5.0.9.tar.gz) = ba28ac307023f1c756f1c421086f81d1e19ec5f09412d5848303c64177a20bd5
SIZE (allegro/allegro-5.0.9.tar.gz) = 3152274
SHA256 (allegro/cosmic_protector.png) = 2bbfc008c5da3e703ebfbd9611fd1b14e4aff5da1cbe993a3a4d333c89a116f1
SIZE (allegro/cosmic_protector.png) = 2978
SHA256 (allegro/speed.png) = dfceec81746aad09d5b787ab33e3357a1d84d23735e8e1f7da0f23891a741d8a
SIZE (allegro/speed.png) = 3767
#!/bin/sh
#
# # $FreeBSD$
#
cd "%%EXAMPLESDIR%%/demos/cosmic_protector"
exec ./cosmic_protector "${@}"
[
{ type: install
message: <<EOM
Allegro-devel has been installed.
Allegro-devel have two Demos (Games)
Cosmic Protector and SPEED
You can use executable
%%LOCALBASE%%/bin/cosmic_protector
%%LOCALBASE%%/bin/speed
Or can use desktop files
%%LOCALBASE%%/share/applications/cosmic_protector.desktop
%%LOCALBASE%%/share/applications/speed.desktop
Have fun!
EOM
}
]
#!/bin/sh
#
# # $FreeBSD$
#
cd "%%EXAMPLESDIR%%/demos/speed"
exec ./speed "${@}"
Allegro is a cross-platform library intended for use in computer games and
other types of multimedia programming.
A wide range of extension packages and add-on modules are also available, which
can be found in the "Library Extensions" section of the Allegro website.
WWW: https://liballeg.org/
This diff is collapsed.
# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
# $FreeBSD$
PORTNAME= allegro
DISTVERSION= 5.2.6.0
CATEGORIES= devel games
PKGNAMESUFFIX= 5
MAINTAINER= ports@FreeBSD.org
COMMENT= Cross-platform C library for games and multimedia programming
LICENSE= ZLIB BSD3CLAUSE
LICENSE_COMB= dual
LIB_DEPENDS= libFLAC.so:audio/flac \
libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libjack.so:audio/jack \
libogg.so:audio/libogg \
libphysfs.so:devel/physfs \
libpng.so:graphics/png \
libtheoradec.so:multimedia/libtheora \
libvorbis.so:audio/libvorbis \
libwebp.so:graphics/webp
USES= cmake:insource compiler:c++11-lang gl gnome jpeg \
openal:soft pkgconfig xorg uniquefiles:dirs
USE_GITHUB= yes
GH_ACCOUNT= liballeg
GH_PROJECT= allegro5
USE_XORG= x11 xpm xext xcursor xxf86vm xxf86dga sm ice xi xinerama xrandr \
xscrnsaver
USE_GL= gl glu
USE_GNOME= gtk20 cairo gdkpixbuf2
USE_LDCONFIG= yes
CFLAGS+= -isystem${LOCALBASE}/include -L${LOCALBASE}/lib
PLIST_SUB= SHLIB_VER="${PORTVERSION}" SHLIB_VER1="${PORTVERSION:R}"
PORTDOCS= *
PORTEXAMPLES= *
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}${PKGNAMESUFFIX}
OPTIONS_DEFINE= ALSA DOCS EXAMPLES PULSEAUDIO
OPTIONS_SUB= yes
DOCS_DESC= Build and install docs and manpages (requires pandoc)
DOCS_BUILD_DEPENDS= ${LOCALBASE}/bin/pandoc:textproc/hs-pandoc
DOCS_CMAKE_BOOL= WANT_DOCS
ALSA_LIB_DEPENDS= libasound.so.2:audio/alsa-lib
ALSA_CMAKE_BOOL= WANT_ALSA
ALSA_BROKEN= ALSA support is broken # confirmed by running demos, leads to assertion at startup
EXAMPLES_CMAKE_BOOL= WANT_EXAMPLES WANT_DEMOS
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_CMAKE_BOOL= WANT_PULSEAUDIO
post-patch:
@${REINPLACE_CMD} -e 's|lib$${LIB_SUFFIX}/pkgconfig|libdata/pkgconfig|' \
${WRKSRC}/CMakeLists.txt
post-install-DOCS-on:
${INSTALL_MAN} ${WRKSRC}/docs/man/* ${STAGEDIR}${MAN3PREFIX}/man/man3/
@cd ${WRKSRC} && ${COPYTREE_SHARE} "README.txt docs/src docs/html" ${STAGEDIR}${DOCSDIR}
post-install-EXAMPLES-on:
@(cd ${WRKSRC} && ${COPYTREE_SHARE} "examples demos" ${STAGEDIR}${EXAMPLESDIR})
${FIND} -d ${STAGEDIR}${EXAMPLESDIR} \
-name CMakeFiles -o -name cmake_install.cmake \
-exec ${RM} -r {} \;
${FIND} ${STAGEDIR}${EXAMPLESDIR}/examples -regex ".*/ex_[a-z0-9_]*" \
-exec ${CHMOD} a+x {} \; \
-exec ${STRIP_CMD} {} \;
.for l in cosmic_protector skater speed
@${CHMOD} a+x ${STAGEDIR}${EXAMPLESDIR}/demos/${l}/${l}
@${STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/demos/${l}/${l}
.endfor
.include <bsd.port.mk>
TIMESTAMP = 1586006805
SHA256 (liballeg-allegro5-5.2.6.0_GH0.tar.gz) = 053b7e00d0ad5411d887e8241914337099c3b0aa53c237b77a92a8a3b68967c1
SIZE (liballeg-allegro5-5.2.6.0_GH0.tar.gz) = 7089870
First hunk fixes build in presence of evdev-proto
--- CMakeLists.txt.orig 2020-02-10 02:03:00 UTC
+++ CMakeLists.txt
@@ -475,7 +475,6 @@ endif(NOT ALLEGRO_BIG_ENDIAN AND NOT ALLEGRO_LITTLE_EN
check_include_files(dirent.h ALLEGRO_HAVE_DIRENT_H)
check_include_files(inttypes.h ALLEGRO_HAVE_INTTYPES_H)
-check_include_files(linux/input.h ALLEGRO_HAVE_LINUX_INPUT_H)
check_include_files(stdbool.h ALLEGRO_HAVE_STDBOOL_H)
check_include_files(stdint.h ALLEGRO_HAVE_STDINT_H)
check_include_files(sys/io.h ALLEGRO_HAVE_SYS_IO_H)
@@ -1155,7 +1154,7 @@ if(INSTALL_PKG_CONFIG_FILES)
@ONLY
)
install(FILES ${LIBRARY_OUTPUT_PATH}/pkgconfig/${outname}
- DESTINATION "lib${LIB_SUFFIX}/pkgconfig"
+ DESTINATION "libdata/pkgconfig"
)
endforeach(name)
endforeach(versuffix)
--- addons/audio/alsa.c.orig 2020-02-10 02:03:00 UTC
+++ addons/audio/alsa.c
@@ -23,7 +23,7 @@
#include "allegro5/allegro.h"
#include "allegro5/internal/aintern_audio.h"
-#include <alloca.h>
+#include <stdlib.h>
#include <alsa/asoundlib.h>
ALLEGRO_DEBUG_CHANNEL("alsa")
Allegro is a cross-platform library mainly aimed at video game and multimedia
programming. It handles common, low-level tasks such as creating windows,
accepting user input, loading data, drawing images, playing sounds, etc.
However, Allegro is not a game engine.
Online documentation: http://docs.liballeg.org/
WWW: https://liballeg.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