Author: steve-guest Date: 2012-05-28 21:39:07 +0000 (Mon, 28 May 2012) New Revision: 13639
Added: packages/trunk/jstest-gtk/debian/patches/flags-from-env.patch Removed: packages/trunk/jstest-gtk/debian/options.cache packages/trunk/jstest-gtk/debian/patches/strict-dependencies.patch Modified: packages/trunk/jstest-gtk/debian/changelog packages/trunk/jstest-gtk/debian/patches/series packages/trunk/jstest-gtk/debian/rules Log: Rework flag management to allow hardened builds. Modified: packages/trunk/jstest-gtk/debian/changelog =================================================================== --- packages/trunk/jstest-gtk/debian/changelog 2012-05-28 21:37:58 UTC (rev 13638) +++ packages/trunk/jstest-gtk/debian/changelog 2012-05-28 21:39:07 UTC (rev 13639) @@ -14,6 +14,7 @@ * Re-enable typos.patch to fix another typo. * Update copyright years and format URL. * Rework libraries.patch to use pkg-config for all libraries. + * Rework flag management to allow hardened builds. -- Stephen Kitt <[email protected]> Fri, 25 May 2012 06:42:17 +0200 Deleted: packages/trunk/jstest-gtk/debian/options.cache =================================================================== --- packages/trunk/jstest-gtk/debian/options.cache 2012-05-28 21:37:58 UTC (rev 13638) +++ packages/trunk/jstest-gtk/debian/options.cache 2012-05-28 21:39:07 UTC (rev 13639) @@ -1,4 +0,0 @@ -CC = 'gcc' -CXX = 'g++' -CCFLAGS = ' :CFLAGS: ' -CXXFLAGS = ' :CFLAGS: ' Added: packages/trunk/jstest-gtk/debian/patches/flags-from-env.patch =================================================================== --- packages/trunk/jstest-gtk/debian/patches/flags-from-env.patch (rev 0) +++ packages/trunk/jstest-gtk/debian/patches/flags-from-env.patch 2012-05-28 21:39:07 UTC (rev 13639) @@ -0,0 +1,21 @@ +Description: Pass build flags from the environment +Author: Stephen Kitt <[email protected]> +Forwarded: no + +--- jstest-gtk-0.1.1~git20090722.orig/SConstruct ++++ jstest-gtk-0.1.1~git20090722/SConstruct +@@ -15,8 +15,13 @@ + ## You should have received a copy of the GNU General Public License + ## along with this program. If not, see <http://www.gnu.org/licenses/>. + +-env = Environment(CXXFLAGS=["-g", "-Wall", "-Werror"]) ++import os ++env = Environment() + env.ParseConfig('pkg-config --cflags --libs gtkmm-2.4 sigc++-2.0 expat x11') ++env.Append(CPPFLAGS = os.environ['CPPFLAGS'], ++ CFLAGS = os.environ['CFLAGS'], ++ CXXFLAGS = os.environ['CXXFLAGS'], ++ LINKFLAGS = os.environ['LINKFLAGS']) + env.Program('jstest-gtk', [ + 'src/axis_widget.cpp', + 'src/button_widget.cpp', Modified: packages/trunk/jstest-gtk/debian/patches/series =================================================================== --- packages/trunk/jstest-gtk/debian/patches/series 2012-05-28 21:37:58 UTC (rev 13638) +++ packages/trunk/jstest-gtk/debian/patches/series 2012-05-28 21:39:07 UTC (rev 13639) @@ -1,6 +1,6 @@ datadir.patch libraries.patch -strict-dependencies.patch +flags-from-env.patch persistent-settings.patch gcc-4.7.patch typos.patch Deleted: packages/trunk/jstest-gtk/debian/patches/strict-dependencies.patch =================================================================== --- packages/trunk/jstest-gtk/debian/patches/strict-dependencies.patch 2012-05-28 21:37:58 UTC (rev 13638) +++ packages/trunk/jstest-gtk/debian/patches/strict-dependencies.patch 2012-05-28 21:39:07 UTC (rev 13639) @@ -1,14 +0,0 @@ -Description: Only link required libraries ("--as-needed") -Author: Miriam Ruiz <[email protected]> -Forwarded: no - ---- jstest-gtk-0.1.1~git20090722.orig/SConstruct -+++ jstest-gtk-0.1.1~git20090722/SConstruct -@@ -16,6 +16,7 @@ - ## along with this program. If not, see <http://www.gnu.org/licenses/>. - - env = Environment(CXXFLAGS=["-g", "-Wall", "-Werror"], -+ LINKFLAGS=["-Wl,-z,defs", "-Wl,--as-needed"], - LIBS=["expat", "X11"]) - env.ParseConfig('pkg-config --cflags --libs gtkmm-2.4 sigc++-2.0') - env.Program('jstest-gtk', [ Modified: packages/trunk/jstest-gtk/debian/rules =================================================================== --- packages/trunk/jstest-gtk/debian/rules 2012-05-28 21:37:58 UTC (rev 13638) +++ packages/trunk/jstest-gtk/debian/rules 2012-05-28 21:39:07 UTC (rev 13639) @@ -3,16 +3,19 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -config: config-stamp -config-stamp: - dh_testdir - sed -e 's/:CFLAGS:/$(CFLAGS)/' < debian/options.cache > options.cache - touch $@ +CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) +CFLAGS := $(shell dpkg-buildflags --get CFLAGS) +CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) +LDFLAGS := $(shell DEB_LDFLAGS_MAINT_APPEND="-Wl,-z,defs -Wl,--as-needed" dpkg-buildflags --get LDFLAGS) +# SCons passes $LINKFLAGS to the compiler as a single argument +# so we build up a single -Wl argument +LINKFLAGS = -Wl$(shell for arg in $(subst -Wl,,$(LDFLAGS)); do echo -n $$arg; done) +export CPPFLAGS CFLAGS CXXFLAGS LINKFLAGS build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp -build-stamp: config-stamp +build-stamp: dh_testdir scons \ prefix=/usr \ _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

