Skip to content
Snippets Groups Projects
Commit 05737577 authored by Simon McVittie's avatar Simon McVittie
Browse files

Initial version of libGL shim

parents
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
*.a
*.la
*.lo
*.o
.deps/
.dirstamp
.libs/
/Makefile
/Makefile.in
/aclocal.m4
/autom4te.cache/
/capsule-shim.mk
/compile
/config.guess
/config.log
/config.status
/config.sub
/configure
/depcomp
/install-sh
/libtool
/ltmain.sh
/m4/
/missing
/preconfigure.log
/shim/*.so.c
CAPSULE_LIBRARY := GL
CAPSULE_VERSION := 1
CAPSULE_TREE := /
CAPSULE_MAJOR := 1
#AM_CAPSULE_MKSTUBLIB_FLAGS := --ext-dlopen --ext-dlsym
include @CAPSULE_MKINC@/disabled.mk
include capsule-shim.mk
README 0 → 100644
This is a libcapsule based proxy library.
Its purpose is to allow a library (libGL.so.1) to be loaded from a
foreign filesystem tree (/) without exposing any other libraries
from that tree to the program using it.
You can export the symbols of more than one library via the proxy:
To do so, add a line containing the SONAME (libFOO.so.X)
of each extra library to shim/libGL.so.c.shared and rebuild.
You can also prevent a library from the foreign tree from being loaded
at all (at least as a result of being a dependency of libGL.so.1).
To achieve this, add a line containing the SONAME (libFOO.so.X)
of the excluded library to shim/libGL.so.c.excluded and rebuild.
The generated library will have the same name as the main proxy target
(libGL.so.1). You can control the exact version number (cf libfoo.x.y.z)
by setting CAPSULE_VERSION in Makefile.am
To make the generated library override dlopen() and/or dlsym() for
callers outside the capsule, pass --ext-dlopen and/or --ext-dlsym to
capsule-mkstublib by setting the AM_CAPSULE_MKSTUBLIB_FLAGS variable in
Makefile.am. If libcapsule's standard implementations of those functions
are not suitable, copy capsule/_ext_dlopen.h, capsule/_ext_dlsym.h
from libcapsule's development files into shim/capsule/, modify them
as necessary, and add them to EXTRA_DIST in Makefile.am.
Similarly, if libcapsule's standard implementation of dlopen() for
callers inside the capsule is not suitable, copy and modify
capsule/_int_dlopen.h.
AC_INIT(libgl-proxy, 1)
AC_CONFIG_MACRO_DIR([m4])
dnl basename of the main library we are proxying for:
AC_SUBST([LIB],[GL])
AC_SUBST([MAJ],[1])
dnl don't kvetch about gnu makefile syntax
dnl and don't require ChangeLog &co if they don't exist
AM_INIT_AUTOMAKE([-Wno-portability foreign])
AM_SILENT_RULES([yes])
LT_INIT
PKG_CHECK_MODULES([CAPSULE], [capsule])
PKG_CHECK_VAR([CAPSULE_MKINC], [capsule], [makeinc])
PKG_CHECK_VAR([CAPSULE_MKSTUBLIB_TOOL], [capsule], [CAPSULE_MKSTUBLIB_TOOL])
PKG_CHECK_VAR([CAPSULE_SYMBOLS_TOOL], [capsule], [CAPSULE_SYMBOLS_TOOL])
AC_CONFIG_FILES([capsule-shim.mk:$CAPSULE_MKINC/capsule-shim.mk.in Makefile])
AC_OUTPUT()
libc.so.6
libdl.so.2
libm.so.6
libpthread.so.0
libX11-xcb.so.1
libX11.so.6
libxcb-dri2.so.0
libxcb-dri3.so.0
libxcb-glx.so.0
libxcb-present.so.0
libxcb-sync.so.1
libxcb.so.1
libX11-xcb.so.1
libX11.so.6
libxcb-dri2.so.0
libxcb-dri3.so.0
libxcb-glx.so.0
libxcb-present.so.0
libxcb-sync.so.1
libxcb.so.1
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment