[jsl] Fix rawhide build

Lubomir Rintel lkundrak at fedoraproject.org
Thu May 15 12:26:49 UTC 2014


commit aa6060e5c9cd63949401b8aa8ca03118bc5f766c
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Thu May 15 14:26:26 2014 +0200

    Fix rawhide build
    
    Drop use of bundled editline, use readline instead
    Don't let the compiler warnings break build

 jsl-0.3.0-wall.patch |  254 ++++++++++++++++++++++++++++++++++++++++++++++++++
 jsl.spec             |   10 ++-
 2 files changed, 263 insertions(+), 1 deletions(-)
---
diff --git a/jsl-0.3.0-wall.patch b/jsl-0.3.0-wall.patch
new file mode 100644
index 0000000..a7f424d
--- /dev/null
+++ b/jsl-0.3.0-wall.patch
@@ -0,0 +1,254 @@
+From d7b59fe5f9b954b7f852a5dcd31aa4de033dc804 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Thu, 15 May 2014 14:25:17 +0200
+Subject: [PATCH] Drop -Wall
+
+It's never correct to use it for production builds.
+Warnings don't need to indicate an actual bug in the code.
+Plus compilers change. And the libraries do.
+---
+ src/config/Darwin.mk       | 2 +-
+ src/config/Darwin1.3.mk    | 2 +-
+ src/config/Darwin5.2.mk    | 2 +-
+ src/config/Darwin5.3.mk    | 2 +-
+ src/config/HP-UXB.10.10.mk | 2 +-
+ src/config/HP-UXB.10.20.mk | 2 +-
+ src/config/HP-UXB.11.00.mk | 4 ++--
+ src/config/IRIX.mk         | 2 +-
+ src/config/Linux_All.mk    | 2 +-
+ src/config/Mac_OS10.0.mk   | 2 +-
+ src/config/OSF1V4.0.mk     | 2 +-
+ src/config/OSF1V5.0.mk     | 2 +-
+ src/config/SunOS4.1.4.mk   | 2 +-
+ src/config/SunOS5.3.mk     | 2 +-
+ src/config/SunOS5.4.mk     | 2 +-
+ src/config/SunOS5.5.mk     | 2 +-
+ src/config/SunOS5.6.mk     | 2 +-
+ 17 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/src/config/Darwin.mk b/src/config/Darwin.mk
+index 9b9b6ff..24f7b06 100644
+--- a/src/config/Darwin.mk
++++ b/src/config/Darwin.mk
+@@ -45,7 +45,7 @@
+ 
+ CC = cc
+ CCC = g++
+-CFLAGS +=  -Wall -Wno-format
++CFLAGS +=  -Wno-format
+ OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN
+ 
+ RANLIB = ranlib
+diff --git a/src/config/Darwin1.3.mk b/src/config/Darwin1.3.mk
+index 05d3767..5ec0c11 100644
+--- a/src/config/Darwin1.3.mk
++++ b/src/config/Darwin1.3.mk
+@@ -45,7 +45,7 @@
+ 
+ CC = cc
+ CCC = g++
+-CFLAGS +=  -Wall -Wno-format
++CFLAGS +=  -Wno-format
+ OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DRHAPSODY
+ 
+ RANLIB = ranlib
+diff --git a/src/config/Darwin5.2.mk b/src/config/Darwin5.2.mk
+index 9b9b6ff..24f7b06 100644
+--- a/src/config/Darwin5.2.mk
++++ b/src/config/Darwin5.2.mk
+@@ -45,7 +45,7 @@
+ 
+ CC = cc
+ CCC = g++
+-CFLAGS +=  -Wall -Wno-format
++CFLAGS +=  -Wno-format
+ OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN
+ 
+ RANLIB = ranlib
+diff --git a/src/config/Darwin5.3.mk b/src/config/Darwin5.3.mk
+index 9b9b6ff..24f7b06 100644
+--- a/src/config/Darwin5.3.mk
++++ b/src/config/Darwin5.3.mk
+@@ -45,7 +45,7 @@
+ 
+ CC = cc
+ CCC = g++
+-CFLAGS +=  -Wall -Wno-format
++CFLAGS +=  -Wno-format
+ OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN
+ 
+ RANLIB = ranlib
+diff --git a/src/config/HP-UXB.10.10.mk b/src/config/HP-UXB.10.10.mk
+index 8cd9d20..4d5a6cc 100644
+--- a/src/config/HP-UXB.10.10.mk
++++ b/src/config/HP-UXB.10.10.mk
+@@ -43,7 +43,7 @@
+ 
+ # CC = gcc
+ # CCC = g++
+-# CFLAGS +=  -Wall -Wno-format -fPIC
++# CFLAGS +=  -Wno-format -fPIC
+ 
+ CC  = cc -Ae +Z
+ CCC = CC -Ae +a1 +eh +Z
+diff --git a/src/config/HP-UXB.10.20.mk b/src/config/HP-UXB.10.20.mk
+index 8cd9d20..4d5a6cc 100644
+--- a/src/config/HP-UXB.10.20.mk
++++ b/src/config/HP-UXB.10.20.mk
+@@ -43,7 +43,7 @@
+ 
+ # CC = gcc
+ # CCC = g++
+-# CFLAGS +=  -Wall -Wno-format -fPIC
++# CFLAGS +=  -Wno-format -fPIC
+ 
+ CC  = cc -Ae +Z
+ CCC = CC -Ae +a1 +eh +Z
+diff --git a/src/config/HP-UXB.11.00.mk b/src/config/HP-UXB.11.00.mk
+index 239188d..1a0f1ee 100644
+--- a/src/config/HP-UXB.11.00.mk
++++ b/src/config/HP-UXB.11.00.mk
+@@ -45,8 +45,8 @@ ifdef NS_USE_NATIVE
+   CC  = cc +Z +DAportable +DS2.0 +u4
+ #  LD  = aCC +Z -b -Wl,+s -Wl,-B,symbolic
+ else
+-  CC = gcc -Wall -Wno-format -fPIC
+-  CCC = g++ -Wall -Wno-format -fPIC
++  CC = gcc -Wno-format -fPIC
++  CCC = g++ -Wno-format -fPIC
+ endif
+ 
+ RANLIB = echo
+diff --git a/src/config/IRIX.mk b/src/config/IRIX.mk
+index 88b162f..aef0dc7 100644
+--- a/src/config/IRIX.mk
++++ b/src/config/IRIX.mk
+@@ -52,7 +52,7 @@ ifndef NS_USE_NATIVE
+ CC = gcc
+ CCC = g++
+ AS = $(CC) -x assembler-with-cpp
+-ODD_CFLAGS = -Wall -Wno-format
++ODD_CFLAGS = -Wno-format
+ ifdef BUILD_OPT
+ OPTIMIZER = -O6
+ endif
+diff --git a/src/config/Linux_All.mk b/src/config/Linux_All.mk
+index 0c43df4..4363f85 100644
+--- a/src/config/Linux_All.mk
++++ b/src/config/Linux_All.mk
+@@ -43,7 +43,7 @@
+ 
+ CC = gcc
+ CCC = g++
+-CFLAGS +=  -Wall -Wno-format
++CFLAGS +=  -Wno-format
+ OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R
+ 
+ RANLIB = echo
+diff --git a/src/config/Mac_OS10.0.mk b/src/config/Mac_OS10.0.mk
+index 74ba151..47eb428 100644
+--- a/src/config/Mac_OS10.0.mk
++++ b/src/config/Mac_OS10.0.mk
+@@ -45,7 +45,7 @@
+ 
+ CC = cc
+ CCC = g++
+-CFLAGS +=  -Wall -Wno-format
++CFLAGS +=  -Wno-format
+ OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE 
+ -DRHAPSODY
+ 
+diff --git a/src/config/OSF1V4.0.mk b/src/config/OSF1V4.0.mk
+index 337ca74..ae7308a 100644
+--- a/src/config/OSF1V4.0.mk
++++ b/src/config/OSF1V4.0.mk
+@@ -48,7 +48,7 @@
+ ifndef NS_USE_NATIVE
+ CC = gcc
+ CCC = g++
+-CFLAGS +=  -mieee -Wall -Wno-format
++CFLAGS +=  -mieee -Wno-format
+ else
+ CC  = cc
+ CCC = cxx
+diff --git a/src/config/OSF1V5.0.mk b/src/config/OSF1V5.0.mk
+index b65738c..7639dba 100644
+--- a/src/config/OSF1V5.0.mk
++++ b/src/config/OSF1V5.0.mk
+@@ -48,7 +48,7 @@
+ ifndef NS_USE_NATIVE
+ CC = gcc
+ CCC = g++
+-CFLAGS +=  -mieee -Wall -Wno-format
++CFLAGS +=  -mieee -Wno-format
+ else
+ CC  = cc
+ CCC = cxx
+diff --git a/src/config/SunOS4.1.4.mk b/src/config/SunOS4.1.4.mk
+index 62f4815..11255aa 100644
+--- a/src/config/SunOS4.1.4.mk
++++ b/src/config/SunOS4.1.4.mk
+@@ -57,7 +57,7 @@ MOZ_CFLAGS = -DSTRINGS_ALIGNED -DNO_REGEX -DNO_ISDIR -DUSE_RE_COMP \
+ 	     -DBOGUS_MB_MAX -DNO_CONST
+ 
+ # Purify doesn't like -MDupdate
+-NOMD_OS_CFLAGS = -DXP_UNIX -Wall -Wno-format -DSW_THREADS -DSUNOS4 -DNEED_SYSCALL \
++NOMD_OS_CFLAGS = -DXP_UNIX -Wno-format -DSW_THREADS -DSUNOS4 -DNEED_SYSCALL \
+ 		 $(MOZ_CFLAGS)
+ 
+ OS_CFLAGS = $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
+diff --git a/src/config/SunOS5.3.mk b/src/config/SunOS5.3.mk
+index bd615de..5ecf87f 100644
+--- a/src/config/SunOS5.3.mk
++++ b/src/config/SunOS5.3.mk
+@@ -43,7 +43,7 @@
+ 
+ CC = gcc
+ CCC = g++
+-CFLAGS +=  -Wall -Wno-format
++CFLAGS +=  -Wno-format
+ 
+ #CC = /opt/SUNWspro/SC3.0.1/bin/cc
+ RANLIB = echo
+diff --git a/src/config/SunOS5.4.mk b/src/config/SunOS5.4.mk
+index de01924..0540ba0 100644
+--- a/src/config/SunOS5.4.mk
++++ b/src/config/SunOS5.4.mk
+@@ -47,7 +47,7 @@ CCC = CC
+ else
+ CC = gcc
+ CCC = g++
+-CFLAGS += -Wall -Wno-format
++CFLAGS += -Wno-format
+ endif
+ 
+ RANLIB = echo
+diff --git a/src/config/SunOS5.5.mk b/src/config/SunOS5.5.mk
+index e26b3a3..928e4e9 100644
+--- a/src/config/SunOS5.5.mk
++++ b/src/config/SunOS5.5.mk
+@@ -45,7 +45,7 @@ AS = /usr/ccs/bin/as
+ ifndef NS_USE_NATIVE
+ CC = gcc
+ CCC = g++
+-CFLAGS +=  -Wall -Wno-format
++CFLAGS +=  -Wno-format
+ else
+ CC = cc
+ CCC = CC
+diff --git a/src/config/SunOS5.6.mk b/src/config/SunOS5.6.mk
+index efe1152..318f861 100644
+--- a/src/config/SunOS5.6.mk
++++ b/src/config/SunOS5.6.mk
+@@ -45,7 +45,7 @@ AS = /usr/ccs/bin/as
+ ifndef NS_USE_NATIVE
+   CC = gcc
+   CCC = g++
+-  CFLAGS +=  -Wall -Wno-format
++  CFLAGS +=  -Wno-format
+ else
+   CC = cc
+   CCC = CC
+-- 
+1.8.3.1
+
diff --git a/jsl.spec b/jsl.spec
index 3506758..c3e1a9e 100644
--- a/jsl.spec
+++ b/jsl.spec
@@ -1,6 +1,6 @@
 Name:           jsl
 Version:        0.3.0
