Bläddra i källkod

Ports: Add xz port

Gunnar Beutner 4 år sedan
förälder
incheckning
8388e822cb
3 ändrade filer med 26 tillägg och 0 borttagningar
  1. 1 0
      Ports/AvailablePorts.md
  2. 13 0
      Ports/xz/package.sh
  3. 12 0
      Ports/xz/patches/configure.patch

+ 1 - 0
Ports/AvailablePorts.md

@@ -110,6 +110,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
 | [`vim`](vim/)                          | Vim                                                        | 8.2.2772                 | https://www.vim.org/                                                           |
 | [`vitetris`](vitetris/)                | vitetris                                                   | 0.59.1                   | https://github.com/vicgeralds/vitetris                                         |
 | [`vttest`](vttest/)                    | vttest                                                     | 20210210                 | https://invisible-island.net/vttest/                                           |
+| [`xz`](xz/)                            | xz                                                         | 5.2.5                    | https://tukaani.org/xz/                                                        |
 | [`yasm`](yasm/)                        | Yasm Modular Assembler                                     | 1.3.0                    | https://yasm.tortall.net/                                                      |
 | [`zlib`](zlib/)                        | zlib                                                       | 1.2.11                   | https://www.zlib.net/                                                          |
 | [`zstd`](zstd/)                        | Zstandard                                                  | 1.4.4                    | https://facebook.github.io/zstd/                                               |

+ 13 - 0
Ports/xz/package.sh

@@ -0,0 +1,13 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port=xz
+version=5.2.5
+useconfigure=true
+files="https://tukaani.org/xz/xz-${version}.tar.gz xz-${version}.tar.gz f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10"
+auth_type=sha256
+depends="zlib libiconv"
+
+install() {
+    run make DESTDIR=$DESTDIR $installopts install
+    ${CC} -shared -o $DESTDIR/usr/local/lib/liblzma.so -Wl,--whole-archive $DESTDIR/usr/local/lib/liblzma.a -Wl,--no-whole-archive -lz -liconv
+    rm -f $DESTDIR/usr/local/lib/liblzma.la
+}

+ 12 - 0
Ports/xz/patches/configure.patch

@@ -0,0 +1,12 @@
+diff -Naur xz-5.2.5/build-aux/config.sub xz-5.2.5.serenity/build-aux/config.sub
+--- xz-5.2.5/build-aux/config.sub	2020-03-17 15:29:35.000000000 +0100
++++ xz-5.2.5.serenity/build-aux/config.sub	2021-04-18 21:28:26.405741777 +0200
+@@ -1363,7 +1363,7 @@
+ 	# The portable systems comes first.
+ 	# Each alternative MUST end in a * to match a version number.
+ 	# -sysv* is not here because it comes later, after sysvr4.
+-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
++	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
+ 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ 	      | -sym* | -kopensolaris* | -plan9* \