From 7e7811ba657962e49e38f5578f5107d25d4cf5e3d1f1d5549245de49cd054904 Mon Sep 17 00:00:00 2001 From: Detlef Steuer Date: Mon, 26 Sep 2011 13:22:45 +0000 Subject: [PATCH] Accepting request 84886 from home:jengelh:science cddlib: Library for finding vertices of convex polytopes OBS-URL: https://build.opensuse.org/request/show/84886 OBS-URL: https://build.opensuse.org/package/show/science/cddlib?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + cddlib-094f.tar.xz | 3 ++ cddlib-flags.diff | 72 ++++++++++++++++++++++++++++++++++++++ cddlib-shared.diff | 79 +++++++++++++++++++++++++++++++++++++++++ cddlib.spec | 87 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 265 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cddlib-094f.tar.xz create mode 100644 cddlib-flags.diff create mode 100644 cddlib-shared.diff create mode 100644 cddlib.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cddlib-094f.tar.xz b/cddlib-094f.tar.xz new file mode 100644 index 0000000..4615402 --- /dev/null +++ b/cddlib-094f.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9366e0a2ac5e0aa249c27813d5fa518df3270c79540d822221791b7cc7832dde +size 944252 diff --git a/cddlib-flags.diff b/cddlib-flags.diff new file mode 100644 index 0000000..4359aa0 --- /dev/null +++ b/cddlib-flags.diff @@ -0,0 +1,72 @@ +From: Jan Engelhardt +Date: 2011-09-26 14:49:00.979547210 +0200 +Upstream: dead + +Replace old variable names by new ones. + +--- + configure.in | 7 ++++--- + lib-src-gmp/Makefile.am | 2 +- + src-gmp/Makefile.am | 6 +++--- + src/Makefile.am | 4 ++-- + 4 files changed, 10 insertions(+), 9 deletions(-) + +Index: cddlib-094f/configure.in +=================================================================== +--- cddlib-094f.orig/configure.in ++++ cddlib-094f/configure.in +@@ -1,8 +1,8 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_INIT() ++AC_INIT([cddlib], [0.94]) + + dnl Init automake. +-AM_INIT_AUTOMAKE(cddlib, 0.94) ++AM_INIT_AUTOMAKE([-Wall foreign]) + + dnl Checks for programs. + AC_PROG_CC +@@ -26,4 +26,5 @@ AC_C_CONST + + dnl Checks for library functions. + +-AC_OUTPUT(lib-src/Makefile src/Makefile lib-src-gmp/Makefile src-gmp/Makefile Makefile) ++AC_CONFIG_FILES([lib-src/Makefile src/Makefile lib-src-gmp/Makefile src-gmp/Makefile Makefile]) ++AC_OUTPUT +Index: cddlib-094f/lib-src-gmp/Makefile.am +=================================================================== +--- cddlib-094f.orig/lib-src-gmp/Makefile.am ++++ cddlib-094f/lib-src-gmp/Makefile.am +@@ -25,5 +25,5 @@ cddtypes_f.h \ + setoper.h + + AM_CPPFLAGS = -DGMPRATIONAL +-INCLUDES = -I$(gmpincludedir) ++AM_CPPFLAGS += -I$(gmpincludedir) + +Index: cddlib-094f/src-gmp/Makefile.am +=================================================================== +--- cddlib-094f.orig/src-gmp/Makefile.am ++++ cddlib-094f/src-gmp/Makefile.am +@@ -31,6 +31,6 @@ testlp3_gmp_SOURCES = tes + + LDADD = ../lib-src-gmp/libcddgmp.la + AM_LDFLAGS = -L$(gmplibdir) +-INCLUDES = -I../lib-src-gmp +-INCLUDES += -I$(gmpincludedir) +-AM_CPPFLAGS = -DGMPRATIONAL ++AM_CPPFLAGS = -I../lib-src-gmp ++AM_CPPFLAGS += -I$(gmpincludedir) ++AM_CPPFLAGS += -DGMPRATIONAL +Index: cddlib-094f/src/Makefile.am +=================================================================== +--- cddlib-094f.orig/src/Makefile.am ++++ cddlib-094f/src/Makefile.am +@@ -30,5 +30,5 @@ testlp3_SOURCES = testlp3 + # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c + + LDADD = ../lib-src/libcdd.la +-INCLUDES = -I../lib-src +-AM_CPPFLAGS = -UGMPRATIONAL ++AM_CPPFLAGS = -I../lib-src ++AM_CPPFLAGS += -UGMPRATIONAL diff --git a/cddlib-shared.diff b/cddlib-shared.diff new file mode 100644 index 0000000..95551c3 --- /dev/null +++ b/cddlib-shared.diff @@ -0,0 +1,79 @@ +From: Jan Engelhardt +Date: 2011-09-26 14:47:01.350702632 +0200 +Upstream: dead + +Replace ye olde static libs with shared libs. + +--- + configure.in | 3 ++- + lib-src-gmp/Makefile.am | 4 ++-- + lib-src/Makefile.am | 4 ++-- + src-gmp/Makefile.am | 2 +- + src/Makefile.am | 2 +- + 5 files changed, 8 insertions(+), 7 deletions(-) + +Index: cddlib-094f/configure.in +=================================================================== +--- cddlib-094f.orig/configure.in ++++ cddlib-094f/configure.in +@@ -7,7 +7,8 @@ AM_INIT_AUTOMAKE(cddlib, 0.94) + dnl Checks for programs. + AC_PROG_CC + AC_PROG_INSTALL +-AC_PROG_RANLIB ++AC_DISABLE_STATIC ++LT_INIT + + dnl Checks for libraries. + dnl Replace `main' with a function in -lg: +Index: cddlib-094f/lib-src-gmp/Makefile.am +=================================================================== +--- cddlib-094f.orig/lib-src-gmp/Makefile.am ++++ cddlib-094f/lib-src-gmp/Makefile.am +@@ -1,6 +1,6 @@ +-lib_LIBRARIES = libcddgmp.a ++lib_LTLIBRARIES = libcddgmp.la + +-libcddgmp_a_SOURCES = \ ++libcddgmp_la_SOURCES = \ + cddcore.c \ + cddlp.c \ + cddmp.c \ +Index: cddlib-094f/lib-src/Makefile.am +=================================================================== +--- cddlib-094f.orig/lib-src/Makefile.am ++++ cddlib-094f/lib-src/Makefile.am +@@ -1,6 +1,6 @@ +-lib_LIBRARIES = libcdd.a ++lib_LTLIBRARIES = libcdd.la + +-libcdd_a_SOURCES = \ ++libcdd_la_SOURCES = \ + cddcore.c \ + cddlp.c \ + cddmp.c \ +Index: cddlib-094f/src-gmp/Makefile.am +=================================================================== +--- cddlib-094f.orig/src-gmp/Makefile.am ++++ cddlib-094f/src-gmp/Makefile.am +@@ -29,7 +29,7 @@ testlp2_gmp_SOURCES = tes + testlp3_gmp_SOURCES = testlp3.c + # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c + +-LDADD = ../lib-src-gmp/libcddgmp.a ++LDADD = ../lib-src-gmp/libcddgmp.la + AM_LDFLAGS = -L$(gmplibdir) + INCLUDES = -I../lib-src-gmp + INCLUDES += -I$(gmpincludedir) +Index: cddlib-094f/src/Makefile.am +=================================================================== +--- cddlib-094f.orig/src/Makefile.am ++++ cddlib-094f/src/Makefile.am +@@ -29,6 +29,6 @@ testlp2_SOURCES = testlp2 + testlp3_SOURCES = testlp3.c + # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c + +-LDADD = ../lib-src/libcdd.a ++LDADD = ../lib-src/libcdd.la + INCLUDES = -I../lib-src + AM_CPPFLAGS = -UGMPRATIONAL diff --git a/cddlib.spec b/cddlib.spec new file mode 100644 index 0000000..bfaef2d --- /dev/null +++ b/cddlib.spec @@ -0,0 +1,87 @@ +# +# spec file for package cddlib +# +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +Name: cddlib +%define lname libcdd0 +Version: 0.94f +Release: 0 +Summary: Library for finding vertices of convex polytopes +Group: Productivity/Scientific/Math +License: GPL-2.0+ +URL: http://www.ifor.math.ethz.ch/~fukuda/cdd_home/ + +Source: cddlib-094f.tar.xz +Patch1: cddlib-shared.diff +Patch2: cddlib-flags.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: gmp-devel >= 3, xz + +%description +cddlib is a C implementation of the Double Description Method of +Motzkin et al. for generating all vertices (i.e. extreme points) and +extreme rays of a general convex polyhedron in R^d given by a system +of linear inequalities. + +%package -n %lname +Summary: Library for finding vertices of convex polytopes +Group: System/Libraries + +%description -n %lname +cddlib is a C implementation of the Double Description Method of +Motzkin et al. for generating all vertices (i.e. extreme points) and +extreme rays of a general convex polyhedron in R^d given by a system +of linear inequalities. + +%package devel +Summary: Development files for cddlib +Group: Development/Libraries/C and C++ +Requires: %lname = %version + +%description devel +cddlib is a C implementation of the Double Description Method of +Motzkin et al. for generating all vertices (i.e. extreme points) and +extreme rays of a general convex polyhedron in R^d given by a system +of linear inequalities. + +%prep +%setup -qn %name-094f +%patch -P 1 -P 2 -p1 + +%build +autoreconf -fi; +%configure --enable-shared --disable-static +make %{?_smp_mflags} + +%install +%make_install +find "%buildroot" -name "*.la" -delete; + +%post -n %lname -p /sbin/ldconfig + +%postun -n %lname -p /sbin/ldconfig + +%files -n %lname +%defattr(-,root,root) +%_libdir/libcdd*.so.* + +%files devel +%defattr(-,root,root) +%_bindir/* +%_libdir/libcdd*.so +%_includedir/* + +%changelog