Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (aff1c77e38ffb2496e34ecf45948830b57e04219)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (aff1c77e38ffb2496e34ecf45948830b57e04219)
  • Date: Thu, 1 Aug 2019 16:56:05 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

audio-libs/id3lib/HISTORY | 3 +++
audio-libs/id3lib/PRE_BUILD | 3 ++-
utils/lshw/HISTORY | 6 ++++++
utils/lshw/PRE_BUILD | 3 +++
utils/lshw/patches/fix-array-bounds.patch | 15 +++++++++++++++
utils/lshw/patches/musl-basename.patch | 30
++++++++++++++++++++++++++++++
utils/lshw/patches/musl-long_bit.patch | 15 +++++++++++++++
utils/lshw/patches/musl-path_max.patch | 14 ++++++++++++++
8 files changed, 88 insertions(+), 1 deletion(-)

New commits:
commit aff1c77e38ffb2496e34ecf45948830b57e04219
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

lshw: Fix build against musl libc

- Import patches from void-linux
- Add a proper fix for _SC_LONG_BIT

commit 8f0c51e0d5747c36fddb7f2784bd92d218ecf656
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

id3lib: Fix build against musl

diff --git a/audio-libs/id3lib/HISTORY b/audio-libs/id3lib/HISTORY
index 62085f1..cb7fd80 100644
--- a/audio-libs/id3lib/HISTORY
+++ b/audio-libs/id3lib/HISTORY
@@ -1,3 +1,6 @@
+2019-08-01 Ismael Luceno <ismael AT sourcemage.org>
+ * PRE_BUILD: Fixed build against musl
+
2016-03-08 Thomas Orgis <sobukus AT sourcemage.org>
* DETAILS: grab the patch from my mirror

diff --git a/audio-libs/id3lib/PRE_BUILD b/audio-libs/id3lib/PRE_BUILD
index 90aa360..1a1def0 100755
--- a/audio-libs/id3lib/PRE_BUILD
+++ b/audio-libs/id3lib/PRE_BUILD
@@ -6,4 +6,5 @@ autoconf &&
if [[ "${ID3LIB_UNICODE}" == "y" ]] ; then
verify_file 2 &&
patch -p1 < ${SOURCE_CACHE}/${SOURCE2}
-fi
+fi &&
+sedit 's!maybe_os in$!& linux-musl*|\\!' config.sub
diff --git a/utils/lshw/HISTORY b/utils/lshw/HISTORY
index 39ef48f..908af72 100644
--- a/utils/lshw/HISTORY
+++ b/utils/lshw/HISTORY
@@ -1,3 +1,9 @@
+2019-08-01 Ismael Luceno <ismael AT sourcemage.org>
+ * PRE_BUILD, patches/fix-array-bounds.patch,
+ patches/musl-basename.patch, patches/musl-path_max.patch:
+ Imported musl patches from void-linux
+ * patches/musl-long_bit.patch: Replaced the non-standard _SC_LONG_BIT
+
2017-01-20 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: version B.02.18

diff --git a/utils/lshw/PRE_BUILD b/utils/lshw/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/utils/lshw/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/utils/lshw/patches/fix-array-bounds.patch
b/utils/lshw/patches/fix-array-bounds.patch
new file mode 100644
index 0000000..5592e8e
--- /dev/null
+++ b/utils/lshw/patches/fix-array-bounds.patch
@@ -0,0 +1,15 @@
+From:
https://github.com/void-linux/void-packages/tree/7bfdb7ab051fbb43309c764ed4613d39ee590679/srcpkgs/lshw/patches/
+
+Fix GCC warning "array subscript is above array bounds [-Warray-bounds]"
+
+--- a/src/core/dmi.cc
++++ b/src/core/dmi.cc
+@@ -511,7 +511,7 @@
+ if (num <= 0x0A)
+ return _(memory_array_location[num]);
+ if (num >= 0xA0 && num < 0xA4)
+- return _(jp_memory_array_location[num]);
++ return _(jp_memory_array_location[num - 0xA0]);
+ return "";
+ }
+
diff --git a/utils/lshw/patches/musl-basename.patch
b/utils/lshw/patches/musl-basename.patch
new file mode 100644
index 0000000..07e5788
--- /dev/null
+++ b/utils/lshw/patches/musl-basename.patch
@@ -0,0 +1,30 @@
+From:
https://github.com/void-linux/void-packages/tree/7bfdb7ab051fbb43309c764ed4613d39ee590679/srcpkgs/lshw/patches/
+
+For musl libc declare a macro version of basename(3).
+
+--- a/src/core/dasd.cc
++++ b/src/core/dasd.cc
+@@ -10,6 +10,10 @@
+ #include <linux/fs.h>
+ #include <map>
+
++#if !defined(__GLIBC__)
++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
++#endif
++
+ using namespace std;
+
+ /*Read only block devices, not partitions*/
+--- a/src/core/sysfs.cc
++++ b/src/core/sysfs.cc
+@@ -19,6 +19,10 @@
+
+ __ID("@(#) $Id$");
+
++#if !defined(__GLIBC__)
++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
++#endif
++
+ using namespace sysfs;
+
+ struct sysfs::entry_i
diff --git a/utils/lshw/patches/musl-long_bit.patch
b/utils/lshw/patches/musl-long_bit.patch
new file mode 100644
index 0000000..20a2c80
--- /dev/null
+++ b/utils/lshw/patches/musl-long_bit.patch
@@ -0,0 +1,15 @@
+From: ismael AT sourcemage.org
+
+musl libc does not implement _SC_LONG_BIT, replace with a portable
alternative.
+
+--- a/src/core/abi.cc
++++ b/src/core/abi.cc
+@@ -20,7 +20,7 @@ __ID("@(#) $Id: mem.cc 1352 2006-05-27 23:54:13Z ezix $");
+ bool scan_abi(hwNode & system)
+ {
+ // are we compiled as 32- or 64-bit process ?
+- system.setWidth(sysconf(LONG_BIT));
++ system.setWidth(sizeof(long) * CHAR_BIT);
+
+ pushd(PROC_SYS);
+
diff --git a/utils/lshw/patches/musl-path_max.patch
b/utils/lshw/patches/musl-path_max.patch
new file mode 100644
index 0000000..a6d4ba5
--- /dev/null
+++ b/utils/lshw/patches/musl-path_max.patch
@@ -0,0 +1,14 @@
+From:
https://github.com/void-linux/void-packages/tree/7bfdb7ab051fbb43309c764ed4613d39ee590679/srcpkgs/lshw/patches/
+
+Need to include limits.h for the definition of PATH_MAX.
+
+--- a/src/core/cpufreq.cc
++++ b/src/core/cpufreq.cc
+@@ -10,6 +10,7 @@
+ #include "version.h"
+ #include "hw.h"
+ #include "osutils.h"
++#include <limits.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (aff1c77e38ffb2496e34ecf45948830b57e04219), Ismael Luceno, 08/01/2019

Archive powered by MHonArc 2.6.24.

Top of Page