чување 5a34f46e435e751b214a38f601804abd32c62ac5
родитељ d008aff2abda9dd97f53d9bee63cecd8e3faab6c
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Tue, 13 Sep 2022 23:12:49 +0200
notmuch: Add patch for static compilation
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 2, додавања: 69(+), брисања: 0(-)
diff --git a/notmuch/mkfile b/notmuch/mkfile
@@ -12,6 +12,10 @@ CFLAGS= -Os -pipe -fPIC
LDFLAGS= -s
$PKGBASE:QV:
+ printf " CP\t%s %s\n" configure configure~
+ cp configure configure~
+ printf " SED\t%s\n" configure
+ sed 's,\(pkg-config --libs\),\1 --static,g' configure~ > configure
printf " CONF\t%s\n" --prefix=$PREFIX
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS \
./configure --prefix=$PREFIX \
@@ -24,6 +28,18 @@ $PKGBASE:QV:
--without-desktop \
--without-ruby \
--without-zsh-completion
+ for patch in $(find pat -type f | sort); do
+ if [ -e $patch.applied ]; then
+ continue
+ fi
+ printf " PATCH\t%s\n" "$patch"
+ patch -Np1 -i $patch || exit 1
+ :>$patch.applied
+ done
+ printf " CP\t%s %s\n" Makefile.config Makefile.config~
+ cp Makefile.config Makefile.config~
+ printf " SED\t%s\n" Makefile.config
+ sed 's,../lib64/,,g' Makefile.config~ > Makefile.config
printf " MAKE\n"
make
diff --git a/notmuch/pat/notmuch-static.patch b/notmuch/pat/notmuch-static.patch
@@ -0,0 +1,53 @@
+--- a/lib/Makefile.local 2022-09-13 20:36:18.585946844 +0200
++++ b/lib/Makefile.local 2022-09-13 20:37:59.238945217 +0200
+@@ -75,22 +75,13 @@
+ $(dir)/$(LIBNAME): $(libnotmuch_modules) util/libnotmuch_util.a parse-time-string/libparse-time-string.a
+ $(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ util/libnotmuch_util.a parse-time-string/libparse-time-string.a
+
+-$(dir)/$(SONAME): $(dir)/$(LIBNAME)
+- ln -sf $(LIBNAME) $@
+-
+-$(dir)/$(LINKER_NAME): $(dir)/$(SONAME)
+- ln -sf $(LIBNAME) $@
+-
+ install: install-$(dir)
+
+-install-$(dir): $(dir)/$(LIBNAME)
++install-$(dir): $(dir)/libnotmuch.a
+ mkdir -p "$(DESTDIR)$(libdir)/"
+- install -m0644 "$(lib)/$(LIBNAME)" "$(DESTDIR)$(libdir)/"
+- ln -sf $(LIBNAME) "$(DESTDIR)$(libdir)/$(SONAME)"
+- ln -sf $(LIBNAME) "$(DESTDIR)$(libdir)/$(LINKER_NAME)"
++ install -m0644 "$(lib)/libnotmuch.a" "$(DESTDIR)$(libdir)/"
+ mkdir -p "$(DESTDIR)$(includedir)"
+ install -m0644 "$(srcdir)/$(lib)/notmuch.h" "$(DESTDIR)$(includedir)/"
+- $(LIBRARY_INSTALL_POST_COMMAND)
+
+ SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
+ CLEAN += $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME)
+--- a/Makefile.local 2022-09-13 21:13:07.588911139 +0200
++++ b/Makefile.local 2022-09-13 22:57:53.262809540 +0200
+@@ -1,7 +1,7 @@
+ # -*- makefile-gmake -*-
+
+ .PHONY: all
+-all: notmuch notmuch-shared build-man build-info ruby-bindings python-cffi-bindings
++all: notmuch build-man build-info
+ ifeq ($(MAKECMDGOALS),)
+ ifeq ($(shell cat .first-build-message 2>/dev/null),)
+ @NOTMUCH_FIRST_BUILD=1 $(MAKE) --no-print-directory all
+@@ -262,13 +262,10 @@
+ notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libnotmuch_util.a parse-time-string/libparse-time-string.a
+ $(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
+
+-notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)
+- $(call quiet,$(FINAL_NOTMUCH_LINKER) $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@
+-
+ .PHONY: install
+ install: all install-man install-info
+ mkdir -p "$(DESTDIR)$(prefix)/bin/"
+- install notmuch-shared "$(DESTDIR)$(prefix)/bin/notmuch"
++ install notmuch "$(DESTDIR)$(prefix)/bin/notmuch"
+ ifeq ($(MAKECMDGOALS), install)
+ @echo ""
+ @echo "Notmuch is now installed to $(DESTDIR)$(prefix)"