summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Tsampas2021-10-30 20:37:01 +0300
committerStelios Tsampas2021-10-30 20:37:01 +0300
commit7b5e9d4fc3a126af60d68b90dc1060615cec60d9 (patch)
treed905a64859f26c89bcaa125a7f942d1bdb2bc0d3
parent76b2b1f87ec4dfad0f05aeed2414f5b95148f706 (diff)
downloadaur-7b5e9d4fc3a126af60d68b90dc1060615cec60d9.tar.gz
Update PKGBUILD
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD57
-rw-r--r--maxcso-system-flags.patch24
-rw-r--r--maxcso-system-libs.patch66
4 files changed, 138 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4607acf68dee..e78f598def31 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,23 @@
pkgbase = maxcso-git
- pkgdesc = Fast ISO to CSO compressor
- pkgver = 1.9.0.r2.f0798c12
+ pkgdesc = A fast ISO to CSO compression program for use with PSP and PS2 emulators
+ pkgver = 1.13.0.r10.161f99d8
pkgrel = 1
url = https://github.com/unknownbrackets/maxcso
arch = x86_64
license = custom:ISCL
makedepends = git
+ depends = gcc-libs
+ depends = glibc
depends = libuv
depends = lz4
depends = zlib
provides = maxcso
conflicts = maxcso
- source = maxcso::git+https://github.com/unknownbrackets/maxcso.git
- md5sums = SKIP
+ source = git+https://github.com/unknownbrackets/maxcso.git
+ source = maxcso-system-flags.patch
+ source = maxcso-system-libs.patch
+ b2sums = SKIP
+ b2sums = 5619e8dcc204dd130f724fb7f08009cfad5d122ffbafa42fe64e3776fd4a25894d9a6a0333192b091bdcf0051e5e4f8cb1f9bf177294d6e822440ac9baa8b23a
+ b2sums = 9f136c8091ad19b842e02e74e780b1e865afe2e71af010c58e28cb23a79e6d8470eb049a8c571588266c597dbdd525ce5999fe71c6f1aec41d6c4d32cf71d983
pkgname = maxcso-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 48f6c446989b..9f34be9b5182 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,52 @@
-# Maintainer: Stelios Tsampas <loathingkernel @at gmail .dot com>
+# Maintainer: loathingkernel <loathingkernel @at gmail .dot com>
pkgname=maxcso-git
-pkgver=1.9.0.r2.f0798c12
+pkgver=1.13.0.r10.161f99d8
pkgrel=1
-pkgdesc="Fast ISO to CSO compressor"
-arch=('x86_64')
-url="https://github.com/unknownbrackets/maxcso"
-license=('custom:ISCL')
-depends=('libuv' 'lz4' 'zlib')
-makedepends=('git')
+pkgdesc='A fast ISO to CSO compression program for use with PSP and PS2 emulators'
+arch=(x86_64)
+url=https://github.com/unknownbrackets/maxcso
+license=(custom:ISCL)
+depends=(
+ gcc-libs
+ glibc
+# libdeflate.so
+ libuv
+# libzopfli.so
+ lz4
+ zlib
+)
+makedepends=(git)
provides=("${pkgname/%-git/}")
conflicts=("${pkgname/%-git/}")
-source=("${pkgname/%-git/}::git+https://github.com/unknownbrackets/maxcso.git")
-md5sums=('SKIP')
+source=(
+ git+https://github.com/unknownbrackets/maxcso.git
+ maxcso-system-flags.patch
+ maxcso-system-libs.patch
+)
+b2sums=('SKIP'
+ '5619e8dcc204dd130f724fb7f08009cfad5d122ffbafa42fe64e3776fd4a25894d9a6a0333192b091bdcf0051e5e4f8cb1f9bf177294d6e822440ac9baa8b23a'
+ '9f136c8091ad19b842e02e74e780b1e865afe2e71af010c58e28cb23a79e6d8470eb049a8c571588266c597dbdd525ce5999fe71c6f1aec41d6c4d32cf71d983')
+
+prepare() {
+ cd maxcso
+# patch -Np1 -i ../maxcso-system-flags.patch
+# patch -Np1 -i ../maxcso-system-libs.patch
+}
pkgver() {
- cd "${pkgname/%-git/}"
- git describe --long | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
+ cd maxcso
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
}
build() {
- cd "${pkgname/%-git/}"
- make
+ make PREFIX=/usr -C maxcso
}
package() {
- cd "${pkgname/%-git/}"
- install -dm 755 "$pkgdir"/usr/{bin,share/{doc,licenses}/"$pkgname"}
- install -m 755 maxcso "$pkgdir"/usr/bin/
- install -m 644 LICENSE.md "$pkgdir"/usr/share/licenses/"$pkgname"/
- install -m 644 README{,_CSO,_ZSO}.md "$pkgdir"/usr/share/doc/"$pkgname"/
+ make DESTDIR="${pkgdir}" PREFIX=/usr -C maxcso install
+ install -Dm 644 maxcso/README{,_CSO,_ZSO}.md -t "${pkgdir}"/usr/share/doc/maxcso/
+ install -Dm 644 maxcso/LICENSE.md -t "${pkgdir}"/usr/share/licenses/maxcso/
}
+
+#vim: ts=2 sw=2 et:
diff --git a/maxcso-system-flags.patch b/maxcso-system-flags.patch
new file mode 100644
index 000000000000..5a4d214263f0
--- /dev/null
+++ b/maxcso-system-flags.patch
@@ -0,0 +1,24 @@
+diff '--color=auto' -rupN maxcso.orig/Makefile maxcso/Makefile
+--- maxcso.orig/Makefile 2021-09-02 11:23:11.924222645 +0200
++++ maxcso/Makefile 2021-09-02 11:24:58.177464161 +0200
+@@ -5,8 +5,9 @@ MANDIR ?= $(PREFIX)/share/man
+ CC ?= gcc
+ CXX ?= g++
+
+-CFLAGS ?= -O2
+-CXXFLAGS ?= $(CFLAGS)
++CFLAGS ?= ${CFLAGS}
++CXXFLAGS ?= ${CXXFLAGS}
++LDFLAGS ?= ${LDFLAGS}
+
+ SRC_CFLAGS += -W -Wall -Wextra -Wno-implicit-function-declaration -DNDEBUG=1
+ SRC_CXXFLAGS += -W -Wall -Wextra -std=c++11 -Izopfli/src -I7zip -DNDEBUG=1 \
+@@ -32,7 +33,7 @@ ZOPFLI_C_OBJ = $(ZOPFLI_C_SRC:.c=.o)
+
+ # TODO: Perhaps detect and use system libdeflate if available.
+ maxcso: $(SRC_CXX_OBJ) $(CLI_CXX_OBJ) $(ZOPFLI_C_OBJ) 7zip/7zip.a libdeflate/libdeflate.a
+- $(CXX) -o $@ $(SRC_CXXFLAGS) $(CXXFLAGS) $^ -luv -llz4 -lz
++ $(CXX) -o $@ $(SRC_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -luv -llz4 -lz
+
+ 7zip/7zip.a:
+ $(MAKE) -C 7zip 7zip.a
diff --git a/maxcso-system-libs.patch b/maxcso-system-libs.patch
new file mode 100644
index 000000000000..cd6d07a83e89
--- /dev/null
+++ b/maxcso-system-libs.patch
@@ -0,0 +1,66 @@
+diff '--color=auto' -rupN maxcso.orig/Makefile maxcso/Makefile
+--- maxcso.orig/Makefile 2021-09-02 11:25:45.865244668 +0200
++++ maxcso/Makefile 2021-09-02 11:26:59.628790478 +0200
+@@ -10,20 +10,13 @@ CXXFLAGS ?= ${CXXFLAGS}
+ LDFLAGS ?= ${LDFLAGS}
+
+ SRC_CFLAGS += -W -Wall -Wextra -Wno-implicit-function-declaration -DNDEBUG=1
+-SRC_CXXFLAGS += -W -Wall -Wextra -std=c++11 -Izopfli/src -I7zip -DNDEBUG=1 \
+- -Ilibdeflate -Wno-unused-parameter -Wno-unused-variable -pthread
++SRC_CXXFLAGS += -W -Wall -Wextra -std=c++11 -I7zip -DNDEBUG=1 \
++ -Wno-unused-parameter -Wno-unused-variable -pthread
+
+ SRC_CXX_SRC = $(wildcard src/*.cpp)
+ SRC_CXX_OBJ = $(SRC_CXX_SRC:.cpp=.o)
+ CLI_CXX_SRC = $(wildcard cli/*.cpp)
+ CLI_CXX_OBJ = $(CLI_CXX_SRC:.cpp=.o)
+-ZOPFLI_C_SRC = zopfli/src/zopfli/blocksplitter.c zopfli/src/zopfli/cache.c \
+- zopfli/src/zopfli/deflate.c zopfli/src/zopfli/gzip_container.c \
+- zopfli/src/zopfli/hash.c zopfli/src/zopfli/katajainen.c \
+- zopfli/src/zopfli/lz77.c zopfli/src/zopfli/squeeze.c \
+- zopfli/src/zopfli/tree.c zopfli/src/zopfli/util.c \
+- zopfli/src/zopfli/zlib_container.c zopfli/src/zopfli/zopfli_lib.c
+-ZOPFLI_C_OBJ = $(ZOPFLI_C_SRC:.c=.o)
+
+ %.o: %.cpp
+ $(CXX) -c $(SRC_CXXFLAGS) $(CXXFLAGS) -o $@ $<
+@@ -31,16 +24,12 @@ ZOPFLI_C_OBJ = $(ZOPFLI_C_SRC:.c=.o)
+ %.o: %.c
+ $(CC) -c $(SRC_CFLAGS) $(CFLAGS) -o $@ $<
+
+-# TODO: Perhaps detect and use system libdeflate if available.
+-maxcso: $(SRC_CXX_OBJ) $(CLI_CXX_OBJ) $(ZOPFLI_C_OBJ) 7zip/7zip.a libdeflate/libdeflate.a
+- $(CXX) -o $@ $(SRC_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -luv -llz4 -lz
++maxcso: $(SRC_CXX_OBJ) $(CLI_CXX_OBJ) 7zip/7zip.a
++ $(CXX) -o $@ $(SRC_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -luv -llz4 -lz -lzopfli -ldeflate
+
+ 7zip/7zip.a:
+ $(MAKE) -C 7zip 7zip.a
+
+-libdeflate/libdeflate.a:
+- $(MAKE) -C libdeflate libdeflate.a
+-
+ install: all
+ mkdir -p $(DESTDIR)$(BINDIR)
+ mkdir -p $(DESTDIR)$(MANDIR)/man1
+@@ -54,7 +43,7 @@ uninstall:
+ rm -f $(DESTDIR)$(MANDIR)/man1/maxcso.1
+
+ clean:
+- rm -f $(SRC_CXX_OBJ) $(CLI_CXX_OBJ) $(ZOPFLI_C_OBJ) maxcso
++ rm -f $(SRC_CXX_OBJ) $(CLI_CXX_OBJ) maxcso
+ $(MAKE) -C 7zip clean
+
+ all: maxcso
+diff '--color=auto' -rupN maxcso.orig/src/sector.cpp maxcso/src/sector.cpp
+--- maxcso.orig/src/sector.cpp 2021-09-02 11:25:45.858577379 +0200
++++ maxcso/src/sector.cpp 2021-09-02 11:27:27.438050698 +0200
+@@ -3,7 +3,7 @@
+ #include "compress.h"
+ #include "cso.h"
+ #include "buffer_pool.h"
+-#include "zopfli/zopfli.h"
++#include "zopfli.h"
+ #include "libdeflate.h"
+ #ifndef NO_DEFLATE7Z
+ #include "deflate7z.h"