summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/xdms')
-rw-r--r--app-arch/xdms/files/xdms-1.3.2-dont-compress-man-pages.patch13
-rw-r--r--app-arch/xdms/files/xdms-1.3.2-fix-build-with-gcc-10.patch80
-rw-r--r--app-arch/xdms/files/xdms-1.3.2-respect-DESTDIR.patch22
-rw-r--r--app-arch/xdms/metadata.xml5
-rw-r--r--app-arch/xdms/xdms-1.3.2-r1.ebuild31
-rw-r--r--app-arch/xdms/xdms-1.3.2-r2.ebuild41
6 files changed, 160 insertions, 32 deletions
diff --git a/app-arch/xdms/files/xdms-1.3.2-dont-compress-man-pages.patch b/app-arch/xdms/files/xdms-1.3.2-dont-compress-man-pages.patch
new file mode 100644
index 000000000000..3396b59a309c
--- /dev/null
+++ b/app-arch/xdms/files/xdms-1.3.2-dont-compress-man-pages.patch
@@ -0,0 +1,13 @@
+From: Sam James <sam@gentoo.org>
+Subject: [PATCH 2/2] Don't compress man pages
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,5 +11,4 @@ install: xdms
+ install xdms.txt COPYING ChangeLog.txt ${DESTDIR}{PREFIX}/share/doc/xdms-{VERSION}/
+ chmod og+rx ${DESTDIR}{PREFIX}/bin ${DESTDIR}{PREFIX}/bin/xdms
+ chmod -R og+rX ${DESTDIR}{PREFIX}/share/doc/xdms-{VERSION}
+- gzip < xdms.1 > xdms.1.gz
+- install xdms.1.gz ${DESTDIR}{PREFIX}/share/man/man1/
++ install xdms.1 ${DESTDIR}{PREFIX}/share/man/man1/
+--
+
diff --git a/app-arch/xdms/files/xdms-1.3.2-fix-build-with-gcc-10.patch b/app-arch/xdms/files/xdms-1.3.2-fix-build-with-gcc-10.patch
new file mode 100644
index 000000000000..dad00addead3
--- /dev/null
+++ b/app-arch/xdms/files/xdms-1.3.2-fix-build-with-gcc-10.patch
@@ -0,0 +1,80 @@
+https://sources.debian.org/patches/xdms/1.3.2-7/0002-Fix-build-with-gcc-10.patch/
+
+From: Jeff Law <law@redhat.com>
+Date: Sat, 9 May 2020 15:16:39 +0200
+Subject: Fix build with gcc-10
+--- a/src/u_deep.c
++++ b/src/u_deep.c
+@@ -17,9 +17,9 @@
+ #include "getbits.h"
+
+
+-INLINE USHORT DecodeChar(void);
+-INLINE USHORT DecodePosition(void);
+-INLINE void update(USHORT c);
++static INLINE USHORT DecodeChar(void);
++static INLINE USHORT DecodePosition(void);
++static INLINE void update(USHORT c);
+ static void reconst(void);
+
+
+@@ -98,7 +98,7 @@ USHORT Unpack_DEEP(UCHAR *in, UCHAR *out, USHORT origsize){
+
+
+
+-INLINE USHORT DecodeChar(void){
++static INLINE USHORT DecodeChar(void){
+ USHORT c;
+
+ c = son[R];
+@@ -117,7 +117,7 @@ INLINE USHORT DecodeChar(void){
+
+
+
+-INLINE USHORT DecodePosition(void){
++static INLINE USHORT DecodePosition(void){
+ USHORT i, j, c;
+
+ i = GETBITS(8); DROPBITS(8);
+@@ -171,7 +171,7 @@ static void reconst(void){
+
+ /* increment frequency of given code by one, and update tree */
+
+-INLINE void update(USHORT c){
++static INLINE void update(USHORT c){
+ USHORT i, j, k, l;
+
+ if (freq[R] == MAX_FREQ) {
+diff --git a/src/u_heavy.c b/src/u_heavy.c
+index fff93d3..8557b71 100644
+--- a/src/u_heavy.c
++++ b/src/u_heavy.c
+@@ -30,8 +30,8 @@ USHORT heavy_text_loc;
+
+ static USHORT read_tree_c(void);
+ static USHORT read_tree_p(void);
+-INLINE USHORT decode_c(void);
+-INLINE USHORT decode_p(void);
++static INLINE USHORT decode_c(void);
++static INLINE USHORT decode_p(void);
+
+
+
+@@ -74,7 +74,7 @@ USHORT Unpack_HEAVY(UCHAR *in, UCHAR *out, UCHAR flags, USHORT origsize){
+
+
+
+-INLINE USHORT decode_c(void){
++static INLINE USHORT decode_c(void){
+ USHORT i, j, m;
+
+ j = c_table[GETBITS(12)];
+@@ -96,7 +96,7 @@ INLINE USHORT decode_c(void){
+
+
+
+-INLINE USHORT decode_p(void){
++static INLINE USHORT decode_p(void){
+ USHORT i, j, m;
+
+ j = pt_table[GETBITS(8)];
diff --git a/app-arch/xdms/files/xdms-1.3.2-respect-DESTDIR.patch b/app-arch/xdms/files/xdms-1.3.2-respect-DESTDIR.patch
new file mode 100644
index 000000000000..3db969932084
--- /dev/null
+++ b/app-arch/xdms/files/xdms-1.3.2-respect-DESTDIR.patch
@@ -0,0 +1,22 @@
+From: Sam James <sam@gentoo.org>
+Subject: [PATCH 1/2] Respect DESTDIR
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -6,10 +6,10 @@ clean:
+ $(MAKE) -C src clean
+
+ install: xdms
+- mkdir -p {PREFIX}/bin {PREFIX}/share/doc/xdms-{VERSION} {PREFIX}/share/man/man1
+- install src/xdms {PREFIX}/bin/
+- install xdms.txt COPYING ChangeLog.txt {PREFIX}/share/doc/xdms-{VERSION}/
+- chmod og+rx {PREFIX}/bin {PREFIX}/bin/xdms
+- chmod -R og+rX {PREFIX}/share/doc/xdms-{VERSION}
++ mkdir -p ${DESTDIR}{PREFIX}/bin ${DESTDIR}{PREFIX}/share/doc/xdms-{VERSION} ${DESTDIR}{PREFIX}/share/man/man1
++ install src/xdms ${DESTDIR}{PREFIX}/bin/
++ install xdms.txt COPYING ChangeLog.txt ${DESTDIR}{PREFIX}/share/doc/xdms-{VERSION}/
++ chmod og+rx ${DESTDIR}{PREFIX}/bin ${DESTDIR}{PREFIX}/bin/xdms
++ chmod -R og+rX ${DESTDIR}{PREFIX}/share/doc/xdms-{VERSION}
+ gzip < xdms.1 > xdms.1.gz
+- install xdms.1.gz {PREFIX}/share/man/man1/
++ install xdms.1.gz ${DESTDIR}{PREFIX}/share/man/man1/
+--
diff --git a/app-arch/xdms/metadata.xml b/app-arch/xdms/metadata.xml
index ec5a204b1712..c8e7d281153b 100644
--- a/app-arch/xdms/metadata.xml
+++ b/app-arch/xdms/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<longdescription>
@@ -9,4 +9,7 @@
Can extract the files contained inside the DMS archives, if the compressed disk is an AmigaDOS disk, using readdisk made by Bernd Schmidt.
Can process multiple files in batch with a single command, and also use stdin and stdout for input and output of data.
</longdescription>
+ <upstream>
+ <remote-id type="gitlab">heikkiorsila/xdms</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/app-arch/xdms/xdms-1.3.2-r1.ebuild b/app-arch/xdms/xdms-1.3.2-r1.ebuild
deleted file mode 100644
index 14f419cd4b8c..000000000000
--- a/app-arch/xdms/xdms-1.3.2-r1.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs
-
-DESCRIPTION="xDMS - Amiga DMS disk image decompressor"
-HOMEPAGE="https://zakalwe.fi/~shd/foss/xdms"
-SRC_URI="https://zakalwe.fi/~shd/foss/xdms/${P}.tar.bz2"
-
-LICENSE="public-domain"
-SLOT="0"
-KEYWORDS="amd64 ~hppa ppc x86"
-IUSE=""
-
-pkg_setup() {
- tc-export CC
-}
-
-src_prepare() {
- default
- sed -i Makefile.in \
- -e "s:COPYING::" \
- -e "s:share/doc/xdms-{VERSION}:share/doc/xdms-${PF}:" || die
- sed -i -e "s:-O2::" src/Makefile.in || die
-}
-
-src_configure() {
- ./configure --prefix=/usr --package-prefix="${D}" || die
-}
diff --git a/app-arch/xdms/xdms-1.3.2-r2.ebuild b/app-arch/xdms/xdms-1.3.2-r2.ebuild
new file mode 100644
index 000000000000..07dce668c10a
--- /dev/null
+++ b/app-arch/xdms/xdms-1.3.2-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="xDMS - Amiga DMS disk image decompressor"
+HOMEPAGE="https://zakalwe.fi/~shd/foss/xdms"
+SRC_URI="https://zakalwe.fi/~shd/foss/xdms/${P}.tar.bz2"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc x86"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.2-respect-DESTDIR.patch
+ "${FILESDIR}"/${PN}-1.3.2-dont-compress-man-pages.patch
+ "${FILESDIR}"/${PN}-1.3.2-fix-build-with-gcc-10.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i Makefile.in \
+ -e "s:COPYING::" \
+ -e "s:share/doc/xdms-{VERSION}:share/doc/${PF}:" || die
+
+ sed -i -e "s:-O2::" src/Makefile.in || die
+}
+
+src_configure() {
+ tc-export CC
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # Needed to avoid typical "Undefined symbols for architecture x86_64"
+ append-ldflags -undefined dynamic_lookup
+ fi
+
+ ./configure --prefix="${EPREFIX}"/usr || die
+}