From b4624c3a701b11248d88aab08744a37ee7aea1cc Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Tue, 10 Sep 2024 04:58:39 +0100 Subject: [PATCH] [cddlib] new port (#40863) --- ports/cddlib/0001-disable-doc-target.patch | 12 +++++++++++ ports/cddlib/0002-disable-dd-log.patch | 25 ++++++++++++++++++++++ ports/cddlib/portfile.cmake | 19 ++++++++++++++++ ports/cddlib/vcpkg.json | 10 +++++++++ versions/baseline.json | 4 ++++ versions/c-/cddlib.json | 9 ++++++++ 6 files changed, 79 insertions(+) create mode 100644 ports/cddlib/0001-disable-doc-target.patch create mode 100644 ports/cddlib/0002-disable-dd-log.patch create mode 100644 ports/cddlib/portfile.cmake create mode 100644 ports/cddlib/vcpkg.json create mode 100644 versions/c-/cddlib.json diff --git a/ports/cddlib/0001-disable-doc-target.patch b/ports/cddlib/0001-disable-doc-target.patch new file mode 100644 index 0000000000..56499942f2 --- /dev/null +++ b/ports/cddlib/0001-disable-doc-target.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile.am b/Makefile.am +index e08cd91..bcde34b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,5 +1,5 @@ + # Directories where we can build something. +-SUBDIRS = doc lib-src src ++SUBDIRS = lib-src src + + # Install the examples into /usr/share/doc/cddlib/examples* + nobase_doc_DATA = $(srcdir)/examples/* $(srcdir)/examples-ine/* $(srcdir)/examples-ine3d/* $(srcdir)/examples-ext/* + diff --git a/ports/cddlib/0002-disable-dd-log.patch b/ports/cddlib/0002-disable-dd-log.patch new file mode 100644 index 0000000000..8659761672 --- /dev/null +++ b/ports/cddlib/0002-disable-dd-log.patch @@ -0,0 +1,25 @@ +diff --git a/src/lcdd.c b/src/lcdd.c +index 473e6c5..cafc1a5 100644 +--- a/src/lcdd.c ++++ b/src/lcdd.c +@@ -44,7 +44,6 @@ int main(int argc, char *argv[]) + dd_ErrorType err; + + dd_set_global_constants(); /* First, this must be called. */ +- dd_log=dd_TRUE; /* Output log */ + + if (argc > 2) + dd_DDFile2File(argv[1],argv[2],&err); +diff --git a/src/scdd.c b/src/scdd.c +index e9e0c59..9e6ed32 100644 +--- a/src/scdd.c ++++ b/src/scdd.c +@@ -66,7 +66,6 @@ int main(int argc, char *argv[]) + FILE *reading=NULL, *writing; + + dd_set_global_constants(); /* First, this must be called. */ +- dd_log=dd_TRUE; /* output log */ + + if (argc>1) strcpy(inputfile,argv[1]); + if (argc<=1 || !SetInputFile(&reading,argv[1])){ + diff --git a/ports/cddlib/portfile.cmake b/ports/cddlib/portfile.cmake new file mode 100644 index 0000000000..89ad1749d2 --- /dev/null +++ b/ports/cddlib/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cddlib/cddlib + REF ${VERSION} + SHA512 8591ebe9e2a09683bb01b478df6536d1291012927d343013f8593126d3570f7883e125c63c68cd21eeea142a450847dc609e373e39cffb308bed1b56d6342ac1 + HEAD_REF master + PATCHES + 0001-disable-doc-target.patch # disable building docs, as they require latex + 0002-disable-dd-log.patch # windows does not export global variables +) +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + COPY_SOURCE # ensure generated files are found +) +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/COPYING") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/cddlib/vcpkg.json b/ports/cddlib/vcpkg.json new file mode 100644 index 0000000000..763fb932b0 --- /dev/null +++ b/ports/cddlib/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "cddlib", + "version-string": "0.94m", + "description": "C implementation of the Double Description Method", + "homepage": "https://github.com/cddlib/cddlib", + "license": "GPL-2.0-or-later", + "dependencies": [ + "gmp" + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index f2a6f5d8d9..61be7269c4 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1544,6 +1544,10 @@ "baseline": "2.4", "port-version": 0 }, + "cddlib": { + "baseline": "0.94m", + "port-version": 0 + }, "cdt": { "baseline": "1.4.1", "port-version": 0 diff --git a/versions/c-/cddlib.json b/versions/c-/cddlib.json new file mode 100644 index 0000000000..051cf34eeb --- /dev/null +++ b/versions/c-/cddlib.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "0bb4839476e2e904a3afcde5003ae2fe7237efd7", + "version-string": "0.94m", + "port-version": 0 + } + ] +}