aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-04-03 19:29:14 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-04-04 01:48:56 +0200
commit5c020d8f944c29c170388836cabd1f2e3cb46854 (patch)
tree4415b6613710b886c8ba31b8d2d09baed4819b82 /media-libs/imgui
parentdev-python/XenAPI: add 22.14.0 (diff)
downloadguru-5c020d8f944c29c170388836cabd1f2e3cb46854.tar.gz
guru-5c020d8f944c29c170388836cabd1f2e3cb46854.tar.bz2
guru-5c020d8f944c29c170388836cabd1f2e3cb46854.zip
media-libs/imgui: explicitly link the build objects
Closes: https://bugs.gentoo.org/836695 Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'media-libs/imgui')
-rw-r--r--media-libs/imgui/imgui-1.87-r1.ebuild (renamed from media-libs/imgui/imgui-1.87.ebuild)32
1 files changed, 21 insertions, 11 deletions
diff --git a/media-libs/imgui/imgui-1.87.ebuild b/media-libs/imgui/imgui-1.87-r1.ebuild
index 0b811f029..4339ad386 100644
--- a/media-libs/imgui/imgui-1.87.ebuild
+++ b/media-libs/imgui/imgui-1.87-r1.ebuild
@@ -87,13 +87,17 @@ src_configure() {
src_compile() {
set -x || die
+ local objects=()
+
for i in imgui{,_draw,_demo,_tables,_widgets}; do
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c ${i}.cpp -o ${i}.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c ${i}.cpp -o ${i}.o || die
+ objects+=( ${i}.o )
done
if use freetype; then
pushd misc/freetype || die
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c imgui_freetype.cpp -o imgui_freetype.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c imgui_freetype.cpp -o imgui_freetype.o || die
+ objects+=( misc/freetype/imgui_freetype.o )
popd || die
pushd misc/fonts || die
${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -fPIE binary_to_compressed_c.cpp -o binary_to_compressed_c || die
@@ -102,27 +106,33 @@ src_compile() {
pushd backends || die
if use allegro; then
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c imgui_impl_allegro5.cpp -o imgui_impl_allegro5.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c imgui_impl_allegro5.cpp -o imgui_impl_allegro5.o || die
+ objects+=( backends/imgui_impl_allegro5.o )
fi
if use glfw; then
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c imgui_impl_glfw.cpp -o imgui_impl_glfw.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c imgui_impl_glfw.cpp -o imgui_impl_glfw.o || die
+ objects+=( backends/imgui_impl_glfw.o )
fi
if use glut; then
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c imgui_impl_glut.cpp -o imgui_impl_glut.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c imgui_impl_glut.cpp -o imgui_impl_glut.o || die
+ objects+=( backends/imgui_impl_glut.o )
fi
if use opengl; then
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c imgui_impl_opengl2.cpp -o imgui_impl_opengl2.o || die
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c imgui_impl_opengl3.cpp -o imgui_impl_opengl3.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c imgui_impl_opengl2.cpp -o imgui_impl_opengl2.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c imgui_impl_opengl3.cpp -o imgui_impl_opengl3.o || die
+ objects+=( backends/imgui_impl_opengl2.o backends/imgui_impl_opengl3.o )
fi
if use sdl; then
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c imgui_impl_sdl.cpp -o imgui_impl_sdl.o || die
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c imgui_impl_sdlrenderer.cpp -o imgui_impl_sdlrenderer.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c imgui_impl_sdl.cpp -o imgui_impl_sdl.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c imgui_impl_sdlrenderer.cpp -o imgui_impl_sdlrenderer.o || die
+ objects+=( backends/imgui_impl_sdl.o backends/imgui_impl_sdlrenderer.o )
fi
if use vulkan; then
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c imgui_impl_vulkan.cpp -o imgui_impl_vulkan.o || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -fPIC -c imgui_impl_vulkan.cpp -o imgui_impl_vulkan.o || die
+ objects+=( backends/imgui_impl_vulkan.o )
fi
popd || die
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -shared -Wl,-soname,libimgui.so *.o backends/*.o misc/freetype/*.o -o libimgui.so ${LIBS} || die
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -shared -Wl,-soname,libimgui.so ${objects[@]} -o libimgui.so ${LIBS} || die
if use examples; then
mkdir ex || die