diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2024-05-15 17:40:18 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2024-05-15 17:42:09 -0400 |
commit | 0c9c98de9bb757a4a2cd0857df6d0e98eb7a6837 (patch) | |
tree | 7632249af61800fbeb63ae8775846df62872d5aa /sci-mathematics | |
parent | net-analyzer/hydra: drop 9.5-r1 (diff) | |
download | gentoo-0c9c98de9bb757a4a2cd0857df6d0e98eb7a6837.tar.gz gentoo-0c9c98de9bb757a4a2cd0857df6d0e98eb7a6837.tar.bz2 gentoo-0c9c98de9bb757a4a2cd0857df6d0e98eb7a6837.zip |
sci-mathematics/topcom: add 1.1.2
Closes: https://bugs.gentoo.org/928063
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/topcom/Manifest | 2 | ||||
-rw-r--r-- | sci-mathematics/topcom/files/topcom-1.1.2-buildsystem.patch | 295 | ||||
-rw-r--r-- | sci-mathematics/topcom/topcom-1.1.2.ebuild | 54 |
3 files changed, 351 insertions, 0 deletions
diff --git a/sci-mathematics/topcom/Manifest b/sci-mathematics/topcom/Manifest index 7838ec1e93cf..328160036c78 100644 --- a/sci-mathematics/topcom/Manifest +++ b/sci-mathematics/topcom/Manifest @@ -1,2 +1,4 @@ DIST TOPCOM-0_17_8.tgz 8994044 BLAKE2B 27426b9fd9da8bc51e3632483cdd1c3f878a03d22dcad637c1c26368d58dbc9a9ef4c6918e314484336b1355cdf703287bf50d248e257773729a4d9fd012c0ca SHA512 2ddab2f30bf3adf93f0bb76c50bc70a5927fe2a9561a59df0ac7bec193b9a9b231eecb58c69840247536b73fda5298955518e798c3b5f8d2961ca09dfdc81cce +DIST TOPCOM-1_1_2.tgz 7924000 BLAKE2B 4e489c2ee1682ca4612eaef785134711d9cd1b61a225b811015fcf8b3db057d83169fb251f61f4b8f983bfd450515619f01664789f7f5dbe2a076d2af0ab6a28 SHA512 acdfcd11d4d6d6b3d21f90313d413a0d6a753a982d1090de5ed2cdd011dec98e04058f79679772bb911c5c2f23834477c5fff9511ca0cd67a392c6b24347ef7d DIST TOPCOM-manual.html 19251 BLAKE2B 8e361fd81bed45b552766a86a856ed1411154b5c523e14463750651d1c8d7b0f1f25a7c29bfdc34910fad3d19a1df94ded47b63a973f22baf3d60a7c5f0e1578 SHA512 5d0303f141bce12e0354c2fb65420102aa198e2271c0e901621f850b47f9cf9642659b0cf8e9bcc7a6da3b39914c20e47c67e72aa9cf999892f80855daa25c67 +DIST TOPCOM-manual.pdf 173775 BLAKE2B 6bc7a68c17b514d0ceb1d7ee69fd9c943078ceb88c6b98a12cb88447cf5720d47aa9db70b0c584ccd6900d186822176cd949b55f4d6badb8ffa997ed1fcba799 SHA512 820f26075d3416264ebece7b218f4c5cdfea0f465fe71724d799e4f0375c44e16f80e49f1f184d48d9699fb42379a27924f4c01385d85216d099e3e1c557389f diff --git a/sci-mathematics/topcom/files/topcom-1.1.2-buildsystem.patch b/sci-mathematics/topcom/files/topcom-1.1.2-buildsystem.patch new file mode 100644 index 000000000000..77982286acf2 --- /dev/null +++ b/sci-mathematics/topcom/files/topcom-1.1.2-buildsystem.patch @@ -0,0 +1,295 @@ +From 4e0185faf3f97f0d027cf74df54d4b08adf1d355 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Wed, 15 May 2024 09:51:06 -0400 +Subject: [PATCH 1/1] */*: patch build system for Gentoo + + - No "external" anything + - Use libtool for libraries + - Unbundle gmp and cddlib + - Use modern cddlib include path + - Detect deps with pkg-config + - Build lib-reg after lib + - Don't hide all symbols with -fvisibility=hidden??? +--- + Makefile.am | 8 +--- + configure.ac | 92 +++++++------------------------------- + lib-src-reg/LPinterface.hh | 4 +- + lib-src-reg/Makefile.am | 7 +-- + lib-src/Makefile.am | 5 +-- + src-reg/Makefile.am | 19 +------- + src/Makefile.am | 19 +------- + wrap-gmp-gmpxx/Makefile.am | 1 - + 8 files changed, 29 insertions(+), 126 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 17f6960..02f80f3 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,7 +1 @@ +-SUBDIRS = wrap-gmp-gmpxx lib-src-reg lib-src src-reg src examples share +-EXTRA_DIST = external/Makefile +-EXTRA_DIST += external/gmp-6.2.1.tar.bz2 +-EXTRA_DIST += external/cddlib-0.94j-TOPCOMb.tar.gz +-EXTRA_DIST += external/qsopt_ex-2.5.10.3.tar.gz +-EXTRA_DIST += external/gmpxx-patch +- ++SUBDIRS = wrap-gmp-gmpxx lib-src lib-src-reg src src-reg examples share +diff --git a/configure.ac b/configure.ac +index 2372711..0e6efd7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -10,96 +10,36 @@ AC_SUBST([TOPCOMROOT], [`pwd`]) + + dnl set some compilation switches consistently: + AC_SUBST([AM_CPPFLAGS], ["-DSTL_SYMMETRIES -DSTL_CONTAINERS -DSTL_FLIPS -DSTL_CHIROTOPE -DGMPRATIONAL -DPERMLIB_DOMAIN_INT -DUSE_LEXORDER]") +-AC_SUBST([AM_CXXFLAGS], [" -fvisibility=hidden -fvisibility-inlines-hidden -pthread -std=c++17"]) +-AC_SUBST([AM_LDFLAGS], ["-L../external/lib]") +- +-dnl backup the user variable LDFLAGS: +-dnl AC_SUBST([LDFLAGS_backup], [${LDFLAGS}]) +- +-dnl add local libraries to LDFLAGS so that AC_CHECK_LIB will find them: +-dnl AC_SUBST([LDFLAGS], ["-L${TOPCOMROOT}/external/lib"]) ++AC_SUBST([AM_CXXFLAGS], ["-std=c++17"]) + + dnl Checks for programs. + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_CXX +-AC_PROG_RANLIB ++LT_INIT + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST + + + dnl Check for libraries: +-dnl Make libgmp if requested: +-AC_LANG_PUSH(C++) +-AC_CHECK_HEADERS([gmpxx.h]) +-AC_LANG_POP +-AM_CONDITIONAL(USE_LOCAL_GMP, [test "x$ac_cv_header_gmpxx_h" = "xno"]) +-if test "x$ac_cv_header_gmpxx_h" = "xyes"; then +- AC_MSG_NOTICE([system libgmp is used]) +-else +- AC_MSG_NOTICE([gmpxx.h not found on system - building gmp locally ...]) +- make -C external gmp +- AC_MSG_NOTICE([... done]) +-fi +- +-dnl Make libcddgmp: +-make -C external cdd +- +-dnl Check for requests for third-party packages: +-dnl Check for qsopt_ex: +-AC_MSG_CHECKING(whether QSOpt_ex support was enabled) +-AC_ARG_ENABLE([qsoptex], +- AS_HELP_STRING([--enable-qsoptex], +- [use QSOpt_ex as an LP solver for regularity checks (requires QSOpt_ex includes in ${TOPCOM}/external/include and libqsopt_ex.a in ${TOPCOM}/external/lib (built automatically during configure)]) ++PKG_CHECK_MODULES( ++ [GMPXX], ++ [gmpxx],[ ++ LIBS="${LIBS} ${GMPXX_LIBS}" ++ CPPFLAGS="${CPPFLAGS} ${GMPXX_CFLAGS}" ++ ], ++ [AC_MSG_ERROR([gmpxx not found])] + ) +-AM_CONDITIONAL(USE_QSOPTEX, [test "x$enable_qsoptex" = "xyes"]) +-if test "x$enable_qsoptex" = "xyes"; then +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_LIBQSOPTEX) +- +- dnl Check for compression libraries (qsopt_ex uses them if they are present): +- AC_CHECK_LIB([z], [gzopen], [], AC_MSG_NOTICE([compiling without libz])) +- AC_CHECK_LIB([bz2], [BZ2_bzopen], [], AC_MSG_NOTICE([compiling without libbz2])) +- +- dnl Make libqsopt_ex: +- make -C external qso +-else +- AC_MSG_RESULT(no) +-fi +- +-dnl Check for soplex: +-AC_MSG_CHECKING(whether soplex support was enabled) +-AC_ARG_ENABLE([soplex], +- AS_HELP_STRING([--enable-soplex], +- [use soplex as an LP solver for regularity checks (requires soplex includes and boost in ${TOPCOM}/external/include and libsoplex.a in ${TOPCOM}/external/lib)]) ++PKG_CHECK_MODULES( ++ [CDDLIB], ++ [cddlib],[ ++ LIBS="${LIBS} ${CDDLIB_LIBS}" ++ CPPFLAGS="${CPPFLAGS} ${CDDLIB_CFLAGS}" ++ ], ++ [AC_MSG_ERROR([cddlib not found])] + ) +-if test "x$enable_soplex" = "xyes"; then +- AC_MSG_RESULT(yes) +- +- dnl Check for compression library (soplex needs it): +- AC_CHECK_LIB([z], [gzopen], [LIBS="-lsoplex $LIBS"; AC_DEFINE(HAVE_LIBSOPLEX)], AC_MSG_NOTICE([libz missing => soplex not enabled])) +-else +- AC_MSG_RESULT(no) +-fi +-AM_CONDITIONAL(USE_SOPLEX, [test "x$ac_cv_lib_z_gzopen" = "xyes" -a "x$enable_soplex" = "xyes"]) +- +-dnl Check for Permlib: +-dnl AC_MSG_CHECKING(whether permlib support was enabled) +-dnl AC_ARG_ENABLE([permlib], +-dnl AS_HELP_STRING([--enable-permlib], +-dnl [support permlib for symmetry checks (requires permlib-includes and boost in ${TOPCOM}/external/include)]) +-dnl ) +-dnl AM_CONDITIONAL(USE_PERMLIB, [test "x$enable_permlib" = "xyes"]) +-dnl if test "x$enable_permlib" = "xyes"; then +-dnl AC_DEFINE(HAVE_LIBPERMLIB) +-dnl AC_MSG_RESULT(yes) +-dnl else +-dnl AC_MSG_RESULT(no) +-dnl fi + +-dnl restore the user variable LDLFAGS: +-dnl AC_SUBST([LDFLAGS], [${LDFLAGS_backup}]) + + AC_CONFIG_FILES([wrap-gmp-gmpxx/Makefile lib-src/Makefile lib-src-reg/Makefile src/Makefile src-reg/Makefile examples/Makefile share/Makefile Makefile]) + AC_OUTPUT +diff --git a/lib-src-reg/LPinterface.hh b/lib-src-reg/LPinterface.hh +index 6522dbe..c376887 100644 +--- a/lib-src-reg/LPinterface.hh ++++ b/lib-src-reg/LPinterface.hh +@@ -21,8 +21,8 @@ + #include "LabelSet.hh" + #include "Rational.h" + +-#include "setoper.h" +-#include "cdd.h" ++#include "cddlib/setoper.h" ++#include "cddlib/cdd.h" + + namespace topcom { + +diff --git a/lib-src-reg/Makefile.am b/lib-src-reg/Makefile.am +index fa8de11..13a0c87 100644 +--- a/lib-src-reg/Makefile.am ++++ b/lib-src-reg/Makefile.am +@@ -1,6 +1,6 @@ +-lib_LIBRARIES = libCHECKREG.a ++lib_LTLIBRARIES = libCHECKREG.la + +-libCHECKREG_a_SOURCES = \ ++libCHECKREG_la_SOURCES = \ + QSOinterface.cc \ + SPXinterface.cc \ + LPinterface.cc \ +@@ -12,9 +12,10 @@ SPXinterface.hh \ + RegularityCheck.hh \ + LPinterface.hh + ++libCHECKREG_la_LIBADD = ../lib-src/libTOPCOM.la ++ + AM_CPPFLAGS += -I../lib-src + AM_CPPFLAGS += -I../wrap-gmp-gmpxx +-AM_CPPFLAGS += -I../external/include + AM_CPPFLAGS += -I$(includedir) + + AM_CPPFLAGS += -ftemplate-depth=100 +diff --git a/lib-src/Makefile.am b/lib-src/Makefile.am +index c048061..dbaa888 100644 +--- a/lib-src/Makefile.am ++++ b/lib-src/Makefile.am +@@ -1,6 +1,6 @@ +-lib_LIBRARIES = libTOPCOM.a ++lib_LTLIBRARIES = libTOPCOM.la + +-libTOPCOM_a_SOURCES = \ ++libTOPCOM_la_SOURCES = \ + Admissibles.cc \ + CheckTriang.cc \ + Circuits.cc \ +@@ -134,7 +134,6 @@ Volumes.hh + + AM_CPPFLAGS += -I../lib-src-reg + AM_CPPFLAGS += -I../wrap-gmp-gmpxx +-AM_CPPFLAGS += -I../external/include + AM_CPPFLAGS += -I$(includedir) + + AM_CPPFLAGS += -ftemplate-depth=100 +diff --git a/src-reg/Makefile.am b/src-reg/Makefile.am +index ed4a016..78e9c44 100644 +--- a/src-reg/Makefile.am ++++ b/src-reg/Makefile.am +@@ -2,27 +2,12 @@ bin_PROGRAMS = checkregularity + + checkregularity_SOURCES = checkregularity.cc + +-LDADD = ../lib-src/libTOPCOM.a \ +- ../lib-src-reg/libCHECKREG.a \ +- ../external/lib/libcddgmp.a +-if USE_QSOPTEX +-LDADD += ../external/lib/libqsopt_ex.a +-endif +- +-if USE_SOPLEX +-LDADD += ../external/lib/libsoplex.a +-endif +-if USE_LOCAL_GMP +-LDADD += ../external/lib/libgmpxx.a \ +- ../external/lib/libgmp.a +-else +-LIBS += -lgmpxx -lgmp +-endif ++checkregularity_LDADD = ../lib-src/libTOPCOM.la \ ++ ../lib-src-reg/libCHECKREG.la + + AM_CPPFLAGS += -I../lib-src + AM_CPPFLAGS += -I../lib-src-reg + AM_CPPFLAGS += -I../wrap-gmp-gmpxx +-AM_CPPFLAGS += -I../external/include + AM_CPPFLAGS += -I$(includedir) + + AM_CPPFLAGS += -ftemplate-depth=100 +diff --git a/src/Makefile.am b/src/Makefile.am +index c97ecc5..ce723fb 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -121,27 +121,12 @@ santos_triang_SOURCES = santos_triang.cc + santos_dim4_triang_SOURCES = santos_dim4_triang.cc + santos_22_triang_SOURCES = santos_22_triang.cc + +-LDADD = ../lib-src/libTOPCOM.a \ +- ../lib-src-reg/libCHECKREG.a \ +- ../external/lib/libcddgmp.a +-if USE_QSOPTEX +-LDADD += ../external/lib/libqsopt_ex.a +-endif +-if USE_SOPLEX +-LDADD += ../external/lib/libsoplex.a +-endif +-if USE_LOCAL_GMP +-LDADD += ../external/lib/libgmpxx.a \ +- ../external/lib/libgmp.a +-else +-LIBS += -lgmpxx -lgmp +-endif +- ++LDADD = ../lib-src/libTOPCOM.la \ ++ ../lib-src-reg/libCHECKREG.la + + AM_CPPFLAGS += -I../lib-src + AM_CPPFLAGS += -I../lib-src-reg + AM_CPPFLAGS += -I../wrap-gmp-gmpxx +-AM_CPPFLAGS += -I../external/include + AM_CPPFLAGS += -I$(includedir) + + AM_CPPFLAGS += -ftemplate-depth=100 +diff --git a/wrap-gmp-gmpxx/Makefile.am b/wrap-gmp-gmpxx/Makefile.am +index f85cfc5..41ad248 100644 +--- a/wrap-gmp-gmpxx/Makefile.am ++++ b/wrap-gmp-gmpxx/Makefile.am +@@ -2,5 +2,4 @@ include_HEADERS = \ + Integer.h \ + Rational.h + +-AM_CPPFLAGS += -I../external/include + AM_CPPFLAGS += -I$(includedir) +-- +2.43.2 + diff --git a/sci-mathematics/topcom/topcom-1.1.2.ebuild b/sci-mathematics/topcom/topcom-1.1.2.ebuild new file mode 100644 index 000000000000..2093e331468c --- /dev/null +++ b/sci-mathematics/topcom/topcom-1.1.2.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +MY_PV=$(ver_rs 0-2 _) +MY_P="${PN^^}-${MY_PV}" + +DESCRIPTION="Computing Triangulations Of Point Configurations and Oriented Matroids" +HOMEPAGE="https://www.wm.uni-bayreuth.de/de/team/rambau_joerg/TOPCOM/index.html" +SRC_URI=" + https://www.wm.uni-bayreuth.de/de/team/rambau_joerg/TOPCOM-Downloads/${MY_P}.tgz + doc? ( https://www.wm.uni-bayreuth.de/de/team/rambau_joerg/TOPCOM-Manual/TOPCOM-manual.pdf ) +" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~riscv ~x86" +IUSE="doc examples" + +DEPEND=" + dev-libs/gmp:0[cxx] + sci-libs/cddlib +" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${P}-buildsystem.patch" ) + +src_prepare () { + default + eautoreconf + find external -delete || die +} + +src_install () { + default + + use doc && dodoc "${DISTDIR}/TOPCOM-manual.pdf" + + if use examples; then + docompress -x "/usr/share/doc/${PF}/examples" + dodoc -r examples + fi + + mv "${ED}/usr/bin/cube" "${ED}/usr/bin/topcom_cube" || die + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + elog "Due to a file collision with media-libs/lib3ds the helper" + elog "'cube' has been installed as topcom_cube (see bug #547030)." +} |