pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xournalpp-git: import xournalpp (git snapshot) as wip/xournalpp-git



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Sun Sep 29 11:37:14 2019 +0200
Changeset:	7a839d7ec46ded6ad17266591dc339d284b7a4ee

Modified Files:
	Makefile
Added Files:
	xournalpp-git/DESCR
	xournalpp-git/Makefile
	xournalpp-git/PLIST
	xournalpp-git/distinfo
	xournalpp-git/patches/patch-src_control_tools_StrokeHandler.cpp
	xournalpp-git/patches/patch-src_util_DeviceListHelper.cpp

Log Message:
xournalpp-git: import xournalpp (git snapshot)  as wip/xournalpp-git

Xournal++ is a handwriting notetaking software with PDF annotation
support. Written in C++ with GTK3, supporting Linux (e.g. Ubuntu,
Debian, Arch, Suse), macOS and Windows 10. Supports pen input from
devices such as Wacom Tablets.

pkgsrc changes:

 * the input system has been patched to list all input devices
   (otherwise some are missing - this is somehow related to gdk
   but I am not sure whether the problem is with xournalpp or gdk),

 * the curves are smoothed for NetBSD and OpenBSD which report
   absolute X and Y coordinates separately which leads to "steps"
   when drawing quickly.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7a839d7ec46ded6ad17266591dc339d284b7a4ee

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |   1 +
 xournalpp-git/DESCR                                |   4 +
 xournalpp-git/Makefile                             |  34 ++++++
 xournalpp-git/PLIST                                | 124 +++++++++++++++++++++
 xournalpp-git/distinfo                             |   8 ++
 .../patch-src_control_tools_StrokeHandler.cpp      |  46 ++++++++
 .../patches/patch-src_util_DeviceListHelper.cpp    |  17 +++
 7 files changed, 234 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index c683b72c01..58e786bf04 100644
--- a/Makefile
+++ b/Makefile
@@ -5052,6 +5052,7 @@ SUBDIR+=	xoreos-tools
 SUBDIR+=	xorgxrdp
 SUBDIR+=	xosview
 SUBDIR+=	xournalpp
+SUBDIR+=	xournalpp-git
 SUBDIR+=	xpde
 SUBDIR+=	xpdq
 SUBDIR+=	xpi-quick_locale_switcher
