Package: netbeans
Version: 7.0.1+dfsg1-4
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu precise ubuntu-patch

Ubuntu still exports LDFLAGS, containing -Wl,-z,relro not recognized by mingw.
Please apply this patch, so that the package can be built unmodified (no-op for
Debian).

diff -Nru netbeans-7.0.1+dfsg1/debian/changelog 
netbeans-7.0.1+dfsg1/debian/changelog
--- netbeans-7.0.1+dfsg1/debian/changelog       2011-12-02 00:05:26.000000000 
+0000
+++ netbeans-7.0.1+dfsg1/debian/changelog       2011-12-04 21:36:57.000000000 
+0000
@@ -1,3 +1,9 @@
+netbeans (7.0.1+dfsg1-4ubuntu1) precise; urgency=low
+
+  * Filter out -Wl,-z,relro from LDFLAGS, not known by mingw.
+
+ -- Matthias Klose <d...@ubuntu.com>  Sun, 04 Dec 2011 22:34:24 +0100
+
 netbeans (7.0.1+dfsg1-4) unstable; urgency=low
 
   * Patch core.osgi to use osgi-core 4.3. (Closes: #649750)
diff -Nru netbeans-7.0.1+dfsg1/debian/rules netbeans-7.0.1+dfsg1/debian/rules
--- netbeans-7.0.1+dfsg1/debian/rules   2011-12-02 00:05:26.000000000 +0000
+++ netbeans-7.0.1+dfsg1/debian/rules   2011-12-04 21:36:38.000000000 +0000
@@ -47,6 +47,14 @@
                               grep -e '^Version' | \
                                perl -pi -e 
's/^Version:\s+(.*)\+dfsg\d+-\d+$$/$$1/')
 
+# Ubuntu sets LDFLAGS in the environment, including -Wl,-z,relro,
+# which is not recognized by mingw
+COMMA=,
+LDFLAGS := $(filter-out -Wl$(COMMA)-z$(COMMA)relro,$(LDFLAGS))
+ifneq (,$(LDFLAGS))
+  export LDFLAGS
+endif
+
 # Defined function to be used to create symlinks
 define symlink
        mkdir -p $(dir $(2))
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to