Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139951816
D49424.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D49424.diff
View Options
diff --git a/Mk/Scripts/check_have_symbols.sh b/Mk/Scripts/check_have_symbols.sh
new file mode 100644
--- /dev/null
+++ b/Mk/Scripts/check_have_symbols.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -eu
+set -o pipefail
+
+# the 3 implementations of readelf we can use have different output, but they all have a similarity
+# for the .gnu.version_d section they all have the symbol version in last element of their output
+# and have "Name:" or "vda_name": in the 10th position, no other section displayed have this
+# it means that if there are no symbols exported then nothing matches this search pattern.
+
+STAGEDIR=$1
+shift
+ret=0
+failed=""
+for lib; do
+ if ! /usr/bin/readelf -V ${STAGEDIR}$lib | awk 'BEGIN { ret=1 } $10 == "Name:" || $10 == "vda_name:" { ret=0; exit 0 } END { exit ret }'; then
+ ret=1
+ failed="${failed} ${lib}"
+ fi
+done
+if [ "$failed" != "" ]; then
+ echo "the following libraries are supposed to have symbols versioning but they don't" >&2
+ for l in ${failed}; do
+ echo "- $l" >&2
+ done
+fi
+exit $ret
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -5394,6 +5394,12 @@
. endif
. endif #DEVELOPER
+. if defined(HAS_SYMBOL_VERSION)
+stage-sanity: check_has_symbol_version
+check_has_symbol_version:
+ ${SH} ${SCRIPTSDIR}/check_have_symbols.sh ${STAGEDIR} ${HAS_SYMBOL_VERSION}
+. endif # HAS_SYMBOL_VERSION
+
${_PORTS_DIRECTORIES}:
@${MKDIR} ${.TARGET}
@@ -5465,7 +5471,8 @@
900:add-plist-info 910:add-plist-docs 920:add-plist-examples \
930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \
${_OPTIONS_install} ${_USES_install} \
- ${_OPTIONS_stage} ${_USES_stage} ${_FEATURES_stage}
+ ${_OPTIONS_stage} ${_USES_stage} ${_FEATURES_stage} \
+ 994:stage-sanity
. if defined(DEVELOPER)
_STAGE_SEQ+= 995:stage-qa
. else
diff --git a/x11/libxkbcommon/Makefile b/x11/libxkbcommon/Makefile
--- a/x11/libxkbcommon/Makefile
+++ b/x11/libxkbcommon/Makefile
@@ -25,6 +25,8 @@
SHEBANG_FILES= test/xkeyboard-config-test.py.in \
test/*.py
+HAS_SYMBOL_VERSION= ${PREFIX}/lib/libxkbregistry.so.0.8.1
+
OPTIONS_DEFINE= EVDEV WAYLAND X11
OPTIONS_DEFAULT=EVDEV WAYLAND X11
OPTIONS_SUB= yes
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 19, 8:25 AM (1 h, 46 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27069347
Default Alt Text
D49424.diff (2 KB)
Attached To
Mode
D49424: Mk: add a new HAS_SYMBOL_VERSION
Attached
Detach File
Event Timeline
Log In to Comment