[packages/phantomjs/dev-2.1: 4/9] build with our cc/c++/flags

glen glen at pld-linux.org
Wed Mar 23 07:05:54 CET 2016


commit 24449b3c02673a0529c224f1d99a812b5a8d0767
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Mar 22 23:20:00 2016 +0200

    build with our cc/c++/flags

 phantomjs.spec | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/phantomjs.spec b/phantomjs.spec
index 1ed6e16..e4352e8 100644
--- a/phantomjs.spec
+++ b/phantomjs.spec
@@ -8,7 +8,7 @@
 Summary:	Headless WebKit with a JavaScript API
 Name:		phantomjs
 Version:	2.1.1
-Release:	0.1
+Release:	0.2
 License:	BSD
 Group:		Applications/Networking
 Source0:	https://github.com/ariya/phantomjs/archive/%{version}/%{name}-%{version}.tar.gz
@@ -32,6 +32,7 @@ BuildRequires:	giflib-devel
 BuildRequires:	linenoise-devel
 BuildRequires:	mongoose-devel
 %{?with_system_qcommandline:BuildRequires:	qcommandline-devel}
+BuildRequires:	sed >= 4.0
 BuildRequires:	unzip
 Requires:	Qt5Gui-platform-xcb
 Requires:	coffee-script
@@ -57,6 +58,22 @@ mv qtwebkit-* src/qt/qtwebkit
 touch src/qt/qtbase/.git
 touch src/qt/qtwebkit/.git
 touch src/qt/3rdparty/.git
+
+# change QMAKE FLAGS to build
+# define QMAKE_STRIP to true, so we get useful -debuginfo pkgs
+cd src/qt/qtbase
+%{__sed} -i -e '
+	s|^\(QMAKE_COMPILER *\)=.*gcc|\1= %{__cc}|;
+	s|^\(QMAKE_CC *\)=.*gcc|\1= %{__cc}|;
+	s|^\(QMAKE_CXX *\)=.*g++|\1= %{__cxx}|;
+	s|^\(QMAKE_CFLAGS_OPTIMIZE .*\)=|\1 = %{rpmcppflags} %{rpmcflags}|;
+	s|^\(QMAKE_LFLAGS *\)+=.*|\1+= %{rpmldflags}|;
+	s|^\(QMAKE_STRIP *\)=.*|\1= :|;
+	' \
+	mkspecs/common/g++-base.conf \
+	mkspecs/common/gcc-base.conf \
+	mkspecs/common/linux.conf
+cd -
 %endif
 
 # remove bundled sources
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/phantomjs.git/commitdiff/a82c74c1bebc21f1e68a4deede33d5d9c92de44c



More information about the pld-cvs-commit mailing list