diff options
author | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2024-03-09 19:29:59 +0100 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2024-03-09 19:30:17 +0100 |
commit | fd97f1479bc28d47bc39181e8cab79015831bde0 (patch) | |
tree | ca4c52aa0936bffa83e83ba59ffed696ba8881b3 /dev-lang/gdl | |
parent | dev-python/chart-studio: enable py3.12 (diff) | |
download | gentoo-fd97f1479bc28d47bc39181e8cab79015831bde0.tar.gz gentoo-fd97f1479bc28d47bc39181e8cab79015831bde0.tar.bz2 gentoo-fd97f1479bc28d47bc39181e8cab79015831bde0.zip |
dev-lang/gdl: add 1.0.4
Closes: https://bugs.gentoo.org/917444
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'dev-lang/gdl')
-rw-r--r-- | dev-lang/gdl/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/gdl/files/gdl-1.0.4-cmake.patch | 100 | ||||
-rw-r--r-- | dev-lang/gdl/gdl-1.0.4.ebuild | 149 |
3 files changed, 250 insertions, 0 deletions
diff --git a/dev-lang/gdl/Manifest b/dev-lang/gdl/Manifest index 36cba2f543cc..831f6ebc2a32 100644 --- a/dev-lang/gdl/Manifest +++ b/dev-lang/gdl/Manifest @@ -1 +1,2 @@ DIST gdl-1.0.1.tar.gz 32775655 BLAKE2B 3428f33300403c98ae1f8f88cfa0e2346abe53d53b9f00c82ee5bf7f09f1f2f7d3021fa81173221ddd41ec29c94c2757cd1dc39b6e4d919c29d70af2e5045e6a SHA512 9d15f114d26d03c34dce6177a5d5115e81c128ec21752c01d171f8427e6cb21b9d0b69a44e29891b5e8fc2bd4d0b89d1a8dcd189f362a13c6e59182528b5842d +DIST gdl-1.0.4.tar.gz 33219638 BLAKE2B db0e843cf2e3f07d6f53d3a8b46cb95303cd0ae199c98099f45bbdfe5d206f325a8f9814935e876a3dfee3a46da0144766b18fa54b38a653567a429a88f06250 SHA512 3206bdd88b0478493221c0552e62620f1c9acbfec6f1900d73d932caae12401bf825e8893c81f844965f79e332bedb6ea99e6ea6f2b21427022efa60d1326eb0 diff --git a/dev-lang/gdl/files/gdl-1.0.4-cmake.patch b/dev-lang/gdl/files/gdl-1.0.4-cmake.patch new file mode 100644 index 000000000000..93d0e38f50a0 --- /dev/null +++ b/dev-lang/gdl/files/gdl-1.0.4-cmake.patch @@ -0,0 +1,100 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f7b8801d..8281aee1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -596,36 +598,16 @@ endif(GRAPHICSMAGICK_FOUND) + # -DMAGICK=ON|OFF + # -DMAGICKDIR=DIR + if(MAGICK) +- set(CMAKE_PREFIX_PATH ${MAGICKDIR}) +- find_package(ImageMagick QUIET COMPONENTS Magick++ MagickWand MagickCore) +- mark_as_advanced(ImageMagick_EXECUTABLE_DIR ImageMagick_Magick++_INCLUDE_DIR ImageMagick_Magick++_LIBRARY +- ImageMagick_MagickCore_INCLUDE_DIR ImageMagick_MagickCore_LIBRARY ImageMagick_MagickWand_INCLUDE_DIR ImageMagick_MagickWand_LIBRARY) +- set(USE_MAGICK ${ImageMagick_FOUND}) +- set(HAS_IMAGEMAGICK ${ImageMagick_FOUND}) +- if(ImageMagick_FOUND) +- find_program(MAGICKXXCONFIG Magick++-config) +- if(MAGICKXXCONFIG) +- execute_process(COMMAND ${MAGICKXXCONFIG} "--libs" OUTPUT_VARIABLE MAGICKXXCONFIGLIBS OUTPUT_STRIP_TRAILING_WHITESPACE) +- set(LIBRARIES ${LIBRARIES} ${MAGICKXXCONFIGLIBS}) +- execute_process(COMMAND ${MAGICKXXCONFIG} "--cxxflags" OUTPUT_VARIABLE MAGICKXXCONFIGCXXFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MAGICKXXCONFIGCXXFLAGS}") +- else(MAGICKXXCONFIG) +- message(FATAL_ERROR "ImageMagick is required but was not found (Magick++-config).\n" +- "Use -DMAGICKDIR=DIR to specify the ImageMagick directory.\n" +- "Use -DMAGICK=OFF to not use it.\n" +- "(suitable Debian/Ubuntu package: libmagick++-dev)\n" +- "(suitable Fedora/CentOS package: ImageMagick-c++-devel)") +- endif(MAGICKXXCONFIG) +- set(LIBRARIES ${LIBRARIES} ${ImageMagick_LIBRARIES}) +- include_directories(${ImageMagick_INCLUDE_DIRS} ${ImageMagick_MagickCore_INCLUDE_DIRS}) +- set(MAGICK_LIBRARIES ${ImageMagick_LIBRARIES}) +- else(ImageMagick_FOUND) +- message(FATAL_ERROR "ImageMagick is required but was not found.\n" +- "Use -DMAGICKDIR=DIR to specify the ImageMagick directory.\n" +- "Use -DMAGICK=OFF to not use it.\n" +- "(suitable Debian/Ubuntu package: libmagick++-dev)\n" +- "(suitable Fedora/CentOS package: ImageMagick-c++-devel)") +- endif(ImageMagick_FOUND) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(Magick++ REQUIRED Magick++) ++ pkg_check_modules(MagickWand REQUIRED MagickWand) ++ pkg_check_modules(MagickCore REQUIRED MagickCore) ++ ++ set(MAGICK_LIBRARIES ${Magick++_LIBRARIES} ${MagickWand_LIBRARIES} ${MagickCore_LIBRARIES}) ++ set(LIBRARIES ${LIBRARIES} ${MAGICK_LIBRARIES}) ++ include_directories(${Magick++_INCLUDE_DIRS}) ++ include_directories(${MagickWand_INCLUDE_DIRS}) ++ include_directories(${MagickCore_INCLUDE_DIRS}) + endif(MAGICK) + + # libtiff +@@ -994,20 +976,8 @@ endif(GLPK) + # -DSHAPELIB=ON|OFF + # -DSHAPELIBDIR=DIR + if(SHAPELIB) +- set(CMAKE_PREFIX_PATH ${SHAPELIBDIR}) +- find_package(SHAPELIB QUIET) +- set(USE_SHAPELIB ${SHAPELIB_FOUND}) +- if(SHAPELIB_FOUND) +- set(LIBRARIES ${LIBRARIES} ${SHAPELIB_LIBRARIES}) +- include_directories(${SHAPELIB_INCLUDE_DIR}) +- else(SHAPELIB_FOUND) +- message(FATAL_ERROR "SHAPELIB (http://shapelib.maptools.org/) is required but was not found.\n" +- "Use -DSHAPELIBDIR=DIR to specify the SHAPELIB-devel directory tree.\n" +- "Use -DSHAPELIB=OFF to not use it.\n" +- "shapelib is often in package libshp-devel.\n" +- "(suitable Debian/Ubuntu package: libshp-dev)\n" +- "(suitable Fedora/CentOS package: shapelib-devel)\n") +- endif(SHAPELIB_FOUND) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(shapelib REQUIRED shapelib) + endif(SHAPELIB) + # EXPAT for IDLffXMLSAX and IDLffXMLDOM + # -DEXPAT=ON|OFF +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 968ead9d..b0623de4 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -200,9 +200,9 @@ add_subdirectory(plplotdriver) + #whereami + add_library(whereami STATIC ${CMAKE_SOURCE_DIR}/src/whereami/src/whereami.c) + +-add_subdirectory(antlr) ++find_library(ANTLR_LIBRARY NAMES antlr) + +-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/antlr ${CMAKE_SOURCE_DIR}/src/plplotdriver ${CMAKE_SOURCE_DIR}/src/whereami/src ${CMAKE_BINARY_DIR}) ++include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/plplotdriver ${CMAKE_SOURCE_DIR}/src/whereami/src ${CMAKE_BINARY_DIR}) + link_directories(${LINK_DIRECTORIES}) + + if(PYTHON_MODULE) #GDL.so +@@ -220,8 +220,7 @@ if(USE_OPENMP) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + endif(USE_OPENMP) + +-add_dependencies(gdl antlr whereami) # be sure that antlr is built before gdl +-target_link_libraries(gdl antlr whereami) # link antlr against gdl ++target_link_libraries(gdl ${ANTLR_LIBRARY} whereami) # link antlr against gdl + if (MINGW) + target_link_libraries(gdl ws2_32) + endif (MINGW) diff --git a/dev-lang/gdl/gdl-1.0.4.ebuild b/dev-lang/gdl/gdl-1.0.4.ebuild new file mode 100644 index 000000000000..95e4cdaec158 --- /dev/null +++ b/dev-lang/gdl/gdl-1.0.4.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +WX_GTK_VER="3.0-gtk3" +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake python-single-r1 toolchain-funcs virtualx wxwidgets + +DESCRIPTION="GNU Data Language" +HOMEPAGE="https://github.com/gnudatalanguage/gdl" +SRC_URI="https://github.com/gnudatalanguage/${PN}/releases/download/v${PV}/${PN}-v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-v${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE=" + +eigen fftw glpk graphicsmagick gshhs hdf hdf5 +imagemagick netcdf + openmp png proj postscript python shapelib tiff udunits wxwidgets +" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + dev-cpp/antlr-cpp:2= + dev-libs/expat + media-libs/libpng:= + net-libs/libtirpc:= + sci-libs/gsl:= + sci-libs/plplot:=[X,cxx,-dynamic,wxwidgets?] + sys-libs/ncurses:= + sys-libs/readline:= + sys-libs/zlib + x11-libs/libX11 + fftw? ( sci-libs/fftw:3.0= ) + glpk? ( sci-mathematics/glpk:= ) + gshhs? ( + sci-geosciences/gshhs-data + sci-geosciences/gshhs:= + ) + hdf? ( sci-libs/hdf:= ) + hdf5? ( sci-libs/hdf5:= ) + imagemagick? ( + !graphicsmagick? ( media-gfx/imagemagick:=[cxx] ) + graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] ) + ) + netcdf? ( sci-libs/netcdf:= ) + proj? ( sci-libs/proj:= ) + postscript? ( dev-libs/pslib ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + ') + ) + shapelib? ( sci-libs/shapelib:= ) + tiff? ( + media-libs/tiff:= + sci-libs/libgeotiff:= + ) + udunits? ( sci-libs/udunits ) + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) +" +DEPEND="${RDEPEND} + eigen? ( dev-cpp/eigen:3 ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( "${FILESDIR}"/${PN}-1.0.4-cmake.patch ) +DOCS=( AUTHORS HACKING NEWS PYTHON.txt README README.md ) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + use python && python-single-r1_pkg_setup +} + +src_prepare() { + use wxwidgets && setup-wxwidgets unicode + use hdf5 && has_version sci-libs/hdf5[mpi] && export CXX=mpicxx + + # remove bundled antlr + rm -r src/antlr || die + + # gentoo: avoid install files in datadir directory + # and manually install them in src_install + sed -e '/AUTHORS/d' -i CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + # MPI is still very buggy + # x11=off does not compile + local mycmakeargs=( + -DMPI=OFF + -DREADLINE=ON + -DX11=ON + -DEXPAT=ON + -DPNGLIB=ON + -DEIGEN3=$(usex eigen) + -DFFTW=$(usex fftw) + -DGRIB=OFF + -DGLPK=$(usex glpk) + -DHDF=$(usex hdf) + -DHDF5=$(usex hdf5) + -DLIBPROJ=$(usex proj) + -DNETCDF=$(usex netcdf) + -DOPENMP=$(usex openmp) + -DPNGLIB=$(usex png) + -DUDUNITS2=$(usex udunits) + -DWXWIDGETS=$(usex wxwidgets) + -DGRAPHICSMAGICK=$(usex imagemagick $(usex graphicsmagick)) + -DMAGICK=$(usex imagemagick $(usex !graphicsmagick)) + -DTIFF=$(usex tiff) + -DGEOTIFF=$(usex tiff) + -DPYTHON_MODULE=$(usex python) + -DPYTHON=$(usex python) + -DSHAPELIB=$(usex shapelib) + -DQHULL=OFF + ) + + if use python; then + # automatically selection ignores EPYTHON + mycmakeargs+=( + -DPYTHONVERSION="${EPYTHON#python}" + ) + fi + + cmake_src_configure +} + +src_test() { + virtx cmake_src_test +} + +src_install() { + cmake_src_install + + newenvd - 50gdl <<-_EOF_ + GDL_PATH="+${EPREFIX}/usr/share/gnudatalanguage" + _EOF_ +} |