summaryrefslogtreecommitdiff
path: root/app-backup/cpdup
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-08 18:03:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-08 18:03:40 +0100
commit418459f7de9eb29d6db8b61681f39c467d9600e1 (patch)
tree87b23e3d06e1b08b13c64e16503aa7ea88b38a8a /app-backup/cpdup
parent522fa4e6f267ba688a264ceec8d6c79663b61219 (diff)
gentoo auto-resync : 08:10:2023 - 18:03:40
Diffstat (limited to 'app-backup/cpdup')
-rw-r--r--app-backup/cpdup/Manifest6
-rw-r--r--app-backup/cpdup/cpdup-1.18-r1.ebuild (renamed from app-backup/cpdup/cpdup-1.18.ebuild)23
-rw-r--r--app-backup/cpdup/files/Makefile.linux13
-rw-r--r--app-backup/cpdup/files/cpdup-1.11-unused.patch14
-rw-r--r--app-backup/cpdup/files/cpdup-1.18-makefile.patch30
-rw-r--r--app-backup/cpdup/files/cpdup-1.18-portable.patch128
6 files changed, 173 insertions, 41 deletions
diff --git a/app-backup/cpdup/Manifest b/app-backup/cpdup/Manifest
index e4315649b44b..476bb7bd5f27 100644
--- a/app-backup/cpdup/Manifest
+++ b/app-backup/cpdup/Manifest
@@ -1,5 +1,5 @@
-AUX Makefile.linux 304 BLAKE2B afeb5a8233955b43ff84e8c79fbf0ab09cc85849b4c771a72dcae7834bc68da0ade3be52743fcad2dfa0a38a775037d9fd82cab8fe5da3a7e1726a045b67a538 SHA512 595d56d4b25168e2426176c36cece12edc5388c58251d3c235611c40349a16f098ab7a17e0ad55435a499ded1cdad9b328f6ad3193bf09eadf5bd6778710b0d8
-AUX cpdup-1.11-unused.patch 252 BLAKE2B b2b3b7f008921342ff35bed0256a9f9681e4a2eb9840398b21bd8347172b2a78e626569211c42a97b0f0b5340d037f0aa80f33cedc449fe63232f8adb836c2e2 SHA512 1041685c7762a113e38ac8420bfa961bad3987318432140092702847571ebad082a7bea0e485b3a08349eb1d2844d171caf4e17e69d273e4ada2aaf847c37ce7
+AUX cpdup-1.18-makefile.patch 729 BLAKE2B 23b9debbd16733e68459af41438c0cb22e7a5fe4ea9cf8bb7ff4f53067884a141788eacd90a1528601f1eb9460805b105e24db4b2ad5648932ff209a37fd14b1 SHA512 afc0863fbbc7c7ff0778ebcb9373f5b3340cd79412a769fa1ddddf6567c6d4bcd876a618d306011b1a6538fe73ca1c0a38d7d193e598a28f3692b5b3903cf2b3
+AUX cpdup-1.18-portable.patch 3652 BLAKE2B bbca984a31436d56b16e34fd4fc68af5aa304cd82563166ff97572bd7a53f0dd7ec053c75f6ee8a2e60064fcce3ec42b8c68ed0774ce6c4d0e68aaebe6706cc2 SHA512 579d3f2a3df106889c3393b9f682a9382a57a20ecbedce61cc75490b09df2ef404e0bcdef196c3d4a4932af65a1c8eb98f0c98dd40aeb6abe50be4d5f02aab20
DIST cpdup-1.18.tgz 42841 BLAKE2B ebf18fd13b465be8483b9aad7af5353343e89e6960da967ddf59e7186bd199604a0d2b2d637efbb4d4d4f57611a3c600c5586861ef9780342d0ebed5de1ca3c8 SHA512 5c57be20951005d731866629a601b6dae91e112067f103d6cfc3f668fbd88b3b7b65990d9fad55f18c0e8238c2642a7b85aea543a0787f21084bda35e0da0e26
-EBUILD cpdup-1.18.ebuild 795 BLAKE2B e30c4a6890ad033af51244687809ca3fd3a7e5f4c2c691f85260011f224b11f5d432d761eee63e9e2c6540ad0d27bbba4dcb003a275c000e3c6ceb52757fac07 SHA512 5d474624c3f2c014de8e5c910c67b9cf20abfc74d0ae6ab7b0c2e156be508fe1fc549b99a61cfb3d0a06fe782e67d70c327c89f9f82d99a331491f1310612203
+EBUILD cpdup-1.18-r1.ebuild 690 BLAKE2B 35b8822a80769167a3156767956e589defe89b547a090451a046ae2045fc4ea26c6c4da0853a1f1e1377bf7abfbf1f100030fd172b1baa017bbfbc6da3061538 SHA512 b27dce969e6989f110e1dd829738289e3dda3259d8a743f41f0247512b5cdb312b4e8c152f03b769e9511fe5df0250bff59cedd32e963a484908b38a3df1892b
MISC metadata.xml 167 BLAKE2B 868e3b584722eaacf68273db062bb773d8c7e5d7ab2b81ca7e8397643bf7cc106c3a1033594401c99c54f667bb45d6b73f9048fc335580bbd44b4589ad26a832 SHA512 30caadd1496c3b9969136038239a1d8e01f236726b4022c2d7e19ca7575f25f735e556835e581afbf44fbd3e4104c40f2b5ef5fa70118d75c881fdf871962d0a
diff --git a/app-backup/cpdup/cpdup-1.18.ebuild b/app-backup/cpdup/cpdup-1.18-r1.ebuild
index 52be46bbfabb..5e6eccb3db93 100644
--- a/app-backup/cpdup/cpdup-1.18.ebuild
+++ b/app-backup/cpdup/cpdup-1.18-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit toolchain-funcs
@@ -13,22 +13,23 @@ S="${WORKDIR}/${PN}"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64"
-IUSE="threads"
-PATCHES=( "${FILESDIR}"/${PN}-1.11-unused.patch )
+RDEPEND="dev-libs/libbsd:="
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-portable.patch
+)
src_prepare() {
default
-
- cp "${FILESDIR}"/Makefile.linux Makefile || die
- # bits/stat.h has __unused too
- sed -i 's/__unused/__cpdup_unused/' *.c || die
- echo "#define strlcpy(a,b,c) strncpy(a,b,c)" >> cpdup.h || die
+ rm compat_linux.c || die
}
src_configure() {
- tc-export CC
- use threads || MAKEOPTS+=" NOPTHREADS=1"
+ tc-export CC PKG_CONFIG
}
src_install() {
diff --git a/app-backup/cpdup/files/Makefile.linux b/app-backup/cpdup/files/Makefile.linux
deleted file mode 100644
index 3e18e4e0b218..000000000000
--- a/app-backup/cpdup/files/Makefile.linux
+++ /dev/null
@@ -1,13 +0,0 @@
-OBJS = cpdup.o fsmid.o hclink.o hcproto.o misc.o
-
-CFLAGS += -D__cpdup_unused="__attribute__ ((unused))" -D_GNU_SOURCE -D__USE_FILE_OFFSET64 -DNOMD5
-
-ifndef NOPTHREADS
-CFLAGS += -DUSE_PTHREADS=1 -pthread
-endif
-
-all: $(OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o cpdup
-
-.c.o:
- $(CC) $(CFLAGS) -c -o $@ $<
diff --git a/app-backup/cpdup/files/cpdup-1.11-unused.patch b/app-backup/cpdup/files/cpdup-1.11-unused.patch
deleted file mode 100644
index 5544afbeddf9..000000000000
--- a/app-backup/cpdup/files/cpdup-1.11-unused.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/cpdup.c
-+++ b/cpdup.c
-@@ -1543,7 +1543,11 @@
- */
-
- static int
-+#ifdef _ST_FLAGS_PRESENT_
- xrename(const char *src, const char *dst, u_long flags)
-+#else
-+xrename(const char *src, const char *dst, u_long flags __unused)
-+#endif
- {
- int r;
-
diff --git a/app-backup/cpdup/files/cpdup-1.18-makefile.patch b/app-backup/cpdup/files/cpdup-1.18-makefile.patch
new file mode 100644
index 000000000000..173232fb3348
--- /dev/null
+++ b/app-backup/cpdup/files/cpdup-1.18-makefile.patch
@@ -0,0 +1,30 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,20 +1,9 @@
+-# $DragonFly: src/bin/cpdup/Makefile,v 1.7 2008/04/10 22:09:08 dillon Exp $
+-#
++OBJS = cpdup.o hcproto.o hclink.o misc.o fsmid.o
+
+-PROG= cpdup
+-SRCS= cpdup.c hcproto.c hclink.c misc.c fsmid.c
+-
+-.if defined(.FreeBSD)
+-CFLAGS += -D_ST_FLAGS_PRESENT_=1
+-WARNS?= 6
+-.endif
+-
+-.if !defined(NOMD5)
+-SRCS+= md5.c
+-.endif
+-
+-LDADD+= -lmd
+-DPADD+= ${LIBMD}
+-
+-.include <bsd.prog.mk>
++CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNOMD5 -DUSE_PTHREADS=1
++CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libbsd)
++CFLAGS += -pthread
++LIBS += $(shell $(PKG_CONFIG) --libs libbsd)
+
++all: $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o cpdup $(LIBS)
diff --git a/app-backup/cpdup/files/cpdup-1.18-portable.patch b/app-backup/cpdup/files/cpdup-1.18-portable.patch
new file mode 100644
index 000000000000..90a82d98a6dc
--- /dev/null
+++ b/app-backup/cpdup/files/cpdup-1.18-portable.patch
@@ -0,0 +1,128 @@
+--- a/compat_sun.h
++++ b/compat_sun.h
+@@ -1,6 +1,3 @@
+-/* __unused is a gcc'ism. */
+-#define __unused
+-
+ #include <stdio.h>
+ #include <stdarg.h>
+
+--- a/cpdup.c
++++ b/cpdup.c
+@@ -127,8 +127,8 @@
+ static void hltdelete(struct hlink *);
+ static void hltsetdino(struct hlink *, ino_t);
+ static int YesNo(const char *path);
+-static int xrename(const char *src, const char *dst, u_long flags);
+-static int xlink(const char *src, const char *dst, u_long flags);
++static int xrename(const char *src, const char *dst, unsigned long flags);
++static int xlink(const char *src, const char *dst, unsigned long flags);
+ static int xremove(struct HostConf *host, const char *path);
+ static int DoCopy(copy_info_t info, struct stat *stat1, int depth);
+ static int ScanDir(List *list, struct HostConf *host, const char *path,
+@@ -1648,7 +1648,7 @@
+ */
+
+ static int
+-xrename(const char *src, const char *dst, u_long flags)
++xrename(const char *src, const char *dst, unsigned long flags)
+ {
+ int r;
+
+@@ -1663,7 +1663,7 @@
+ }
+
+ static int
+-xlink(const char *src, const char *dst, u_long flags)
++xlink(const char *src, const char *dst, unsigned long flags)
+ {
+ int r;
+ #ifdef _ST_FLAGS_PRESENT_
+--- a/cpdup.h
++++ b/cpdup.h
+@@ -39,7 +39,6 @@
+ #define __printflike(a,b)
+ #define __printf0like(a,b)
+ #define __aligned(x)
+-#define __unused
+ #endif
+
+ void logstd(const char *ctl, ...) __printflike(1, 2);
+--- a/hclink.c
++++ b/hclink.c
+@@ -73,7 +73,7 @@
+ }
+
+ static int
+-rc_badop(hctransaction_t trans __unused, struct HCHead *head)
++rc_badop(hctransaction_t trans, struct HCHead *head)
+ {
+ head->error = EOPNOTSUPP;
+ return(0);
+--- a/hcproto.c
++++ b/hcproto.c
+@@ -10,6 +10,8 @@
+ #include "hclink.h"
+ #include "hcproto.h"
+
++#include <bsd/string.h>
++
+ static int hc_decode_stat(hctransaction_t trans, struct stat *, struct HCHead *);
+ static int hc_decode_stat_item(struct stat *st, struct HCLeaf *item);
+ static int rc_encode_stat(hctransaction_t trans, struct stat *);
+@@ -1503,7 +1505,7 @@
+ * CHFLAGS
+ */
+ int
+-hc_chflags(struct HostConf *hc, const char *path, u_long flags)
++hc_chflags(struct HostConf *hc, const char *path, unsigned long flags)
+ {
+ hctransaction_t trans;
+ struct HCHead *head;
+@@ -1535,7 +1537,7 @@
+ {
+ struct HCLeaf *item;
+ const char *path = NULL;
+- u_long flags = 0;
++ unsigned long flags = 0;
+ int rc;
+
+ FOR_EACH_ITEM(item, trans, head) {
+@@ -1544,7 +1546,7 @@
+ path = HCC_STRING(item);
+ break;
+ case LC_FILEFLAGS:
+- flags = (u_long)HCC_INT64(item);
++ flags = (unsigned long)HCC_INT64(item);
+ break;
+ }
+ }
+@@ -1846,7 +1848,7 @@
+ }
+
+ static int
+-rc_geteuid(hctransaction_t trans, struct HCHead *head __unused)
++rc_geteuid(hctransaction_t trans, struct HCHead *head)
+ {
+ hcc_leaf_int32(trans, LC_UID, geteuid());
+ return (0);
+@@ -1920,7 +1922,7 @@
+ }
+
+ static int
+-rc_getgroups(hctransaction_t trans, struct HCHead *head __unused)
++rc_getgroups(hctransaction_t trans, struct HCHead *head)
+ {
+ int count, i;
+ gid_t *gidlist;
+--- a/hcproto.h
++++ b/hcproto.h
+@@ -105,7 +105,7 @@
+ int hc_chmod(struct HostConf *hc, const char *path, mode_t mode);
+ int hc_mknod(struct HostConf *hc, const char *path, mode_t mode, dev_t rdev);
+ int hc_link(struct HostConf *hc, const char *name1, const char *name2);
+-int hc_chflags(struct HostConf *hc, const char *path, u_long flags);
++int hc_chflags(struct HostConf *hc, const char *path, unsigned long flags);
+ int hc_readlink(struct HostConf *hc, const char *path, char *buf, int bufsiz);
+ mode_t hc_umask(struct HostConf *hc, mode_t numask);
+ int hc_symlink(struct HostConf *hc, const char *name1, const char *name2);