logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 27d83b7b4c9fe23a080f6413fd6a9b71601ba8e7
parent a9bc38ff289108ccd2747f9e4c1921804a890d9a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 11 Mar 2021 11:15:23 +0100

media-libs/libsdl: Add sdl-config

Diffstat:

Amedia-libs/libsdl/files/sdl-config65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mmedia-libs/libsdl/libsdl-9999.ebuild3++-
2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/media-libs/libsdl/files/sdl-config b/media-libs/libsdl/files/sdl-config @@ -0,0 +1,65 @@ +#!/bin/sh + +prefix=/usr +exec_prefix=${prefix} +exec_prefix_set=no +libdir=/usr/lib + +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.15 + ;; + --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/libsdl-9999.ebuild b/media-libs/libsdl/libsdl-9999.ebuild @@ -38,10 +38,11 @@ src_install() { dolib.so "${BUILD_DIR}/"libSDL-1.2.so* + dobin "${FILESDIR}/sdl-config" + 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