Built OCaml bindings with distribution CFLAGS and consolidated patches

Fixed Cython build requires
Used macro for python3 path
This commit is contained in:
Jaroslav Škarvada 2018-12-05 21:03:29 +01:00
parent b19c3d962d
commit 281f6b7568
4 changed files with 61 additions and 54 deletions

View File

@ -1,15 +1,5 @@
From bc609b45ee5b44247d528e9462cb28792753a267 Mon Sep 17 00:00:00 2001
From: Dave Mielke <dave@mielke.cc>
Date: Tue, 24 Apr 2018 17:41:28 -0400
Subject: [PATCH] The distribution-supplied LDFLAGS should also be used when
making shared objects. (dm)
---
configure.ac | 73 +++++++++++++++++++++++++++++++-----------------------------
1 file changed, 38 insertions(+), 35 deletions(-)
diff --git a/configure.ac b/configure.ac
index 906a8f632..4e8b0ccb7 100644
index 7d93d8b..8938c6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -377,7 +377,7 @@ in
@ -106,3 +96,15 @@ index 906a8f632..4e8b0ccb7 100644
AC_SUBST([MKSHR], ["${brltty_cv_prog_make_object_shared}"])
AC_CACHE_CHECK([for make relocatable object command], [brltty_cv_prog_make_object_relocatable], [dnl
@@ -541,9 +544,9 @@ in
esac
if test "${GCC}" = "yes"
then
- brltty_cv_prog_mklib="\$(CC) ${brltty_mklib_gcc_make=-shared} BRLTTY_OPTIONS_LD2CC([${brltty_mklib_ld_options+${brltty_mklib_ld_options} <name>}]) -o"
+ brltty_cv_prog_mklib="\$(CC) \$(LDFLAGS) ${brltty_mklib_gcc_make=-shared} BRLTTY_OPTIONS_LD2CC([${brltty_mklib_ld_options+${brltty_mklib_ld_options} <name>}]) -o"
else
- brltty_cv_prog_mklib="\$(LD) ${brltty_mklib_ld_make} ${brltty_mklib_ld_options+${brltty_mklib_ld_options} <name>} -o"
+ brltty_cv_prog_mklib="\$(LD) \$(LDFLAGS) ${brltty_mklib_ld_make} ${brltty_mklib_ld_options+${brltty_mklib_ld_options} <name>} -o"
fi])
AC_SUBST([MKLIB], ["${brltty_cv_prog_mklib}"])

View File

@ -1,36 +0,0 @@
diff --git a/Bindings/OCaml/Makefile.in b/Bindings/OCaml/Makefile.in
index 47f7201..469f41e 100644
--- a/Bindings/OCaml/Makefile.in
+++ b/Bindings/OCaml/Makefile.in
@@ -55,13 +55,13 @@ OCAML_FILES = $(OCAML_MISC) $(OCAML_CLIBS) $(OCAML_BCLIB) $(OCAML_NCLIB)
all : $(OCAML_FILES)
$(OCAML_CLIBS) : brlapi_stubs.$O brlapi
- $(OCAMLMKLIB) $(API_LDFLAGS) -oc $(OCAML_LIB)_stubs brlapi_stubs.$O
+ $(OCAMLMKLIB) -ldopt "$(LDFLAGS)" $(API_LDFLAGS) -oc $(OCAML_LIB)_stubs brlapi_stubs.$O
$(OCAML_BCLIB) : $(OCAML_CLIBS) brlapi.cmo
$(OCAMLC) -a $(OCAMLMKLIB_FLAGS) -o $(OCAML_LIB).cma brlapi.cmo
$(OCAML_NCLIB) : $(OCAML_CLIBS) brlapi.cmx
- $(OCAMLMKLIB) $(OCAMLMKLIBOPT_FLAGS) -o $(OCAML_LIB) brlapi.cmx
+ $(OCAMLMKLIB) -ldopt "$(LDFLAGS)" $(OCAMLMKLIBOPT_FLAGS) -o $(OCAML_LIB) brlapi.cmx
brlapi.cmi: brlapi.mli
$(OCAMLC) -o $@ -c brlapi.mli
diff --git a/configure.ac b/configure.ac
index daed454..8938c6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -544,9 +544,9 @@ in
esac
if test "${GCC}" = "yes"
then
- brltty_cv_prog_mklib="\$(CC) ${brltty_mklib_gcc_make=-shared} BRLTTY_OPTIONS_LD2CC([${brltty_mklib_ld_options+${brltty_mklib_ld_options} <name>}]) -o"
+ brltty_cv_prog_mklib="\$(CC) \$(LDFLAGS) ${brltty_mklib_gcc_make=-shared} BRLTTY_OPTIONS_LD2CC([${brltty_mklib_ld_options+${brltty_mklib_ld_options} <name>}]) -o"
else
- brltty_cv_prog_mklib="\$(LD) ${brltty_mklib_ld_make} ${brltty_mklib_ld_options+${brltty_mklib_ld_options} <name>} -o"
+ brltty_cv_prog_mklib="\$(LD) \$(LDFLAGS) ${brltty_mklib_ld_make} ${brltty_mklib_ld_options+${brltty_mklib_ld_options} <name>} -o"
fi])
AC_SUBST([MKLIB], ["${brltty_cv_prog_mklib}"])

View File

