summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2024-03-18 20:07:44 +0100
committerLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2024-03-18 20:07:44 +0100
commitcb4e88e8df8d4d33cfa47e14cb170c6ab6fb0000 (patch)
treee54fa2db9c8028f45cdcf5c8a0bd1d4c2ce79a78
parentf6c0050cd5ad10ec46f227d5eb79f1cdffbbdbbf (diff)
downloadmidipix_build-cb4e88e8df8d4d33cfa47e14cb170c6ab6fb0000.tar.bz2
midipix_build-cb4e88e8df8d4d33cfa47e14cb170c6ab6fb0000.tar.xz
groups.d/231.native_packages_etc.group:{image,graphics}magick:${PKG_NO_PURGE_LA_FILES}: don't delete .la files.
etc/README.md: documents NO_PURGE_LA_FILES. subr.pkg/pkg_install_files.subr:pkgp_install_files_libraries(): purge .la files subject to ${PKG_NO_PURGE_LA_FILES}. vars.env.d/000.build.env:${DEFAULT_BUILD_VARS}: adds NO_PURGE_LA_FILES. subr.ex/ex_rtl_rpm.subr:ex_rtl_purge_la_files(): removes duplicate function.
-rw-r--r--etc/README.md1
-rw-r--r--groups.d/231.native_packages_etc.group2
-rw-r--r--subr.ex/ex_rtl_rpm.subr22
-rw-r--r--subr.pkg/pkg_install_files.subr4
-rw-r--r--vars.env.d/000.build.env2
5 files changed, 7 insertions, 24 deletions
diff --git a/etc/README.md b/etc/README.md
index cf2d21c1..794d2fbf 100644
--- a/etc/README.md
+++ b/etc/README.md
@@ -784,6 +784,7 @@ VERSION`` and/or ``URLS_GIT``, respectively.
| NO_CLEAN_BASE_DIR | Flag(UInt,0) | Inhibit cleaning of package build root directory beneath ``${BUILD_WORKDIR}`` |
| NO_CLEAN | Flag(UInt,0) | Inhibit cleaning of package build directory beneath ``${PKG_BASE_DIR}`` pre-finish |
| NO_LOG_VARS | Flag(UInt,0) | Inhibit logging of build & package variables pre-package build |
+| NO_PURGE_LA_FILES | Flag(UInt,0) | Inhibit purging of .la files |
| PATCHES_EXTRA | List( ) | Additional patches to apply |
| PKG_CONFIG | CmdName | ``pkg-config(1)`` implementation |
| PKG_CONFIG_LIBDIR | DirName | ``pkg-config(1)`` search directory |
diff --git a/groups.d/231.native_packages_etc.group b/groups.d/231.native_packages_etc.group
index 56fdd5de..930fae11 100644
--- a/groups.d/231.native_packages_etc.group
+++ b/groups.d/231.native_packages_etc.group
@@ -187,6 +187,7 @@ zstd";
: ${PKG_GRAPHICSMAGICK_LDFLAGS_CONFIGURE_EXTRA:=-fopenmp};
: ${PKG_GRAPHICSMAGICK_LIBTOOL=rlibtool};
: ${PKG_GRAPHICSMAGICK_IN_TREE:=1};
+: ${PKG_GRAPHICSMAGICK_NO_PURGE_LA_FILES=1};
: ${PKG_GZIP_SHA256SUM:=7454eb6935db17c6655576c2e1b0fabefd38b4d0936e0f87f48cd062ce91a057};
: ${PKG_GZIP_VERSION:=1.13};
: ${PKG_GZIP_URL:=https://ftp.gnu.org/gnu/gzip/gzip-${PKG_GZIP_VERSION}.tar.xz};
@@ -221,6 +222,7 @@ gl_cv_func_getopt_gnu=yes"};
: ${PKG_IMAGEMAGICK_CFLAGS_CONFIGURE_EXTRA:="-I${PREFIX_NATIVE}/include/freetype2"};
: ${PKG_IMAGEMAGICK_CONFIGURE_ARGS_EXTRA:="--with-modules --without-x --without-pango --without-jemalloc --without-tcmalloc --without-umem"};
: ${PKG_IMAGEMAGICK_LIBTOOL="clibtool"};
+: ${PKG_IMAGEMAGICK_NO_PURGE_LA_FILES=1};
: ${PKG_INFOUNZIP_URLS_GIT:=infounzip=https://github.com/Redfoxmoon3/infounzip.git@master};
: ${PKG_INFOUNZIP_IN_TREE:=1};
: ${PKG_INFOUNZIP_CFLAGS_BUILD_EXTRA:=${NATIVE_PACKAGES_CFLAGS_CONFIGURE}};
diff --git a/subr.ex/ex_rtl_rpm.subr b/subr.ex/ex_rtl_rpm.subr
index 7c89acb3..2f1589d6 100644
--- a/subr.ex/ex_rtl_rpm.subr
+++ b/subr.ex/ex_rtl_rpm.subr
@@ -228,28 +228,6 @@ ex_rtl_fixup_pkgconfig_paths() {
};
#
-# ex_rtl_purge_la_files() - purge .la files in tree
-# @_dname_base: base directory pathname
-#
-# Returns: zero (0) on success, non-zero (>0) on failure
-#
-ex_rtl_purge_la_files() {
- local _erplf_dname_base="${1}" \
- _erplf_la_path="";
-
- for _erplf_la_path in $(find \
- "${_erplf_dname_base}" \
- -type f \
- -name \*.la);
- do
- if ! rtl_fileop rm "${_erplf_la_path}"; then
- return 1;
- fi;
- done;
- return 0;
-};
-
-#
# ex_rtl_strip_files() - strip files of debugging information
# @_strip_cmd: strip(1) command name
# @_tree_root: pathname to tree root
diff --git a/subr.pkg/pkg_install_files.subr b/subr.pkg/pkg_install_files.subr
index aebba9a1..f37257c6 100644
--- a/subr.pkg/pkg_install_files.subr
+++ b/subr.pkg/pkg_install_files.subr
@@ -45,7 +45,9 @@ pkgp_install_files_libraries() {
if [ "${PKG_BUILD_TYPE}" != "host" ]; then
ex_rtl_install_library_archives "${PKG_DESTDIR}" "${PKG_TARGET}-mdso" || return 1;
fi;
- ex_rtl_purge_la_files "${PKG_DESTDIR}" || return 1;
+ if [ "${PKG_NO_PURGE_LA_FILES:-0}" -eq 0 ]; then
+ ex_rtl_purge_la_files "${PKG_DESTDIR}" || return 1;
+ fi;
return 0;
};
diff --git a/vars.env.d/000.build.env b/vars.env.d/000.build.env
index e4a08d1f..1c38d3da 100644
--- a/vars.env.d/000.build.env
+++ b/vars.env.d/000.build.env
@@ -37,7 +37,7 @@ DEFAULT_BUILD_VARS=" \
MAKEFLAGS_INSTALL_EXTRA MAKEFLAGS_INSTALL_EXTRA_LIST MAKEFLAGS_INSTALL_LIST \
MAKEFLAGS_LOADAVG MAKEFLAGS_PARALLELISE MAKEFLAGS_VERBOSITY MAKE_INSTALL_VNAME \
MAKE_SUBDIRS MIRRORS MIRRORS_GIT NO_CLEAN NO_CLEAN_BASE_DIR NO_CLEAN_BUILD_DIR \
- NO_LOG_VARS PATCHES_EXTRA PKG_CONFIG PKG_CONFIG_LIBDIR PKGLIST_DISABLE PREFIX \
+ NO_LOG_VARS NO_PURGE_LA_FILES PATCHES_EXTRA PKG_CONFIG PKG_CONFIG_LIBDIR PKGLIST_DISABLE PREFIX \
PYTHON RANLIB RPM_DISABLE SHA256SUM SOFORT_NATIVE_CC SOFORT_NATIVE_CFLAGS \
SOFORT_NATIVE_CFLAGS_EXTRA SOFORT_NATIVE_CXX SOFORT_NATIVE_CXXFLAGS \
SOFORT_NATIVE_CXXFLAGS_EXTRA SOFORT_NATIVE_LD SOFORT_NATIVE_LDFLAGS \