From 2a1db5183140f644717c299c5daa969366a5755765c4cc11edaf2d3bea0b5c40 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 19 Sep 2020 09:22:07 +0000 Subject: [PATCH 1/5] - Update to release 0.94k OBS-URL: https://build.opensuse.org/package/show/science/cddlib?expand=0&rev=22 --- cddlib-0.94j.tar.gz | 3 --- cddlib-0.94k.tar.gz | 3 +++ cddlib.changes | 8 ++++++++ cddlib.spec | 18 +++++++----------- 4 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 cddlib-0.94j.tar.gz create mode 100644 cddlib-0.94k.tar.gz diff --git a/cddlib-0.94j.tar.gz b/cddlib-0.94j.tar.gz deleted file mode 100644 index a0cda3a..0000000 --- a/cddlib-0.94j.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27d7fcac2710755a01ef5381010140fc57c95f959c3c5705c58539d8c4d17bfb -size 1364746 diff --git a/cddlib-0.94k.tar.gz b/cddlib-0.94k.tar.gz new file mode 100644 index 0000000..71be9bb --- /dev/null +++ b/cddlib-0.94k.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de7397d7fe32758a6b53453a889ec7619b6c68a15d84eb132421f3d7d457be44 +size 1363115 diff --git a/cddlib.changes b/cddlib.changes index 3e40819..24a68b0 100644 --- a/cddlib.changes +++ b/cddlib.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Sep 19 09:18:52 UTC 2020 - Jan Engelhardt + +- Update to release 0.94k + * Header files are now installed to PREFIX/include/cddlib to + avoid clashes with other libraries. + * pkg-config cddlib.pc file added. + ------------------------------------------------------------------- Sat Oct 20 11:41:09 UTC 2018 - Jan Engelhardt diff --git a/cddlib.spec b/cddlib.spec index 599ada7..c1d56d6 100644 --- a/cddlib.spec +++ b/cddlib.spec @@ -1,7 +1,7 @@ # # spec file for package cddlib # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,20 +18,16 @@ Name: cddlib %define lname libcdd0 -Version: 0.94j +Version: 0.94k Release: 0 Summary: Library for finding vertices of convex polytopes License: GPL-2.0-or-later Group: Productivity/Scientific/Math -Url: https://www.inf.ethz.ch/personal/fukudak/cdd_home/ +URL: https://www.inf.ethz.ch/personal/fukudak/cdd_home/ -Source: https://github.com/cddlib/cddlib/releases/download/0.94j/cddlib-0.94j.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: autoconf -BuildRequires: automake +Source: https://github.com/cddlib/cddlib/releases/download/%version/%name-%version.tar.gz BuildRequires: fdupes BuildRequires: gmp-devel >= 3 -BuildRequires: libtool %description cddlib is a C implementation of the Double Description Method of @@ -76,9 +72,8 @@ This package contains the documentation to cddlib. %setup -q %build -autoreconf -fi -%configure --enable-shared --disable-static --includedir="%_includedir/cdd" --docdir="%_docdir/%name" -make %{?_smp_mflags} V=1 +%configure --enable-shared --disable-static --docdir="%_docdir/%name" +%make_build %install %make_install @@ -95,6 +90,7 @@ rm -f "%buildroot/%_libdir"/*.la %_bindir/* %_libdir/libcdd*.so %_includedir/* +%_libdir/pkgconfig/*.pc %files doc %_docdir/%name/ From 437bacbbc29be35056cfd62b974e49f09eda17337791ac9eab75f76b1458b0ff Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 19 Sep 2020 11:07:12 +0000 Subject: [PATCH 2/5] - Add 0001-build-extend-extern-C-block-in-header-files.patch OBS-URL: https://build.opensuse.org/package/show/science/cddlib?expand=0&rev=23 --- ...xtend-extern-C-block-in-header-files.patch | 70 +++++++++++++++++++ cddlib.changes | 1 + 2 files changed, 71 insertions(+) create mode 100644 0001-build-extend-extern-C-block-in-header-files.patch diff --git a/0001-build-extend-extern-C-block-in-header-files.patch b/0001-build-extend-extern-C-block-in-header-files.patch new file mode 100644 index 0000000..6e41086 --- /dev/null +++ b/0001-build-extend-extern-C-block-in-header-files.patch @@ -0,0 +1,70 @@ +From 1412ca0120841c7f8a83633c5dc857add060445f Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Sat, 19 Sep 2020 13:03:18 +0200 +Subject: [PATCH] build: extend "extern C" block in header files +Upstream: https://github.com/cddlib/cddlib/pull/46 + +I am getting compile errors in sympol when I try to remove +their extern "C" hack: + + extern "C" { + #include + } + +Turns out this is because cdd's own extern C are not broad enough. +--- + lib-src/cdd.h | 18 +++++++----------- + 1 file changed, 7 insertions(+), 11 deletions(-) + +diff --git a/lib-src/cdd.h b/lib-src/cdd.h +index ebc52cc..d78d5d1 100644 +--- a/lib-src/cdd.h ++++ b/lib-src/cdd.h +@@ -35,6 +35,10 @@ extern mytype dd_purezero; + extern mytype dd_minuszero; + extern mytype dd_minusone; + ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ + extern time_t dd_statStartTime; /* cddlib starting time */ + extern long dd_statBApivots; /* basis finding pivots */ + extern long dd_statCCpivots; /* criss-cross pivots */ +@@ -53,10 +57,6 @@ extern dd_boolean dd_choiceLexicoPivotQ; /* whether to use the lexicographic + + /* ---------- FUNCTIONS MEANT TO BE PUBLIC ---------- */ + +-#if defined(__cplusplus) +-extern "C" { +-#endif +- + /* basic matrix manipulations */ + void dd_InitializeArow(dd_colrange,dd_Arow *); + void dd_InitializeAmatrix(dd_rowrange,dd_colrange,dd_Amatrix *); +@@ -211,10 +211,6 @@ void dd_WriteLPMode(FILE *f); + dd_MatrixPtr dd_FourierElimination(dd_MatrixPtr,dd_ErrorType *); + dd_MatrixPtr dd_BlockElimination(dd_MatrixPtr, dd_colset, dd_ErrorType *); + +-#if defined(__cplusplus) +-} +-#endif +- + /* ---------- FUNCTIONS MEANT TO BE NON-PUBLIC ---------- */ + void dd_QuickSort(dd_rowindex, long, long, dd_Amatrix, long); + void dd_RandomPermutation(dd_rowindex, long, unsigned int seed); +@@ -285,8 +281,8 @@ dd_PolyhedraPtr dd_CreatePolyhedraData(dd_rowrange, dd_colrange); + dd_boolean dd_InitializeConeData(dd_rowrange, dd_colrange, dd_ConePtr*); + dd_boolean dd_AppendMatrix2Poly(dd_PolyhedraPtr*, dd_MatrixPtr); + +- +- +- ++#if defined(__cplusplus) ++} ++#endif + + /* end of cddlib.h */ +-- +2.28.0 + diff --git a/cddlib.changes b/cddlib.changes index 24a68b0..7738a43 100644 --- a/cddlib.changes +++ b/cddlib.changes @@ -5,6 +5,7 @@ Sat Sep 19 09:18:52 UTC 2020 - Jan Engelhardt * Header files are now installed to PREFIX/include/cddlib to avoid clashes with other libraries. * pkg-config cddlib.pc file added. +- Add 0001-build-extend-extern-C-block-in-header-files.patch ------------------------------------------------------------------- Sat Oct 20 11:41:09 UTC 2018 - Jan Engelhardt From e98fa4f07454d15129f8a2f2d02903955a614272cbdcb656482f36d1c8216f64 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 19 Sep 2020 13:06:40 +0000 Subject: [PATCH 3/5] OBS-URL: https://build.opensuse.org/package/show/science/cddlib?expand=0&rev=24 --- cddlib.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cddlib.spec b/cddlib.spec index c1d56d6..4d21a59 100644 --- a/cddlib.spec +++ b/cddlib.spec @@ -26,6 +26,7 @@ Group: Productivity/Scientific/Math URL: https://www.inf.ethz.ch/personal/fukudak/cdd_home/ Source: https://github.com/cddlib/cddlib/releases/download/%version/%name-%version.tar.gz +Patch1: 0001-build-extend-extern-C-block-in-header-files.patch BuildRequires: fdupes BuildRequires: gmp-devel >= 3 @@ -69,7 +70,7 @@ Motzkin et al. This package contains the documentation to cddlib. %prep -%setup -q +%autosetup -p1 %build %configure --enable-shared --disable-static --docdir="%_docdir/%name" From ca33126f12521bd58b4cc29f40ae74918f3325d0f65b4b5e975e642218a1c2a3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 20 Sep 2020 07:12:23 +0000 Subject: [PATCH 4/5] - Update to release 0.94l OBS-URL: https://build.opensuse.org/package/show/science/cddlib?expand=0&rev=25 --- ...xtend-extern-C-block-in-header-files.patch | 70 ------------------- cddlib-0.94k.tar.gz | 3 - cddlib-0.94l.tar.gz | 3 + cddlib.changes | 6 ++ cddlib.spec | 3 +- 5 files changed, 10 insertions(+), 75 deletions(-) delete mode 100644 0001-build-extend-extern-C-block-in-header-files.patch delete mode 100644 cddlib-0.94k.tar.gz create mode 100644 cddlib-0.94l.tar.gz diff --git a/0001-build-extend-extern-C-block-in-header-files.patch b/0001-build-extend-extern-C-block-in-header-files.patch deleted file mode 100644 index 6e41086..0000000 --- a/0001-build-extend-extern-C-block-in-header-files.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 1412ca0120841c7f8a83633c5dc857add060445f Mon Sep 17 00:00:00 2001 -From: Jan Engelhardt -Date: Sat, 19 Sep 2020 13:03:18 +0200 -Subject: [PATCH] build: extend "extern C" block in header files -Upstream: https://github.com/cddlib/cddlib/pull/46 - -I am getting compile errors in sympol when I try to remove -their extern "C" hack: - - extern "C" { - #include - } - -Turns out this is because cdd's own extern C are not broad enough. ---- - lib-src/cdd.h | 18 +++++++----------- - 1 file changed, 7 insertions(+), 11 deletions(-) - -diff --git a/lib-src/cdd.h b/lib-src/cdd.h -index ebc52cc..d78d5d1 100644 ---- a/lib-src/cdd.h -+++ b/lib-src/cdd.h -@@ -35,6 +35,10 @@ extern mytype dd_purezero; - extern mytype dd_minuszero; - extern mytype dd_minusone; - -+#if defined(__cplusplus) -+extern "C" { -+#endif -+ - extern time_t dd_statStartTime; /* cddlib starting time */ - extern long dd_statBApivots; /* basis finding pivots */ - extern long dd_statCCpivots; /* criss-cross pivots */ -@@ -53,10 +57,6 @@ extern dd_boolean dd_choiceLexicoPivotQ; /* whether to use the lexicographic - - /* ---------- FUNCTIONS MEANT TO BE PUBLIC ---------- */ - --#if defined(__cplusplus) --extern "C" { --#endif -- - /* basic matrix manipulations */ - void dd_InitializeArow(dd_colrange,dd_Arow *); - void dd_InitializeAmatrix(dd_rowrange,dd_colrange,dd_Amatrix *); -@@ -211,10 +211,6 @@ void dd_WriteLPMode(FILE *f); - dd_MatrixPtr dd_FourierElimination(dd_MatrixPtr,dd_ErrorType *); - dd_MatrixPtr dd_BlockElimination(dd_MatrixPtr, dd_colset, dd_ErrorType *); - --#if defined(__cplusplus) --} --#endif -- - /* ---------- FUNCTIONS MEANT TO BE NON-PUBLIC ---------- */ - void dd_QuickSort(dd_rowindex, long, long, dd_Amatrix, long); - void dd_RandomPermutation(dd_rowindex, long, unsigned int seed); -@@ -285,8 +281,8 @@ dd_PolyhedraPtr dd_CreatePolyhedraData(dd_rowrange, dd_colrange); - dd_boolean dd_InitializeConeData(dd_rowrange, dd_colrange, dd_ConePtr*); - dd_boolean dd_AppendMatrix2Poly(dd_PolyhedraPtr*, dd_MatrixPtr); - -- -- -- -+#if defined(__cplusplus) -+} -+#endif - - /* end of cddlib.h */ --- -2.28.0 - diff --git a/cddlib-0.94k.tar.gz b/cddlib-0.94k.tar.gz deleted file mode 100644 index 71be9bb..0000000 --- a/cddlib-0.94k.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de7397d7fe32758a6b53453a889ec7619b6c68a15d84eb132421f3d7d457be44 -size 1363115 diff --git a/cddlib-0.94l.tar.gz b/cddlib-0.94l.tar.gz new file mode 100644 index 0000000..7961346 --- /dev/null +++ b/cddlib-0.94l.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ef6b1ee44509a26d480cda699ca1a9a38ecc9a2aba5092dbd7390ca285769e0 +size 1350988 diff --git a/cddlib.changes b/cddlib.changes index 7738a43..d3e5fd4 100644 --- a/cddlib.changes +++ b/cddlib.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 20 06:38:16 UTC 2020 - Jan Engelhardt + +- Update to release 0.94l + * Merged 0001-build-extend-extern-C-block-in-header-files.patch + ------------------------------------------------------------------- Sat Sep 19 09:18:52 UTC 2020 - Jan Engelhardt diff --git a/cddlib.spec b/cddlib.spec index 4d21a59..ed2f808 100644 --- a/cddlib.spec +++ b/cddlib.spec @@ -18,7 +18,7 @@ Name: cddlib %define lname libcdd0 -Version: 0.94k +Version: 0.94l Release: 0 Summary: Library for finding vertices of convex polytopes License: GPL-2.0-or-later @@ -26,7 +26,6 @@ Group: Productivity/Scientific/Math URL: https://www.inf.ethz.ch/personal/fukudak/cdd_home/ Source: https://github.com/cddlib/cddlib/releases/download/%version/%name-%version.tar.gz -Patch1: 0001-build-extend-extern-C-block-in-header-files.patch BuildRequires: fdupes BuildRequires: gmp-devel >= 3 From 7687cffdcc17492c815697cb0ff16c9a94be57841df47cbbf6c372048630f33a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 20 Sep 2020 08:00:15 +0000 Subject: [PATCH 5/5] - Split command-line programs to new package cddlib-tools. OBS-URL: https://build.opensuse.org/package/show/science/cddlib?expand=0&rev=26 --- cddlib.changes | 1 + cddlib.spec | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/cddlib.changes b/cddlib.changes index d3e5fd4..626daee 100644 --- a/cddlib.changes +++ b/cddlib.changes @@ -3,6 +3,7 @@ Sun Sep 20 06:38:16 UTC 2020 - Jan Engelhardt - Update to release 0.94l * Merged 0001-build-extend-extern-C-block-in-header-files.patch +- Split command-line programs to new package cddlib-tools. ------------------------------------------------------------------- Sat Sep 19 09:18:52 UTC 2020 - Jan Engelhardt diff --git a/cddlib.spec b/cddlib.spec index ed2f808..dff40f7 100644 --- a/cddlib.spec +++ b/cddlib.spec @@ -46,7 +46,7 @@ extreme rays of a general convex polyhedron in R^d given by a system of linear inequalities. %package devel -Summary: Development files for cddlib +Summary: Header files for cddlib Group: Development/Libraries/C and C++ Requires: %lname = %version Requires: gmp-devel @@ -57,6 +57,8 @@ 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. +This package contains the headers for the C library. + %package doc Summary: Documentation for the cddlib API Group: Documentation/Other @@ -68,6 +70,20 @@ Motzkin et al. This package contains the documentation to cddlib. +%package tools +Summary: Programs for vertex generation using Double Description Method +Group: Productivity/Scientific/Math +Provides: cddlib-devel:/usr/bin/scdd +Conflicts: cddlib-devel < 0.94l + +%description tools +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. + +This package contains the command-line utilities of cddlib. + %prep %autosetup -p1 @@ -87,7 +103,6 @@ rm -f "%buildroot/%_libdir"/*.la %_libdir/libcdd*.so.* %files devel -%_bindir/* %_libdir/libcdd*.so %_includedir/* %_libdir/pkgconfig/*.pc @@ -95,4 +110,8 @@ rm -f "%buildroot/%_libdir"/*.la %files doc %_docdir/%name/ +%files tools +%_bindir/* +%license COPYING + %changelog