SHA256
1
0
forked from pool/cddlib

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
This commit is contained in:
Detlef Steuer 2011-09-26 13:22:45 +00:00 committed by Git OBS Bridge
commit 7e7811ba65
6 changed files with 265 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
cddlib-094f.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9366e0a2ac5e0aa249c27813d5fa518df3270c79540d822221791b7cc7832dde
size 944252

72
cddlib-flags.diff Normal file
View File

@ -0,0 +1,72 @@
From: Jan Engelhardt <jengelh@medozas.de>
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

79
cddlib-shared.diff Normal file
View File

@ -0,0 +1,79 @@
From: Jan Engelhardt <jengelh@medozas.de>
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

87
cddlib.spec Normal file
View File

@ -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