media-libs/allegro: initial import of 4.4.2

This commit is contained in:
Julian Ospald 2016-02-27 17:59:31 +01:00
parent faf2f2d69d
commit cda984b704
6 changed files with 162 additions and 0 deletions

View File

@ -18,6 +18,7 @@ games-rpg
games-server
games-simulation
games-strategy
media-libs
media-sound
net-firewall
net-im

View File

@ -0,0 +1,115 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
require cmake [ out_of_source=false ]
SUMMARY="cross-platform multimedia library"
HOMEPAGE="http://alleg.sourceforge.net/"
DOWNLOADS="mirror://sourceforge/alleg/${PNV}.tar.gz"
LICENCES="Allegro MIT GPL-2 ZLIB"
SLOT="0"
PLATFORMS="amd64 ~mips ppc ppc64 x86"
MYOPTIONS="
alsa
fbcon [[ description = [ Add framebuffer support for the console,
via the kernel ] ]]
jack
opengl
oss
ogg
( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
"
DEPENDENCIES="
build:
virtual/pkg-config
x11-proto/xextproto
x11-proto/xf86dgaproto
x11-proto/xf86vidmodeproto
x11-proto/xproto
build+run:
media-libs/libpng:=
x11-libs/libX11
x11-libs/libXcursor
x11-libs/libXext
x11-libs/libXpm
x11-libs/libXt
x11-libs/libXxf86dga
x11-libs/libXxf86vm
alsa? ( sys-sound/alsa-lib )
jack? ( media-sound/jack-audio-connection-kit )
ogg? ( media-libs/libvorbis )
opengl? (
x11-dri/glu
x11-dri/mesa
)
providers:ijg-jpeg? ( media-libs/jpeg:= )
providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
"
DEFAULT_SRC_PREPARE_PATCHES=(
-p0 "${FILES}"/${PNV}-shared.patch
"${FILES}"/${PNV}-underlink.patch
"${FILES}"/${PNV}-gentoo.patch
"${FILES}"/${PNV}-rpath.patch
)
CMAKE_SRC_CONFIGURE_PARAMS=(
"-DDOCDIR=share/doc"
"-DINFODIR=share/info"
"-DMANDIR=share/man"
"-DWANT_EXAMPLES=OFF"
"-DWANT_JPGALLEG=ON"
"-DWANT_LINUX_CONSOLE=OFF"
"-DWANT_LINUX_SVGALIB=OFF"
"-DWANT_LINUX_VGA=ON"
"-DWANT_LOADPNG=ON"
"-DWANT_TOOLS=ON"
"-DWANT_X11=ON"
)
CMAKE_SRC_CONFIGURE_OPTION_WANTS=(
"alsa ALSA"
"fbcon LINUX_FBCON"
"jack JACK"
"ogg LOGG"
"opengl ALLEGROGL"
"oss OSS"
)
CMAKE_SRC_CONFIGURE_TESTS=(
"-DWANT_TESTS=ON"
)
src_prepare() {
default
edo sed -i \
-e "s:allegro-\${ALLEGRO_VERSION}:${PNVR}:" \
docs/CMakeLists.txt
}
src_install() {
cmake_src_install
newbin setup/setup ${PN}-setup
insinto /usr/share/${PN}
doins {keyboard,language,setup/setup}.dat
insinto /usr/share/pixmaps
newins misc/icon.png ${PN}.png
insinto /usr/share/applications
hereins ${PN}-setup.desktop << EOF
[Desktop Entry]
Name=Allegro Setup
Type=Application
Comment=${SUMMARY}
Exec=allegro-setup
TryExec=allegro-setup
Icon=allegro
Categories=Settings;
EOF
}

View File

@ -0,0 +1,16 @@
--- docs/CMakeLists.txt.old 2012-03-04 20:20:05.566881387 +0100
+++ docs/CMakeLists.txt 2012-03-04 20:20:50.659714153 +0100
@@ -71,11 +71,12 @@
string(REGEX MATCH "[^/]*._tx" basename ${page})
string(REPLACE "._tx" "" basename ${basename})
- set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page})
if(${page} MATCHES "/build/")
+ set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page})
set(txt_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.txt)
set(html_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.html)
else()
+ set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page})
set(txt_out ${CMAKE_CURRENT_BINARY_DIR}/txt/${basename}.txt)
set(html_out ${CMAKE_CURRENT_BINARY_DIR}/html/${basename}.html)
endif()

View File

@ -0,0 +1,8 @@
--- setup/CMakeLists.txt
+++ setup/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(CMAKE_SKIP_BUILD_RPATH TRUE)
+
add_our_executable(setup setup.c)
copy_files(copy_setup_data setup.dat)

View File

@ -0,0 +1,11 @@
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -830,7 +830,7 @@
option(WANT_LOGG "Enable logg" on)
option(WANT_JPGALLEG "Enable JPGAlleg" on)
-if(WANT_FRAMEWORKS)
+if(SHARED)
set(ADDON_LINKAGE SHARED)
else()
set(ADDON_LINKAGE STATIC)

View File

@ -0,0 +1,11 @@
--- CMakeLists.txt.old 2011-06-06 23:46:06.057320691 +0200
+++ CMakeLists.txt 2011-06-06 23:46:21.900313261 +0200
@@ -392,7 +392,7 @@
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 dl m ${CMAKE_THREAD_LIBS_INIT})
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_UNIX_FILES})
if(WANT_OSS)