aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-07-03 06:27:06 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-07-03 06:27:47 +0000
commitc3068f3c4640116d412f652386b97e0f5e907e09 (patch)
tree1dd2933fd2a14aa85cdf62fa78da1c4a88c6cf04
parent091d30b1438d064ec698c94938d85412d118cb1e (diff)
downloadports-c3068f3c4640116d412f652386b97e0f5e907e09.tar.gz
ports-c3068f3c4640116d412f652386b97e0f5e907e09.zip
graphics/kplot: New port: Cairo plotting library
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/kplot/Makefile21
-rw-r--r--graphics/kplot/distinfo3
-rw-r--r--graphics/kplot/files/patch-Makefile113
-rw-r--r--graphics/kplot/pkg-descr3
-rw-r--r--graphics/kplot/pkg-plist37
6 files changed, 178 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index 7657f37f07a0..85d1eb877603 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -412,6 +412,7 @@
SUBDIR += kontrast
SUBDIR += kooka
SUBDIR += kphotoalbum
+ SUBDIR += kplot
SUBDIR += kqtquickcharts
SUBDIR += kquickimageeditor
SUBDIR += krita
diff --git a/graphics/kplot/Makefile b/graphics/kplot/Makefile
new file mode 100644
index 000000000000..193a89e5f8ec
--- /dev/null
+++ b/graphics/kplot/Makefile
@@ -0,0 +1,21 @@
+PORTNAME= kplot
+DISTVERSIONPREFIX= VERSION_
+DISTVERSION= 0_1_15
+CATEGORIES= graphics
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Cairo plotting library
+
+LICENSE= ISCL
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+USES= gmake gnome localbase pkgconfig
+USE_GNOME= cairo
+
+USE_GITHUB= yes
+GH_ACCOUNT= kristapsdz
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libkplot.so
+
+.include <bsd.port.mk>
diff --git a/graphics/kplot/distinfo b/graphics/kplot/distinfo
new file mode 100644
index 000000000000..c45107a82fc6
--- /dev/null
+++ b/graphics/kplot/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1656828350
+SHA256 (kristapsdz-kplot-VERSION_0_1_15_GH0.tar.gz) = 602ebaac9b67dc7c7e84d8112df887c95ba0a1c4ed71fbab6671f8c5ecf4ba2a
+SIZE (kristapsdz-kplot-VERSION_0_1_15_GH0.tar.gz) = 41464
diff --git a/graphics/kplot/files/patch-Makefile b/graphics/kplot/files/patch-Makefile
new file mode 100644
index 000000000000..ba5278ce6640
--- /dev/null
+++ b/graphics/kplot/files/patch-Makefile
@@ -0,0 +1,113 @@
+--- Makefile.orig 2022-07-03 06:07:22 UTC
++++ Makefile
+@@ -1,6 +1,6 @@
+ .SUFFIXES: .3 .3.html
+
+-CFLAGS = -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
++CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings -fPIC
+ #If you're on Mac OSX without XQuarts, you'll need /usr/X11 instead of /opt/X11!
+ CPPFLAGS = `pkg-config --cflags --silence-errors cairo || echo '-I/opt/X11/include/cairo'`
+ VERSION = 0.1.15
+@@ -165,13 +165,13 @@ MANS = man/kdata_array_alloc.3 \
+ man/kplot_get_plotcfg.3 \
+ man/kplotcfg_defaults.3
+
+-all: libkplot.a $(EXAMPLES)
++all: libkplot.so $(EXAMPLES)
+
+ install: all
+ mkdir -p $(DESTDIR)$(PREFIX)/lib
+ mkdir -p $(DESTDIR)$(PREFIX)/include
+ mkdir -p $(DESTDIR)$(PREFIX)/share/man/man3
+- install -m 0444 libkplot.a $(DESTDIR)$(PREFIX)/lib
++ install -m 0444 libkplot.so $(DESTDIR)$(PREFIX)/lib
+ install -m 0444 kplot.h $(DESTDIR)$(PREFIX)/include
+ install -m 0444 $(MANS) $(DESTDIR)$(PREFIX)/man/man3
+
+@@ -186,50 +186,50 @@ installwww: www
+ install -m 0444 kplot.tgz $(PREFIX)/snapshots
+ install -m 0444 kplot.tgz.sha512 $(PREFIX)/snapshots
+
+-$(EXAMPLES): libkplot.a
++$(EXAMPLES): libkplot.so
+
+-EXAMPLE_LIBS = libkplot.a $(LDADD) -lm
++EXAMPLE_LIBS = libkplot.so $(LDADD) -lm
+
+-example0: example0.c libkplot.a
++example0: example0.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example1: example1.c libkplot.a
++example1: example1.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example2: example2.c libkplot.a
++example2: example2.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example3: example3.c libkplot.a
++example3: example3.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example4: example4.c libkplot.a
++example4: example4.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example5: example5.c libkplot.a
++example5: example5.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example6: example6.c libkplot.a
++example6: example6.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example7: example7.c libkplot.a
++example7: example7.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example8: example8.c libkplot.a
++example8: example8.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example9: example9.c libkplot.a
++example9: example9.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example10: example10.c libkplot.a
++example10: example10.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example11: example11.c libkplot.a
++example11: example11.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example12: example12.c libkplot.a
++example12: example12.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+-example13: example13.c libkplot.a
++example13: example13.c libkplot.so
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(EXAMPLE_LIBS)
+
+ example0.png: example0
+@@ -274,8 +274,8 @@ example12.png: example12
+ example13.png: example13
+ ./example13
+
+-libkplot.a: $(OBJS)
+- $(AR) rs $@ $(OBJS)
++libkplot.so: $(OBJS)
++ $(CC) -shared -o $@ $(OBJS) -L$(PREFIX)/lib -lcairo
+
+ $(OBJS): kplot.h compat.h extern.h
+
+@@ -305,7 +305,7 @@ kplot.tgz:
+ rm -rf .dist
+
+ clean:
+- rm -f libkplot.a compat.h test-reallocarray
++ rm -f libkplot.so compat.h test-reallocarray
+ rm -f $(EXAMPLES)
+ rm -rf *.dSYM
+ rm -f $(OBJS)
diff --git a/graphics/kplot/pkg-descr b/graphics/kplot/pkg-descr
new file mode 100644
index 000000000000..5a3e38a2b59c
--- /dev/null
+++ b/graphics/kplot/pkg-descr
@@ -0,0 +1,3 @@
+kplot is an open source Cairo plotting library.
+
+WWW: https://kristaps.bsd.lv/kplot/
diff --git a/graphics/kplot/pkg-plist b/graphics/kplot/pkg-plist
new file mode 100644
index 000000000000..32631b748763
--- /dev/null
+++ b/graphics/kplot/pkg-plist
@@ -0,0 +1,37 @@
+include/kplot.h
+lib/libkplot.so
+man/man3/kdata_array_alloc.3.gz
+man/man3/kdata_array_fill.3.gz
+man/man3/kdata_bucket_add.3.gz
+man/man3/kdata_bucket_alloc.3.gz
+man/man3/kdata_buffer_alloc.3.gz
+man/man3/kdata_buffer_copy.3.gz
+man/man3/kdata_destroy.3.gz
+man/man3/kdata_get.3.gz
+man/man3/kdata_hist_add.3.gz
+man/man3/kdata_hist_alloc.3.gz
+man/man3/kdata_mean_alloc.3.gz
+man/man3/kdata_mean_attach.3.gz
+man/man3/kdata_pmfmean.3.gz
+man/man3/kdata_pmfstddev.3.gz
+man/man3/kdata_pmfvar.3.gz
+man/man3/kdata_stddev_alloc.3.gz
+man/man3/kdata_stddev_attach.3.gz
+man/man3/kdata_vector_alloc.3.gz
+man/man3/kdata_vector_append.3.gz
+man/man3/kdata_xmax.3.gz
+man/man3/kdata_xmean.3.gz
+man/man3/kdata_xmin.3.gz
+man/man3/kdata_xstddev.3.gz
+man/man3/kdatacfg_defaults.3.gz
+man/man3/kplot.3.gz
+man/man3/kplot_alloc.3.gz
+man/man3/kplot_attach_data.3.gz
+man/man3/kplot_attach_datas.3.gz
+man/man3/kplot_attach_smooth.3.gz
+man/man3/kplot_detach.3.gz
+man/man3/kplot_draw.3.gz
+man/man3/kplot_free.3.gz
+man/man3/kplot_get_datacfg.3.gz
+man/man3/kplot_get_plotcfg.3.gz
+man/man3/kplotcfg_defaults.3.gz