logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: fea5fdcd8aaae4e298fe39ad053689ff488f9e0f
parent 7b002bf75a7af7ba28388068608826460d44e9a2
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  3 Jun 2021 23:19:58 +0200

media-libs/libsdl: Update live ebuild

Diffstat:

Dmedia-libs/libsdl/Manifest1-
Dmedia-libs/libsdl/files/sdl-config65-----------------------------------------------------------------
Dmedia-libs/libsdl/files/sdl.pc.in15---------------
Mmedia-libs/libsdl/libsdl-9999.ebuild46++++++++--------------------------------------
4 files changed, 8 insertions(+), 119 deletions(-)

diff --git a/media-libs/libsdl/Manifest b/media-libs/libsdl/Manifest @@ -1 +0,0 @@ -DIST SDL-1.2.15.tar.gz 3920622 BLAKE2B ecd4b82d7de6e4ca0de1317ad34bcd957a5a0d319e94c5b705f8b30aa53136ac08c88a6dcd90ad0ac84e607ba9483c2366921c4b25c8c53973cee62cfe97d204 SHA512 ac392d916e6953b0925a7cbb0f232affea33339ef69b47a0a7898492afb9784b93138986df53d6da6d3e2ad79af1e9482df565ecca30f89428be0ae6851b1adc diff --git a/media-libs/libsdl/files/sdl-config b/media-libs/libsdl/files/sdl-config @@ -1,65 +0,0 @@ -#!/bin/sh - -prefix=@prefix@ -exec_prefix=${prefix} -exec_prefix_set=no -libdir=@libdir@ - -usage="\ -Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]" -#usage="\ -#Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]" - -if test $# -eq 0; then - echo "${usage}" 1>&2 - exit 1 -fi - -while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case $1 in - --prefix=*) - prefix=$optarg - if test $exec_prefix_set = no ; then - exec_prefix=$optarg - fi - ;; - --prefix) - echo $prefix - ;; - --exec-prefix=*) - exec_prefix=$optarg - exec_prefix_set=yes - ;; - --exec-prefix) - echo $exec_prefix - ;; - --version) - echo 1.2.99 - ;; - --cflags) - echo -I${prefix}/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT - ;; - --libs) - if test x"${prefix}" != x"/usr" ; then - libdirs="-L/usr/lib64" - else - libdirs="" - fi - echo $libdirs -lSDL -lpthread - ;; -# --static-libs) -## --libs|--static-libs) -# echo -L/usr/lib64 -lSDL -lpthread -lm -ldl -lasound -lm -ldl -lpthread -lpthread -# ;; - *) - echo "${usage}" 1>&2 - exit 1 - ;; - esac - shift -done diff --git a/media-libs/libsdl/files/sdl.pc.in b/media-libs/libsdl/files/sdl.pc.in @@ -1,15 +0,0 @@ -# sdl pkg-config source file - -prefix=@prefix@ -exec_prefix=${prefix} -libdir=@libdir@ -includedir=${prefix}/include - -Name: sdl -Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. -Version: 1.2.99 -Requires: sdl2 -Conflicts: -Libs: -L${libdir} -lSDL -Libs.private: -lSDL -Cflags: -I${includedir}/SDL -D_GNU_SOURCE=1 -D_REENTRANT diff --git a/media-libs/libsdl/libsdl-9999.ebuild b/media-libs/libsdl/libsdl-9999.ebuild @@ -6,54 +6,24 @@ inherit git-r3 cmake multilib DESCRIPTION="Simple Direct Media Layer (sdl-1.2 compatibility)" HOMEPAGE="https://github.com/libsdl-org/sdl12-compat" - -# Used for .pc and ./include/ -# See https://github.com/libsdl-org/sdl12-compat/issues/34 -SRC_URI="https://libsdl.org/release/SDL-1.2.15.tar.gz" - EGIT_REPO_URI="https://github.com/libsdl-org/sdl12-compat" LICENSE="ZLIB" -SLOT="0" +SLOT="0/sdl12-compat" # Those are fakes and just there for compat with other ebuilds IUSE="oss alsa nas X dga xv xinerama fbcon tslib aalib opengl libcaca +sound +video +joystick custom-cflags pulseaudio static-libs" +IUSE="test" +RESTRICT="!test? ( test )" src_unpack() { default git-r3_src_unpack } -src_prepare() { - cmake_src_prepare - - mkdir -p "${WORKDIR}/SDL" || die - mv "${WORKDIR}/SDL-1.2.15/include/"*.h "${WORKDIR}/SDL" || die - mv "${WORKDIR}/SDL-1.2.15/include/SDL_config.h.default" "${WORKDIR}/SDL/SDL_config.h" || die - - sed \ - -e "s;@prefix@;${EROOT}/usr;" \ - -e 's;@libdir@;${prefix}/'"$(get_libdir);" \ - "${FILESDIR}/sdl-config" > "${WORKDIR}/sdl-config" || die - - sed \ - -e "s;@prefix@;${EROOT}/usr;" \ - -e 's;@libdir@;${prefix}/'"$(get_libdir);" \ - "${FILESDIR}/sdl.pc.in" > "${WORKDIR}/sdl.pc" || die - - sed -i \ - -e 's;test_program(testsprite;#test_program(testsprite;' \ - CMakeLists.txt || die -} - -src_install() { - default - - dolib.so "${BUILD_DIR}/"libSDL-1.2.so* - - dobin "${FILESDIR}/sdl-config" - - doheader -r "${WORKDIR}/SDL" +src_configure() { + local mycmakeargs=( + -DSDL12TESTS=$(usex test) + ) - mkdir -p "${ED}/usr/$(get_libdir)/pkgconfig" - cp "${WORKDIR}/sdl.pc" "${ED}/usr/$(get_libdir)/pkgconfig/sdl.pc" + cmake_src_configure }