-Release:        9%{?dist}
+Release:        10%{?dist}
 Summary:        Check JavaScript code for common mistakes
 
 Group:          Development/Tools
@@ -9,6 +9,8 @@ URL:            http://javascriptlint.com/
 Source0:        http://javascriptlint.com/download/%{name}-%{version}-src.tar.gz
 Patch0:         jsl-0.3.0-smash.patch
 Patch1:         jsl-0.3.0-tests.patch
+Patch2:         jsl-0.3.0-wall.patch
+BuildRequires:  readline-devel
 
 %description
 With JavaScript Lint, you can check all your JavaScript source code for
@@ -25,6 +27,7 @@ practices.
 %setup -q
 %patch0 -p1 -b .smash
 %patch1 -p1 -b .tests
+%patch2 -p1 -b .wall
 
 
 %build
@@ -35,6 +38,7 @@ find . -type f |xargs chmod 644 $FILES
 # Dependencies dealt with poorly -- no _smp_mflags
 make -C src -f Makefile.ref SHARED_LIBRARY= \
         OBJDIR=. JS_EDITLINE=1 XCFLAGS="%{optflags}" \
+	JS_READLINE=1 JS_EDITLINE=0 \
         OS_CFLAGS="-DXP_UNIX -DHAVE_VA_COPY -DVA_COPY=va_copy"
 
 
@@ -53,6 +57,10 @@ perl run_tests.pl ../src/jsl
 
 
 %changelog
+* Wed Dec 04 2013 Lubomir Rintel <lkundrak at v3.sk> - 0.3.0-10
+- Drop use of bundled editline, use readline instead
+- Don't let the compiler warnings break build
+
 * Wed Dec 04 2013 Lubomir Rintel <lkundrak at v3.sk> - 0.3.0-9
 - Fix build with -Werror=format-security
 


More information about the scm-commits mailing list