Skip to content

Commit

Permalink
Drop build dependency on perl in favour of python
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhill committed Jan 13, 2016
1 parent 6e12b6e commit 0fdac6a
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 46 deletions.
6 changes: 3 additions & 3 deletions configure.librdkafka
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ int main (void) {
mkl_mkvar_set SYMDUMPER SYMDUMPER 'echo'
fi

# The linker-script generator (lds-gen.pl) requires perl
# The linker-script generator (lds-gen.py) requires python
if [[ $WITH_LDS == y ]]; then
if ! mkl_command_check perl "HAVE_PERL" "disable" "perl -v"; then
mkl_err "disabling linker-script since perl is not available"
if ! mkl_command_check python "HAVE_PYTHON" "disable" "python -V"; then
mkl_err "disabling linker-script since python is not available"
mkl_mkvar_set WITH_LDS WITH_LDS "n"
fi
fi
Expand Down
41 changes: 0 additions & 41 deletions lds-gen.pl

This file was deleted.

35 changes: 35 additions & 0 deletions lds-gen.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env python
#
#
# Generate linker script to only expose symbols of the public API
#

import sys
import re


if __name__ == '__main__':

funcs = list()
last_line = ''

for line in sys.stdin:
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line)
if m:
sym = m.group(2)
m2 = re.match(r'(RD_UNUSED|__attribute__\(\(unused\)\))', line)
if not m2:
funcs.append(sym)
last_line = ''
else:
last_line = line

print '# Automatically generated by lds-gen.py - DO NOT EDIT'
print '{\n global:'
if len(funcs) == 0:
print ' *;'
else:
for f in sorted(funcs):
print ' %s;' % f

print '};'
2 changes: 1 addition & 1 deletion packaging/debian/control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Source: librdkafka
Priority: optional
Maintainer: Faidon Liambotis <paravoid@debian.org>
Build-Depends: debhelper (>= 9), zlib1g-dev, libssl-dev, libsasl2-dev, perl
Build-Depends: debhelper (>= 9), zlib1g-dev, libssl-dev, libsasl2-dev, python
Standards-Version: 3.9.6
Section: libs
Homepage: https://github.com/edenhill/librdkafka
Expand Down
2 changes: 1 addition & 1 deletion packaging/debian/librdkafka.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Homepage: https://github.com/edenhill/librdkafka
Standards-Version: 3.9.6
Vcs-Browser: https://github.com/edenhill/librdkafka/tree/master
Vcs-Git: git://github.com/edenhill/librdkafka.git -b master
Build-Depends: debhelper (>= 9), zlib1g-dev, libssl-dev, libsasl2-dev, perl
Build-Depends: debhelper (>= 9), zlib1g-dev, libssl-dev, libsasl2-dev, python
Package-List:
librdkafka-dev deb libdevel optional arch=any
librdkafka1 deb libs optional arch=any
Expand Down

0 comments on commit 0fdac6a

Please sign in to comment.