0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-12-15 05:09:55 +00:00
Rudi Heitbaum 10d1cb9915 xmlstarlet: use shared libraries
reduce size of /usr/bin/xml by ~1MB and simplify build

before:
$ ldd /usr/bin/xml
        linux-vdso.so.1 (0x00007ffc675ac000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f54f0620000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f54f0546000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f54f0386000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f54f063b000)

$ ls -la /usr/bin/xml*
-rwxr-xr-x    1 root     root       1483728 Jan  6 04:27 /usr/bin/xml
lrwxrwxrwx    1 root     root             3 Jan  6 04:27 /usr/bin/xmlstarlet -> xml

after:
$ ldd /usr/bin/xml
        linux-vdso.so.1 (0x00007ffea1d78000)
        libexslt.so.0 => /usr/lib/libexslt.so.0 (0x00007efdcdbeb000)
        libxslt.so.1 => /usr/lib/libxslt.so.1 (0x00007efdcdba9000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007efdcda4c000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007efdcd88c000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007efdcd7b2000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007efdcd799000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007efdcdc02000)

$ ls -la /usr/bin/xml*
-rwxr-xr-x    1 root     root         85736 Jan 13 12:30 /usr/bin/xml
lrwxrwxrwx    1 root     root             3 Jan 13 12:30 /usr/bin/xmlstarlet -> xml

$ ls -la /usr/lib/*xslt*
lrwxrwxrwx    1 root     root            13 Jan 13 12:28 /usr/lib/libexslt.so -> libexslt.so.0
lrwxrwxrwx    1 root     root            18 Jan 13 12:28 /usr/lib/libexslt.so.0 -> libexslt.so.0.8.21
-rw-r--r--    1 root     root         81096 Jan 13 12:28 /usr/lib/libexslt.so.0.8.21
lrwxrwxrwx    1 root     root            12 Jan 13 12:28 /usr/lib/libxslt.so -> libxslt.so.1
lrwxrwxrwx    1 root     root            17 Jan 13 12:28 /usr/lib/libxslt.so.1 -> libxslt.so.1.1.39
-rw-r--r--    1 root     root        263272 Jan 13 12:28 /usr/lib/libxslt.so.1.1.39
2024-01-13 22:33:23 +00:00

39 lines
1.9 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
PKG_NAME="xmlstarlet"
PKG_VERSION="1.6.1"
PKG_SHA256="15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca"
PKG_LICENSE="MIT"
PKG_SITE="http://xmlstar.sourceforge.net"
PKG_URL="http://netcologne.dl.sourceforge.net/project/xmlstar/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_HOST="libxml2:host libxslt:host"
PKG_DEPENDS_TARGET="toolchain libxml2 libxslt"
PKG_LONGDESC="XMLStarlet is a command-line XML utility which allows the modification and validation of XML documents."
PKG_CONFIGURE_OPTS_HOST=" ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \
LIBXML_CONFIG=${TOOLCHAIN}/bin/xml2-config \
LIBXSLT_CONFIG=${TOOLCHAIN}/bin/xslt-config \
--with-libxml-include-prefix=${TOOLCHAIN}/include/libxml2 \
--with-libxml-libs-prefix=${TOOLCHAIN}/lib \
--with-libxslt-include-prefix=${TOOLCHAIN}/include \
--with-libxslt-libs-prefix=${TOOLCHAIN}/lib"
PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \
LIBXML_CONFIG=${SYSROOT_PREFIX}/usr/bin/xml2-config \
LIBXSLT_CONFIG=${SYSROOT_PREFIX}/usr/bin/xslt-config \
--with-libxml-include-prefix=${SYSROOT_PREFIX}/usr/include/libxml2 \
--with-libxml-libs-prefix=${SYSROOT_PREFIX}/usr/lib \
--with-libxslt-include-prefix=${SYSROOT_PREFIX}/usr/include \
--with-libxslt-libs-prefix=${SYSROOT_PREFIX}/usr/lib"
post_makeinstall_host() {
ln -sf xml ${TOOLCHAIN}/bin/xmlstarlet
}
post_makeinstall_target() {
ln -sf xml ${INSTALL}/usr/bin/xmlstarlet
}