Remove build dependency on xxd/vim-common.

This commit is contained in:
Alexey Kopytov
2018-01-06 11:11:53 +03:00
parent 09db2db521
commit 7ee5776eff
8 changed files with 26 additions and 13 deletions

View File

@ -36,6 +36,8 @@ EXTRA_DIST = autogen.sh README.md README-WIN.txt README-Oracle.md ChangeLog \
rpm/sysbench.spec \
scripts/buildpack.sh
noinst_SCRIPTS = scripts/txt2c.sh
dist-hook:
$(MAKE) -C $(distdir)/third_party/cram clean

View File

@ -131,7 +131,7 @@ build and use an older 0.5 release on Windows.
### Debian/Ubuntu
``` shell
apt -y install make automake libtool pkg-config libaio-dev vim-common
apt -y install make automake libtool pkg-config libaio-dev
# For MySQL support
apt -y install libmysqlclient-dev
# For PostgreSQL support
@ -140,7 +140,7 @@ build and use an older 0.5 release on Windows.
### RHEL/CentOS
``` shell
yum -y install make automake libtool pkgconfig libaio-devel vim-common
yum -y install make automake libtool pkgconfig libaio-devel
# For MySQL support, replace with mysql-devel on RHEL/CentOS 5
yum -y install mariadb-devel
# For PostgreSQL support
@ -149,7 +149,7 @@ build and use an older 0.5 release on Windows.
### Fedora
``` shell
dnf -y install make automake libtool pkgconfig libaio-devel vim-common
dnf -y install make automake libtool pkgconfig libaio-devel
# For MySQL support
dnf -y install mariadb-devel
# For PostgreSQL support

View File

@ -52,11 +52,6 @@ if test x"$sb_have_pkg_config" = xno; then
AC_MSG_ERROR([the pkg-config package is required to build sysbench])
fi
AC_CHECK_PROG(sb_have_xxd, xxd, yes, no)
if test x"$sb_have_xxd" = xno; then
AC_MSG_ERROR("xxd is required to build sysbench (usually comes with the vim package)")
fi
AX_COMPILER_VENDOR
# Checks for user arguments

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
sysbench (1.0.12-1) unstable; urgency=low
* remove vim-common from build dependencies
-- Alexey Kopytov <akopytov@gmail.com> Sat, 06 Jan 2018 10:59:42 +0300
sysbench (1.0.11-1) unstable; urgency=low
* add Debian Stretch support by adding optional build dependency on

2
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: sysbench
Section: misc
Priority: extra
Maintainer: Alexey Kopytov <akopytov@gmail.com>
Build-Depends: debhelper, autoconf, automake, libtool, libmysqlclient-dev | default-libmysqlclient-dev, libpq-dev, pkg-config, vim-common, python
Build-Depends: debhelper, autoconf, automake, libtool, libmysqlclient-dev | default-libmysqlclient-dev, libpq-dev, pkg-config, python
Standards-Version: 3.9.5
Homepage: https://github.com/akopytov/sysbench

View File

@ -19,7 +19,6 @@ BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: libaio-devel
BuildRequires: vim-common
# Use bundled cram for tests
BuildRequires: python
@ -75,6 +74,9 @@ make test
%changelog
* Sat Jan 6 2018 Alexey Kopytov <akopytov@gmail.com> - 1.0.12-1
- Remove vim-common from build dependencies.
* Sun Apr 09 2017 Alexey Kopytov <akopytov@gmail.com> - 1.0.5-1
- Add --without-gcc-arch to configure flags

View File

@ -18,11 +18,19 @@ BUILT_SOURCES = sysbench.lua.h sysbench.rand.lua.h sysbench.sql.lua.h \
sysbench.compat.lua.h sysbench.cmdline.lua.h \
sysbench.histogram.lua.h
CLEARFILES = $(BUILT_SOURCES)
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = $(BUILT_SOURCES:.h=)
SUFFIXES = .lua .lua.h
.lua.lua.h:
xxd -i $< $@
@echo "Creating $@ from $<"
@var=$$(echo $< | sed 's/\./_/g') && \
( echo "unsigned char $${var}[] =" && \
sed -e 's/\\/\\\\/g' \
-e 's/"/\\"/g' \
-e 's/^/ "/g' \
-e 's/$$/\\n"/g' $< && \
echo ";" && \
echo "size_t $${var}_len = sizeof($${var}) - 1;" ) > $@

View File

@ -99,7 +99,7 @@ typedef struct {
const char *name;
const unsigned char *source;
/* Use a pointer, since _len variables are not compile-time constants */
unsigned int *source_len;
size_t *source_len;
} internal_script_t;
typedef enum {