diff options
author | Universebenzene | 2021-08-03 16:19:10 +0800 |
---|---|---|
committer | Universebenzene | 2021-08-03 16:19:10 +0800 |
commit | 172ad1ed3d862e23591b6edad8d2233cc37edbf7 (patch) | |
tree | ba89d5cdd0a565b8b37c86f6ce0774003d3a952e | |
parent | 072a7437276a4f736c5ecec20029ec7c6645b486 (diff) | |
download | aur-172ad1ed3d862e23591b6edad8d2233cc37edbf7.tar.gz |
Update to version 1.0.0_rc.3
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | gdl-mallinfo2.patch | 69 | ||||
-rw-r--r-- | gdl-tiff.patch | 199 |
5 files changed, 298 insertions, 32 deletions
@@ -1,23 +1,21 @@ pkgbase = python-gdl pkgdesc = Python interface for the GNU Data Language(GDL) - pkgver = 0.9.9 + pkgver = 1.0.0_rc.3 pkgrel = 2 - url = http://gnudatalanguage.sourceforge.net/ + url = http://gnudatalanguage.sourceforge.net arch = i686 arch = x86_64 license = GPL makedepends = cmake - makedepends = python - depends = gnudatalanguage=0.9.9 + depends = gnudatalanguage=1.0.0_rc.3 conflicts = python2-gdl - source = https://github.com/gnudatalanguage/gdl/archive/v0.9.9.tar.gz - source = gdl-python3.patch - source = gdl-graphicsmagick.patch + source = https://github.com/gnudatalanguage/gdl/archive/v1.0.0-rc.3.tar.gz source = gdl.profile - md5sums = 749dc9b6dd0b9a5385ffe83e7b1a6f46 - md5sums = f757aec04c3149e5cd003990d50c8fa4 - md5sums = 366bb65898facb4112dd213fe20c69e3 + source = gdl-mallinfo2.patch + source = gdl-tiff.patch + md5sums = a6dbcbf5eaf7bb27440fdb69b84d38d7 md5sums = 40aa5fd8278cd8e80425c62a577563cc + md5sums = ae546f1cb8f775dfc8589f656bdaf40a + md5sums = e3270e6d366670a10947e4199c7bc35a pkgname = python-gdl - diff --git a/.gitignore b/.gitignore index 26b182d2191f..e973b6c95374 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,7 @@ !gdl.profile !gdl-python3.patch !gdl-graphicsmagick.patch +!gdl-mallinfo2.patch +!gdl-tiff.patch !PKGBUILD !.SRCINFO @@ -5,55 +5,53 @@ # Contributor: Jan Kohnert <kohni.jk at gmail dot com> pkgname=python-gdl -pkgver=0.9.9 +pkgver=1.0.0_rc.3 pkgrel=2 pkgdesc="Python interface for the GNU Data Language(GDL)" arch=('i686' 'x86_64') -url="http://gnudatalanguage.sourceforge.net/" +url="http://gnudatalanguage.sourceforge.net" license=('GPL') depends=("gnudatalanguage=${pkgver}") -makedepends=('cmake' 'python') +makedepends=('cmake') #options=('!makeflags') conflicts=('python2-gdl') -source=("https://github.com/gnudatalanguage/gdl/archive/v${pkgver}.tar.gz" -# 'gdl-tirpc.patch' -# 'gdl-updates.patch' - 'gdl-python3.patch' - 'gdl-graphicsmagick.patch' - 'gdl.profile') -md5sums=('749dc9b6dd0b9a5385ffe83e7b1a6f46' - 'f757aec04c3149e5cd003990d50c8fa4' - '366bb65898facb4112dd213fe20c69e3' - '40aa5fd8278cd8e80425c62a577563cc') +source=("https://github.com/gnudatalanguage/gdl/archive/v${pkgver/_/-}.tar.gz" + 'gdl.profile' + 'gdl-mallinfo2.patch' + 'gdl-tiff.patch') +md5sums=('a6dbcbf5eaf7bb27440fdb69b84d38d7' + '40aa5fd8278cd8e80425c62a577563cc' + 'ae546f1cb8f775dfc8589f656bdaf40a' + 'e3270e6d366670a10947e4199c7bc35a') prepare() { - cd ${srcdir}/gdl-${pkgver} + cd ${srcdir}/gdl-${pkgver/_/-} # patch -p1 < ../gdl-tirpc.patch # patch -p1 < ../gdl-updates.patch - patch -Np1 -l -i "${srcdir}/gdl-python3.patch" - patch -Np1 -i "${srcdir}/gdl-graphicsmagick.patch" + patch -p1 -l -N -i "${srcdir}"/gdl-mallinfo2.patch + patch -p1 -l -N -i "${srcdir}"/gdl-tiff.patch export _pyver=$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])') } build() { - cd ${srcdir}/gdl-${pkgver} + cd ${srcdir}/gdl-${pkgver/_/-} if [[ -d build ]]; then rm -r build fi mkdir build cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr -DPYTHON=ON -DPYTHONVERSION=3 \ + cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr -DPYTHON=ON -DPYTHONVERSION=3 \ -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_MODULE=ON \ -DGRAPHICSMAGICK=ON -DMAGICK=OFF -DFFTW=ON -DHDF=ON -DHDFDIR=/opt/hdf4 \ - -DHDF5=ON -DGRIB=ON -DUDUNITS=ON -DEIGEN3=ON \ - -DNETCDF=ON -DREADLINE=ON -DEDITLINE=OFF .. + -DHDF5=ON -DGRIB=ON -DUDUNITS2=ON -DEIGEN3=ON \ + -DNETCDF=ON -DREADLINE=ON -DLIBPROJ4=OFF -DGLPK=ON -DSHAPELIB=ON .. make } package() { - cd ${srcdir}/gdl-${pkgver}/build + cd ${srcdir}/gdl-${pkgver/_/-}/build if [[ -d ../pkginstall ]]; then rm -r ../pkginstall fi diff --git a/gdl-mallinfo2.patch b/gdl-mallinfo2.patch new file mode 100644 index 000000000000..bb629ba96d87 --- /dev/null +++ b/gdl-mallinfo2.patch @@ -0,0 +1,69 @@ +diff -U 3 -dHrN -- gdl-1.0.0-rc.3_orig/CMakeLists.txt gdl-1.0.0-rc.3/CMakeLists.txt +--- gdl-1.0.0-rc.3_orig/CMakeLists.txt 2020-06-19 18:03:33.000000000 +0200 ++++ gdl-1.0.0-rc.3/CMakeLists.txt 2021-07-31 21:36:40.184567405 +0200 +@@ -162,6 +162,7 @@ + check_function_exists(malloc_zone_statistics HAVE_MALLOC_ZONE_STATISTICS) + check_function_exists(sbrk HAVE_SBRK) + check_function_exists(mallinfo HAVE_MALLINFO) ++check_function_exists(mallinfo2 HAVE_MALLINFO2) + + # mallocs + check_include_file(malloc.h HAVE_MALLOC_H) +diff -U 3 -dHrN -- gdl-1.0.0-rc.3_orig/config.h.cmake gdl-1.0.0-rc.3/config.h.cmake +--- gdl-1.0.0-rc.3_orig/config.h.cmake 2020-06-19 18:03:33.000000000 +0200 ++++ gdl-1.0.0-rc.3/config.h.cmake 2021-07-31 21:36:40.184567405 +0200 +@@ -22,6 +22,7 @@ + #cmakedefine HAVE_LOCALE_H 1 + #cmakedefine HAVE_SBRK 1 + #cmakedefine HAVE_MALLINFO 1 ++#cmakedefine HAVE_MALLINFO2 1 + #cmakedefine HAVE_MALLOC_H 1 + #cmakedefine HAVE_MALLOC_MALLOC_H 1 + #cmakedefine HAVE_MALLOC_ZONE_STATISTICS 1 +diff -U 3 -dHrN -- gdl-1.0.0-rc.3_orig/src/basegdl.cpp gdl-1.0.0-rc.3/src/basegdl.cpp +--- gdl-1.0.0-rc.3_orig/src/basegdl.cpp 2020-06-19 18:03:33.000000000 +0200 ++++ gdl-1.0.0-rc.3/src/basegdl.cpp 2021-07-31 22:10:51.046521975 +0200 +@@ -769,7 +769,7 @@ + SizeT MemStats::HighWater = 0; + SizeT MemStats::Current = 0; + +-#if !defined(HAVE_MALLINFO) ++#if (!defined(HAVE_MALLINFO) && !defined(HAVE_MALLINFO2)) + # if (!defined(HAVE_MALLOC_ZONE_STATISTICS) || !defined(HAVE_MALLOC_MALLOC_H)) + # if defined(HAVE_SBRK) + char* MemStats::StartOfMemory = reinterpret_cast<char*>(::sbrk(0)); +diff -U 3 -dHrN -- gdl-1.0.0-rc.3_orig/src/basegdl.hpp gdl-1.0.0-rc.3/src/basegdl.hpp +--- gdl-1.0.0-rc.3_orig/src/basegdl.hpp 2021-07-31 21:12:27.366570216 +0200 ++++ gdl-1.0.0-rc.3/src/basegdl.hpp 2021-07-31 22:13:46.689456377 +0200 +@@ -37,7 +37,7 @@ + #ifdef HAVE_MALLOC_MALLOC_H + # include <malloc/malloc.h> + #endif +-#if !defined(HAVE_MALLINFO) ++#if (!defined(HAVE_MALLINFO) && !defined(HAVE_MALLINFO2)) + # if (!defined(HAVE_MALLOC_ZONE_STATISTICS) || !defined(HAVE_MALLOC_MALLOC_H)) + # if defined(HAVE_SBRK) + # include <unistd.h> +@@ -292,7 +292,7 @@ + // SizeT has architecture-dependant size (32/64 bit) + static SizeT NumAlloc, NumFree, HighWater, Current; + +-#if !defined(HAVE_MALLINFO) ++#if (!defined(HAVE_MALLINFO) && !defined(HAVE_MALLINFO2)) + # if (!defined(HAVE_MALLOC_ZONE_STATISTICS) || !defined(HAVE_MALLOC_MALLOC_H)) + # if defined(HAVE_SBRK) + static char* StartOfMemory; +@@ -340,7 +340,12 @@ + // - the LLVM project (lib/System/Unix/Process.inc) see http://llvm.org/ + // - the Squid cache project (src/tools.cc) see http://squid-cache.org/ + // TODO (TOCHECK): Squid considers also gnumalloc.h - ? +-#if defined(HAVE_MALLINFO) ++#if defined(HAVE_MALLINFO2) ++ // Docs see below, newer versions of glibc deprecated mallinfo() ++ static struct mallinfo2 mi; ++ mi = mallinfo2(); ++ Current = mi.arena+mi.hblkhd; ++#elif defined(HAVE_MALLINFO) + // Linux case for example + static struct mallinfo mi; + mi = mallinfo(); diff --git a/gdl-tiff.patch b/gdl-tiff.patch new file mode 100644 index 000000000000..4cd3e396bcfb --- /dev/null +++ b/gdl-tiff.patch @@ -0,0 +1,199 @@ +diff -U 3 -dHrN -- gdl-1.0.0-rc.3_orig/src/tiff.cxx gdl-1.0.0-rc.3/src/tiff.cxx +--- gdl-1.0.0-rc.3_orig/src/tiff.cxx 2020-06-19 18:03:33.000000000 +0200 ++++ gdl-1.0.0-rc.3/src/tiff.cxx 2021-07-31 23:55:20.514208009 +0200 +@@ -219,24 +219,24 @@ + return true; + } + +- uint16 Handler::DirectoryCount() const ++ uint16_t Handler::DirectoryCount() const + { + return (tiff_ ? nDirs_ : 0); + } + +- uint16 Handler::FileVersion() const ++ uint16_t Handler::FileVersion() const + { + return (tiff_ ? verNum_ : 0); + } + +- typedef void (*ScanlineFn)(BaseGDL*, uint32, uint32, const void*, size_t); ++ typedef void (*ScanlineFn)(BaseGDL*, uint32_t, uint32_t, const void*, size_t); + template<typename T> + ScanlineFn createScanlineFn(BaseGDL*& var, T* val) + { + if(!(var = val)) + return nullptr; + +- return [](BaseGDL* image, uint32 x, uint32 y, const void* buf, size_t bytes) { ++ return [](BaseGDL* image, uint32_t x, uint32_t y, const void* buf, size_t bytes) { + auto img = static_cast<T*>(image); + auto ptr = reinterpret_cast<typename T::Ty*>(img->DataAddr()); + auto dim = img->Dim(); +@@ -248,9 +248,9 @@ + + BaseGDL* Handler::ReadImage(const Directory& dir, const Rectangle& rect) + { +- uint32 c = dir.samplesPerPixel; +- uint32 w = (rect.w ? rect.w : dir.width - rect.x); +- uint32 h = (rect.h ? rect.h : dir.height - rect.y); ++ uint32_t c = dir.samplesPerPixel; ++ uint32_t w = (rect.w ? rect.w : dir.width - rect.x); ++ uint32_t h = (rect.h ? rect.h : dir.height - rect.y); + + ScanlineFn addScanline; + BaseGDL* image = nullptr; +@@ -289,7 +289,7 @@ + goto error; + } + +- for(uint32 y = 0; y < h; ++y) { ++ for(uint32_t y = 0; y < h; ++y) { + if(TIFFReadScanline(tiff_, buffer, rect.y + y, 0) == -1) + goto error; + +@@ -307,13 +307,13 @@ + goto error; + } + +- for(uint32 y = 0, yrem, yoff; y < h; y += yrem) { ++ for(uint32_t y = 0, yrem, yoff; y < h; y += yrem) { + yoff = (rect.y + y) % dir.tileHeight; + + if(((yrem = dir.tileHeight - yoff) + y) > h) + yrem = h - y; + +- for(uint32 x = 0, xrem, xoff; x < w; x += xrem) { ++ for(uint32_t x = 0, xrem, xoff; x < w; x += xrem) { + if(TIFFReadTile(tiff_, buffer, rect.x + x, rect.y + y, 0, 0) == -1) + goto error; + +@@ -323,7 +323,7 @@ + if(((xrem = dir.tileWidth - xoff) + x) > w) + xrem = w - x; + +- for(uint32 ty = 0; ty < yrem; ++ty, start += (sampOff * dir.tileWidth)) ++ for(uint32_t ty = 0; ty < yrem; ++ty, start += (sampOff * dir.tileWidth)) + addScanline(image, x, y + ty, start, sampOff * xrem); + } + } +@@ -352,7 +352,7 @@ + + DStructFactory gtif; + TIFF::GeoKey gk; +- int16 nvals; ++ int16_t nvals; + double* val; + + // TIFF geo fields +diff -U 3 -dHrN -- gdl-1.0.0-rc.3_orig/src/tiff.hxx gdl-1.0.0-rc.3/src/tiff.hxx +--- gdl-1.0.0-rc.3_orig/src/tiff.hxx 2020-06-19 18:03:33.000000000 +0200 ++++ gdl-1.0.0-rc.3/src/tiff.hxx 2021-07-31 23:53:29.572624524 +0200 +@@ -36,12 +36,12 @@ + struct Directory + { + tdir_t index = 0; +- uint32 width = 0; +- uint32 height = 0; +- uint32 tileWidth = 0; +- uint32 tileHeight = 0; +- uint16 samplesPerPixel = 1; +- uint16 bitsPerSample = 1; ++ uint32_t width = 0; ++ uint32_t height = 0; ++ uint32_t tileWidth = 0; ++ uint32_t tileHeight = 0; ++ uint16_t samplesPerPixel = 1; ++ uint16_t bitsPerSample = 1; + + struct Position + { +@@ -54,7 +54,7 @@ + float x = 1.f; + float y = 1.f; + +- enum class Unit : uint16 ++ enum class Unit : uint16_t + { + None = 1, + Inches = 2, +@@ -62,7 +62,7 @@ + } unit = Unit::Inches; + } resolution; + +- enum class Orientation : uint16 ++ enum class Orientation : uint16_t + { + LeftToRightTopToBottom = 1, + RightToLeftTopToBottom = 2, +@@ -74,7 +74,7 @@ + BottomToTopLeftToRight = 8, + } orientation = Orientation::LeftToRightTopToBottom; + +- enum class SampleFormat : uint16 ++ enum class SampleFormat : uint16_t + { + UnsignedInteger = 1, + SignedInteger = 2, +@@ -84,13 +84,13 @@ + ComplexFloatingPoint = 6, + } sampleFormat = SampleFormat::UnsignedInteger; + +- enum class PlanarConfig : uint16 ++ enum class PlanarConfig : uint16_t + { + Contiguous = 1, + Separate = 2, + } planarConfig = PlanarConfig::Contiguous; + +- enum class Photometric : uint16 ++ enum class Photometric : uint16_t + { + MinIsWhite = 0, + MinIsBlack = 1, +@@ -109,9 +109,9 @@ + + struct ColorMap + { +- uint16* red; +- uint16* green; +- uint16* blue; ++ uint16_t* red; ++ uint16_t* green; ++ uint16_t* blue; + } colorMap = { 0 }; + + const char* description = ""; +@@ -148,8 +148,8 @@ + + struct Rectangle + { +- uint32 x, y; +- uint32 w, h; ++ uint32_t x, y; ++ uint32_t w, h; + }; + + class Handler +@@ -161,8 +161,8 @@ + bool Open(const char* file, const char* mode); + void Close(); + bool GetDirectory(tdir_t, Directory&) const; +- uint16 DirectoryCount() const; +- uint16 FileVersion() const; ++ uint16_t DirectoryCount() const; ++ uint16_t FileVersion() const; + BaseGDL* ReadImage(const Directory&, const Rectangle& = { 0 }); + + template<typename... Ts> +@@ -193,8 +193,8 @@ + #endif + TIFFErrorHandler defEH_ = nullptr; + TIFFErrorHandler defWH_ = nullptr; +- uint16 nDirs_ = 1; +- uint16 verNum_ = 0; ++ uint16_t nDirs_ = 1; ++ uint16_t verNum_ = 0; + }; + } + |