[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#845718: maildir-filter: link against -lpcre in LIBS instead of LDFLAGS



Package: maildir-filter
Version: 1.20-4
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu zesty ubuntu-patch

Dear Maintainer,

LDFLAGS should only be used for linker options, not for libraries to link
against. Putting libraries here breaks linkers that use the --as-needed flag
(such as in Ubuntu), since they expect the libraries after the files that
need them.

LIBS should be used instead.

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/rules: Remove -lpcre from DEB_LDFLAGS_MAINT_APPEND; it doesn't
    belong in that Makefile variable.
  * debian/patches/makefile_flags_and_dir: Update to add -lpcre to the LIBS
    variable.

Thanks for considering the patch.

Logan Rosen

-- System Information:
Debian Release: stretch/sid
  APT prefers yakkety-updates
  APT policy: (500, 'yakkety-updates'), (500, 'yakkety-security'), (500, 'yakkety'), (100, 'yakkety-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-21-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru maildir-filter-1.20/debian/patches/makefile_flags_and_dir maildir-filter-1.20/debian/patches/makefile_flags_and_dir
--- maildir-filter-1.20/debian/patches/makefile_flags_and_dir	2016-09-16 18:31:51.000000000 -0400
+++ maildir-filter-1.20/debian/patches/makefile_flags_and_dir	2016-11-25 23:07:21.000000000 -0500
@@ -3,15 +3,14 @@
         Samuel Henrique <samueloph@gmail.com>
 Last-Update: 2016-09-16
 
-Index: maildir-filter-1.20/Makefile
-===================================================================
---- maildir-filter-1.20.orig/Makefile
-+++ maildir-filter-1.20/Makefile
-@@ -1,11 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,11 +1,11 @@
  CC=gcc
 -CFLAGS=-O6 -pipe -g -Werror -Wall
 -LDFLAGS=-lpcre
  BINNAME=maildir-filter
++LIBS+=-lpcre
  
  all: maildir-filter
  
@@ -20,7 +19,7 @@
  	cp maildir-filter $(DESTDIR)/usr/bin/${BINNAME}
  	chmod 755 $(DESTDIR)/usr/bin/${BINNAME}
  	chown root.root $(DESTDIR)/usr/bin/${BINNAME}
-@@ -15,6 +14,7 @@ update-templates:
+@@ -15,6 +15,7 @@
  	-xgettext -d maildir-filter -j -o po/maildir-filter.pot -k_ -T maildir-filter.c 
  
  maildir-filter: maildir-filter.o
diff -Nru maildir-filter-1.20/debian/rules maildir-filter-1.20/debian/rules
--- maildir-filter-1.20/debian/rules	2016-09-16 18:31:24.000000000 -0400
+++ maildir-filter-1.20/debian/rules	2016-11-25 23:03:42.000000000 -0500
@@ -1,7 +1,6 @@
 #!/usr/bin/make -f
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-export DEB_LDFLAGS_MAINT_APPEND = -lpcre
 
 %:
 	dh $@

Reply to: