Compare commits

...

3 Commits

Author SHA1 Message Date
David Abdurachmanov 114b76c477
Add missing patch file
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-06-18 22:38:19 +02:00
David Abdurachmanov 67e2187011
Use libtirpc for xdr_* functions
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-06-18 22:37:45 +02:00
David Abdurachmanov 6cbbb1e463
Switch to use %{valgrind_arches}
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-06-05 19:32:28 +02:00
2 changed files with 130 additions and 2 deletions

116
libdap-use-libtirpc.patch Normal file
View File

@ -0,0 +1,116 @@
diff --git a/Makefile.am b/Makefile.am
index 39d226b..83f11bb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I conf -I gl/m4
aclocaldir=$(datadir)/aclocal
pkgconfigdir=$(libdir)/pkgconfig
-AM_CPPFLAGS = -I$(top_builddir)/gl -I$(top_srcdir)/gl -I$(top_srcdir)/GNU $(XML2_CFLAGS)
+AM_CPPFLAGS = -I$(top_builddir)/gl -I$(top_srcdir)/gl -I$(top_srcdir)/GNU $(XML2_CFLAGS) $(TIRPC_CFLAGS)
AM_CXXFLAGS =
if COMPILER_IS_GCC
@@ -47,8 +47,8 @@ man_MANS = getdap.1 dap-config.1 getdap4.1
groff -t -e -mandoc -Tascii $< | col -bx > $@
libparsers_la_SOURCES = $(FLEX_SRC) $(BISON_SRC)
-libparsers_la_CPPFLAGS = $(XML2_CFLAGS)
-libparsers_la_LIBADD = $(XML2_LIBS)
+libparsers_la_CPPFLAGS = $(XML2_CFLAGS) $(TIRPC_CFLAGS)
+libparsers_la_LIBADD = $(XML2_LIBS) $(TIRPC_LIBS)
libdap_la_SOURCES = $(DAP_SRC) $(GNU_SRC)
if DAP4_DEFINED
@@ -57,7 +57,7 @@ endif
libdap_la_LDFLAGS = -version-info $(LIBDAP_VERSION)
libdap_la_CPPFLAGS = $(AM_CPPFLAGS)
-libdap_la_LIBADD = $(XML2_LIBS) $(PTHREAD_LIBS) gl/libgnu.la d4_ce/libd4_ce_parser.la \
+libdap_la_LIBADD = $(XML2_LIBS) $(PTHREAD_LIBS) $(TIRPC_LIBS) gl/libgnu.la d4_ce/libd4_ce_parser.la \
d4_function/libd4_function_parser.la libparsers.la
if DAP4_DEFINED
diff --git a/conf/acinclude.m4 b/conf/acinclude.m4
index 63a17e7..2aa96bb 100644
--- a/conf/acinclude.m4
+++ b/conf/acinclude.m4
@@ -561,9 +561,21 @@ AC_DEFUN([DODS_CHECK_SIZES], [dnl
# First, we need to see if the xdr routines are in libc, librpc,
# or librpcsvc or libnsl
dap_xdrlib=
- AC_SEARCH_LIBS([xdr_void],[c rpc nsl rpcsvc],[
- dap_xdrlib=`echo $ac_res|sed -e 's/^-l//'`],[
- AC_MSG_WARN(Cannot locate library containing xdr functions.)])
+ # Check for libtirpc first:
+ PKG_PROG_PKG_CONFIG([0.9.0])
+ PKG_CHECK_MODULES([TIRPC], [libtirpc >= 1.0.3],
+ [dap_xdrlib=`echo "${TIRPC_LIBS}" | sed -e 's/^-l//'`
+ AC_SUBST([TIRPC_CFLAGS])
+ AC_SUBST([TIRPC_LIBS])
+ AC_DEFINE([HAVE_LIBTIRPC], [1], [Define to 1 to use libtirpc.])],
+ [dap_xdrlib=""]
+ )
+ AS_IF(
+ [test "$dap_xdrlib" = ""],
+ [AC_SEARCH_LIBS([xdr_void],[c rpc nsl rpcsvc],[
+ dap_xdrlib=`echo $ac_res|sed -e 's/^-l//'`],[
+ AC_MSG_WARN(Cannot locate library containing xdr functions.)])])
+
# Added for autoconf 2.59 which appears to not use/set $ac_res. jhrg
if test -z "$dap_xdrlib" ; then dap_xdrlib=c; fi
if test "$dap_xdrlib" = "none required" ; then dap_xdrlib=c; fi
diff --git a/d4_ce/Makefile.am b/d4_ce/Makefile.am
index aa1a070..fcae7a4 100644
--- a/d4_ce/Makefile.am
+++ b/d4_ce/Makefile.am
@@ -7,7 +7,7 @@ AUTOMAKE_OPTIONS = foreign
.NOTPARALLEL:
# Arrange to build with the backward compatibility mode enabled.
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/d4_ce -I$(srcdir) $(XML2_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/d4_ce -I$(srcdir) $(XML2_CFLAGS) $(TIRPC_CFLAGS)
AM_CXXFLAGS =
if COMPILER_IS_GCC
diff --git a/d4_function/Makefile.am b/d4_function/Makefile.am
index b3afae4..bf1a083 100644
--- a/d4_function/Makefile.am
+++ b/d4_function/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
.NOTPARALLEL:
# Arrange to build with the backward compatibility mode enabled.
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/d4_ce -I$(srcdir) $(XML2_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/d4_ce -I$(srcdir) $(XML2_CFLAGS) $(TIRPC_CFLAGS)
AM_CXXFLAGS =
if COMPILER_IS_GCC
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f32e7d0..d51d255 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
# Arrange to build with the backward compatibility mode enabled.
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/GNU -I$(top_srcdir)/d4_ce \
--I$(top_srcdir)/d4_function $(XML2_CFLAGS) $(CURL_CFLAGS)
+-I$(top_srcdir)/d4_function $(XML2_CFLAGS) $(CURL_CFLAGS) $(TIRPC_CFLAGS)
AM_CXXFLAGS =
if COMPILER_IS_GCC
diff --git a/unit-tests/Makefile.am b/unit-tests/Makefile.am
index 16d958a..183495d 100644
--- a/unit-tests/Makefile.am
+++ b/unit-tests/Makefile.am
@@ -7,8 +7,8 @@ AUTOMAKE_OPTIONS = foreign
# Headers in 'tests' are used by the arrayT unit tests.
-AM_CPPFLAGS = -I$(top_srcdir)/GNU -I$(top_srcdir) -I$(top_srcdir)/tests $(CURL_CFLAGS) $(XML2_CFLAGS)
-AM_LDADD = $(XML2_LIBS)
+AM_CPPFLAGS = -I$(top_srcdir)/GNU -I$(top_srcdir) -I$(top_srcdir)/tests $(CURL_CFLAGS) $(XML2_CFLAGS) $(TIRPC_CFLAGS)
+AM_LDADD = $(XML2_LIBS) $(TIRPC_LIBS)
AM_CXXFLAGS =
# CXXFLAGS =

View File

@ -1,7 +1,7 @@
Name: libdap
Summary: The C++ DAP2 library from OPeNDAP
Version: 3.18.3
Release: 5%{?dist}
Release: 5.1.riscv64%{?dist}
License: LGPLv2+
Group: Development/Libraries
@ -9,6 +9,9 @@ URL: http://www.opendap.org/
Source0: http://www.opendap.org/pub/source/libdap-%{version}.tar.gz
#Don't run HTTP tests - builders don't have network connections
Patch0: libdap-offline.patch
# glibc all xdr_* symbols are now version (i.e. in compatibility mode)
# we need to use newer, external library
Patch1: libdap-use-libtirpc.patch
# For autoreconf
BuildRequires: libtool
@ -22,7 +25,8 @@ BuildRequires: libuuid-devel
BuildRequires: libxml2-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
%ifnarch s390 %{mips}
BuildRequires: libtirpc-devel
%ifarch %{valgrind_arches}
BuildRequires: valgrind
%endif
@ -43,6 +47,7 @@ Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: curl-devel
Requires: libxml2-devel
Requires: libtirpc-devel
Requires: pkgconfig
# for the /usr/share/aclocal directory ownership
Requires: automake
@ -63,6 +68,7 @@ Documentation of the libdap library.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .offline
%patch1 -p1 -b .tirpc
iconv -f latin1 -t utf8 < COPYRIGHT_W3C > COPYRIGHT_W3C.utf8
touch -r COPYRIGHT_W3C COPYRIGHT_W3C.utf8
mv COPYRIGHT_W3C.utf8 COPYRIGHT_W3C
@ -131,6 +137,12 @@ make check
%changelog
* Mon Jun 18 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 3.18.3-5.1.riscv64
- Use libtirpc library for xdr_*
* Tue Jun 05 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 3.18.3-5.0.riscv64
- Switch to use %{valgrind_arches}
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.18.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild