commit: a9bc38ff289108ccd2747f9e4c1921804a890d9a
parent 724512b2509c61118c27022007337e60d76d37a3
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 11 Mar 2021 11:06:09 +0100
media-libs/libsdl: Switch to git, add headers and .pc
Diffstat:
2 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/media-libs/libsdl/files/sdl.pc.in b/media-libs/libsdl/files/sdl.pc.in
@@ -0,0 +1,15 @@
+# sdl pkg-config source file
+
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+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.9999
+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
@@ -1,25 +1,34 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit mercurial cmake
+inherit git-r3 cmake
-DESCRIPTION="Simple Direct Media Layer"
-HOMEPAGE="https://www.libsdl.org/"
-EHG_REPO_URI="https://hg.libsdl.org/sdl12-compat"
-S="${WORKDIR}/sdl12-compat"
+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"
# 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"
+src_unpack() {
+ default
+ git-r3_src_unpack
+}
+
src_prepare() {
cmake_src_prepare
+ mv "${WORKDIR}/SDL-1.2.15/include" "${WORKDIR}/SDL" || die
+
sed -i \
- -e 's;PUBLIC "/usr/local/include/SDL2";PUBLIC "/usr/include/SDL2";' \
-e 's;test_program(testsprite;#test_program(testsprite;' \
CMakeLists.txt || die
}
@@ -28,4 +37,12 @@ src_install() {
default
dolib.so "${BUILD_DIR}/"libSDL-1.2.so*
+
+ doheader -r "${WORKDIR}/SDL"
+
+ mkdir -p "${ED}/usr/lib/pkgconfig"
+
+ sed \
+ -e "s;@prefix@;${EROOT}/usr;" \
+ "${FILESDIR}/sdl.pc.in" > "${ED}/usr/lib/pkgconfig/sdl.pc" || die
}