summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>2014-05-22 00:22:00 -0300
committerLisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>2014-05-22 00:22:00 -0300
commitc8bb66933d7159958feaab2e286c780f2e45b3d7 (patch)
tree6ab2be0f4ccc1a8c77de2861021c2019ce67bab8
parent60c0322480c84f5552a92edee6d57181dccd7007 (diff)
downloadqtscript-c8bb66933d7159958feaab2e286c780f2e45b3d7.tar.gz
Search for private symbols at build time.
-rw-r--r--debian/changelog4
-rw-r--r--debian/copyright1
-rwxr-xr-xdebian/mark_private_symbols.sh35
-rwxr-xr-xdebian/rules5
4 files changed, 41 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 7fdd75e..cf59848 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ qtscript-opensource-src (5.3.0+dfsg-2) UNRELEASED; urgency=medium
[ Lisandro Damián Nicanor Pérez Meyer ]
* Development packages are now Arch: any and Multi-Arch: same.
+ * Search for private symbols at build time and produce a diff so as to be
+ able to get the changes from build logs.
+ - Modify mark_private_symbols.sh.
+ - Run mark_private_symbols.sh from debian/rules.
-- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Wed, 21 May 2014 23:36:18 -0300
diff --git a/debian/copyright b/debian/copyright
index 96d57f3..924f5a4 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -8,6 +8,7 @@ License: LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3
Files: debian/mark_private_symbols.sh
Copyright: 2013 Sune Vuorela <sune@debian.org>
+ 2014 Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
License: Expat
Files: debian/*
diff --git a/debian/mark_private_symbols.sh b/debian/mark_private_symbols.sh
index 80f329b..9b13f2c 100755
--- a/debian/mark_private_symbols.sh
+++ b/debian/mark_private_symbols.sh
@@ -1,5 +1,6 @@
#! /bin/sh
# Copyright (c) 2013 Sune Vuorela <sune@debian.org>
+# Copyright (c) 2014 Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,7 +21,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-PRIVATE_HEADERS=qtscript5-private-dev/usr/include
+# Usage:
+# Define DEBUG to see which symbols is being processed.
+# Define WRITERESULTS to actually mark the real symbols files.
+
+PRIVATE_HEADERS=debian/qtscript5-private-dev/usr/include
error() {
echo $@
@@ -36,7 +41,16 @@ then
error "Private headers not found"
fi
-grep -rh class ${PRIVATE_HEADERS} |
+if [ ! -n "${WRITERESULTS}" ]
+then
+ # Create a backup copy of the original symbols file.
+ for symbols_file in `ls debian/*.symbols`
+ do
+ cp $symbols_file $symbols_file.mps
+ done
+fi
+
+grep -rh class ${PRIVATE_HEADERS} |
grep EXPORT |
while read class export classname rest
do
@@ -44,7 +58,20 @@ grep -rh class ${PRIVATE_HEADERS} |
done |
while read privateclass
do
- debug marking ${privateclass} as private
- sed -i "s/\(.*${privateclass}[^ ]* *[^ ]*\)$/\1 1/" *.symbols
+ debug Marking ${privateclass} as private
+ if [ -n "${WRITERESULTS}" ]
+ then
+ sed -i "s/\(.*${privateclass}[^ ]* *[^ ]*\)$/\1 1/" debian/*.symbols
+ else
+ sed -i "s/\(.*${privateclass}[^ ]* *[^ ]*\)$/\1 1/" debian/*.symbols.mps
+ fi
done
+if [ ! -n "${WRITERESULTS}" ]
+then
+ # Diff the symbols files and output it's differences.
+ for symbols_file in `ls debian/*.symbols`
+ do
+ diff -Nau $symbols_file $symbols_file.mps
+ done
+fi
diff --git a/debian/rules b/debian/rules
index b28565c..a325489 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,6 +30,11 @@ override_dh_auto_install-indep:
override_dh_install:
dh_install --fail-missing
+override_dh_makeshlibs:
+ dh_makeshlibs
+ # Check for private symbols not marked as such. Be verbose.
+ DEBUG=1 debian/mark_private_symbols.sh
+
override_dh_builddeb:
dh_builddeb -- -Zxz