From ac38d75cfe0f2444f4c7b9b4b5e11d03c07f37b4 Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Thu, 13 Apr 2023 09:32:42 -0400 Subject: [PATCH 1/2] New package: libjodycode-1.0 --- common/shlibs | 1 + srcpkgs/libjodycode-devel | 1 + .../patches/fix-make-install.patch | 75 +++++++++++++++++++ .../remove-unneccessary-compiler-flags.patch | 22 ++++++ srcpkgs/libjodycode/patches/set-soname.patch | 45 +++++++++++ srcpkgs/libjodycode/template | 26 +++++++ 6 files changed, 170 insertions(+) create mode 120000 srcpkgs/libjodycode-devel create mode 100644 srcpkgs/libjodycode/patches/fix-make-install.patch create mode 100644 srcpkgs/libjodycode/patches/remove-unneccessary-compiler-flags.patch create mode 100644 srcpkgs/libjodycode/patches/set-soname.patch create mode 100644 srcpkgs/libjodycode/template diff --git a/common/shlibs b/common/shlibs index 605a8249c8e2..08bd66cead8d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4243,3 +4243,4 @@ libdate-tz.so.3 chrono-date-3.0.1_1 libayatana-ido3-0.4.so.0 ayatana-ido-0.9.2_1 libayatana-indicator3.so.7 libayatana-indicator-0.9.3_1 libayatana-appindicator3.so.1 libayatana-appindicator-0.5.91_1 +libjodycode.so.1 libjodycode-1.0_1 diff --git a/srcpkgs/libjodycode-devel b/srcpkgs/libjodycode-devel new file mode 120000 index 000000000000..038ea779ae69 --- /dev/null +++ b/srcpkgs/libjodycode-devel @@ -0,0 +1 @@ +libjodycode \ No newline at end of file diff --git a/srcpkgs/libjodycode/patches/fix-make-install.patch b/srcpkgs/libjodycode/patches/fix-make-install.patch new file mode 100644 index 000000000000..5110bb85f78c --- /dev/null +++ b/srcpkgs/libjodycode/patches/fix-make-install.patch @@ -0,0 +1,75 @@ +From 1655163b273baac6e02f6b3404e4fcbb14ab763d Mon Sep 17 00:00:00 2001 +From: Jody Bruchon +Date: Mon, 10 Apr 2023 09:01:39 -0400 +Subject: [PATCH] Makefile: fix make install/uninstall + +This removes the Windows barriers. You're on your own on Windows. +--- + Makefile | 32 +++++++++++++++++--------------- + 1 file changed, 17 insertions(+), 15 deletions(-) + +diff --git a/Makefile b/Makefile +index e15aba4..99f5726 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,8 +23,8 @@ COMPILER_OPTIONS += -Wshadow -Wfloat-equal -Waggregate-return -Wcast-qual -Wswit + COMPILER_OPTIONS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -fstrict-aliasing -pipe -fPIC + + UNAME_S=$(shell uname -s) +-VERSION=$(shell grep '#define VER ' version.h | sed 's/[^"]*"//;s/".*//') +-VERSION_MAJOR=$(shell grep '#define VER ' version.h | sed 's/[^"]*"//;s/\..*//') ++VERSION=$(shell grep '\#define VER ' version.h | sed 's/[^"]*"//;s/".*//') ++VERSION_MAJOR=$(shell grep '\#define VER ' version.h | sed 's/[^"]*"//;s/\..*//') + + # Don't use unsupported compiler options on gcc 3/4 (Mac OS X 10.5.8 Xcode) + ifeq ($(UNAME_S), Darwin) +@@ -96,33 +96,35 @@ $(PROGRAM_NAME): $(OBJS) + # $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM_NAME) $(OBJS) + + installdirs: +- @[ "$(ON_WINDOWS)" = "1" ] && echo "Do not use install rules on Windows" && exit 1 + test -e $(DESTDIR)$(LIB_DIR) || $(MKDIR) $(DESTDIR)$(LIB_DIR) ++ test -e $(DESTDIR)$(INC_DIR) || $(MKDIR) $(DESTDIR)$(INC_DIR) + test -e $(DESTDIR)$(MAN7_DIR) || $(MKDIR) $(DESTDIR)$(MAN7_DIR) + +-install: sharedlib staticlib installdirs +- @[ "$(ON_WINDOWS)" = "1" ] && echo "Do not use install rules on Windows" && exit 1 +- $(INSTALL_DATA) $(PROGRAM_NAME).so $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).so.$(VERSION) ++installfiles: ++ $(INSTALL_DATA) $(PROGRAM_NAME).so $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).so.$(VERSION) + $(LN) $(PROGRAM_NAME).so.$(VERSION) $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).so.$(VERSION_MAJOR) + $(LN) $(PROGRAM_NAME).so.$(VERSION) $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).so +- $(INSTALL_DATA) $(PROGRAM_NAME).a $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).a +- $(INSTALL_DATA) $(PROGRAM_NAME).h $(DESTDIR)$(INC_DIR)/$(PROGRAM_NAME).h +- $(INSTALL_DATA) $(PROGRAM_NAME).7 $(DESTDIR)$(MAN7_DIR)/$(PROGRAM_NAME).7 ++ $(INSTALL_DATA) $(PROGRAM_NAME).a $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).a ++ $(INSTALL_DATA) $(PROGRAM_NAME).h $(DESTDIR)$(INC_DIR)/$(PROGRAM_NAME).h ++ $(INSTALL_DATA) $(PROGRAM_NAME).7 $(DESTDIR)$(MAN7_DIR)/$(PROGRAM_NAME).7 ++ ++install: sharedlib staticlib installdirs installfiles + + uninstalldirs: +- @[ "$(ON_WINDOWS)" = "1" ] && echo "Do not use install rules on Windows" && exit 1 +- -test -e $(DESTDIR)$(LIB_DIR) && $(RMDIR) $(DESTDIR)$(LIB_DIR) +- -test -e $(DESTDIR)$(INC_DIR) && $(RMDIR) $(DESTDIR)$(INC_DIR) ++ -test -e $(DESTDIR)$(LIB_DIR) && $(RMDIR) $(DESTDIR)$(LIB_DIR) ++ -test -e $(DESTDIR)$(INC_DIR) && $(RMDIR) $(DESTDIR)$(INC_DIR) + -test -e $(DESTDIR)$(MAN7_DIR) && $(RMDIR) $(DESTDIR)$(MAN7_DIR) + +-uninstall: uninstalldirs +- @[ "$(ON_WINDOWS)" = "1" ] && echo "Do not use install rules on Windows" && exit 1 ++uninstallfiles: + $(RM) $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).so.$(VERSION) + $(RM) $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).so.$(VERSION_MAJOR) +- $(RM) $(DESTDIR)$(INC_DIR)/$(PROGRAM_NAME).a ++ $(RM) $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).so ++ $(RM) $(DESTDIR)$(LIB_DIR)/$(PROGRAM_NAME).a + $(RM) $(DESTDIR)$(INC_DIR)/$(PROGRAM_NAME).h + $(RM) $(DESTDIR)$(MAN7_DIR)/$(PROGRAM_NAME).7 + ++uninstall: uninstallfiles uninstalldirs ++ + test: + ./test.sh + + diff --git a/srcpkgs/libjodycode/patches/remove-unneccessary-compiler-flags.patch b/srcpkgs/libjodycode/patches/remove-unneccessary-compiler-flags.patch new file mode 100644 index 000000000000..ce092cb586f7 --- /dev/null +++ b/srcpkgs/libjodycode/patches/remove-unneccessary-compiler-flags.patch @@ -0,0 +1,22 @@ +From 8676de946f535cf7de8980d0476ce706b1ff9a8c Mon Sep 17 00:00:00 2001 +From: Jody Bruchon +Date: Sun, 9 Apr 2023 21:21:22 -0400 +Subject: [PATCH] Makefile: remove unnecessary definitions + +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 1910db6..e15aba4 100644 +--- a/Makefile ++++ b/Makefile +@@ -21,7 +21,6 @@ SUFFIX = so + COMPILER_OPTIONS = -Wall -Wwrite-strings -Wcast-align -Wstrict-aliasing -Wstrict-prototypes -Wpointer-arith -Wundef + COMPILER_OPTIONS += -Wshadow -Wfloat-equal -Waggregate-return -Wcast-qual -Wswitch-default -Wswitch-enum -Wconversion -Wunreachable-code -Wformat=2 + COMPILER_OPTIONS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -fstrict-aliasing -pipe -fPIC +-COMPILER_OPTIONS += -DSMA_MAX_FREE=11 -DNO_ATIME + + UNAME_S=$(shell uname -s) + VERSION=$(shell grep '#define VER ' version.h | sed 's/[^"]*"//;s/".*//') + diff --git a/srcpkgs/libjodycode/patches/set-soname.patch b/srcpkgs/libjodycode/patches/set-soname.patch new file mode 100644 index 000000000000..a53e544e7200 --- /dev/null +++ b/srcpkgs/libjodycode/patches/set-soname.patch @@ -0,0 +1,45 @@ +From 891a0bfebbe8ec98dea911588e3d7e739951c1f2 Mon Sep 17 00:00:00 2001 +From: Jody Bruchon +Date: Wed, 12 Apr 2023 23:43:30 -0400 +Subject: [PATCH] Add soname linker option (GitHub issue #2) + +--- + Makefile | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 99f5726..1d8dc6c 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,11 +16,13 @@ MKDIR = mkdir -p + INSTALL_PROGRAM = $(INSTALL) -m 0755 + INSTALL_DATA = $(INSTALL) -m 0644 + SUFFIX = so ++API_VERSION = 1 + + # Make Configuration + COMPILER_OPTIONS = -Wall -Wwrite-strings -Wcast-align -Wstrict-aliasing -Wstrict-prototypes -Wpointer-arith -Wundef + COMPILER_OPTIONS += -Wshadow -Wfloat-equal -Waggregate-return -Wcast-qual -Wswitch-default -Wswitch-enum -Wconversion -Wunreachable-code -Wformat=2 + COMPILER_OPTIONS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -fstrict-aliasing -pipe -fPIC ++LINK_OPTIONS += -Wl,-soname,$(PROGRAM_NAME).$(SUFFIX).$(API_VERSION) + + UNAME_S=$(shell uname -s) + VERSION=$(shell grep '\#define VER ' version.h | sed 's/[^"]*"//;s/".*//') +@@ -69,6 +71,7 @@ ifdef ON_WINDOWS + endif + + CFLAGS += $(COMPILER_OPTIONS) $(CFLAGS_EXTRA) ++LDFLAGS += $(LINK_OPTIONS) + + # ADDITIONAL_OBJECTS - some platforms will need additional object files + # to support features not supplied by their vendor. Eg: GNU getopt() +@@ -81,7 +84,7 @@ OBJS += $(ADDITIONAL_OBJECTS) + all: sharedlib staticlib + + sharedlib: $(OBJS) +- $(CC) -shared -o $(PROGRAM_NAME).$(SUFFIX) $(OBJS) ++ $(CC) -shared -o $(PROGRAM_NAME).$(SUFFIX) $(OBJS) $(LDFLAGS) + + staticlib: $(OBJS) + $(AR) rcs libjodycode.a $(OBJS) + diff --git a/srcpkgs/libjodycode/template b/srcpkgs/libjodycode/template new file mode 100644 index 000000000000..2e1c60adde42 --- /dev/null +++ b/srcpkgs/libjodycode/template @@ -0,0 +1,26 @@ +# Template file for 'libjodycode' +pkgname=libjodycode +version=1.0 +revision=1 +build_style=gnu-makefile +make_use_env=yes +short_desc="Shared code used by several utilities written by Jody Bruchon" +maintainer="cinerea0 " +license="MIT" +homepage="https://github.com/jbruchon/libjodycode" +changelog="https://raw.githubusercontent.com/jbruchon/libjodycode/master/CHANGES" +distfiles="https://github.com/jbruchon/libjodycode/archive/refs/tags/v${version}.tar.gz" +checksum=3849c7a76c46687eafcff8db37477ce31662ac7a0d88cbd7495755b0f9859280 + +post_install() { + vlicense LICENSE +} + +libjodycode-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + } +} From e073115eb804c936912851b05616c8fb72c39e31 Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Thu, 13 Apr 2023 09:34:05 -0400 Subject: [PATCH 2/2] jdupes: update to 1.22.0, adopt --- srcpkgs/jdupes/template | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/srcpkgs/jdupes/template b/srcpkgs/jdupes/template index 15a749997c40..ab64aa4cc1d6 100644 --- a/srcpkgs/jdupes/template +++ b/srcpkgs/jdupes/template @@ -1,18 +1,18 @@ # Template file for 'jdupes' pkgname=jdupes -version=1.21.3 +version=1.22.0 revision=1 build_style=gnu-makefile -make_build_args="ENABLE_BTRFS=1" +make_build_args="ENABLE_BTRFS=1 ENABLE_DEDUPE=1" +make_use_env=yes +makedepends="libjodycode-devel" short_desc="Powerful duplicate file finder and an enhanced fork of fdupes" -maintainer="Orphaned " +maintainer="cinerea0 " license="MIT" homepage="https://github.com/jbruchon/jdupes" changelog="https://raw.githubusercontent.com/jbruchon/jdupes/master/CHANGES" distfiles="https://github.com/jbruchon/jdupes/archive/refs/tags/v${version}.tar.gz" -checksum=8992d0ff1fe135c685063ce3c9d69d54f1f19f1b32845e84441f888218063cc0 - -CFLAGS="-DENABLE_DEDUPE" +checksum=945b69f1570d058b70c40d144c5dfa9d5769f43e9488e8ac4f47bbb9ac973df7 post_install() { vlicense LICENSE