[srcpd] srcpd: exclude plugin for ppc
Denis Fateyev
dfateyev at fedoraproject.org
Sun Dec 7 16:21:08 UTC 2014
commit 3fb789353aef7ca63a6019829ecb4930e85bb5c4
Author: Denis Fateyev <denis at fateyev.com>
Date: Sun Dec 7 22:19:24 2014 +0600
srcpd: exclude plugin for ppc
srcpd-2.1.2-io-conditional.patch | 110 ++++++++++++++++++++++++++++++++++++++
srcpd-2.1.2-typedef.patch | 11 ++++
srcpd.spec | 13 +++--
3 files changed, 130 insertions(+), 4 deletions(-)
---
diff --git a/srcpd-2.1.2-io-conditional.patch b/srcpd-2.1.2-io-conditional.patch
new file mode 100644
index 0000000..1e6f43a
--- /dev/null
+++ b/srcpd-2.1.2-io-conditional.patch
@@ -0,0 +1,110 @@
+--- a/configure 2013-01-26 23:11:51.000000000 +0600
++++ b/configure 2014-12-07 08:36:13.731991746 +0600
+@@ -4677,21 +4677,6 @@
+ with_DDLS88=yes
+ fi
+
+-if test "$with_DDLS88" = "yes"; then
+-
+-$as_echo "#define USE_DDLS88 1" >>confdefs.h
+-
+- ((NUM_MODULES++))
+-fi
+- if test "$with_DDLS88" = yes; then
+- USE_DDLS88_TRUE=
+- USE_DDLS88_FALSE='#'
+-else
+- USE_DDLS88_TRUE='#'
+- USE_DDLS88_FALSE=
+-fi
+-
+-
+ # Check whether --enable-hsi88 was given.
+ if test "${enable_hsi88+set}" = set; then :
+ enableval=$enable_hsi88; with_HSI88="$leval"
+@@ -5342,7 +5327,7 @@
+ _ACEOF
+
+ else
+- as_fn_error $? "essential header file is missing" "$LINENO" 5
++ with_DDLS88=no
+ fi
+
+ done
+@@ -6296,7 +6281,7 @@
+ if test "x$ac_cv_func_ioperm" = xyes; then :
+
+ else
+- as_fn_error $? "support missing" "$LINENO" 5
++ with_DDLS88=no
+ fi
+
+ fi
+@@ -6496,6 +6481,20 @@
+ am__EXEEXT_FALSE=
+ fi
+
++if test "$with_DDLS88" = "yes"; then
++
++$as_echo "#define USE_DDLS88 1" >>confdefs.h
++
++ ((NUM_MODULES++))
++fi
++ if test "$with_DDLS88" = yes; then
++ USE_DDLS88_TRUE=
++ USE_DDLS88_FALSE='#'
++else
++ USE_DDLS88_TRUE='#'
++ USE_DDLS88_FALSE=
++fi
++
+ if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+
+--- a/configure.in 2013-01-26 23:11:01.000000000 +0600
++++ b/configure.in 2014-12-07 06:49:17.876561257 +0600
+@@ -46,11 +46,6 @@
+ AC_ARG_ENABLE(ddls88,
+ AC_HELP_STRING([--disable-ddls88], [do not compile ddl-s88 module]),
+ [with_DLL88="$enableval"], [with_DDLS88=yes])
+-if test "$with_DDLS88" = "yes"; then
+- AC_DEFINE(USE_DDLS88,1, [define to 1 if you want ddl-s88 support])
+- ((NUM_MODULES++))
+-fi
+-AM_CONDITIONAL(USE_DDLS88, test "$with_DDLS88" = yes)
+
+ dnl Option to disable HSI S88 support
+ AC_ARG_ENABLE(hsi88,
+@@ -183,8 +178,7 @@
+ case $host in
+ *-*-linux*)
+ if test "$with_DDLS88" = "yes"; then
+- AC_CHECK_HEADERS(sys/io.h, ,
+- AC_MSG_ERROR(essential header file is missing))
++ AC_CHECK_HEADERS(sys/io.h, ,[with_DDLS88=no])
+ fi
+ AC_CHECK_HEADERS(linux/serial.h linux/i2c-dev.h, ,
+ AC_MSG_ERROR(essential header file is missing))
+@@ -244,7 +238,7 @@
+ case $host in
+ *-*-linux*)
+ if test "$with_DDLS88" = "yes"; then
+- AC_CHECK_FUNC(ioperm, , AC_MSG_ERROR(support missing))
++ AC_CHECK_FUNC(ioperm, ,[with_DDLS88=no])
+ fi
+ ;;
+ *-*-cygwin*)
+@@ -292,6 +286,12 @@
+ ipv6=no
+ ))
+
++if test "$with_DDLS88" = "yes"; then
++ AC_DEFINE(USE_DDLS88,1, [define to 1 if you want ddl-s88 support])
++ ((NUM_MODULES++))
++fi
++AM_CONDITIONAL(USE_DDLS88, test "$with_DDLS88" = yes)
++
+ AC_CONFIG_FILES(Makefile src/Makefile man/Makefile man/de/Makefile)
+ AC_OUTPUT
+
diff --git a/srcpd-2.1.2-typedef.patch b/srcpd-2.1.2-typedef.patch
new file mode 100644
index 0000000..1c186af
--- /dev/null
+++ b/srcpd-2.1.2-typedef.patch
@@ -0,0 +1,11 @@
+--- a/src/srcp-time.h 2009-01-19 02:24:58.000000000 +0600
++++ b/src/srcp-time.h 2014-12-07 07:57:33.428654164 +0600
+@@ -13,7 +13,7 @@
+ #include <sys/time.h>
+
+ /* time value */
+-typedef struct _VTIME
++typedef struct VTIMEDEF
+ {
+ int day;
+ int hour;
diff --git a/srcpd.spec b/srcpd.spec
index cec27ab..4f5e57a 100644
--- a/srcpd.spec
+++ b/srcpd.spec
@@ -12,7 +12,7 @@
Name: srcpd
Version: 2.1.2
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Simple Railroad Command Protocol (SRCP) server
Group: System Environment/Daemons
@@ -22,10 +22,10 @@ Source0: http://sourceforge.net/projects/srcpd/files/srcpd/%{version}/srcpd-%{ve
Source1: srcpd.service
Source2: srcpd.init
-%{?el5:BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root}
+Patch0: srcpd-2.1.2-io-conditional.patch
+Patch1: srcpd-2.1.2-typedef.patch
-# Compile errors (missing sys/io.h) on secondary architectures
-ExclusiveArch: %{ix86} %{arm} x86_64
+%{?el5:BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root}
BuildRequires: libxml2-devel
@@ -51,6 +51,8 @@ support SRCP. IANA assigned TCP port 4303 to it.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
for file in ./man/de/srcpd.* ./DESIGN ./README; do
iconv -f latin1 -t utf8 < $file > $file.new
mv -f $file.new $file
@@ -133,6 +135,9 @@ exit 0
%changelog
+* Sat Dec 06 2014 Denis Fateyev <denis at fateyev.com> - 2.1.2-6
+- Conditional build for ddls88 plugin
+
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
More information about the scm-commits
mailing list