Skip to content

Commit

Permalink
scripts(setup-ubuntu.sh): Apply system libdirs and pkgconfig dirs to …
Browse files Browse the repository at this point in the history
…new pkgconf build

Fixes #22060
  • Loading branch information
robertkirkman authored and twaik committed Nov 2, 2024
1 parent 023a0dd commit 48dcd7e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,21 @@ $SUDO ln -sf /data/data/com.termux/files/usr/opt/bionic-host /system
# Install newer pkg-config then what ubuntu provides, as the stock
# ubuntu version has performance problems with at least protobuf:
PKGCONF_VERSION=2.3.0
HOST_TRIPLET=$(gcc -dumpmachine)
PKG_CONFIG_DIRS=$(grep DefaultSearchPaths: /usr/share/pkgconfig/personality.d/${HOST_TRIPLET}.personality | cut -d ' ' -f 2)
SYSTEM_LIBDIRS=$(grep SystemLibraryPaths: /usr/share/pkgconfig/personality.d/${HOST_TRIPLET}.personality | cut -d ' ' -f 2)
mkdir -p /tmp/pkgconf-build
cd /tmp/pkgconf-build
curl -O https://distfiles.ariadne.space/pkgconf/pkgconf-${PKGCONF_VERSION}.tar.xz
tar xf pkgconf-${PKGCONF_VERSION}.tar.xz
cd pkgconf-${PKGCONF_VERSION}
./configure --prefix=/usr && make && $SUDO make install
echo "SYSTEM_LIBDIRS: $SYSTEM_LIBDIRS"
echo "PKG_CONFIG_DIRS: $PKG_CONFIG_DIRS"
./configure --prefix=/usr \
--with-system-libdir=${SYSTEM_LIBDIRS} \
--with-pkg-config-dir=${PKG_CONFIG_DIRS}
make
$SUDO make install
cd -
rm -Rf /tmp/pkgconf-build
# Prevent package from being upgraded and overwriting our manual installation:
Expand Down

0 comments on commit 48dcd7e

Please sign in to comment.