sortix-mirror/ports/bzip2/bzip2.patch
Jonas 'Sortie' Termansen 9588b0d3db Add ports to the Sortix repository.
This change imports the ports collection from the former porttix and srctix
repositories and converts them to port(5) files with metadata pointing to
the upstream release tarballs with patches checked into this repository.
Ports are now developed and versioned along with the operating system and
are automatically built per the PACKAGES environment variable. The patches
are licensed under the same license as the relevant ports.

Tix has gained support for the new port(5) format. tix-port(8) is the new
high level ports build even point that handles downloading pstream releases
into the new mirror cache directory, applying the patches, building the port
with the lower-level tix-build(8), and finally installing the binary
package. The new tix-vars(8) program parses port(5) files and the new
tix-rmdiff(8) program produces input for tix-rmpatch(8).

The old doc/ directory is discontinued in favor of manual pages documenting
the new ports system.

The obsolete porttix-create(8) and srctix-create(8) programs are removed.
2022-06-13 22:29:53 +02:00

130 lines
5.1 KiB
Diff

diff -Paur --no-dereference -- bzip2.upstream/bzip2.c bzip2/bzip2.c
--- bzip2.upstream/bzip2.c
+++ bzip2/bzip2.c
@@ -72,7 +72,9 @@
# include <utime.h>
# include <unistd.h>
# include <sys/stat.h>
+#if !defined(__sortix__)
# include <sys/times.h>
+#endif
# define PATH_SEP '/'
# define MY_LSTAT lstat
diff -Paur --no-dereference -- bzip2.upstream/Makefile bzip2/Makefile
--- bzip2.upstream/Makefile
+++ bzip2/Makefile
@@ -25,6 +25,8 @@
# Where you want it installed when you do 'make install'
PREFIX=/usr/local
+EXEC_PREFIX=$(PREFIX)
+DESTDIR=
OBJS= blocksort.o \
@@ -35,7 +37,7 @@
decompress.o \
bzlib.o
-all: libbz2.a bzip2 bzip2recover test
+all: libbz2.a bzip2 bzip2recover
bzip2: libbz2.a bzip2.o
$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
@@ -70,43 +72,43 @@
@cat words3
install: bzip2 bzip2recover
- if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
- if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
- if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
- if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
- cp -f bzip2 $(PREFIX)/bin/bzip2
- cp -f bzip2 $(PREFIX)/bin/bunzip2
- cp -f bzip2 $(PREFIX)/bin/bzcat
- cp -f bzip2recover $(PREFIX)/bin/bzip2recover
- chmod a+x $(PREFIX)/bin/bzip2
- chmod a+x $(PREFIX)/bin/bunzip2
- chmod a+x $(PREFIX)/bin/bzcat
- chmod a+x $(PREFIX)/bin/bzip2recover
- cp -f bzip2.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzip2.1
- cp -f bzlib.h $(PREFIX)/include
- chmod a+r $(PREFIX)/include/bzlib.h
- cp -f libbz2.a $(PREFIX)/lib
- chmod a+r $(PREFIX)/lib/libbz2.a
- cp -f bzgrep $(PREFIX)/bin/bzgrep
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
- chmod a+x $(PREFIX)/bin/bzgrep
- cp -f bzmore $(PREFIX)/bin/bzmore
- ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
- chmod a+x $(PREFIX)/bin/bzmore
- cp -f bzdiff $(PREFIX)/bin/bzdiff
- ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
- chmod a+x $(PREFIX)/bin/bzdiff
- cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzgrep.1
- chmod a+r $(PREFIX)/man/man1/bzmore.1
- chmod a+r $(PREFIX)/man/man1/bzdiff.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
- echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
- echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+ if ( test ! -d $(DESTDIR)$(EXEC_PREFIX)/bin ) ; then mkdir -p $(DESTDIR)$(EXEC_PREFIX)/bin ; fi
+ if ( test ! -d $(DESTDIR)$(EXEC_PREFIX)/lib ) ; then mkdir -p $(DESTDIR)$(EXEC_PREFIX)/lib ; fi
+ if ( test ! -d $(DESTDIR)$(PREFIX)/share/man ) ; then mkdir -p $(DESTDIR)$(PREFIX)/share/man ; fi
+ if ( test ! -d $(DESTDIR)$(PREFIX)/share/man/man1 ) ; then mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 ; fi
+ if ( test ! -d $(DESTDIR)$(PREFIX)/include ) ; then mkdir -p $(DESTDIR)$(PREFIX)/include ; fi
+ cp -f bzip2 $(DESTDIR)$(EXEC_PREFIX)/bin/bzip2
+ cp -f bzip2 $(DESTDIR)$(EXEC_PREFIX)/bin/bunzip2
+ cp -f bzip2 $(DESTDIR)$(EXEC_PREFIX)/bin/bzcat
+ cp -f bzip2recover $(DESTDIR)$(EXEC_PREFIX)/bin/bzip2recover
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzip2
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bunzip2
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzcat
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzip2recover
+ cp -f bzip2.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ chmod a+r $(DESTDIR)$(PREFIX)/share/man/man1/bzip2.1
+ cp -f bzlib.h $(DESTDIR)$(PREFIX)/include
+ chmod a+r $(DESTDIR)$(PREFIX)/include/bzlib.h
+ cp -f libbz2.a $(DESTDIR)$(EXEC_PREFIX)/lib
+ chmod a+r $(DESTDIR)$(EXEC_PREFIX)/lib/libbz2.a
+ cp -f bzgrep $(DESTDIR)$(EXEC_PREFIX)/bin/bzgrep
+ ln -s -f bzgrep $(DESTDIR)$(EXEC_PREFIX)/bin/bzegrep
+ ln -s -f bzgrep $(DESTDIR)$(EXEC_PREFIX)/bin/bzfgrep
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzgrep
+ cp -f bzmore $(DESTDIR)$(EXEC_PREFIX)/bin/bzmore
+ ln -s -f bzmore $(DESTDIR)$(EXEC_PREFIX)/bin/bzless
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzmore
+ cp -f bzdiff $(DESTDIR)$(EXEC_PREFIX)/bin/bzdiff
+ ln -s -f bzdiff $(DESTDIR)$(EXEC_PREFIX)/bin/bzcmp
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzdiff
+ cp -f bzgrep.1 bzmore.1 bzdiff.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ chmod a+r $(DESTDIR)$(PREFIX)/share/man/man1/bzgrep.1
+ chmod a+r $(DESTDIR)$(PREFIX)/share/man/man1/bzmore.1
+ chmod a+r $(DESTDIR)$(PREFIX)/share/man/man1/bzdiff.1
+ echo ".so man1/bzgrep.1" > $(DESTDIR)$(PREFIX)/share/man/man1/bzegrep.1
+ echo ".so man1/bzgrep.1" > $(DESTDIR)$(PREFIX)/share/man/man1/bzfgrep.1
+ echo ".so man1/bzmore.1" > $(DESTDIR)$(PREFIX)/share/man/man1/bzless.1
+ echo ".so man1/bzdiff.1" > $(DESTDIR)$(PREFIX)/share/man/man1/bzcmp.1
clean:
rm -f *.o libbz2.a bzip2 bzip2recover \
diff -Paur --no-dereference -- bzip2.upstream/make.sortix bzip2/make.sortix
--- bzip2.upstream/make.sortix
+++ bzip2/make.sortix
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec "$MAKE" "$@" \
+ PREFIX="$PREFIX" \
+ EXEC_PREFIX="$EXEC_PREFIX" \
+ DESTDIR="$DESTDIR" \
+ CC=${HOST}-gcc \
+ AR=${HOST}-ar \
+ RANLIB=${HOST}-ranlib \
+ BIGFILES= \
+#