From cda984b70417983a4b0bd9c535f66a0fdb667fbd Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 27 Feb 2016 17:59:31 +0100 Subject: [PATCH] media-libs/allegro: initial import of 4.4.2 --- metadata/categories.conf | 1 + .../allegro/allegro-4.4.2.exheres-0 | 115 ++++++++++++++++++ .../allegro/files/allegro-4.4.2-gentoo.patch | 16 +++ .../allegro/files/allegro-4.4.2-rpath.patch | 8 ++ .../allegro/files/allegro-4.4.2-shared.patch | 11 ++ .../files/allegro-4.4.2-underlink.patch | 11 ++ 6 files changed, 162 insertions(+) create mode 100644 packages/media-libs/allegro/allegro-4.4.2.exheres-0 create mode 100644 packages/media-libs/allegro/files/allegro-4.4.2-gentoo.patch create mode 100644 packages/media-libs/allegro/files/allegro-4.4.2-rpath.patch create mode 100644 packages/media-libs/allegro/files/allegro-4.4.2-shared.patch create mode 100644 packages/media-libs/allegro/files/allegro-4.4.2-underlink.patch diff --git a/metadata/categories.conf b/metadata/categories.conf index d3c0426b..2891e981 100644 --- a/metadata/categories.conf +++ b/metadata/categories.conf @@ -18,6 +18,7 @@ games-rpg games-server games-simulation games-strategy +media-libs media-sound net-firewall net-im diff --git a/packages/media-libs/allegro/allegro-4.4.2.exheres-0 b/packages/media-libs/allegro/allegro-4.4.2.exheres-0 new file mode 100644 index 00000000..2ec4b374 --- /dev/null +++ b/packages/media-libs/allegro/allegro-4.4.2.exheres-0 @@ -0,0 +1,115 @@ +# Copyright 1999-2015 Gentoo Foundation +# Copyright 2016 Julian Ospald +# 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 +} + diff --git a/packages/media-libs/allegro/files/allegro-4.4.2-gentoo.patch b/packages/media-libs/allegro/files/allegro-4.4.2-gentoo.patch new file mode 100644 index 00000000..119d9c78 --- /dev/null +++ b/packages/media-libs/allegro/files/allegro-4.4.2-gentoo.patch @@ -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() diff --git a/packages/media-libs/allegro/files/allegro-4.4.2-rpath.patch b/packages/media-libs/allegro/files/allegro-4.4.2-rpath.patch new file mode 100644 index 00000000..57bdb6bf --- /dev/null +++ b/packages/media-libs/allegro/files/allegro-4.4.2-rpath.patch @@ -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) + diff --git a/packages/media-libs/allegro/files/allegro-4.4.2-shared.patch b/packages/media-libs/allegro/files/allegro-4.4.2-shared.patch new file mode 100644 index 00000000..665c03e3 --- /dev/null +++ b/packages/media-libs/allegro/files/allegro-4.4.2-shared.patch @@ -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) diff --git a/packages/media-libs/allegro/files/allegro-4.4.2-underlink.patch b/packages/media-libs/allegro/files/allegro-4.4.2-underlink.patch new file mode 100644 index 00000000..33dc9d26 --- /dev/null +++ b/packages/media-libs/allegro/files/allegro-4.4.2-underlink.patch @@ -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)