Package: gimp-plugin-registry
Version: 5.20120621
Severity: important
Tags: patch
User: [email protected]
Usertags: no-add-needed

Dear Maintainer,

gimp-plugin-registry fails to build with ld --no-add-needed as some
plugins do not link against libm which they use directly.

This flag is set by default in Debian but due to a bug in binutils it
only triggers in experimental (and ubuntu)
I also fixed a LFGLAGS -> LDFLAGS which I assume is just a typo in
common.mk

Thanks for considering the patch.


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

Kernel: Linux 3.8.0-16-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru gimp-plugin-registry-5.20120621ubuntu1/debian/patches/ld-no-add-needed.patch gimp-plugin-registry-5.20120621ubuntu2/debian/patches/ld-no-add-needed.patch
--- gimp-plugin-registry-5.20120621ubuntu1/debian/patches/ld-no-add-needed.patch	1970-01-01 01:00:00.000000000 +0100
+++ gimp-plugin-registry-5.20120621ubuntu2/debian/patches/ld-no-add-needed.patch	2013-04-04 23:59:20.000000000 +0200
@@ -0,0 +1,68 @@
+Description: link plugins with the needed libm
+ required by ld --no-add-needed
+--- a/focus-blur/src/src/Makefile.am
++++ b/focus-blur/src/src/Makefile.am
+@@ -59,7 +59,8 @@ INCLUDES = \
+ LDADD = \
+ 	$(GTHREAD_LIBS)		\
+ 	$(GIMP_LIBS)		\
+-	$(FFTW3_LIBS)
++	$(FFTW3_LIBS)           \
++	-lm
+ 
+ focusblurstock.$(OBJEXT): $(top_srcdir)/pixmaps/pixbufs.h
+ $(top_srcdir)/pixmaps/pixbufs.h:
+--- a/focus-blur/src/src/Makefile.in
++++ b/focus-blur/src/src/Makefile.in
+@@ -228,7 +228,8 @@ INCLUDES = \
+ LDADD = \
+ 	$(GTHREAD_LIBS)		\
+ 	$(GIMP_LIBS)		\
+-	$(FFTW3_LIBS)
++	$(FFTW3_LIBS)           \
++	-lm
+ 
+ all: all-am
+ 
+--- a/common.mk
++++ b/common.mk
+@@ -1,7 +1,7 @@
+ GIMPTOOL = /usr/bin/gimptool-2.0
+ 
+ %: %.c
+-	CFLAGS="$(CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(LFGLAGS) $(EXTRA_LDFLAGS)" $(GIMPTOOL) --build $<
++	CFLAGS="$(CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(LDFLAGS) $(EXTRA_LDFLAGS)" LIBS="$(LIBS) -lm" $(GIMPTOOL) --build $<
+ 
+ build: $(PLUGIN)
+ 
+--- a/separate+/separate+/Makefile
++++ b/separate+/separate+/Makefile
+@@ -37,7 +37,7 @@ CM      = -DENABLE_COLOR_MANAGEMENT
+ NLS     = -DENABLE_NLS -DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""
+ SEP_CFLAGS += $(GIMP_INCLUDE) $(GTK_INCLUDE) $(LCMS_INCLUDE) $(CM) $(NLS) \
+           -DUSE_ICC_BUTTON
+-LIBS    = $(GIMP_LIB) $(GTK_LIB) $(LCMS_LIB) $(TIFF_LIB) $(JPEG_LIB)
++LIBS    = $(GIMP_LIB) $(GTK_LIB) $(LCMS_LIB) $(TIFF_LIB) $(JPEG_LIB) -lm
+ 
+ SOURCES = $(SEPARATE_SOURCES) $(IMPORT_SOURCES) \
+           $(ICC_COLORSPACE_SOURCES) $(EXTRA_SOURCES)
+--- a/wavelet-denoise/wavelet-denoise-0.3.1/src/Makefile
++++ b/wavelet-denoise/wavelet-denoise-0.3.1/src/Makefile
+@@ -1,5 +1,5 @@
+ CFLAGS = -O3 -Wall $(shell gimptool-2.0 --cflags)
+-LIBS = $(shell gimptool-2.0 --libs)
++LIBS = $(shell gimptool-2.0 --libs) -lm
+ PLUGIN = wavelet-denoise
+ SOURCES = plugin.c colorspace.c denoise.c wavelet.c events.c interface.c
+ HEADERS = plugin.h interface.h messages.h
+--- a/normalmap/gimp-normalmap-1.2.2/Makefile.linux
++++ b/normalmap/gimp-normalmap-1.2.2/Makefile.linux
+@@ -11,7 +11,7 @@ TARGET=normalmap
+ OBJS=normalmap.o preview3d.o scale.o
+ 
+ LIBS=`pkg-config --libs gtk+-2.0 gtkglext-1.0 gimp-2.0 gimpui-2.0` \
+--L/usr/X11R6/lib -lGLEW
++-L/usr/X11R6/lib -lGLEW -lm
+ 
+ all: $(TARGET)
+ 
diff -Nru gimp-plugin-registry-5.20120621ubuntu1/debian/patches/series gimp-plugin-registry-5.20120621ubuntu2/debian/patches/series
--- gimp-plugin-registry-5.20120621ubuntu1/debian/patches/series	2012-06-21 22:55:54.000000000 +0200
+++ gimp-plugin-registry-5.20120621ubuntu2/debian/patches/series	2013-04-04 23:33:33.000000000 +0200
@@ -13,3 +13,4 @@
 refocus_lapack.diff
 refocus_fix_warnings.diff
 gcc4.3-fixes.diff
+ld-no-add-needed.patch

Reply via email to