From 2689955282467976f49f7e1c0225cb72bca25c05 Mon Sep 17 00:00:00 2001
From: Filippo Cremonese <filippocremonese@rev.ng>
Date: Thu, 1 Oct 2020 18:01:39 +0200
Subject: [PATCH] Add libltdl component

---
 .orchestra/config/components/libltdl.yml      | 30 +++++++++++++++++++
 .../config/components/ui/graphviz.lib.yml     |  3 +-
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 .orchestra/config/components/libltdl.yml

diff --git a/.orchestra/config/components/libltdl.yml b/.orchestra/config/components/libltdl.yml
new file mode 100644
index 0000000..1966c1a
--- /dev/null
+++ b/.orchestra/config/components/libltdl.yml
@@ -0,0 +1,30 @@
+#@ load("@ytt:overlay", "overlay")
+#@ load("/lib/create_component.lib.yml", "single_build_component")
+
+#@ load("/global_options.lib.yml", "options")
+
+#@ source_url = "https://mirror.kumi.systems/gnu/libtool/libtool-2.4.6.tar.gz"
+
+#@yaml/text-templated-strings
+---
+#@ def _libltdl_args():
+configure: |
+  mkdir -p "$BUILD_DIR"
+  extract.sh --into "$BUILD_DIR" "(@= source_url @)"
+  cd "$BUILD_DIR"
+  ./configure \
+    --enable-ltdl-install \
+    --disable-static \
+    --prefix="$ORCHESTRA_ROOT" \
+    CFLAGS="(@= options["use_old_glibc_cflags"] @) -Wno-error" \
+    LDFLAGS="(@= options["use_old_glibc_lflags"] @) (@= options["modern_linker_flags"] @) -Wl,-rpath,$RPATH_PLACEHOLDER/lib"
+build_system: make
+dependencies:
+  - toolchain/host/gcc
+#@ end
+
+#@overlay/match by=overlay.all
+#@overlay/match-child-defaults missing_ok=True
+---
+components:
+  libltdl: #@ single_build_component(**_libltdl_args())
diff --git a/.orchestra/config/components/ui/graphviz.lib.yml b/.orchestra/config/components/ui/graphviz.lib.yml
index fe58c14..e633aad 100644
--- a/.orchestra/config/components/ui/graphviz.lib.yml
+++ b/.orchestra/config/components/ui/graphviz.lib.yml
@@ -13,7 +13,7 @@ configure: |
 
   cd $BUILD_DIR
   ./configure \
-    --disable-ltdl \
+    --enable-ltdl \
     --disable-gdk-pixbuf \
     --without-pangocairo \
     --without-devil \
@@ -64,6 +64,7 @@ configure: |
 build_system: make
 dependencies:
   - clang-release
+  - libltdl
 #@ end
 
 ---
-- 
GitLab