From 9a1c3fdf15cf8745079cc40ca22f1de6bb555f06 Mon Sep 17 00:00:00 2001 From: miqlas <5569059+extrowerk@users.noreply.github.com> Date: Mon, 13 Aug 2018 19:10:16 +0200 Subject: [PATCH] plotutils: new recipe (#2908) --- .../plotutils/patches/plotutils-2.6.patchset | 62 +++++++++++ media-libs/plotutils/plotutils-2.6.recipe | 103 ++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 media-libs/plotutils/patches/plotutils-2.6.patchset create mode 100644 media-libs/plotutils/plotutils-2.6.recipe diff --git a/media-libs/plotutils/patches/plotutils-2.6.patchset b/media-libs/plotutils/patches/plotutils-2.6.patchset new file mode 100644 index 000000000..3d8ddd2e3 --- /dev/null +++ b/media-libs/plotutils/patches/plotutils-2.6.patchset @@ -0,0 +1,62 @@ +From 9a67a68adf7f44d14cf28d9151a730b3758b34f0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 12 Aug 2018 10:37:06 +0200 +Subject: PNG build fix + + +diff --git a/libplot/z_write.c b/libplot/z_write.c +index d76a7cc..cfb1906 100644 +--- a/libplot/z_write.c ++++ b/libplot/z_write.c +@@ -164,7 +164,7 @@ _pl_z_maybe_output_image (S___(Plotter *_plotter)) + } + + /* cleanup after libpng errors (error handler does a longjmp) */ +- if (setjmp (png_ptr->jmpbuf)) ++ if (png_jmpbuf (png_ptr)) + { + png_destroy_write_struct (&png_ptr, (png_info **)NULL); + return -1; +@@ -444,7 +444,7 @@ _our_error_fn_stdio (png_struct *png_ptr, const char *data) + #endif + } + +- longjmp (png_ptr->jmpbuf, 1); ++ longjmp (png_jmpbuf (png_ptr), 1); + } + + static void +@@ -515,7 +515,7 @@ _our_error_fn_stream (png_struct *png_ptr, const char *data) + #endif + } + +- longjmp (png_ptr->jmpbuf, 1); ++ longjmp (png_jmpbuf (png_ptr), 1); + } + + static void +-- +2.16.4 + + +From 4df75ea2e441d7259f32b97018749722253b4051 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 12 Aug 2018 10:39:13 +0200 +Subject: Autoreconf fix + + +diff --git a/configure.ac b/configure.ac +index 8fb7b64..1ee3d31 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5,6 +5,7 @@ + AC_INIT([GNU plotutils],[2.6],[bug-plotutils@gnu.org]) + AC_PREREQ(2.59) + AC_CONFIG_SRCDIR(graph/graph.c) ++AC_PROG_CXX + AM_INIT_AUTOMAKE([plotutils],[2.6]) + AM_CONFIG_HEADER(config.h:config.hin) + +-- +2.16.4 + diff --git a/media-libs/plotutils/plotutils-2.6.recipe b/media-libs/plotutils/plotutils-2.6.recipe new file mode 100644 index 000000000..d32f0b5e1 --- /dev/null +++ b/media-libs/plotutils/plotutils-2.6.recipe @@ -0,0 +1,103 @@ +SUMMARY="Powerful C/C++ function library for exporting 2-D vector graphics" +DESCRIPTION="A thread-safe function library for exporting two-dimensional \ +vector graphics files, and for displaying animated vector graphics under the \ +X Window System." +HOMEPAGE="https://www.gnu.org/software/plotutils/" +COPYRIGHT="1995, 1996, 1997, 1998, 1999, 2000, 2005, 2008, Free Software Foundation, Inc." +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/plotutils/plotutils-$portVersion.tar.gz + https://ftpmirror.gnu.org/plotutils/plotutils-$portVersion.tar.gz + http://ftp.hosteurope.de/mirror/ftp.gnu.org/gnu/plotutils/plotutils-$portVersion.tar.gz + https://ftp.gnu.org/pub/plotutils/plotutils-$portVersion.tar.gz" +CHECKSUM_SHA256="4f4222820f97ca08c7ea707e4c53e5a3556af4d8f1ab51e0da6ff1627ff433ab" +PATCHES="plotutils-$portVersion.patchset" + +ARCHITECTURES="?x86_gcc2 x86 x86_64 ?arm ?ppc" +SECONDARY_ARCHITECTURES="?x86_gcc2 x86" + +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + plotutils$secondaryArchSuffix = $portVersion + lib:libplot$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_tools=" + plotutils${secondaryArchSuffix}_tools = $portVersion + cmd:double = $portVersion + cmd:graph = $portVersion + cmd:hersheydemo = $portVersion + cmd:ode = $portVersion + cmd:plot = $portVersion + cmd:plotfont = $portVersion + cmd:spline = $portVersion + cmd:tek2plot = $portVersion + " +REQUIRES_tools=" + haiku$secondaryArchSuffix + lib:libplot$secondaryArchSuffix == $portVersion base + lib:libpng16$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + plotutils${secondaryArchSuffix}_devel = $portVersion + devel:libplot$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + haiku$secondaryArchSuffix + plotutils$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libpng16$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:libtoolize$secondaryArchSuffix >= 2.4.2 + cmd:make + " + +BUILD() +{ + libtoolize --force --copy --install + autoreconf -i + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install + + rm $libDir/libplot*.la + + prepareInstalledDevelLibs libplot + fixPkgconfig + + # tools package + packageEntries tools $binDir + + # devel package + packageEntries devel \ + $developDir +} + +TEST() +{ + make check +}