flam3, remove old bep/patch file(s), bump version with a working recipe (#1308)

This commit is contained in:
Schrijvers Luc
2017-04-29 02:44:53 +02:00
committed by waddlesplash
parent 6fff90be5f
commit f08e99da8b
5 changed files with 167 additions and 129 deletions

View File

@@ -1,29 +0,0 @@
DESCRIPTION="Flam3 - Tools and a library for creating flame fractal images"
HOMEPAGE="http://flam3.com/"
SOURCE_URI="http://flam3.googlecode.com/files/flam3-3.0.tar.gz"
CHECKSUM_MD5="0526e476338327f718d76e6f48ddc090"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-util/pkconfig >= 0.23"
BUILD()
{
cd flam3-3.0/src
if [ -n "$(setgcc | grep '2')" ]; then
patch -p0 -ui ../../../patches/flam3-3.0-gcc2.patch
fi
libtoolize --force --copy --install
autoreconf -i
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL()
{
cd flam3-3.0/src
make install
}
LICENSE="GNU GPL v3"
COPYRIGHT="1992-2009 Spotworks LLC"

View File

@@ -0,0 +1,83 @@
SUMMARY="Tools and library for creating flame fractal images"
DESCRIPTION="Flam3 - Flames are algorithmically generated images and \
animations. The software was originally written in 1992 and released as \
open source, aka free software. Over the years it has been greatly expanded, \
and is now widely used to create art and special effects. The shape and \
color of each image is specified by a long string of numbers - a genetic \
code of sorts."
HOMEPAGE="http://flam3.com/"
COPYRIGHT="1992-2015 Scott Draves, Erik Reckase"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/scottdraves/flam3/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="afcd4af13897740e34f6ae1f3061bbfbda9c1dd5df3ecc9f57141c985d35d19d"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
if [ "$effectiveTargetArchitecture" = x86_gcc2 ];then
PATCHES="flam3-$portVersion.patchset"
fi
PROVIDES="
flam3$secondaryArchSuffix = $portVersion
cmd:flam3_animate$secondaryArchSuffix
cmd:flam3_convert$secondaryArchSuffix
cmd:flam3_genome$secondaryArchSuffix
cmd:flam3_render$secondaryArchSuffix
lib:libflam3$secondaryArchSuffix = 0.0.0 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
flam3${secondaryArchSuffix}_devel = $portVersion
devel:libflam3$secondaryArchSuffix = 0.0.0 compat >= 0
"
REQUIRES_devel="
flam3$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libjpeg$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:awk
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:libtoolize$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
cmd:make
"
BUILD()
{
autoreconf -vfi
runConfigure ./configure --enable-shared
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libflam3.la
prepareInstalledDevelLib libflam3
fixPkgconfig
packageEntries devel \
$developDir
}

View File

@@ -1,11 +0,0 @@
--- Makefile.am 2010-10-11 22:35:32.020447232 +0200
+++ Makefile.am 2010-11-18 11:10:09.946339840 +0100
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
SVN_DEF = -D'SVN_REV="$(shell svnversion -n .)"'
-AM_CFLAGS = -g -O3 -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
+AM_CFLAGS = -g -O3 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(SVN_DEF)
ACLOCAL_AMFLAGS = -I m4

View File

@@ -1,89 +0,0 @@
diff -Naurb flam3-3.0/src/Makefile.am flam3-3.0-haiku/src/Makefile.am
--- flam3-3.0/src/Makefile.am 2010-10-11 22:35:32.020447232 +0200
+++ flam3-3.0-haiku/src/Makefile.am 2010-11-16 10:56:25.806617088 +0100
@@ -11,19 +11,19 @@
include_HEADERS = flam3.h isaac.h isaacs.h rect.c
libflam3_la_SOURCES = flam3.c filters.c parser.c variations.c interpolation.c palettes.c jpeg.c png.c isaac.c
-libflam3_la_LDFLAGS = -no-undefined -ljpeg -lpng -lz -lpthread
+libflam3_la_LDFLAGS = -no-undefined -ljpeg -lpng -lz $(LIBPTHREAD)
flam3_genome_SOURCES = flam3-genome.c docstring.c
-flam3_genome_LDADD = libflam3.la -lm
+flam3_genome_LDADD = libflam3.la $(LIBM)
flam3_animate_SOURCES = flam3-animate.c docstring.c
-flam3_animate_LDADD = libflam3.la -lm
+flam3_animate_LDADD = libflam3.la $(LIBM)
flam3_render_SOURCES = flam3-render.c docstring.c
-flam3_render_LDADD = libflam3.la -lm
+flam3_render_LDADD = libflam3.la $(LIBM)
flam3_convert_SOURCES = flam3-convert.c docstring.c
-flam3_convert_LDADD = libflam3.la -lm
+flam3_convert_LDADD = libflam3.la $(LIBM)
pkgdata_DATA = flam3-palettes.xml
diff -Naurb flam3-3.0/src/configure.in flam3-3.0-haiku/src/configure.in
--- flam3-3.0/src/configure.in 2010-10-11 22:35:32.020971520 +0200
+++ flam3-3.0-haiku/src/configure.in 2010-11-08 17:38:50.000000000 +0100
@@ -27,6 +27,7 @@
AC_CHECK_LIB([z],[deflateInit_],,[AC_MSG_ERROR([zlib is required.])])
AC_CHECK_LIB([png],[png_write_image],,[AC_MSG_ERROR([The png library is required.])])
AC_CHECK_LIB([xml2],[xmlParseFile],,[AC_MSG_ERROR([The xml2 library is required.])])
+AC_CHECK_LIB([m], [cos], [LIBM="$LIBM -lm"])
if test "${enable_atomic_ops}" = "" ; then
@@ -68,7 +69,10 @@
fi
if test "${enable_pthread}" = "yes" ; then
- AC_CHECK_LIB([pthread],[pthread_create],,[AC_MSG_WARN([Pthread library not found - threads disabled.])])
+ AC_CHECK_LIB([pthread], [pthread_create], [LIBPTHREAD="-lpthread"],
+ [AC_CHECK_LIB([root], [pthread_create], [LIBPTHREAD="", AC_DEFINE([HAVE_LIBPTHREAD], 1, [Have builtin pthread API])],
+ [AC_MSG_WARN([Pthread library not found - threads disabled.])])])
+# AC_CHECK_LIB([pthread root],[pthread_create],,[AC_MSG_WARN([Pthread library not found - threads disabled.])])
fi
AC_CHECK_LIB([jpeg],[jpeg_start_compress],,[AC_MSG_ERROR([The jpeg library is required.])])
AC_PATH_PROG(XML2_CONFIG,xml2-config, no, $PATH:/bin:/usr/bin:/usr/local/bin)
diff -Naurb flam3-3.0/src/flam3.c flam3-3.0-haiku/src/flam3.c
--- flam3-3.0/src/flam3.c 2010-10-11 22:35:32.026738688 +0200
+++ flam3-3.0-haiku/src/flam3.c 2010-11-08 17:13:58.000000000 +0100
@@ -50,9 +50,14 @@
#include <windows.h>
#define flam3_os "WIN"
#else
+#ifdef __HAIKU__
+#include <OS.h>
+#define flam3_os "HAIKU"
+#else
#define flam3_os "LNX"
#endif
#endif
+#endif
@@ -1339,6 +1344,11 @@
return(1);
#endif
+#ifdef __HAIKU__
+ system_info si;
+ get_system_info(&si);
+ nthreads = si.cpu_count;
+#else
#ifdef _WIN32
SYSTEM_INFO sysInfo;
GetSystemInfo(&sysInfo);
@@ -1380,6 +1390,7 @@
#endif
#endif
#endif
+#endif
return (nthreads);
}

View File

@@ -0,0 +1,84 @@
From 3a83a1c2fd8fba40edec980d4c023f357f9d78d0 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 28 Apr 2017 22:28:42 +0200
Subject: flam3, gcc2 patch
diff --git a/Makefile.am b/Makefile.am
index c3d0f42..8d841dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
GIT_DEF = -D'GIT_REV="$(shell git describe --tags --dirty)"'
-AM_CFLAGS = -g -O3 -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(GIT_DEF)
+AM_CFLAGS = -g -O3 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(GIT_DEF)
ACLOCAL_AMFLAGS = -I m4
diff --git a/flam3-genome.c b/flam3-genome.c
index 509dbd7..5798e94 100644
--- a/flam3-genome.c
+++ b/flam3-genome.c
@@ -888,10 +888,12 @@ main(argc, argv)
fprintf(stderr, "can only find parents of one genome\n");
exit(1);
}
- xmlDocPtr edits = cp[0].edits;
+ {
+ xmlDocPtr edits = cp[0].edits;
xmlNode *rootnode = xmlDocGetRootElement(edits);
print_find_parents(rootnode, 0, 0);
exit(0);
+ }
}
/* pick a control point until it looks good enough */
diff --git a/flam3.c b/flam3.c
index 8b84629..47761f1 100644
--- a/flam3.c
+++ b/flam3.c
@@ -1816,7 +1816,8 @@ void flam3_print(FILE *f, flam3_genome *cp, char *extra_attributes, int print_ed
}
- int hexpalette = argi("hexpalette",0);
+ {
+ int hexpalette = argi("hexpalette",0);
if (hexpalette) {
@@ -1891,6 +1892,7 @@ void flam3_print(FILE *f, flam3_genome *cp, char *extra_attributes, int print_ed
fprintf(stderr, "error: couldn't restore locale settings\n");
free(locale);
}
+ }
}
#define PRINTNON(p) do { if (x->p != 0.0) fprintf(f, #p "=\"%f\" ",x->p); } while(0)
diff --git a/interpolation.c b/interpolation.c
index 4390337..30af0a1 100644
--- a/interpolation.c
+++ b/interpolation.c
@@ -430,7 +430,8 @@ void flam3_interpolate_n(flam3_genome *result, int ncp,
new_count = 1.0;
/* Convert the new hsv coord to back rgb */
- double new_hsv_rgb[3];
+ {
+ double new_hsv_rgb[3];
hsv2rgb(new_hsv, new_hsv_rgb);
/* Store the interpolated color in the new palette */
@@ -452,6 +453,7 @@ void flam3_interpolate_n(flam3_genome *result, int ncp,
result->palette[i].index = 0.0;
if (result->palette[i].index > 255.0)
result->palette[i].index = 255.0;
+ }
}
} else {
/* Sweep - not the best option for float indices */
--
2.7.0