From nobody Mon Mar 06 22:24:02 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PVtQp6402z3wT5M; Mon, 6 Mar 2023 22:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PVtQp4z5Yz3Kdp; Mon, 6 Mar 2023 22:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678141442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ux1catzMKIbdFJZHpG2xnTmhQqsXglkMQ0pSX58wlG4=; b=bXeLDXGPvMFTXjlmFJy1vYTvd2WcyBLzlmhaxF4P9X8f087loXhVRR6fywYeMzJ1ahlw5H 85eUZ70rpPLwjoGwG2bTCJj2kpYUa88yjoz5iBbUS798luaRYnMUmdrrYsWRBVSkBZvZCy Kvl2RQKHG3SNUddy/J2MVVY+RAWzDCPY05pbCJg+5aLUQFOLL9T4UWse9hOUn0oK8lg95y ycV3H8S6qha2nH/ZlBWrwO5V3EZLsReBIi4ojafG4RqLHSX5Yb6tXsKDP8Y/eaTG4KC9ZM 8Aftyq4ATX4voR1qGcYQ5StliQKOuBADvimX/B7mmYPuptQ4Udmr+RsAY9jT8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678141442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ux1catzMKIbdFJZHpG2xnTmhQqsXglkMQ0pSX58wlG4=; b=yBaw19KqZgm7QUBmnzijOrASTPa5b159zm/XtgIb8IrW0GnLflnQ/i2P29d0DQId+WJO19 w6cwXvL6kUzXL7gq4ll1gZlrURuEVV65FzDGMpodz524dHIheIcYkfXEavOjeYk4tpbVtA iuIixrgyy6l09SvIrU0kOikvIEKCyBSkOpuEz4UsnRNTO8Rnjw6SfTAur98PhmTkgSOm9c n55MNmUINQq9nNi6h0uisndyLXFX18It8rqUwaOjLsPeHBtKYQQYd+3C0sYktiRw0uSTdi SNZKHYRnZ+zjVpwPGX4FjL9ErWKswxNVkwaw99lSa3TAICKtSNCdubb/BzduDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678141442; a=rsa-sha256; cv=none; b=IdoicXjd8xcaqfseTHu/T1iK7W5yJNaA2lb7cUp8rTWmL1U1pxLYBb0l206nvif/3lyhUF wCOoG0qs/f2apG11rXHTzhWC/3q1UoKcQKqk2SI/gXnChmYPqH8l2Akb1it6Wdk74FyzSx e3F7RJv/HqmdFPtlwbuqiu84QSRS4nP1nePHblrkCFrfICVvwmqQcY0dWPLZyvzUgsyX0v 9/+erPv409T3X6vuCJ4LX7C8wHtS6bk7FEtz7PBB2ac826unrvdnoPZaLCWv8nVT/iBKx0 FRy7Dd3WAFOJkhcj2fdqDh7rrZZ+XbICjudIGq4N8EQum94I5Die8tJsWB0Yhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PVtQp3xB0zKc6; Mon, 6 Mar 2023 22:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 326MO2qS000250; Mon, 6 Mar 2023 22:24:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 326MO2gc000249; Mon, 6 Mar 2023 22:24:02 GMT (envelope-from git) Date: Mon, 6 Mar 2023 22:24:02 GMT Message-Id: <202303062224.326MO2gc000249@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 0b7b6fa1b00c - main - print/sioyek: new port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b7b6fa1b00c114d8a8674e4d1504de28f043fdd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=0b7b6fa1b00c114d8a8674e4d1504de28f043fdd commit 0b7b6fa1b00c114d8a8674e4d1504de28f043fdd Author: Robert Clausecker AuthorDate: 2023-03-04 14:09:18 +0000 Commit: Robert Clausecker CommitDate: 2023-03-06 22:23:43 +0000 print/sioyek: new port Sioyek is a PDF viewer with a focus on technical books and research papers. WWW: https://sioyek.info - unbundled mupdf and sqlite3 dependencies Requested by: reddit user /u/cargolax --- print/Makefile | 1 + print/sioyek/Makefile | 40 ++++++++++++++++++++++ print/sioyek/distinfo | 3 ++ .../files/patch-pdf__viewer__build__config.pro | 28 +++++++++++++++ print/sioyek/files/patch-pdf__viewer_main.cpp | 22 ++++++++++++ print/sioyek/files/patch-pdf__viewer_utils.cpp | 11 ++++++ print/sioyek/pkg-descr | 36 +++++++++++++++++++ print/sioyek/pkg-plist | 19 ++++++++++ 8 files changed, 160 insertions(+) diff --git a/print/Makefile b/print/Makefile index 7b3b608a4c7f..b20e01b15ae9 100644 --- a/print/Makefile +++ b/print/Makefile @@ -232,6 +232,7 @@ SUBDIR += sgf2tex SUBDIR += shrinkpdf SUBDIR += simple-fb2-reader + SUBDIR += sioyek SUBDIR += splix SUBDIR += system-config-printer SUBDIR += t1utils diff --git a/print/sioyek/Makefile b/print/sioyek/Makefile new file mode 100644 index 000000000000..7bf63885e131 --- /dev/null +++ b/print/sioyek/Makefile @@ -0,0 +1,40 @@ +PORTNAME= sioyek +DISTVERSIONPREFIX= v +DISTVERSION= 2.0.0 +CATEGORIES= print + +MAINTAINER= fuz@FreeBSD.org +COMMENT= PDF viewer with focus on technical books and research papers +WWW= https://sioyek.info + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libmupdf.so:graphics/mupdf \ + libharfbuzz.so:print/harfbuzz \ + libfreetype.so:print/freetype2 \ + libjbig2dec.so:graphics/jbig2dec \ + libmujs.so:lang/mujs \ + libopenjp2.so:graphics/openjpeg + +USES= desktop-file-utils jpeg gl qmake qt:5 sqlite +USE_GITHUB= yes +GH_ACCOUNT= ahrm +USE_GL= gl +USE_QT= 3d buildtools:build core gui network opengl widgets + +post-extract: +.for f in sqlite3.h sqlite3ext.h sqlite3.c shell.c + ${RM} ${WRKSRC}/pdf_viewer/$f +.endfor + +pre-configure: + ${REINPLACE_CMD} -e 's,%%ETCDIR%%,${ETCDIR},' \ + -e 's,%%DATADIR%%,${DATADIR},' ${WRKSRC}/pdf_viewer/main.cpp + +post-install: +.for f in keys prefs + ${MV} ${STAGEDIR}${ETCDIR}/$f.config ${STAGEDIR}${ETCDIR}/$f.config.sample +.endfor + +.include diff --git a/print/sioyek/distinfo b/print/sioyek/distinfo new file mode 100644 index 000000000000..74be77e7dd4f --- /dev/null +++ b/print/sioyek/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1677891935 +SHA256 (ahrm-sioyek-v2.0.0_GH0.tar.gz) = 92398b6da5e297c59f22cd3c6b562194846f28bc17bb4ae9432869aafeb5df17 +SIZE (ahrm-sioyek-v2.0.0_GH0.tar.gz) = 4900368 diff --git a/print/sioyek/files/patch-pdf__viewer__build__config.pro b/print/sioyek/files/patch-pdf__viewer__build__config.pro new file mode 100644 index 000000000000..c70267963043 --- /dev/null +++ b/print/sioyek/files/patch-pdf__viewer__build__config.pro @@ -0,0 +1,28 @@ +--- pdf_viewer_build_config.pro.orig 2022-12-16 16:06:01 UTC ++++ pdf_viewer_build_config.pro +@@ -28,8 +28,6 @@ HEADERS += pdf_viewer/book.h \ + pdf_viewer/checksum.h \ + pdf_viewer/new_file_checker.h \ + pdf_viewer/coordinates.h \ +- pdf_viewer/sqlite3.h \ +- pdf_viewer/sqlite3ext.h \ + pdf_viewer/ui.h \ + pdf_viewer/path.h \ + pdf_viewer/utf8.h \ +@@ -55,7 +53,6 @@ SOURCES += pdf_viewer/book.cpp \ + pdf_viewer/checksum.cpp \ + pdf_viewer/new_file_checker.cpp \ + pdf_viewer/coordinates.cpp \ +- pdf_viewer/sqlite3.c \ + pdf_viewer/ui.cpp \ + pdf_viewer/path.cpp \ + pdf_viewer/utils.cpp \ +@@ -82,7 +79,7 @@ unix:!mac { + } else { + DEFINES += NON_PORTABLE + DEFINES += LINUX_STANDARD_PATHS +- LIBS += -ldl -lmupdf -lmupdf-third -lgumbo -lharfbuzz -lfreetype -ljbig2dec -ljpeg -lmujs -lopenjp2 -lz ++ LIBS += -ldl -lmupdf -lmupdf-third -lharfbuzz -lfreetype -ljbig2dec -ljpeg -lmujs -lopenjp2 -lz -lsqlite3 + } + + isEmpty(PREFIX){ diff --git a/print/sioyek/files/patch-pdf__viewer_main.cpp b/print/sioyek/files/patch-pdf__viewer_main.cpp new file mode 100644 index 000000000000..2fb5adc397e4 --- /dev/null +++ b/print/sioyek/files/patch-pdf__viewer_main.cpp @@ -0,0 +1,22 @@ +--- pdf_viewer/main.cpp.orig 2023-03-04 14:34:21 UTC ++++ pdf_viewer/main.cpp +@@ -296,7 +296,7 @@ void configure_paths(){ + user_config_paths.push_back(mac_standard_config_path.slash(L"prefs_user.config")); + #endif + +-#ifdef Q_OS_LINUX ++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) + QStringList all_config_paths = QStandardPaths::standardLocations(QStandardPaths::AppConfigLocation); + for (int i = all_config_paths.size()-1; i >= 0; i--) { + user_config_paths.push_back(Path(all_config_paths.at(i).toStdWString()).slash(L"prefs_user.config")); +@@ -306,8 +306,8 @@ void configure_paths(){ + #ifdef LINUX_STANDARD_PATHS + Path home_path(QDir::homePath().toStdWString()); + Path standard_data_path = home_path.slash(L".local").slash(L"share").slash(L"sioyek"); +- Path standard_config_path = Path(L"/etc/sioyek"); +- Path read_only_data_path = Path(L"/usr/share/sioyek"); ++ Path standard_config_path = Path(L"%%ETCDIR%%"); ++ Path read_only_data_path = Path(L"%%DATADIR%%"); + standard_data_path.create_directories(); + + default_config_path = standard_config_path.slash(L"prefs.config"); diff --git a/print/sioyek/files/patch-pdf__viewer_utils.cpp b/print/sioyek/files/patch-pdf__viewer_utils.cpp new file mode 100644 index 000000000000..f5214ad89f03 --- /dev/null +++ b/print/sioyek/files/patch-pdf__viewer_utils.cpp @@ -0,0 +1,11 @@ +--- pdf_viewer/utils.cpp.orig 2023-03-04 13:46:24 UTC ++++ pdf_viewer/utils.cpp +@@ -1194,7 +1194,7 @@ void sleep_ms(unsigned int ms) { + #ifdef Q_OS_WIN + Sleep(ms); + #else +- struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; ++ struct timespec ts = { static_cast(ms / 1000), static_cast((ms % 1000) * 1000 * 1000) }; + nanosleep(&ts, NULL); + #endif + } diff --git a/print/sioyek/pkg-descr b/print/sioyek/pkg-descr new file mode 100644 index 000000000000..97cdabd10541 --- /dev/null +++ b/print/sioyek/pkg-descr @@ -0,0 +1,36 @@ +Sioyek is a PDF viewer with a focus on technical books and research papers. + +Searchable + Quickly search your previously opened documents, table of + contents, bookmarks, and highlights. Sioyek can even generate + the table of contents if the document doesn't have one! + +Smart Jump + You can preview or jump to references (e.g. bibliography, figures, + equations, etc.) even when the document doesn't have links. You + can also search references in google scholar with one click! + +Portals + You can create portals from parts of documents to other parts + displayed in a second window. So when you are reading a paragraph + that is talking about a figure, table, algorithm, theorem, etc. + you don't have to keep jumping between the two locations. + +Marks and Bookmarks + Mark locations with one-character symbols and then quickly jump + back to them. You can also create bookmarks which are like marks, + but use a descriptive text instead of a symbol and can be searched. + +Keyboard Focused + While sioyek fully supports many mouse actions, it is still + possible to use sioyek only using a keyboard. This includes + functionality such as text selection too! + +Synctex + Sioyek autoreloads the document so you can preview the changes + as you edit the latex file. You can also jump between the + corresponding locations in PDF and latex files with one click. + +Other features include configurability, extensibility with external +commands and scripts, text highlighting, a discoverable command palette, +and a visual ruler highlighting the current line. diff --git a/print/sioyek/pkg-plist b/print/sioyek/pkg-plist new file mode 100644 index 000000000000..405d13c1b80c --- /dev/null +++ b/print/sioyek/pkg-plist @@ -0,0 +1,19 @@ +bin/sioyek +@sample %%ETCDIR%%/keys.config.sample +@sample %%ETCDIR%%/prefs.config.sample +share/applications/sioyek.desktop +share/pixmaps/sioyek-icon-linux.png +%%DATADIR%%/shaders/custom_colors.fragment +%%DATADIR%%/shaders/dark_mode.fragment +%%DATADIR%%/shaders/debug.fragment +%%DATADIR%%/shaders/highlight.fragment +%%DATADIR%%/shaders/separator.fragment +%%DATADIR%%/shaders/simple.fragment +%%DATADIR%%/shaders/simple.vertex +%%DATADIR%%/shaders/stencil.fragment +%%DATADIR%%/shaders/stencil.vertex +%%DATADIR%%/shaders/undendered_page.fragment +%%DATADIR%%/shaders/unrendered_page.fragment +%%DATADIR%%/shaders/vertical_bar.fragment +%%DATADIR%%/shaders/vertical_bar_dark.fragment +%%DATADIR%%/tutorial.pdf