aboutsummaryrefslogtreecommitdiff
path: root/graphics/tslib
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/tslib')
-rw-r--r--graphics/tslib/Makefile20
-rw-r--r--graphics/tslib/distinfo3
-rw-r--r--graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc845
-rw-r--r--graphics/tslib/pkg-descr4
-rw-r--r--graphics/tslib/pkg-plist63
5 files changed, 135 insertions, 0 deletions
diff --git a/graphics/tslib/Makefile b/graphics/tslib/Makefile
new file mode 100644
index 000000000000..bd7baa0cd115
--- /dev/null
+++ b/graphics/tslib/Makefile
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+PORTNAME= tslib
+DISTVERSION= 1.21
+CATEGORIES= graphics
+
+MAINTAINER= adridg@FreeBSD.org
+COMMENT= Touchscreen access library
+
+LICENSE= LGPL21
+
+USES= cmake
+
+USE_GITHUB= yes
+GH_ACCOUNT= libts
+
+# - Waveshare requires Linux internals
+CMAKE_OFF= enable-waveshare
+
+.include <bsd.port.mk>
diff --git a/graphics/tslib/distinfo b/graphics/tslib/distinfo
new file mode 100644
index 000000000000..0b92a7d88fa6
--- /dev/null
+++ b/graphics/tslib/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1586901679
+SHA256 (libts-tslib-1.21_GH0.tar.gz) = 8b3df2af000aff5c1efcab40ba96d3a61859062e6630f6090b6994e6272e0d30
+SIZE (libts-tslib-1.21_GH0.tar.gz) = 228626
diff --git a/graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc8 b/graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc8
new file mode 100644
index 000000000000..861a580d841b
--- /dev/null
+++ b/graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc8
@@ -0,0 +1,45 @@
+diff --git tools/ts_uinput.c tools/ts_uinput.c
+index 9c40bb3..912ff72 100644
+--- tools/ts_uinput.c
++++ tools/ts_uinput.c
+@@ -1,6 +1,7 @@
+ /*
+ * (C) 2017 Ginzinger electronic systems GmbH, A-4952 Weng im Innkreis
+ *
++ * Adriaan de Groot <adridg@FreeBSD.org> 2020-04-15
+ * Martin Kepplinger <martin.kepplinger@ginzinger.com> 2016-09-14
+ * Melchior FRANZ <melchior.franz@ginzinger.com> 2015-09-30
+ *
+@@ -361,6 +362,23 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s,
+
+ static int get_abs_max_fb(struct data_t *data, int *max_x, int *max_y)
+ {
++#ifdef __FreeBSD__
++ struct fbtype fbinfo;
++
++ if (ioctl(data->fd_fb, FBIOGTYPE, &fbinfo) < 0) {
++ perror("ioctl FBIOGTYPE");
++ return errno;
++ }
++
++ if ((fbinfo.fb_width == 0) || (fbinfo.fb_height == 0)) {
++ /* Bogus w/h, guess something */
++ *max_x = 320 - 1;
++ *max_y = 240 - 1;
++ } else {
++ *max_x = fbinfo.fb_width - 1;
++ *max_y = fbinfo.fb_height - 1;
++ }
++#else
+ struct fb_var_screeninfo fbinfo;
+
+ if (ioctl(data->fd_fb, FBIOGET_VSCREENINFO, &fbinfo) < 0) {
+@@ -370,7 +388,7 @@ static int get_abs_max_fb(struct data_t *data, int *max_x, int *max_y)
+
+ *max_x = fbinfo.xres - 1;
+ *max_y = fbinfo.yres - 1;
+-
++#endif
+ return 0;
+ }
+
diff --git a/graphics/tslib/pkg-descr b/graphics/tslib/pkg-descr
new file mode 100644
index 000000000000..40e571b2a542
--- /dev/null
+++ b/graphics/tslib/pkg-descr
@@ -0,0 +1,4 @@
+tslib consists of the library *libts* and tools that help you
+calibrate and use it in your environment.
+
+WWW: http://www.tslib.org/
diff --git a/graphics/tslib/pkg-plist b/graphics/tslib/pkg-plist
new file mode 100644
index 000000000000..61d74160fd9e
--- /dev/null
+++ b/graphics/tslib/pkg-plist
@@ -0,0 +1,63 @@
+bin/ts_calibrate
+bin/ts_conf
+bin/ts_finddev
+bin/ts_harvest
+bin/ts_print
+bin/ts_print_mt
+bin/ts_print_raw
+bin/ts_test
+bin/ts_test_mt
+bin/ts_uinput
+etc/ts.conf
+include/tslib.h
+lib/cmake/tslib/tslibConfig.cmake
+lib/cmake/tslib/tslibConfigVersion.cmake
+lib/cmake/tslib/tslibTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/tslib/tslibTargets.cmake
+lib/libts.so
+lib/libts.so.0
+lib/libts.so.0.10.3
+lib/ts/debounce.so
+lib/ts/dejitter.so
+lib/ts/evthres.so
+lib/ts/iir.so
+lib/ts/input.so
+lib/ts/invert.so
+lib/ts/linear.so
+lib/ts/lowpass.so
+lib/ts/median.so
+lib/ts/pthres.so
+lib/ts/skip.so
+lib/ts/touchkit.so
+lib/ts/variance.so
+libdata/pkgconfig/tslib.pc
+man/man1/ts_calibrate.1.gz
+man/man1/ts_conf.1.gz
+man/man1/ts_finddev.1.gz
+man/man1/ts_harvest.1.gz
+man/man1/ts_print.1.gz
+man/man1/ts_print_mt.1.gz
+man/man1/ts_print_raw.1.gz
+man/man1/ts_test.1.gz
+man/man1/ts_test_mt.1.gz
+man/man1/ts_uinput.1.gz
+man/man1/ts_verify.1.gz
+man/man3/ts_close.3.gz
+man/man3/ts_close_restricted.3.gz
+man/man3/ts_conf_get.3.gz
+man/man3/ts_conf_set.3.gz
+man/man3/ts_config.3.gz
+man/man3/ts_error_fn.3.gz
+man/man3/ts_fd.3.gz
+man/man3/ts_get_eventpath.3.gz
+man/man3/ts_libversion.3.gz
+man/man3/ts_open.3.gz
+man/man3/ts_open_restricted.3.gz
+man/man3/ts_print_ascii_logo.3.gz
+man/man3/ts_read.3.gz
+man/man3/ts_read_mt.3.gz
+man/man3/ts_read_raw.3.gz
+man/man3/ts_read_raw_mt.3.gz
+man/man3/ts_setup.3.gz
+man/man3/tslib_version.3.gz
+man/man5/ts.conf.5.gz