diff --git a/xournalpp-git/DESCR b/xournalpp-git/DESCR
new file mode 100644
index 0000000000..b99f7b7ec3
--- /dev/null
+++ b/xournalpp-git/DESCR
@@ -0,0 +1,4 @@
+Xournal++ is a handwriting notetaking software with PDF annotation
+support. Written in C++ with GTK3, supporting Linux (e.g. Ubuntu,
+Debian, Arch, Suse), macOS and Windows 10. Supports pen input from
+devices such as Wacom Tablets.
diff --git a/xournalpp-git/Makefile b/xournalpp-git/Makefile
new file mode 100644
index 0000000000..029c7c97c2
--- /dev/null
+++ b/xournalpp-git/Makefile
@@ -0,0 +1,34 @@
+# $NetBSD$
+
+DISTNAME=	xournalpp-0.0
+CATEGORIES=	editors
+MASTER_SITES=	${MASTER_SITE_GITHUB:=xournalpp/}
+DIST_SUBDIR=	${GITHUB_PROJECT}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/xournalpp/xournalpp/
+COMMENT=	Handwriting notetaking software with PDF annotation support
+LICENSE=	gnu-gpl-v2
+
+GIT_REPOSITORIES=	xournalpp
+#GIT_BRANCH.xournalpp=	master
+GIT_REPO.xournalpp=	git://github.com/xournalpp/xournalpp.git
+WRKSRC=			${WRKDIR}/xournalpp
+
+USE_CMAKE=	yes
+USE_LANGUAGES=	c c++
+
+DEPENDS+=	tex-amsfonts-[0-9]*:../../fonts/tex-amsfonts
+DEPENDS+=	tex-amsmath-[0-9]*:../../print/tex-amsmath
+DEPENDS+=	tex-latex-[0-9]*:../../print/tex-latex
+DEPENDS+=	tex-latex-bin-[0-9]*:../../print/tex-latex-bin
+DEPENDS+=	tex-standalone-[0-9]*:../../print/tex-standalone
+
+.include "../../archivers/libzip/buildlink3.mk"
+.include "../../audio/libsndfile/buildlink3.mk"
+.include "../../audio/portaudio-devel/buildlink3.mk"
+.include "../../print/poppler-glib/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/xournalpp-git/PLIST b/xournalpp-git/PLIST
new file mode 100644
index 0000000000..481e7ee0eb
--- /dev/null
+++ b/xournalpp-git/PLIST
@@ -0,0 +1,124 @@
+@comment $NetBSD$
+bin/xournal-thumbnailer
+bin/xournalpp
+share/locale/cs/LC_MESSAGES/xournalpp.mo
+share/locale/de/LC_MESSAGES/xournalpp.mo
+share/locale/es_ES/LC_MESSAGES/xournalpp.mo
+share/locale/fi_FI/LC_MESSAGES/xournalpp.mo
+share/locale/fr_FR/LC_MESSAGES/xournalpp.mo
+share/locale/hr_HR/LC_MESSAGES/xournalpp.mo
+share/locale/it/LC_MESSAGES/xournalpp.mo
+share/locale/nl_NL/LC_MESSAGES/xournalpp.mo
+share/locale/pl/LC_MESSAGES/xournalpp.mo
+share/locale/ru_RU/LC_MESSAGES/xournalpp.mo
+share/locale/tlh_AA/LC_MESSAGES/xournalpp.mo
+share/locale/zh/LC_MESSAGES/xournalpp.mo
+share/locale/zh_HK/LC_MESSAGES/xournalpp.mo
+share/locale/zh_TW/LC_MESSAGES/xournalpp.mo
+share/xournalpp/plugins/Example/main.lua
+share/xournalpp/plugins/Example/plugin.ini
+share/xournalpp/plugins/Example/var_dump.lua
+share/xournalpp/plugins/ToggleGrid/plugin.ini
+share/xournalpp/plugins/ToggleGrid/togglegrid.lua
+share/xournalpp/ui/about.glade
+share/xournalpp/ui/exportSettings.glade
+share/xournalpp/ui/fillTransparency.glade
+share/xournalpp/ui/goto.glade
+share/xournalpp/ui/icons/hicolor/24x24/actions/pageSpinner.png
+share/xournalpp/ui/icons/hicolor/icon-theme.cache
+share/xournalpp/ui/icons/hicolor/index.theme
+share/xournalpp/ui/icons/hicolor/scalable/actions/addPage.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/arrow-draw.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/audio-playback-pause.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/audio-playback-stop.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/audio-record.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/centerPage.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/circle-draw.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/coordinate-system-draw.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/customize_toolbars.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/default.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/delPage.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/fill.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/floating_toolbox.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/fullscreen.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/goto.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/grid_snapping.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/hand.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/lasso.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/layer.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/line-style-dash-dot.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/line-style-dash.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/line-style-dot.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/line-style-plain.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/manage_toolbars.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/nextAnnotatedPage.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/object-play.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/object-select.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/presentation-mode.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/rect-draw.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/rect-select.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/ruler.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/shape_recognizer.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/showpairedpages.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/sidebar-page-preview.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/sidebar_bookmarks.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/sidebar_index.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/snapping.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/stretch.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/thickness_medium.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/thickness_thick.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/tool_camera.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/tool_eraser.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/tool_highlighter.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/tool_image.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/tool_math_tex.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/tool_pencil.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/tool_text.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/transparent.svg
+share/xournalpp/ui/icons/hicolor/update-icon-cache.sh
+share/xournalpp/ui/iconsDark/hicolor/icon-theme.cache
+share/xournalpp/ui/iconsDark/hicolor/index.theme
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/arrow-draw.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/audio-playback-pause.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/audio-playback-stop.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/circle-draw.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/coordinate-system-draw.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/fill.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/grid_snapping.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/rect-draw.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/ruler.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/shape_recognizer.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/snapping.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/thickness_medium.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/thickness_thick.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/thickness_thin.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/thickness_fine.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/thickness_very_fine.svg
+share/xournalpp/ui/icons/hicolor/scalable/actions/thickness_very_thick.svg
+share/xournalpp/ui/iconsDark/hicolor/scalable/actions/tool_text.svg
+share/xournalpp/ui/iconsDark/hicolor/update-icon-cache.sh
+share/xournalpp/ui/images.glade
+share/xournalpp/ui/main.glade
+share/xournalpp/ui/pageTemplate.glade
+share/xournalpp/ui/pagesize.glade
+share/xournalpp/ui/pagetemplates.ini
+share/xournalpp/ui/pdfpages.glade
+share/xournalpp/ui/pixmaps/application-x-xojpp.svg
+share/xournalpp/ui/pixmaps/application-x-xopp.svg
+share/xournalpp/ui/pixmaps/application-x-xopt.svg
+share/xournalpp/ui/pixmaps/com.github.xournalpp.xournalpp.png
+share/xournalpp/ui/pixmaps/com.github.xournalpp.xournalpp.svg
+share/xournalpp/ui/pixmaps/default.svg
+share/xournalpp/ui/pixmaps/gnome-mime-application-x-xopp.svg
+share/xournalpp/ui/pixmaps/gnome-mime-application-x-xopt.svg
+share/xournalpp/ui/pixmaps/xopt.svg
+share/xournalpp/ui/plugin.glade
+share/xournalpp/ui/pluginEntry.glade
+share/xournalpp/ui/settings.glade
+share/xournalpp/ui/settingsButtonConfig.glade
+share/xournalpp/ui/settingsDeviceClassConfig.glade
+share/xournalpp/ui/texdialog.glade
+share/xournalpp/ui/toolbar.ini
+share/xournalpp/ui/toolbarCustomizeDialog.glade
+share/xournalpp/ui/toolbarManageDialog.glade
+share/xournalpp/ui/xournalpp.css
diff --git a/xournalpp-git/distinfo b/xournalpp-git/distinfo
new file mode 100644
index 0000000000..c8759bdc7d
--- /dev/null
+++ b/xournalpp-git/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (xournalpp/1.0.12.tar.gz) = 9df25b6a9d8403d0667a17b9145c7a6c325bf2da
+RMD160 (xournalpp/1.0.12.tar.gz) = a446f30fc7c9556d6d1e163f06189f7009d8e267
+SHA512 (xournalpp/1.0.12.tar.gz) = 6831da57c715bf70676fdd515f55475c72fb7b2e418157c2d110383bd7a5f37db1961b1b87b2af3a62f0d46f99310d499c113f3480025c6fa47ecec8a3153112
+Size (xournalpp/1.0.12.tar.gz) = 14694286 bytes
+SHA1 (patch-src_control_tools_StrokeHandler.cpp) = 80df57a9776a9919a95a04bf6c057dc021fc789e
+SHA1 (patch-src_util_DeviceListHelper.cpp) = 8f3534c80c79ec49dd9562c3ed4e3ff7c36b2ecb
diff --git a/xournalpp-git/patches/patch-src_control_tools_StrokeHandler.cpp b/xournalpp-git/patches/patch-src_control_tools_StrokeHandler.cpp
new file mode 100644
index 0000000000..a295967764
--- /dev/null
+++ b/xournalpp-git/patches/patch-src_control_tools_StrokeHandler.cpp
@@ -0,0 +1,46 @@
+$NetBSD$
+
+On NetBSD, absolute coordinate changes are reported as an X value followed by a Y value,
+which (when moving quickly) leads to a "stepping" effect. Using a Bezier curve fitting
+for the points yields a smooth curve in most cases, and does not seem to adversely affect
+the user experience (even with a conventional mouse).
+
+--- ./src/control/tools/StrokeHandler.cpp.orig	2019-09-10 05:47:36.000000000 +0000
++++ ./src/control/tools/StrokeHandler.cpp
+@@ -115,9 +115,36 @@ bool StrokeHandler::onMotionNotifyEvent(
+ 	}
+ 	else
+ 	{
++#if defined(__NetBSD__) || defined(__OpenBSD__)
++		if (pointCount > 1)
++#else
+ 		if (pointCount > 0)
++#endif
+ 		{
+ 			Point prevPoint(stroke->getPoint(pointCount - 1));
++#if defined(__NetBSD__) || defined(__OpenBSD__)
++			double length, prevLength, t, x, y;
++			Point pprevPoint(stroke->getPoint(pointCount - 2));
++
++			// treat this point as an end point
++			// treat the previous point as a control point and recalculate the "actual" point
++			prevLength = prevPoint.lineLengthTo(pprevPoint);
++			length = prevLength + currentPoint.lineLengthTo(prevPoint);
++			if (length != 0)
++			{
++				t = prevLength/length;
++				// Bezier curve fitting
++				x = (1-t)*(1-t)*pprevPoint.x + 2*t*(1-t)*prevPoint.x + t*t*currentPoint.x;
++				y = (1-t)*(1-t)*pprevPoint.y + 2*t*(1-t)*prevPoint.y + t*t*currentPoint.y;
++				
++				prevPoint = Point(x,y,prevPoint.z);
++				stroke->deletePointsFrom(pointCount-1);
++				stroke->addPoint(prevPoint);
++				stroke->addPoint(currentPoint);
++				currentPoint = prevPoint;
++				prevPoint = pprevPoint;
++			}
++#endif
+ 
+ 			Stroke lastSegment;
+ 
diff --git a/xournalpp-git/patches/patch-src_util_DeviceListHelper.cpp b/xournalpp-git/patches/patch-src_util_DeviceListHelper.cpp
new file mode 100644
index 0000000000..5d4decf4db
--- /dev/null
+++ b/xournalpp-git/patches/patch-src_util_DeviceListHelper.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+This check seems to skip devices that are reasonable to include (on NetBSD), so rather
+list all devices and let the user manage them.
+
+--- src/util/DeviceListHelper.cpp.orig	2019-08-13 08:34:36.000000000 +0000
++++ src/util/DeviceListHelper.cpp
+@@ -31,7 +31,8 @@ void addDevicesToList(std::vector<InputD
+ 			devList = devList->next;
+ 			continue;
+ 		}
+-		if (gdk_device_get_vendor_id(dev) == nullptr && gdk_device_get_product_id(dev) == nullptr)
++		// if (gdk_device_get_vendor_id(dev) == nullptr && gdk_device_get_product_id(dev) == nullptr)
++		if (gdk_device_get_device_type(dev) == GDK_DEVICE_TYPE_MASTER)
+ 		{
+ 			// Skip core pointer
+ 			devList = devList->next;


Home | Main Index | Thread Index | Old Index