Index: x11/xinput_calibrator/Makefile =================================================================== --- x11/xinput_calibrator/Makefile +++ x11/xinput_calibrator/Makefile @@ -0,0 +1,43 @@ +# Created by: Vladimir Kondratyev +# $FreeBSD$ + +PORTNAME= xinput_calibrator +PORTVERSION= 0.7.5.g2014.02.14 +CATEGORIES= x11 + +MAINTAINER= wulf@FreeBSD.org +COMMENT= Generic touchscreen calibration program for X.Org + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/COPYING + +OPTIONS_SINGLE= GUI +OPTIONS_SINGLE_GUI= X11 GTK2 +OPTIONS_DEFAULT= X11 + +X11_CONFIGURE_ON= --with-gui=x11 +X11_USE= XORG=xrandr +GTK2_CONFIGURE_ON= --with-gui=gtkmm +GTK2_USE= GNOME=gtkmm24 + +USE_GITHUB= yes +GH_TUPLE= tias:${PORTNAME}:03dadf5 + +USES= localbase compiler:c++11-lib pkgconfig autoreconf libtool +USE_CXXSTD= c++11 +GNU_CONFIGURE= yes +USE_XORG= x11 xext xi inputproto + +post-patch: + @${REINPLACE_CMD} -e '/^bin_PROGRAMS =/s/tester//' \ + ${WRKSRC}/src/Makefile.am + @${REINPLACE_CMD} -e 's/config to ouput/config to output/' \ + ${WRKSRC}/man/xinput_calibrator.1 \ + ${WRKSRC}/src/main_common.cpp + @${REINPLACE_CMD} -e \ + '/touchscreen\.fdi/ s|\(/etc/hal\)|${LOCALBASE}\1| ; \ + /99-calibration\.conf/ s|\(/etc/X11\)|${LOCALBASE}\1|' \ + ${WRKSRC}/src/calibrator/Evdev.cpp \ + ${WRKSRC}/src/calibrator/XorgPrint.cpp + +.include Index: x11/xinput_calibrator/distinfo =================================================================== --- x11/xinput_calibrator/distinfo +++ x11/xinput_calibrator/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1497351988 +SHA256 (tias-xinput_calibrator-0.7.5.g2014.02.14-03dadf5_GH0.tar.gz) = 2d503a96461a4e419bc6fc1d41867df8944e3c9477a7139962b282a582a29a7b +SIZE (tias-xinput_calibrator-0.7.5.g2014.02.14-03dadf5_GH0.tar.gz) = 46556 Index: x11/xinput_calibrator/files/patch-src_calibrator.hh =================================================================== --- x11/xinput_calibrator/files/patch-src_calibrator.hh +++ x11/xinput_calibrator/files/patch-src_calibrator.hh @@ -0,0 +1,19 @@ +--- src/calibrator.hh.orig 2014-02-13 22:24:23 UTC ++++ src/calibrator.hh +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include // Place here as it is missed in many .cpp files + #include + + // XXX: we currently don't handle lines that are longer than this +@@ -127,7 +128,7 @@ enum OutputType { + + class WrongCalibratorException : public std::invalid_argument { + public: +- WrongCalibratorException(const std::string& msg = "") : ++ WrongCalibratorException(const char* msg = "") : + std::invalid_argument(msg) {} + }; + Index: x11/xinput_calibrator/files/patch-src_calibrator.cpp =================================================================== --- x11/xinput_calibrator/files/patch-src_calibrator.cpp +++ x11/xinput_calibrator/files/patch-src_calibrator.cpp @@ -0,0 +1,12 @@ +--- src/calibrator.cpp.orig 2014-02-13 22:24:23 UTC ++++ src/calibrator.cpp +@@ -196,7 +196,9 @@ bool Calibrator::finish(int width, int height) + + const char* Calibrator::get_sysfs_name() + { ++#ifdef __linux__ + if (is_sysfs_name(device_name)) ++#endif + return device_name; + + // TODO: more mechanisms Index: x11/xinput_calibrator/files/patch-src_main__common.cpp =================================================================== --- x11/xinput_calibrator/files/patch-src_main__common.cpp +++ x11/xinput_calibrator/files/patch-src_main__common.cpp @@ -0,0 +1,18 @@ +--- src/main_common.cpp.orig 2014-02-13 22:24:23 UTC ++++ src/main_common.cpp +@@ -388,6 +388,7 @@ Calibrator* Calibrator::make_calibrator(int argc, char + + + // Different device/driver, different ways to apply the calibration values ++#ifdef __linux__ + try { + // try Usbtouchscreen driver + return new CalibratorUsbtouchscreen(device_name, device_axys, +@@ -398,6 +399,7 @@ Calibrator* Calibrator::make_calibrator(int argc, char + if (verbose) + printf("DEBUG: Not usbtouchscreen calibrator: %s\n", x.what()); + } ++#endif + + try { + // next, try Evdev driver (with XID) Index: x11/xinput_calibrator/pkg-descr =================================================================== --- x11/xinput_calibrator/pkg-descr +++ x11/xinput_calibrator/pkg-descr @@ -0,0 +1,12 @@ +xinput_calibrator is a program for calibrating your touchscreen, when +using the X Window System. + +It currently features: +- Works for any standard Xorg touchscreen driver (uses XInput protocol). +- Mis-click detection (prevents bogus calibration). +- Dynamically recalibrates the evdev driver. +- Outputs the calibration as xorg.conf.d snippet or HAL policy file. + +It does not support libinput calibration (yet?). + +WWW: https://www.freedesktop.org/wiki/Software/xinput_calibrator/ Index: x11/xinput_calibrator/pkg-plist =================================================================== --- x11/xinput_calibrator/pkg-plist +++ x11/xinput_calibrator/pkg-plist @@ -0,0 +1,5 @@ +bin/xinput_calibrator +man/man1/xinput_calibrator.1.gz +share/applications/xinput_calibrator.desktop +share/pixmaps/xinput_calibrator.svg +share/pixmaps/xinput_calibrator.xpm