mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
potrace: add actual recipe for version 1.13.
* remove old format recipe and patch.
This commit is contained in:
63
media-gfx/potrace/patches/potrace-1.13.patchset
Normal file
63
media-gfx/potrace/patches/potrace-1.13.patchset
Normal file
@@ -0,0 +1,63 @@
|
||||
From 77efdb2dbf1053ffd8d3d611744294b42b9edae1 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 1 Aug 2016 19:08:15 +0000
|
||||
Subject: Haiku patch
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 93be9b1..576d65b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -197,7 +197,7 @@ for PostScript level 3 compression.])
|
||||
])
|
||||
fi
|
||||
|
||||
-AC_CHECK_LIB(m, floor, true, AC_MSG_ERROR([cannot find the m library (-lm)]))
|
||||
+AC_CHECK_LIB(m, floor, MATH_LIBS="-lm", MATH_LIBS="")
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Check for library functions.
|
||||
@@ -264,6 +264,7 @@ AC_SUBST(POTRACE)
|
||||
AC_SUBST(MKBITMAP)
|
||||
AC_SUBST(EXTRA_OBJS)
|
||||
AC_SUBST(EXTRA_LIBS)
|
||||
+AC_SUBST(MATH_LIBS)
|
||||
AC_SUBST(AM_CPPFLAGS)
|
||||
AC_SUBST(POTRACELIB_VERSION)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index bf84312..3414c06 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -20,16 +20,16 @@ potrace_SOURCES = main.c main.h bitmap_io.c bitmap_io.h backend_eps.c \
|
||||
lzw.c lzw.h bitops.h auxiliary.h potracelib.h bitmap.h curve.h \
|
||||
platform.h progress.h progress_bar.c progress_bar.h bbox.c bbox.h \
|
||||
trans.c trans.h
|
||||
-potrace_LDADD = libpotrace.la @EXTRA_OBJS@ -lm @EXTRA_LIBS@
|
||||
+potrace_LDADD = libpotrace.la @EXTRA_OBJS@ @MATH_LIBS@ @EXTRA_LIBS@
|
||||
potrace_DEPENDENCIES = libpotrace.la @EXTRA_OBJS@
|
||||
|
||||
mkbitmap_SOURCES = mkbitmap.c bitmap_io.c bitmap_io.h greymap.c \
|
||||
greymap.h platform.h bitmap.h potracelib.h bitops.h
|
||||
-mkbitmap_LDADD = @EXTRA_OBJS@ -lm
|
||||
+mkbitmap_LDADD = @EXTRA_OBJS@ @MATH_LIBS@
|
||||
mkbitmap_DEPENDENCIES = @EXTRA_OBJS@
|
||||
|
||||
potracelib_demo_SOURCES = potracelib_demo.c
|
||||
-potracelib_demo_LDADD = libpotrace.la -lm
|
||||
+potracelib_demo_LDADD = libpotrace.la @MATH_LIBS@
|
||||
potracelib_demo_DEPENDENCIES = libpotrace.la
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -44,7 +44,7 @@ EXTRA_LTLIBRARIES = libpotrace.la
|
||||
libpotrace_la_SOURCES = $(libsources)
|
||||
libpotrace_la_LDFLAGS = -version-info 0:3:0 -rpath '$(libdir)' \
|
||||
-export-symbols $(srcdir)/libpotrace-export.sym -no-undefined
|
||||
-libpotrace_la_LIBADD = -lm
|
||||
+libpotrace_la_LIBADD = @MATH_LIBS@
|
||||
MOSTLYCLEANFILES = libpotrace.la
|
||||
|
||||
# header files to install
|
||||
--
|
||||
2.7.0
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
diff -urN potrace-1.8/Makefile.in potrace-1.8-haiku/Makefile.in
|
||||
--- potrace-1.8/Makefile.in 2007-04-09 00:28:49.063963136 +0000
|
||||
+++ potrace-1.8-haiku/Makefile.in 2010-09-22 14:37:46.670564352 +0000
|
||||
@@ -101,6 +101,7 @@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBM = @LIBM@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKBITMAP = @MKBITMAP@
|
||||
diff -urN potrace-1.8/configure.in potrace-1.8-haiku/configure.in
|
||||
--- potrace-1.8/configure.in 2007-04-09 00:27:12.063700992 +0000
|
||||
+++ potrace-1.8-haiku/configure.in 2010-09-22 13:58:47.000000000 +0000
|
||||
@@ -135,7 +135,8 @@
|
||||
])
|
||||
fi
|
||||
|
||||
-AC_CHECK_LIB(m, floor, true, AC_MSG_ERROR([cannot find the m library (-lm)]))
|
||||
+AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
|
||||
+AC_CHECK_LIB(m, floor, LIBM="$LIBM -lm")
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Check for library functions.
|
||||
diff -urN potrace-1.8/src/Makefile.am potrace-1.8-haiku/src/Makefile.am
|
||||
--- potrace-1.8/src/Makefile.am 2007-04-09 00:36:44.066060288 +0000
|
||||
+++ potrace-1.8-haiku/src/Makefile.am 2010-09-22 14:51:36.089653248 +0000
|
||||
@@ -16,16 +16,16 @@
|
||||
backend_gimp.c backend_gimp.h backend_xfig.c backend_xfig.h \
|
||||
backend_pdf.c backend_pdf.h lzw.c lzw.h bitops.h auxiliary.h potracelib.h \
|
||||
bitmap.h curve.h platform.h progress.h
|
||||
-potrace_LDADD = libpotrace.a @EXTRA_OBJS@ -lm @EXTRA_LIBS@
|
||||
+potrace_LDADD = libpotrace.a @EXTRA_OBJS@ $(LIBM) @EXTRA_LIBS@
|
||||
potrace_DEPENDENCIES = libpotrace.a @EXTRA_OBJS@
|
||||
|
||||
mkbitmap_SOURCES = mkbitmap.c bitmap_io.c bitmap_io.h greymap.c \
|
||||
greymap.h platform.h
|
||||
-mkbitmap_LDADD = @EXTRA_OBJS@ -lm
|
||||
+mkbitmap_LDADD = @EXTRA_OBJS@ $(LIBM)
|
||||
mkbitmap_DEPENDENCIES = @EXTRA_OBJS@
|
||||
|
||||
potracelib_demo_SOURCES = potracelib_demo.c
|
||||
-potracelib_demo_LDADD = libpotrace.a -lm
|
||||
+potracelib_demo_LDADD = libpotrace.a $(LIBM)
|
||||
potracelib_demo_DEPENDENCIES = libpotrace.a
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
diff -urN potrace-1.8/src/Makefile.in potrace-1.8-haiku/src/Makefile.in
|
||||
--- potrace-1.8/src/Makefile.in 2007-04-09 00:37:31.066322432 +0000
|
||||
+++ potrace-1.8-haiku/src/Makefile.in 2010-09-22 14:34:20.208666624 +0000
|
||||
@@ -117,6 +117,7 @@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBM = @LIBM@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKBITMAP = @MKBITMAP@
|
||||
@@ -172,15 +173,15 @@
|
||||
backend_pdf.c backend_pdf.h lzw.c lzw.h bitops.h auxiliary.h potracelib.h \
|
||||
bitmap.h curve.h platform.h progress.h
|
||||
|
||||
-potrace_LDADD = libpotrace.a @EXTRA_OBJS@ -lm @EXTRA_LIBS@
|
||||
+potrace_LDADD = libpotrace.a @EXTRA_OBJS@ $(LIBM) @EXTRA_LIBS@
|
||||
potrace_DEPENDENCIES = libpotrace.a @EXTRA_OBJS@
|
||||
mkbitmap_SOURCES = mkbitmap.c bitmap_io.c bitmap_io.h greymap.c \
|
||||
greymap.h platform.h
|
||||
|
||||
-mkbitmap_LDADD = @EXTRA_OBJS@ -lm
|
||||
+mkbitmap_LDADD = @EXTRA_OBJS@ $(LIBM)
|
||||
mkbitmap_DEPENDENCIES = @EXTRA_OBJS@
|
||||
potracelib_demo_SOURCES = potracelib_demo.c
|
||||
-potracelib_demo_LDADD = libpotrace.a -lm
|
||||
+potracelib_demo_LDADD = libpotrace.a $(LIBM)
|
||||
potracelib_demo_DEPENDENCIES = libpotrace.a
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
89
media-gfx/potrace/potrace-1.13.recipe
Normal file
89
media-gfx/potrace/potrace-1.13.recipe
Normal file
@@ -0,0 +1,89 @@
|
||||
SUMMARY="Portable Network Graphics library"
|
||||
DESCRIPTION="Potrace is a tool for tracing a bitmap, which means, transforming a \
|
||||
bitmap into a smooth, scalable image. The input is a bitmap (PBM, \
|
||||
PGM, PPM, or BMP), and the default output is one of several vector \
|
||||
file formats. A typical use is to create EPS files from scanned \
|
||||
data, such as company or university logos, handwritten notes, etc. \
|
||||
The resulting image is not \"jaggy\" like a bitmap, but smooth. It can \
|
||||
then be rendered at any resolution.
|
||||
|
||||
Potrace can currently produce the following output formats: EPS, \
|
||||
PostScript, PDF, SVG (scalable vector graphics), DXF, GeoJSON, PGM \
|
||||
(for easy antialiasing of pixel-based images), Gimppath, and \
|
||||
XFig. Additional backends might be added in the future.
|
||||
|
||||
A separate program, mkbitmap, is also provided. This program can act \
|
||||
as a pre-processor for Potrace, applying scaling and various filters \
|
||||
to an image before converting it to a bitmap. This is useful for \
|
||||
potracing greyscale and color images.
|
||||
"
|
||||
HOMEPAGE="http://potrace.sourceforge.net/"
|
||||
COPYRIGHT="2001-2015 Peter Selinger"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://potrace.sourceforge.net/download/$portVersion/potrace-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="6252438b6b6644b9b6298056b4c5de3690a1d4e862b66889abe21eecdf16b784"
|
||||
PATCHES="potrace-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
potrace$secondaryArchSuffix = $portVersion
|
||||
lib:libpotrace$secondaryArchSuffix = 0.0.3 compat >= 0
|
||||
cmd:mkbitmap
|
||||
cmd:potrace
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
potrace${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libpotrace$secondaryArchSuffix = 0.0.3 compat >= 0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
potrace$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -f -i
|
||||
runConfigure ./configure --with-libpotrace
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
rm $libDir/libpotrace.la
|
||||
|
||||
prepareInstalledDevelLibs libpotrace
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
DESCRIPTION="transforms bitmaps into vector graphics"
|
||||
HOMEPAGE="http://potrace.sourceforge.net/"
|
||||
SOURCE_URI="http://potrace.sourceforge.net/download/potrace-1.8.tar.gz"
|
||||
CHECKSUM_MD5="e73b45565737d64011612704dd4d9f86"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND=""
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd potrace-1.8
|
||||
libtoolize --force --copy --install
|
||||
aclocal
|
||||
autoconf
|
||||
automake
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd potrace-1.8
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2001-2007 Peter Selinger"
|
||||
Reference in New Issue
Block a user