pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/file Adjust previous use of LD_PRELOAD to fix...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/52502c33c823
branches:  trunk
changeset: 771815:52502c33c823
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Mon Dec 27 23:25:08 2021 +0000

description:
Adjust previous use of LD_PRELOAD to fix Solaris 11 build, hoping it'll
fix the SmartOS bulk build (which gave similar errors, but which I
couldn't reproduce on my SmartOS or Tribblix systems).

Does not break:
- macOS 12.1
- NetBSD 9.2 and -current
- OpenBSD 7.0
- FreeBSD 13.0
- Tribblix m25.1
- CentOS 7 and 8
- Debian 9, 10, and 11
- Devuan 4
- Ubuntu 14, 16, 18, and 20
- Void

diffstat:

 sysutils/file/Makefile                        |   7 ++++++-
 sysutils/file/distinfo                        |   5 +++--
 sysutils/file/patches/patch-magic_Makefile.in |   4 ++--
 sysutils/file/patches/patch-magic_myfile      |  15 +++++++++++++++
 4 files changed, 26 insertions(+), 5 deletions(-)

diffs (73 lines):

diff -r 427cffda768d -r 52502c33c823 sysutils/file/Makefile
--- a/sysutils/file/Makefile    Mon Dec 27 20:24:03 2021 +0000
+++ b/sysutils/file/Makefile    Mon Dec 27 23:25:08 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49 2021/04/08 10:40:43 nia Exp $
+# $NetBSD: Makefile,v 1.50 2021/12/27 23:25:08 schmonz Exp $
 
 DISTNAME=              file-5.40
 CATEGORIES=            sysutils
@@ -14,6 +14,11 @@
 CONFIGURE_ARGS+=       --enable-fsect-man5
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR:Q}
 
+SUBST_CLASSES+=                paths
+SUBST_STAGE.paths=     pre-configure
+SUBST_FILES.paths=     magic/myfile
+SUBST_VARS.paths=      SH
+
 MESSAGE_SUBST+=                PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
 
 TEST_TARGET=           check
diff -r 427cffda768d -r 52502c33c823 sysutils/file/distinfo
--- a/sysutils/file/distinfo    Mon Dec 27 20:24:03 2021 +0000
+++ b/sysutils/file/distinfo    Mon Dec 27 23:25:08 2021 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.40 2021/12/18 12:07:50 schmonz Exp $
+$NetBSD: distinfo,v 1.41 2021/12/27 23:25:08 schmonz Exp $
 
 BLAKE2s (file-5.40.tar.gz) = 81709bb3abd39d4eea0e8d93966f162496d89e5bfc7f9e88d6be31b86dd5ed75
 SHA512 (file-5.40.tar.gz) = 3b70df75fa4c9050d55b1ffdc28e5f3c8b8ef7d4efd1a06bf53f113b676d81114a85aae56e0897d32b53716662d64ad18ab251ca8c92c6405c69eb758bb99afb
 Size (file-5.40.tar.gz) = 1004214 bytes
 SHA1 (patch-aa) = df1206c65ebbffca766ad77f7d98f8caa26a8b1c
-SHA1 (patch-magic_Makefile.in) = ef956a9970ced035ad7f4241c66e56b2d07dddb0
+SHA1 (patch-magic_Makefile.in) = 7870ab84573b2d2ce4b774083f073c620ba6f5d1
+SHA1 (patch-magic_myfile) = a977950ad98fd633aae6dec8357353a5b5ceee9d
 SHA1 (patch-src_fsmagic.c) = f862c5335bc3c6b0d39dfcdfd79e2d99407e40f5
diff -r 427cffda768d -r 52502c33c823 sysutils/file/patches/patch-magic_Makefile.in
--- a/sysutils/file/patches/patch-magic_Makefile.in     Mon Dec 27 20:24:03 2021 +0000
+++ b/sysutils/file/patches/patch-magic_Makefile.in     Mon Dec 27 23:25:08 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-magic_Makefile.in,v 1.1 2021/12/18 12:07:50 schmonz Exp $
+$NetBSD: patch-magic_Makefile.in,v 1.2 2021/12/27 23:25:08 schmonz Exp $
 
 Use the just-built libmagic, not whatever might be already installed.
 
@@ -9,7 +9,7 @@
            fi; \
          fi)
 -      $(FILE_COMPILE) -C -m magic
-+      LD_PRELOAD=../src/.libs/libmagic.so ../src/.libs/file -C -m magic
++      chmod +x myfile && ./myfile magic
        @rm -fr magic
  
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff -r 427cffda768d -r 52502c33c823 sysutils/file/patches/patch-magic_myfile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/file/patches/patch-magic_myfile  Mon Dec 27 23:25:08 2021 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-magic_myfile,v 1.1 2021/12/27 23:25:08 schmonz Exp $
+
+Use the just-built libmagic, not whatever might be already installed.
+
+--- magic/myfile.orig  2021-12-27 21:10:43.590323858 +0000
++++ magic/myfile
+@@ -0,0 +1,8 @@
++#!@SH@
++
++set -e
++
++magicdir=$(pwd)
++cd ../src/.libs
++LD_PRELOAD=./libmagic.so.1 ./file -C -m "${magicdir}/$1"
++cp magic.mgc ${magicdir}



Home | Main Index | Thread Index | Old Index