summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-02-08 13:06:48 +0100
committerDavid Seifert <soap@gentoo.org>2020-02-08 13:06:48 +0100
commit8e823883f26773f166dcedabc77003b2a4950347 (patch)
treefbaaca0ec2f9e4ee7cd9c0f03b3bfd4ec8870ebc /sys-fs
parentsys-fs/hfsplusutils: Fix GCC 10 (diff)
downloadgentoo-8e823883f26773f166dcedabc77003b2a4950347.tar.gz
gentoo-8e823883f26773f166dcedabc77003b2a4950347.tar.bz2
gentoo-8e823883f26773f166dcedabc77003b2a4950347.zip
sys-fs/hfsplusutils: Use proper `static inline` idiom for gnu89/C11
Package-Manager: Portage-2.3.87, Repoman-2.3.20 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc5.patch201
-rw-r--r--sys-fs/hfsplusutils/hfsplusutils-1.0.4-r2.ebuild10
2 files changed, 205 insertions, 6 deletions
diff --git a/sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc5.patch b/sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc5.patch
new file mode 100644
index 000000000000..7b3b30c1090a
--- /dev/null
+++ b/sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc5.patch
@@ -0,0 +1,201 @@
+https://bugs.gentoo.org/580620
+
+--- a/libhfsp/src/blockiter.c
++++ b/libhfsp/src/blockiter.c
+@@ -143,9 +143,3 @@
+ fail:
+ return -1;
+ }
+-
+-/* return current block */
+-UInt32 blockiter_curr(blockiter *b) /* inline */
+-{
+- return b->e->start_block + b->block;
+-}
+--- a/libhfsp/src/blockiter.h
++++ b/libhfsp/src/blockiter.h
+@@ -52,7 +52,7 @@
+ extern int blockiter_skip(blockiter *b, UInt32 skip);
+
+ /* return current block */
+-extern inline UInt32 blockiter_curr(blockiter *b)
++static inline UInt32 blockiter_curr(blockiter *b)
+ {
+ return b->e->start_block + b->block;
+ }
+--- a/libhfsp/src/libhfsp.c
++++ b/libhfsp/src/libhfsp.c
+@@ -32,15 +32,5 @@
+
+ const char *hfsp_error = "no error"; /* static error string */
+
+-/** helper function to create those Apple 4 byte Signatures */
+-UInt32 sig(char c0, char c1, char c2, char c3)
+-{
+- UInt32 sig;
+- ((char*)&sig)[0] = c0;
+- ((char*)&sig)[1] = c1;
+- ((char*)&sig)[2] = c2;
+- ((char*)&sig)[3] = c3;
+- return sig;
+-}
+
+
+--- a/libhfsp/src/libhfsp.h
++++ b/libhfsp/src/libhfsp.h
+@@ -90,7 +90,7 @@
+
+
+ /** helper function to create those Apple 4 byte Signatures */
+-extern inline UInt32 sig(char c0, char c1, char c2, char c3)
++static inline UInt32 sig(char c0, char c1, char c2, char c3)
+ {
+ UInt32 sig;
+ ((char*)&sig)[0] = c0;
+--- a/libhfsp/src/volume.c
++++ b/libhfsp/src/volume.c
+@@ -604,14 +604,6 @@
+ vol->extents = NULL;
+ }
+
+-/* accessor for entends btree, is created on demand */
+-/* inline */ btree* volume_get_extents_tree(volume* vol)
+-{
+- if (!vol->extents)
+- volume_create_extents_tree(vol);
+- return vol->extents;
+-}
+-
+ /* return new Id for files/folder and check for overflow.
+ *
+ * retun 0 on error .
+--- a/libhfsp/src/volume.h
++++ b/libhfsp/src/volume.h
+@@ -75,7 +75,7 @@
+ extern void volume_create_extents_tree(volume* vol);
+
+ /* accessor for entends btree, is created on demand */
+-extern inline btree* volume_get_extents_tree(volume* vol)
++static inline btree* volume_get_extents_tree(volume* vol)
+ {
+ if (!vol->extents)
+ volume_create_extents_tree(vol);
+--- a/src/darray.c
++++ b/src/darray.c
+@@ -65,16 +65,6 @@
+ return (array->eltend - array->mem) / array->elemsz;
+ }
+
+-/*
+- * NAME: darray->array()
+- * DESCRIPTION: return the array as an indexable block
+- */
+-inline
+-void *darray_array(darray *array)
+-{
+- return (void *) array->mem;
+-}
+-
+
+ /*
+ * NAME: darray->append()
+--- a/src/darray.h
++++ b/src/darray.h
+@@ -40,7 +40,7 @@
+ extern void darray_sort(darray *, int (*)(const void *, const void *));
+
+ /* return the array as an indexable block */
+-extern inline void *darray_array(darray *array)
++static inline void *darray_array(darray *array)
+ {
+ return (void *) array->mem;
+ }
+--- a/src/dlist.c
++++ b/src/dlist.c
+@@ -60,24 +60,6 @@
+ }
+
+ /*
+- * NAME: dlist->array()
+- * DESCRIPTION: return the array of strings in a list; can dispose with free()
+- */
+-char **dlist_array(dlist *list)
+-{
+- return (char **) list->mem;
+-}
+-
+-/*
+- * NAME: dlist->size()
+- * DESCRIPTION: return the number of strings in a list
+- */
+-int dlist_size(dlist *list)
+-{
+- return list->eltend - (char **) list->mem;
+-}
+-
+-/*
+ * NAME: dlist->append()
+ * DESCRIPTION: insert a string to the end of a list
+ */
+--- a/src/dlist.h
++++ b/src/dlist.h
+@@ -36,13 +36,13 @@
+ extern int dlist_append(dlist *, const char *);
+
+ /* return the array of strings in a list; can dispose with free() */
+-extern inline char **dlist_array(dlist *list)
++static inline char **dlist_array(dlist *list)
+ {
+ return (char **) list->mem;
+ }
+
+ /* return the number of strings in a list */
+-extern inline int dlist_size(dlist *list)
++static inline int dlist_size(dlist *list)
+ {
+ return list->eltend - (char **) list->mem;
+ }
+--- a/src/dstring.c
++++ b/src/dstring.c
+@@ -124,24 +124,6 @@
+ return 0;
+ }
+
+-/*
+- * NAME: dstring->string()
+- * DESCRIPTION: return a pointer to a dynamic string's content
+- */
+-char *dstring_string(dstring *string)
+-{
+- return string->str;
+-}
+-
+-/*
+- * NAME: dstring->length()
+- * DESCRIPTION: return the length of a dynamic string
+- */
+-int dstring_length(dstring *string)
+-{
+- return string->len;
+-}
+-
+
+ /*
+ * NAME: dstring->shrink()
+--- a/src/dstring.h
++++ b/src/dstring.h
+@@ -42,12 +42,12 @@
+ extern void dstring_shrink(dstring *, size_t);
+ extern void dstring_free(dstring *);
+
+-extern inline char *dstring_string(dstring *string)
++static inline char *dstring_string(dstring *string)
+ {
+ return string->str;
+ }
+
+-extern inline int dstring_length(dstring *string)
++static inline int dstring_length(dstring *string)
+ {
+ return string->len;
+ }
diff --git a/sys-fs/hfsplusutils/hfsplusutils-1.0.4-r2.ebuild b/sys-fs/hfsplusutils/hfsplusutils-1.0.4-r2.ebuild
index a578df335018..34c9cf508cba 100644
--- a/sys-fs/hfsplusutils/hfsplusutils-1.0.4-r2.ebuild
+++ b/sys-fs/hfsplusutils/hfsplusutils-1.0.4-r2.ebuild
@@ -3,9 +3,10 @@
EAPI=7
-inherit autotools flag-o-matic
+inherit autotools
MY_P="hfsplus_${PV}"
+
DESCRIPTION="HFS+ Filesystem Access Utilities (a PPC filesystem)"
HOMEPAGE="http://penguinppc.org/historical/hfsplus/"
SRC_URI="http://penguinppc.org/historical/hfsplus/${MY_P}.src.tar.bz2"
@@ -13,7 +14,6 @@ SRC_URI="http://penguinppc.org/historical/hfsplus/${MY_P}.src.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ppc ppc64 x86"
-IUSE="static-libs"
S="${WORKDIR}/hfsplus-${PV}"
@@ -25,6 +25,7 @@ PATCHES=(
"${FILESDIR}"/${P}-stdlib.patch
"${FILESDIR}"/${P}-cflags.patch
"${FILESDIR}"/${P}-fno-common-gcc10.patch
+ "${FILESDIR}"/${P}-gcc5.patch
)
src_prepare() {
@@ -36,10 +37,7 @@ src_prepare() {
}
src_configure() {
- # bug 580620
- append-flags -fgnu89-inline
-
- econf $(use_enable static-libs static)
+ econf --disable-static
}
src_install() {