@ -0,0 +1,36 @@
diff --git a/Bindings/OCaml/Makefile.in b/Bindings/OCaml/Makefile.in
index 47f7201..7d56ef1 100644
--- a/Bindings/OCaml/Makefile.in
+++ b/Bindings/OCaml/Makefile.in
@@ -55,25 +55,25 @@ OCAML_FILES = $(OCAML_MISC) $(OCAML_CLIBS) $(OCAML_BCLIB) $(OCAML_NCLIB)
all : $(OCAML_FILES)
$(OCAML_CLIBS) : brlapi_stubs.$O brlapi
- $(OCAMLMKLIB) $(API_LDFLAGS) -oc $(OCAML_LIB)_stubs brlapi_stubs.$O
+ $(OCAMLMKLIB) -ldopt "$(LDFLAGS)" $(API_LDFLAGS) -oc $(OCAML_LIB)_stubs brlapi_stubs.$O
$(OCAML_BCLIB) : $(OCAML_CLIBS) brlapi.cmo
- $(OCAMLC) -a $(OCAMLMKLIB_FLAGS) -o $(OCAML_LIB).cma brlapi.cmo
+ $(OCAMLC) -ccopt "$(CFLAGS)" -a $(OCAMLMKLIB_FLAGS) -o $(OCAML_LIB).cma brlapi.cmo
$(OCAML_NCLIB) : $(OCAML_CLIBS) brlapi.cmx
- $(OCAMLMKLIB) $(OCAMLMKLIBOPT_FLAGS) -o $(OCAML_LIB) brlapi.cmx
+ $(OCAMLMKLIB) -ldopt "$(LDFLAGS)" $(OCAMLMKLIBOPT_FLAGS) -o $(OCAML_LIB) brlapi.cmx
brlapi.cmi: brlapi.mli
- $(OCAMLC) -o $@ -c brlapi.mli
+ $(OCAMLC) -ccopt "$(CFLAGS)" -o $@ -c brlapi.mli
brlapi.cmo: brlapi.ml brlapi.cmi
- $(OCAMLC) -o $@ -c brlapi.ml
+ $(OCAMLC) -ccopt "$(CFLAGS)" -o $@ -c brlapi.ml
brlapi.cmx: brlapi.ml brlapi.cmi
$(OCAMLOPT) -o $@ -c brlapi.cmx brlapi.ml
brlapi_stubs.$O: $(SRC_DIR)/brlapi_stubs.c
- $(OCAMLC) -I $(BLD_TOP)$(PGM_DIR) -I $(SRC_TOP)$(PGM_DIR) -c $(SRC_DIR)/brlapi_stubs.c
+ $(OCAMLC) -ccopt "$(CFLAGS)" -I $(BLD_TOP)$(PGM_DIR) -I $(SRC_TOP)$(PGM_DIR) -c $(SRC_DIR)/brlapi_stubs.c
brlapi.mli : $(SRC_DIR)/main.mli constants.mli
cat $(SRC_DIR)/main.mli constants.mli > $@

View File

@ -33,7 +33,7 @@
Name: brltty
Version: %{pkg_version}
Release: 27%{?dist}
Release: 28%{?dist}
License: LGPLv2+
URL: http://brltty.app/
Source0: http://brltty.app/archive/%{name}-%{version}.tar.xz
@ -48,10 +48,9 @@ Patch1: brltty-loadLibrary.patch
Patch2: brltty-5.0-libspeechd.patch
# Upstream patch (commits 9476bc50dc8 and 796fb282e3):
Patch3: 0001-Add-support-for-eSpeak-NG.patch
# https://github.com/brltty/brltty/commit/bc609b45ee5b44247d528e9462cb28792753a267
# Upstreamed
Patch4: brltty-5.6-libs-add-ldflags.patch
# https://github.com/brltty/brltty/commit/03110db3ca9110d6fb2f7056d62fc07418c4024e
Patch5: brltty-5.6-libs-add-ldflags2.patch
Patch5: brltty-5.6-ocaml-add-flags.patch
Summary: Braille display driver for Linux/Unix
BuildRequires: byacc, glibc-kernheaders, bluez-libs-devel, systemd
BuildRequires: gettext, at-spi2-core-devel, alsa-lib-devel
@ -176,6 +175,7 @@ This package provides the Tcl binding for BrlAPI.
Version: %{api_version}
License: LGPLv2+
Requires: brlapi%{?_isa} = %{api_version}-%{release}
BuildRequires: Cython
BuildRequires: python2-devel
BuildRequires: python2-setuptools
Summary: Python binding for BrlAPI
@ -239,7 +239,7 @@ pushd python2
%patch2 -p1 -b .libspeechd
%patch3 -p1 -b .espeak-ng
%patch4 -p1 -b .libs-add-ldflags
%patch5 -p1 -b .libs-add-ldflags2
%patch5 -p1 -b .ocaml-add-flags
# remove packaged binary file
rm -f Programs/brltty-ktb
@ -299,7 +299,7 @@ PYTHONS="$PYTHONS python2"
# ... and then do it again for the Python 3 module
pushd python3
./autogen
%configure $configure_opts PYTHON=%{__python3}
%configure $configure_opts PYTHON=%{__python3} CYTHON=%{_bindir}/cython
make
popd
PYTHONS="$PYTHONS python3"
@ -402,7 +402,7 @@ cp -p %{name}.lang ../
#Use python 3 for latex-access, BZ 1465657.
/usr/bin/2to3 -wn ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
sed -i 's|/usr/bin/python|/usr/bin/python3|g' ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
sed -i 's|/usr/bin/python|%{__python3}|g' ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
popd
#install dracut module
@ -534,6 +534,11 @@ fi
%{_prefix}/lib/dracut/modules.d/99brltty/
%changelog
* Wed Dec 5 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 5.6-28
- Built OCaml bindings with distribution CFLAGS and consolidated patches
- Fixed Cython build requires
- Used macro for python3 path
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.6-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild