commit: 8d4c5afdab8a515d0ab9b67d69a047e851efe263
parent 27d83b7b4c9fe23a080f6413fd6a9b71601ba8e7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 11 Mar 2021 11:30:51 +0100
media-libs/libsdl: Fix sdl-config and sdl.pc
Diffstat:
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/media-libs/libsdl/files/sdl-config b/media-libs/libsdl/files/sdl-config
@@ -1,9 +1,9 @@
#!/bin/sh
-prefix=/usr
+prefix=@prefix@
exec_prefix=${prefix}
exec_prefix_set=no
-libdir=/usr/lib
+libdir=@libdir@
usage="\
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
@@ -39,7 +39,7 @@ while test $# -gt 0; do
echo $exec_prefix
;;
--version)
- echo 1.2.15
+ echo 1.2.99
;;
--cflags)
echo -I${prefix}/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
diff --git a/media-libs/libsdl/files/sdl.pc.in b/media-libs/libsdl/files/sdl.pc.in
@@ -2,12 +2,12 @@
prefix=@prefix@
exec_prefix=${prefix}
-libdir=${prefix}/lib
+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.9999
+Version: 1.2.99
Requires: sdl2
Conflicts:
Libs: -L${libdir} -lSDL
diff --git a/media-libs/libsdl/libsdl-9999.ebuild b/media-libs/libsdl/libsdl-9999.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit git-r3 cmake
+inherit git-r3 cmake multilib
DESCRIPTION="Simple Direct Media Layer (sdl-1.2 compatibility)"
HOMEPAGE="https://github.com/libsdl-org/sdl12-compat"
@@ -28,6 +28,16 @@ src_prepare() {
mv "${WORKDIR}/SDL-1.2.15/include" "${WORKDIR}/SDL" || 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
@@ -42,8 +52,6 @@ src_install() {
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
+ mkdir -p "${ED}/usr/$(get_libdir)/pkgconfig"
+ cp "${WORKDIR}/sdl.pc" "${ED}/usr/$(get_libdir)/pkgconfig/sdl.pc"
}