mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 22:18:55 +02:00
The same problem seems to be present in the patches to unzip 6.0. The fix to the attribute writing is trivial (see the patchset for details). Really fixes #2075.
97 lines
3.7 KiB
Plaintext
97 lines
3.7 KiB
Plaintext
From 94b89957e5960a284dba79386f39fb64df61c849 Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Sun, 7 Jan 2018 10:40:16 +0100
|
|
Subject: Fix BeOS makefile (not really maintained by upstream)
|
|
|
|
* Fix installation dir for binaries and docs
|
|
* Define UNICODE_SUPPORT
|
|
* Fix source dir for docs and manpages
|
|
|
|
diff --git a/beos/Makefile b/beos/Makefile
|
|
index 9e86a3d..102d847 100644
|
|
--- a/beos/Makefile
|
|
+++ b/beos/Makefile
|
|
@@ -91,18 +91,18 @@ UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H)
|
|
INSTALL = install
|
|
# on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate
|
|
manext = 1
|
|
-prefix = /boot/home/config
|
|
-BINDIR = $(prefix)/bin# where to install executables
|
|
-MANDIR = $(prefix)/man/man$(manext)# where to install man pages
|
|
+prefix ?= /boot/home/config
|
|
+BINDIR ?= $(prefix)/bin# where to install executables
|
|
+MANDIR ?= $(prefix)/man# where to install man pages
|
|
INSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/zipinfo$E $(BINDIR)/unzipsfx$E \
|
|
$(BINDIR)/unzip$E
|
|
-INSTALLEDMAN = $(MANDIR)/unzip.$(manext) $(MANDIR)/funzip.$(manext) \
|
|
- $(MANDIR)/unzipsfx.$(manext) $(MANDIR)/zipinfo.$(manext)
|
|
+INSTALLEDMAN = $(MANDIR)/man1/unzip.$(manext) $(MANDIR)/man1/funzip.$(manext) \
|
|
+ $(MANDIR)/man1/unzipsfx.$(manext) $(MANDIR)/man1/zipinfo.$(manext)
|
|
#
|
|
UNZIPS = unzip$E funzip$E unzipsfx$E zipinfo$E
|
|
# this is a little ugly...well, no, it's a lot ugly:
|
|
-MANS = man/unzip.1 man/unzipsfx.1 man/zipinfo.1 man/funzip.1 man/zipgrep.1
|
|
-DOCS = unzip.txt unzipsfx.txt zipinfo.txt funzip.txt zipgrep.txt
|
|
+MANS = man/man1/unzip.1 man/man1/unzipsfx.1 man/man1/zipinfo.1 man/man1/funzip.1 man/man1/zipgrep.1
|
|
+DOCS = docs/unzip.txt docs/unzipsfx.txt docs/zipinfo.txt docs/funzip.txt docs/zipgrep.txt
|
|
|
|
######################################################################
|
|
# Things that change:
|
|
@@ -371,11 +371,11 @@ install: all
|
|
$(LN) unzip$E $(BINDIR)/zipinfo$E
|
|
$(RM) $(BINDIR)/zipgrep$E
|
|
$(INSTALL) -m 755 unix/zipgrep $(BINDIR)/zipgrep$E
|
|
- $(INSTALL) -m 644 man/unzip.1 $(MANDIR)/unzip.$(manext)
|
|
- $(INSTALL) -m 644 man/unzipsfx.1 $(MANDIR)/unzipsfx.$(manext)
|
|
- $(INSTALL) -m 644 man/zipinfo.1 $(MANDIR)/zipinfo.$(manext)
|
|
- $(INSTALL) -m 644 man/funzip.1 $(MANDIR)/funzip.$(manext)
|
|
- $(INSTALL) -m 644 man/zipgrep.1 $(MANDIR)/zipgrep.$(manext)
|
|
+ $(INSTALL) -m 644 man/man1/unzip.1 $(MANDIR)/man1/unzip.$(manext)
|
|
+ $(INSTALL) -m 644 man/man1/unzipsfx.1 $(MANDIR)/man1/unzipsfx.$(manext)
|
|
+ $(INSTALL) -m 644 man/man1/zipinfo.1 $(MANDIR)/man1/zipinfo.$(manext)
|
|
+ $(INSTALL) -m 644 man/man1/funzip.1 $(MANDIR)/man1/funzip.$(manext)
|
|
+ $(INSTALL) -m 644 man/man1/zipgrep.1 $(MANDIR)/man1/zipgrep.$(manext)
|
|
$(INSTALL) -m 644 $(DOCS) $(MANDIR)
|
|
|
|
# alternatively, could use zip method: -cd $(BINDIR); rm -f $(UNZIPS) [etc.]
|
|
diff --git a/beos/beocfg.h b/beos/beocfg.h
|
|
index b6b6cf9..73764e0 100644
|
|
--- a/beos/beocfg.h
|
|
+++ b/beos/beocfg.h
|
|
@@ -69,6 +69,7 @@
|
|
|
|
/* ISO/OEM (iconv) character conversion. */
|
|
|
|
+#define UNICODE_SUPPORT
|
|
#define ICONV_MAPPING /* part of vanilla Haiku distribution */
|
|
|
|
#ifdef ICONV_MAPPING
|
|
--
|
|
2.15.0
|
|
|
|
|
|
From 1e9782a77b2f5b070df6e89da2a21c272ffc72ea Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Sun, 7 Jan 2018 11:09:04 +0100
|
|
Subject: Fix writing directory attributes
|
|
|
|
It is not allowed to open a directory in write mode.
|
|
Fortunately, fs_write_attr accepts a read-only file descriptor.
|
|
|
|
diff --git a/beos/beos.c b/beos/beos.c
|
|
index ecdc2c8..1f03710 100644
|
|
--- a/beos/beos.c
|
|
+++ b/beos/beos.c
|
|
@@ -1349,7 +1349,7 @@ static int set_file_attrs( const char *name,
|
|
ptr = (unsigned char *)attr_buff;
|
|
guard = ptr + attr_size;
|
|
|
|
- fd = open(name, O_RDWR | O_NOTRAVERSE);
|
|
+ fd = open(name, O_RDONLY | O_NOTRAVERSE);
|
|
if (fd < 0) {
|
|
return errno; /* should it be -fd ? */
|
|
}
|
|
--
|
|
2.15.0
|
|
|